Merge lp://staging/~bellini666/storm/py3 into lp://staging/storm
Proposed by
Thiago Bellini
Status: | Merged | ||||
---|---|---|---|---|---|
Merge reported by: | Colin Watson | ||||
Merged at revision: | not available | ||||
Proposed branch: | lp://staging/~bellini666/storm/py3 | ||||
Merge into: | lp://staging/storm | ||||
Diff against target: |
3359 lines (+481/-675) 57 files modified
ez_setup.py (+0/-284) setup.py (+20/-36) storm/__init__.py (+3/-1) storm/base.py (+3/-2) storm/cache.py (+3/-2) storm/cextensions.c (+61/-83) storm/database.py (+11/-6) storm/databases/__init__.py (+2/-1) storm/databases/mysql.py (+2/-1) storm/databases/postgres.py (+6/-4) storm/databases/sqlite.py (+7/-4) storm/event.py (+1/-0) storm/exceptions.py (+20/-10) storm/expr.py (+23/-17) storm/info.py (+8/-3) storm/properties.py (+5/-3) storm/references.py (+11/-5) storm/schema/patch.py (+6/-5) storm/schema/schema.py (+4/-2) storm/schema/sharding.py (+2/-1) storm/sqlobject.py (+18/-14) storm/store.py (+8/-6) storm/tracer.py (+3/-1) storm/twisted/testing.py (+1/-0) storm/twisted/transact.py (+2/-1) storm/tz.py (+41/-48) storm/uri.py (+7/-2) storm/variables.py (+27/-21) storm/xid.py (+1/-0) storm/zope/schema.py (+1/-0) storm/zope/testing.py (+1/-1) storm/zope/zstorm.py (+3/-1) tests/cache.py (+6/-3) tests/database.py (+3/-0) tests/databases/base.py (+17/-13) tests/databases/postgres.py (+6/-4) tests/databases/proxy.py (+7/-5) tests/databases/sqlite.py (+3/-2) tests/event.py (+1/-0) tests/expr.py (+10/-7) tests/helper.py (+5/-1) tests/info.py (+4/-2) tests/mocker.py (+28/-20) tests/properties.py (+4/-2) tests/schema/patch.py (+6/-4) tests/schema/schema.py (+2/-3) tests/schema/sharding.py (+3/-1) tests/sqlobject.py (+3/-2) tests/store/base.py (+26/-21) tests/store/postgres.py (+1/-0) tests/tracer.py (+4/-2) tests/uri.py (+1/-0) tests/variables.py (+18/-14) tests/wsgi.py (+5/-2) tests/zope/adapters.py (+1/-0) tests/zope/testing.py (+2/-1) tests/zope/zstorm.py (+4/-1) |
||||
To merge this branch: | bzr merge lp://staging/~bellini666/storm/py3 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Stuart Bishop (community) | Needs Fixing | ||
Review via email: mp+325182@code.staging.launchpad.net |
Commit message
Make storm work with python2 and python3 using futurize and six.
Description of the change
Make storm work with python2 and python3 using futurize and six.
This branch has been tested with stoq <https:/
To post a comment you must log in.
A critical part of landing this on trunk is a test suite working under both python2.7 and python3. I haven't succeeded here (using a fresh Xenial container).
The mechanical python2->python3 bits seem fine.
I'm in no way qualified to review storm/cextensions.c , so will be relying on the tests here unless I can get some alternative eyeballs to have a look.
I'm unsure about the changes from explicit large ints to plain ints (1L -> 1). I haven't looked closely into what the tests that needed this change were actually testing, and how this change can be valid under both py2 and py3.
I've setup a clean Xenial container, and setup a dev environment to run the test suite (we can only land this if the tests pass under both python2 and python3).
dev/ubuntu-deps needs updating (or an alternative mechanism for getting developer dependencies. Add these packages: python-future python3-future python-dev python3-dev python3-mysqldb python3-fixtures python3-psycopg2 python3- testresources python3-transaction python3-twisted python3- zope.component python3- zope.security python3-setuptools
'make check' uses the default python2, and is running 0 tests. Something has broken with test discovery, and this needs to be fixed.
'make check PYTHON=python3' uses python3, and is failing to build:
$ make check PYTHON=python3 info/dependency _links. txt info/top_ level.txt info/PKG- INFO egg-info/ SOURCES. txt' egg-info/ SOURCES. txt' linux-x86_ 64-3.5/ storm/cextensio ns.cpython- 35m-x86_ 64-linux- gnu.so -> storm "storm. cextensions" , ["storm/ cextensions. c"])]) python3. 5/distutils/ core.py" , line 148, in setup run_commands( ) python3. 5/distutils/ dist.py" , line 955, in run_commands run_command( cmd) python3. 5/distutils/ dist.py" , line 974, in run_command python3/ dist-packages/ setuptools/ command/ test.py" , line 159, in run with_project_ on_sys_ path(self. run_tests) python3/ dist-packages/ setuptools/ command/ test.py" , line 140, in with_project_ on_sys_ path python3/ dist-packages/ setuptools/ command/ test.py" , line 180, in run_tests self._resolve_ as_ep(self. test_runner) , python3. 5/unittest/ main.py" , line 93, in __init__ parseArgs( argv) python3. 5/unittest/ main.py" , line 123, in parseArgs _do_discovery( []) python3. 5/unittest/ main.py" , line 228, in _do_discovery discover( self.start, self.pattern, self.top) python3. 5/unittest/ loader. py", line 341, in discover _find_tests( start_dir, pattern)) python3. 5/unittest/ loader. py", line 398, in _find_tests
STORM_CEXTENSIONS=0 python3 setup.py test
running test
running egg_info
writing dependency_links to storm.egg-
writing top-level names to storm.egg-
writing storm.egg-
reading manifest file 'storm.
reading manifest template 'MANIFEST.in'
warning: no files found matching 'ez_setup.py'
writing manifest file 'storm.
running build_ext
copying build/lib.
Traceback (most recent call last):
File "setup.py", line 57, in <module>
[Extension(
File "/usr/lib/
dist.
File "/usr/lib/
self.
File "/usr/lib/
cmd_obj.run()
File "/usr/lib/
self.
File "/usr/lib/
func()
File "/usr/lib/
testRunner=
File "/usr/lib/
self.
File "/usr/lib/
self.
File "/usr/lib/
self.test = loader.
File "/usr/lib/
tests = list(self.
File "/usr/lib/
full_pa...