ionelmc / python-lazy-object-proxy

A fast and thorough lazy object proxy.
BSD 2-Clause "Simplified" License
247 stars 36 forks source link

The latest version of setuptools has not support Python 2 #33

Closed vimiix closed 4 years ago

vimiix commented 4 years ago

REF:https://setuptools.readthedocs.io/en/latest/history.html#v45-0-0

ionelmc commented 4 years ago

Pip or whatever should be smart enough to use the latest available on python 2. Is that pr really necessary? Any details on what kind of error it solves?

vimiix commented 4 years ago

Thanks for your reply.

When I installed requirements in my project yesterday, I got this error.

Collecting lazy-object-proxy (from astroid<1.5.0,>=1.4.5->pylint==1.6.4->-r /Users/vimiix/Work/..../requirements.txt (line 26))
  Downloading http://pypi.douban.com/packages/07/3f/a3d687f83c7d44970f70ff0400677746c8860b11f0c08f6b4e07205f0cdc/lazy-object-proxy-1.4.3.tar.gz
  Installing build dependencies: started
  Installing build dependencies: finished with status 'error'
  ERROR: Complete output from command /Users/vimiix/Work/...../venv/bin/python2.7 /Users/vimiix/Work/...../venv/lib/python2.7/site-packages/pip install --ignore-installed --no-user --prefix /private/var/folders/c4/q59ln2z17fqd70gkxmrdz4vc0000gn/T/pip-build-env-W39uIl/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i http://pypi.douban.com/simple/ --extra-index-url https://pypi.python.org/simple/ --find-links file:///Users/vimiix/Work/..../sdk/3rdparty --trusted-host pypi.tuna.tsinghua.edu.cn --trusted-host pypi.douban.com -- 'setuptools>=30.3.0' wheel 'setuptools_scm>=3.3.1':
  DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
  Looking in indexes: http://pypi.douban.com/simple/, https://pypi.python.org/simple/
  Looking in links: file:///Users/vimiix/Work/....../sdk/3rdparty
  Collecting setuptools>=30.3.0
    Downloading http://pypi.douban.com/packages/af/e7/02db816dc88c598281bacebbb7ccf2c9f1a6164942e88f1a0fded8643659/setuptools-45.0.0-py2.py3-none-any.whl (583kB)
  ERROR: setuptools requires Python '>=3.5' but the running Python is 2.7.16
  WARNING: You are using pip version 19.1.1, however version 19.3.1 is available.
  You should consider upgrading via the 'pip install --upgrade pip' command.
  ----------------------------------------

So,maybe that pr is helpful.( I'm not so sure, but it really solved this error. )

python and pip version:

Python 2.7.16
pip 19.1.1
ionelmc commented 4 years ago

Looks like you use a broken pypi mirror that don't have python_requires metadata? http://pypi.douban.com - what is that?!

vimiix commented 4 years ago

http://pypi.douban.com - what is that?!

It is a pypi mirror site for instead pypi.python.org in China. ╮(╯_╰)╭

I saw same question in setuptools issue tab.

ionelmc commented 4 years ago

Ooof. Can't you workaround this by pinning setuptools in your requirements? Having lazy-object-proxy have an upper constraint because some mirror is broken seems wrong. The problem doesn't reproduce without that mirror.

vimiix commented 4 years ago

Got it, thanks.