SylvainDe / DidYouMean-Python

Module to have suggestions in case of errors (NameError, AttributeError, etc).
MIT License
122 stars 15 forks source link

CI jobs failing on Python 3.2 / PyPy3 #30

Closed SylvainDe closed 5 years ago

SylvainDe commented 7 years ago

Jobs have been failing fro a few days now:

2.59s$ pip install coverage==3.7.1
/home/travis/virtualenv/pypy3-2.4.0/site-packages/pip/_vendor/pkg_resources/__init__.py:80: UserWarning: Support for Python 3.0-3.2 has been dropped. Future versions will fail here.
  warnings.warn(msg)
Collecting coverage==3.7.1
  Downloading coverage-3.7.1.tar.gz (284kB)
    100% |████████████████████████████████| 286kB 1.9MB/s 
Exception:
Traceback (most recent call last):
  File "/home/travis/virtualenv/pypy3-2.4.0/site-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/home/travis/virtualenv/pypy3-2.4.0/site-packages/pip/commands/install.py", line 310, in run
    wb.build(autobuilding=True)
  File "/home/travis/virtualenv/pypy3-2.4.0/site-packages/pip/wheel.py", line 750, in build
    self.requirement_set.prepare_files(self.finder)
  File "/home/travis/virtualenv/pypy3-2.4.0/site-packages/pip/req/req_set.py", line 370, in prepare_files
    ignore_dependencies=self.ignore_dependencies))
  File "/home/travis/virtualenv/pypy3-2.4.0/site-packages/pip/req/req_set.py", line 601, in _prepare_file
    abstract_dist.prep_for_dist()
  File "/home/travis/virtualenv/pypy3-2.4.0/site-packages/pip/req/req_set.py", line 127, in prep_for_dist
    self.req_to_install.run_egg_info()
  File "/home/travis/virtualenv/pypy3-2.4.0/site-packages/pip/req/req_install.py", line 397, in run_egg_info
    self.setup_py, self.name,
  File "/home/travis/virtualenv/pypy3-2.4.0/site-packages/pip/req/req_install.py", line 372, in setup_py
    import setuptools  # noqa
  File "/home/travis/virtualenv/pypy3-2.4.0/site-packages/setuptools/__init__.py", line 12, in <module>
    import setuptools.version
  File "/home/travis/virtualenv/pypy3-2.4.0/site-packages/setuptools/version.py", line 1, in <module>
    import pkg_resources
  File "/home/travis/virtualenv/pypy3-2.4.0/site-packages/pkg_resources/__init__.py", line 77, in <module>
    raise RuntimeError("Python 3.3 or later is required")
RuntimeError: Python 3.3 or later is required
SylvainDe commented 7 years ago

Related issues:

SylvainDe commented 7 years ago

Last commit did not fix anything, the failure is just different : https://travis-ci.org/SylvainDe/DidYouMean-Python/jobs/231730380 .

$ pip install --upgrade pep8
Traceback (most recent call last):
  File "/home/travis/virtualenv/python3.2.6/bin/pip", line 7, in <module>
    from pip import main
  File "/home/travis/virtualenv/python3.2.6/lib/python3.2/site-packages/pip/__init__.py", line 21, in <module>
    from pip._vendor.requests.packages.urllib3.exceptions import DependencyWarning
  File "/home/travis/virtualenv/python3.2.6/lib/python3.2/site-packages/pip/_vendor/requests/__init__.py", line 66, in <module>
    from .models import Request, Response, PreparedRequest
  File "/home/travis/virtualenv/python3.2.6/lib/python3.2/site-packages/pip/_vendor/requests/models.py", line 856
    http_error_msg = u'%s Client Error: %s for url: %s' % (self.status_code, reason, self.url)
                                                      ^
SyntaxError: invalid syntax
yupbank commented 7 years ago

Hey... i also come into the latter failure.. did you have a solution for that?

SylvainDe commented 7 years ago

@yupbank Not yet. I have a limited understanding on this and haven't found an obvious solution. Reading the issues linked above might lead to a solution but in any case, a general consensus seems to be that Python 3.2 is not supposed to be used. If you find anything, I am obviously interested :)

yupbank commented 7 years ago

Ah. I've found a solution. add this pip install tox-travis and it will settle nasty things behind the virtualenv verison and python3.2 version

yupbank commented 7 years ago

ah.. nvm.. you are not using tox.. maybe i can port a pr for you.. if i have time..

SylvainDe commented 7 years ago

@yupbank Thanks for the feedback. If you do have time for a PR, that's brilliant. If you don't, a link to the commit(s) fixing the issue on your side would be much appreciated.

yupbank commented 7 years ago

sorry i was too busy.. try this https://github.com/SimonSapin/tinycss2/pull/6

SylvainDe commented 7 years ago

@yupbank Thank you very much! I'll have a look asap (after going through the doc to understand all of it). I'm glad you found something working for you :-)

hugovk commented 7 years ago

I think you can safely drop Python 3.2 now, it's been EOL for a while and its Unicode handling is a pain so many packages are dropping it.

image

https://en.wikipedia.org/wiki/CPython#Version_history

As for PyPy3, Travis have updated it to a later release which is based on later Python 3 version, so just try rebuilding it and it may well pass now.

(Very soon Python 2.6 will become a pain to support, but you can probably keep 3.3 for a bit longer if needed.)

SylvainDe commented 5 years ago

Solved