Python 2 incompatibility
See original GitHub issueHello,
There seems to be an issue with the latest version of fastavro (1.0) on Python 2 after you dropped the Python 2 support from what I saw in your Changelog. Here is the error that I have when trying to install fastavro on Python 2 :
if sys.implementation.name != "pypy":
AttributeError: 'module' object has no attribute 'implementation'
You dropped Python 2 support but you forgot to add python_requires='>=3.5'
in your setup.py that will prevent users with Python 2 from downloading a sdist version they cannot build.
For more information about python_requires you can check the following details: Note: supporting python_requires requires setuptools>=24.2.0 and pip>=9.0.0 to benefit from it. Details here: https://packaging.python.org/guides/distributing-packages-using-setuptools/#python-requires
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (3 by maintainers)
Top Results From Across the Web
PEP 291 – Backward Compatibility for the Python 2 Standard ...
This PEP describes the packages and modules in the Python 2 standard library which should remain backward compatible with previous versions of ...
Read more >Cheat Sheet: Writing Python 2-3 compatible code
This notebook shows you idioms for writing future-proof code that is compatible with both versions of Python: 2 and 3. It accompanies Ed...
Read more >Python Language Tutorial => Incompatibilities moving from ...
Python 2.7 is backwards-compatible with most earlier versions of Python, and can run Python code from most 1.x and 2.x versions of Python...
Read more >Supporting Python 2 and 3 without 2to3 conversion
Python 2.7 has some small improvements on Python 3 compatibility, but it's likely that if you want to run the same code under...
Read more >Are Python 2.7 and 3.x permanently incompatible? - Quora
That's good question. And the answer is Yes, Python 2.7 and 3.x will be permanently incompatible. However, even though the technical is Yes,...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Okay, so I learned that there is a new
yank
feature on pypi which looks like it will do what I want. It effectively hides the1.0.0
release so that it won’t be used bypip
but is still technically installable if someone doespip install fastavro==1.0.0
.I was able to install correctly on Python 2 now:
So I tried merging the PR and creating a
1.0.0.post
release. I thought the idea of the post release was to effectively shadow the1.0.0
release, but that doesn’t seem to happen. When I try to install on Python 2,pip
skips the1.0.0.post
as expected because of thepython_requires
, but it still just tries to use the1.0.0
tarball.I could delete the
1.0.0
tarball from pypi… I’m a little worried about doing that as it sometimes causes issues for people that run their own mirrors or have the cached1.0.0
version, but leaving it up also seems like a bad idea because now anyone on Python 2 that tries to install will hit an error at install time.