jazzband / geojson

Python bindings and utilities for GeoJSON
https://pypi.python.org/pypi/geojson/
BSD 3-Clause "New" or "Revised" License
908 stars 120 forks source link

Enable testing for Python 3.4 on TravisCI #27

Closed frewsxcv closed 10 years ago

petrrr commented 10 years ago

I just was trying to enable geojson also for Python 3.4 when porting this to Macports, but realize that testing fails specifically for this. From the traceback, this might be an issue with testing only.

So what is the status regarding Python 3.4 compatibility? Is it working, just testing missing? Or are there issues with geojson as well?

Below the trace back:

running test
running egg_info
writing dependency_links to geojson.egg-info/dependency_links.txt
writing requirements to geojson.egg-info/requires.txt
writing geojson.egg-info/PKG-INFO
writing top-level names to geojson.egg-info/top_level.txt
reading manifest file 'geojson.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'geojson.egg-info/SOURCES.txt'
running build_ext
/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/nose/config.py:262: RuntimeWarning: Option 'with-coverage' in config file 'setup.cfg' ignored: excluded by runtime environment
  warn(msg, RuntimeWarning)
/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/nose/config.py:262: RuntimeWarning: Option 'cover-package' in config file 'setup.cfg' ignored: excluded by runtime environment
  warn(msg, RuntimeWarning)
/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/nose/config.py:262: RuntimeWarning: Option 'cover-erase' in config file 'setup.cfg' ignored: excluded by runtime environment
  warn(msg, RuntimeWarning)
/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/nose/config.py:262: RuntimeWarning: Option 'with-doctest' in config file 'setup.cfg' ignored: excluded by runtime environment
  warn(msg, RuntimeWarning)
/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/nose/config.py:262: RuntimeWarning: Option 'doctest-extension' in config file 'setup.cfg' ignored: excluded by runtime environment
  warn(msg, RuntimeWarning)
Traceback (most recent call last):
  File "setup.py", line 44, in <module>
    "Topic :: Scientific/Engineering :: GIS",
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/distutils/core.py", line 149, in setup
    dist.run_commands()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/distutils/dist.py", line 955, in run_commands
    self.run_command(cmd)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/setuptools/command/test.py", line 135, in run
    self.with_project_on_sys_path(self.run_tests)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/setuptools/command/test.py", line 116, in with_project_on_sys_path
    func()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/setuptools/command/test.py", line 160, in run_tests
    testLoader = cks
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/unittest/main.py", line 93, in __init__
    self.runTests()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/unittest/main.py", line 244, in runTests
    self.result = testRunner.run(self.test)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/unittest/runner.py", line 168, in run
    test(result)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/unittest/suite.py", line 87, in __call__
    return self.run(*args, **kwds)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/unittest/suite.py", line 130, in run
    self._removeTestAtIndex(index)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/unittest/suite.py", line 83, in _removeTestAtIndex
    self._removed_tests += test.countTestCases()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/unittest/suite.py", line 41, in countTestCases
    cases = self._removed_tests
AttributeError: 'FinalizingSuiteWrapper' object has no attribute '_removed_tests'
frewsxcv commented 10 years ago

@petrrr That's a bug with nose 1.3.0 with Python 3.4. The latest stable version of nose (1.3.1) fixes that issue. I upgraded the setup.py to reflect this. Thanks for pointing this out

petrrr commented 10 years ago

Thanks for this hint. Will try to get nose updated ASAP.

frewsxcv commented 10 years ago

I'm getting some weird VersionConflict error now though. I'll look into it later. Check Travis CI if you're interested

petrrr commented 10 years ago

I have updated to nose==1.3.1, but also still observe problems. To me it appears that the test installs coverage=3.6 as dependency, and when looking into the build directory in find the following:

petr% ls work/geojson-1.0.6/
CHANGELOG.rst                   build                       setup.cfg
LICENSE.rst                 coverage-3.6-py3.4-macosx-10.8-x86_64.egg   setup.py
MANIFEST.in                 geojson                     tests
PKG-INFO                    geojson.egg-info
README.rst                  nose-1.3.0-py3.4.egg

So despite having nose 1.3.1 installed as a site-packages. The local version seems to be used.

petrrr commented 10 years ago

I think the problem is in the setup.py file, it requires exactly the specified versions:

[...]
    setup_requires=["nose==1.3.0"],
    tests_require=["nose==1.3.0", "coverage==3.6"],
[...]

This should probably be replaced by nose>1.3.0 and coverage>3.6. Update: okay i see this has already been changed.

frewsxcv commented 10 years ago

Moving this issue over to #28

petrrr commented 10 years ago

Hi, I just would ask if it were possible to create a new release with the requirement versions changes. This would make packaging for MacPorts a lot more simple.

frewsxcv commented 10 years ago

After #28 get fixed I'll ship a new version

frewsxcv commented 10 years ago

Shipping a new version right now