palantir / conjure-python-client

Python client and JSON encoders for use with generated Conjure clients
Apache License 2.0
7 stars 20 forks source link

Restrict enum34 and typing intallation #99

Closed cdb39 closed 4 years ago

cdb39 commented 4 years ago

enum34 backports the enum functionality delivered in python 3.4 to older versions of python. Limit it's installation to only those earlier versions.

Similarly typing became part of the stdlib in 3.5. Restrict its installation to only earlier python versions.

In both instances, without this restriction, the installed packages overshadow stdlib modules, resulting in undesired behaviour (such as the disappearence of newer features).

Before this PR

enum34 and typing are installed regardless of python version, potentially overshadowing the stdlib.

After this PR

Those dependencies are only installed when needed. ==COMMIT_MSG== ==COMMIT_MSG==

Possible downsides?

changelog-app[bot] commented 4 years ago

Generate changelog in changelog-dir>`changelog/@unreleased`</changelog-dir

Type

- [ ] Feature - [X] Improvement - [ ] Fix - [ ] Break - [ ] Deprecation - [ ] Manual task - [ ] Migration

Description

Restrict enum34 and typing intallation **Check the box to generate changelog(s)** - [ ] Generate changelog entry
cdb39 commented 4 years ago

Not entirely sure why environment markers are not being parsed by tox / setup.py, even if using the later versions.

stale[bot] commented 4 years ago

This PR has been automatically marked as stale because it has not been touched in the last 14 days. If you'd like to keep it open, please leave a comment or add the 'long-lived' label, otherwise it'll be closed in 7 days.

Latios96 commented 3 years ago

Hi,

installing enum34 in Python versions later than Python 3.4 causes some serious problems because it shadows the module from stdlib. Right now, you need to make some workarounds when installing conjure-python-client to avoid installing enum34. That's a really bad experience. Any chances to get this PR merged?