Skip to content

automatically install dataclass backport for Python 3.6#135

Merged
dave-doty merged 2 commits intodevfrom
dev-dataclass-p36
Sep 11, 2020
Merged

automatically install dataclass backport for Python 3.6#135
dave-doty merged 2 commits intodevfrom
dev-dataclass-p36

Conversation

@tcosmo
Copy link
Copy Markdown
Collaborator

@tcosmo tcosmo commented Sep 10, 2020

Tested and Solved with 1102804

@tcosmo tcosmo requested a review from dave-doty as a code owner September 10, 2020 16:47
@tcosmo tcosmo linked an issue Sep 10, 2020 that may be closed by this pull request
@tcosmo tcosmo changed the title Adding installation instruction for python dataclasses for Python 3.6 automatically install dataclass backport for Python 3.6 Sep 10, 2020
long_description_content_type='text/markdown; variant=GFM',
requires=['xlwt']
)
requires=['xlwt'],
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just want to make absolutely sure that this will still allow the package to be installed on Python 3.7 or higher. The syntax looks like it's saying that we require Python 3.6 or below.

But is this just saying that, if the Python version is 3.6 or below, then install dataclasses?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes I tested it. Simple way to test it create two virtual env, one under python 3.6 and one under python 3.7 and theninside each venv, run "python setup.py", the installation is successful in both cases.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And, in the venv with python 3.6, the dataclass package is present and importable after running the script.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The syntax is indeed saying, care about the previous package iff this condition on python version is met

@tcosmo
Copy link
Copy Markdown
Collaborator Author

tcosmo commented Sep 11, 2020

@dave-doty added instruction to force min python version to be 3.6:
python_requires='>=3.6'

@dave-doty dave-doty merged commit b32be23 into dev Sep 11, 2020
@dave-doty dave-doty deleted the dev-dataclass-p36 branch September 11, 2020 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

automatically install dataclass backport for Python 3.6

2 participants