Skip to content

Instantly share code, notes, and snippets.

View sheilatron's full-sized avatar

Sheila Allen sheilatron

View GitHub Profile
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/config/.vim/bundle/Vundle.vim
call vundle#begin()
" let Vundle manage Vundle, required
Plugin 'gmarik/Vundle.vim'
Plugin 'tpope/vim-fugitive'
"Plugin 'andviro/flake8-vim'
@sheilatron
sheilatron / SA_hang_on_autoflush
Created August 18, 2015 09:40
While running SA tests against mxODBC 3.3.4, unixODBC 2.3.2, Microsoft ODBC for Linux (Fedora 22)
test/orm/test_session.py::SessionStateTest::test_autocommit_doesnt_raise_on_pending PASSED
test/orm/test_session.py::SessionStateTest::test_autoflush ^CTraceback (most recent call last):
File "/usr/lib64/python2.7/logging/__init__.py", line 880, in emit
stream.write(fs % msg)
File "/home/sallen/env/testmx334d2/lib/python2.7/site-packages/_pytest/capture.py", line 229, in write
self.buffer.write(obj)
ValueError: I/O operation on closed file
Logged from file pool.py, line 608
DEBUG:sqlalchemy.pool.QueuePool:Created new connection <mx.ODBC.unixODBC connection object at 0x7ff9c0d122f0>
Traceback (most recent call last):
@sheilatron
sheilatron / sa_mxodbc334test1.txt
Created August 13, 2015 10:02
SQLAlchemy tests (master branch 8/12/2015), mxODBC 3.3.4, unixODBC 2.3.3, Microsoft ODBC for Linux on Fedora21
(testmx334d2)[sallen@localhost sqlalchemy]$ py.test --db=msodbc
=============================================================================================== test session starts ===============================================================================================
platform linux2 -- Python 2.7.10 -- py-1.4.30 -- pytest-2.7.2 -- /home/sallen/env/testmx334d2/bin/python
rootdir: /home/sallen/env/testmx334d2/sqlalchemy, inifile: setup.cfg
collected 7224 items
test/aaa_profiling/test_compiler.py::CompileTest_mssql_mxodbc::test_insert <- lib/sqlalchemy/testing/profiling.py SKIPPED
test/aaa_profiling/test_compiler.py::CompileTest_mssql_mxodbc::test_select SKIPPED
test/aaa_profiling/test_compiler.py::CompileTest_mssql_mxodbc::test_select_labels SKIPPED
@sheilatron
sheilatron / gist:4e52f3508425569336ad
Created August 13, 2015 08:53
wheel error pip install egenix-mxodbc
I've seen this on both Linux & Windows while using pip install as well as upgrade (-U option).
The installation works for my virtualenv, but there is a build error for creating wheels.
(zopish) C:\Users\sallen\env\zopish\Lib>pip install -U egenix-mxodbc
Collecting egenix-mxodbc
Downloading egenix-mxodbc-3.3.4.zip (78kB)
100% |################################| 81kB 1.6MB/s
Requirement already up-to-date: egenix-mx-base in c:\users\sallen\env\zopish\lib\site-packages (from egenix-mxodbc)
Building wheels for collected packages: egenix-mxodbc
Running setup.py bdist_wheel for egenix-mxodbc
@sheilatron
sheilatron / test_mssql_concat_isnull
Last active August 29, 2015 14:24
test for isnull FunctionElement with concatenation
from sqlalchemy import select, Boolean, String
from sqlalchemy.sql.expression import FunctionElement
from sqlalchemy.ext.compiler import compiles
from sqlalchemy.sql import column
from sqlalchemy.testing import fixtures, AssertsCompiledSQL
from sqlalchemy.sql.functions import ReturnTypeFromArgs
@sheilatron
sheilatron / python_popen_python.py
Created March 21, 2012 14:13
Python function to create child Python processes inheriting sys.paths
def spawn_python_script(package_name, script_name, *args):
"""
Run the module ``script_name`` as an external Python script,
using the same Python executable as the current process,
with the same Python paths. This needs to support both
virtualenv and buildout Python executables.
Example:
popen = run_as_script('zetl.scripts','start_conductor.py')
@sheilatron
sheilatron / gist:1240116
Created September 25, 2011 02:02
No module named redirect.middleware
Traceback (most recent call last):
File "/home/pytexas/.virtualenv/pytexas/lib/python2.6/site-packages/django/core/servers/basehttp.py", line 283, in run
self.result = application(self.environ, self.start_response)
File "/home/pytexas/.virtualenv/pytexas/lib/python2.6/site-packages/staticfiles/handlers.py", line 66, in __call__
return self.application(environ, start_response)
File "/home/pytexas/.virtualenv/pytexas/lib/python2.6/site-packages/django/core/handlers/wsgi.py", line 250, in __call__
self.load_middleware()
@sheilatron
sheilatron / gist:1227656
Created September 19, 2011 21:25
multiprocess pickling error
Traceback (most recent call last):
File "c:\zeomega\env\etl\src\jiva.etl\jiva\etl\jobs\base.py", line 142, in process
conductor.conduct_pipeline()
File "c:\zeomega\env\etl\src\jiva.etl\jiva\etl\multiprocess\conductor.py", line 113, in conduct_pipeline
self.pipeline.start()
File "c:\zeomega\env\etl\src\jiva.etl\jiva\etl\multiprocess\__init__.py", line 234, in start
process.start()
File "c:\zeomega\env\etl\src\jiva.etl\jiva\etl\multiprocess\__init__.py", line 302, in start
process.start()
File "c:\Python26\lib\multiprocessing\process.py", line 104, in start