-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BLD: Require enum34 for Python < 3.4 #24153
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
pandas-dev#22802 imports `enum`, which was added to the built-ins in Python 3.4. The `enum34` package backports `enum` to earlier Python versions, so this should be a dependency as long as Python 2.7 is still supported.
Codecov Report
@@ Coverage Diff @@
## master #24153 +/- ##
==========================================
- Coverage 92.2% 92.2% -0.01%
==========================================
Files 162 162
Lines 51700 51700
==========================================
- Hits 47671 47670 -1
- Misses 4029 4030 +1
Continue to review full report at Codecov.
|
1 similar comment
Codecov Report
@@ Coverage Diff @@
## master #24153 +/- ##
==========================================
- Coverage 92.2% 92.2% -0.01%
==========================================
Files 162 162
Lines 51700 51700
==========================================
- Hits 47671 47670 -1
- Misses 4029 4030 +1
Continue to review full report at Codecov.
|
I guess this makes sense, even if after the next version only Python>=3.5 will be supported, so it'll be only for 0.24. |
we may actually want to just change it and not use enums which is slightly simpler adding a required dependency has some implications for wheel and conda building (meaning we haven’t touched these in a while) |
Yeah we should be able to write this without an enum fairly easily. |
superseded by #24170 |
#22802 imports
enum
, which was added to the built-ins in Python 3.4. Theenum34
package backportsenum
to earlier Python versions, so this should be a dependency as long as Python 2.7 is still supported.To demonstrate the issue, creating a minimal environment using
conda
and installing the nightly Pandas build suffices:Then:
If I install
enum34
:$ pip install enum34 Collecting enum34 Using cached https://files.pythonhosted.org/packages/c5/db/e56e6b4bbac7c4a06de1c50de6fe1ef3810018ae11732a50f15f62c7d050/enum34-1.1.6-py2-none-any.whl Installing collected packages: enum34 Successfully installed enum34-1.1.6 $ python -c 'import pandas' $
git diff upstream/master -u -- "*.py" | flake8 --diff
Not sure what the best way to test this would be. Currently, installing
hypothesis
masks this error, because it contains the requirementenum34; python_version == "2.7"
.Related: MacPython/pandas-wheels#36, bids-standard/pybids#276, bids-standard/pybids#315