Skip to content
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

Uninstall enum34 #28563

Merged
merged 1 commit into from
Sep 28, 2020
Merged

Uninstall enum34 #28563

merged 1 commit into from
Sep 28, 2020

Conversation

millerdev
Copy link
Contributor

@millerdev millerdev commented Sep 28, 2020

Fixes a bug in pip install during deploy. Found while attempting to deploy #28487 (and other changes).

This is a holdover from long since passed Python 2.7 days. It probably should have been removed long ago. enum34 is a backport of the stdlib enum module for Python versions < 3.4, so we no longer need it since we require 3.6.

Error seen attempting to pip install psycogreen==1.0.2 when enum34 is installed, which applies to some of machines on prod but not all of them:

Traceback (most recent call last):
  File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "lib/python3.6/site-packages/pip/__main__.py", line 23, in <module>
    from pip._internal.cli.main import main as _main  # isort:skip # noqa
  File "lib/python3.6/site-packages/pip/_internal/cli/main.py", line 5, in <module>
    import locale
  File "lib/python3.6/locale.py", line 16, in <module>
    import re
  File "lib/python3.6/re.py", line 142, in <module>
    class RegexFlag(enum.IntFlag):
AttributeError: module 'enum' has no attribute 'IntFlag'

Relevant links:
https://stackoverflow.com/q/43124775/10840
pypa/pip#8214

This is a holdover from long since passed Python 2.7 days. It probably should have been removed long ago. `enum34` is a backport of the stdlib enum module for Python versions < 3.4, so we no longer need it since we require 3.6.

Error seen attempting to `pip install psycogreen==1.0.2` when enum34 is installed:

AttributeError: module 'enum' has no attribute 'IntFlag'

Relevant links:
https://stackoverflow.com/q/43124775/10840
pypa/pip#8214
@millerdev millerdev added the product/invisible Change has no end-user visible impact label Sep 28, 2020
@millerdev
Copy link
Contributor Author

I think it should be safe to merge before tests have run since enum34 is not a requirement, and therefore the change in this PR will have no affect on tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
product/invisible Change has no end-user visible impact
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants