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

Restrict dataclasses pkg installation to < python 3.7 #631

Closed
wants to merge 1 commit into from

Conversation

sransara
Copy link

@sransara sransara commented Mar 18, 2023

Solves:

Using environment markers: https://peps.python.org/pep-0508/#environment-markers

Test that it works:

❯ docker run --rm -it python:3.7 sh -c 'pip install git+https://github.com/sransara/ontobio.git@fix-dataclasses-req && python'
[... docker & pip installer output removed for brevity ...]
Python 3.7.16 (default, Mar 14 2023, 03:47:39) 
[GCC 10.2.1 20210110] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.path
['', '/usr/local/lib/python37.zip', '/usr/local/lib/python3.7', '/usr/local/lib/python3.7/lib-dynload', '/usr/local/lib/python3.7/site-packages']
>>> # Simulate environment where pip installed site-packages comes before stdlib packages
>>> sys.path.reverse()
>>> sys.path
['/usr/local/lib/python3.7/site-packages', '/usr/local/lib/python3.7/lib-dynload', '/usr/local/lib/python3.7', '/usr/local/lib/python37.zip', '']
>>>
>>> import ontobio
>>> 

@sransara
Copy link
Author

No longer necessary since: 34f4300 where required Python version has been upgraded to > Python 3.9

@sransara sransara closed this Nov 13, 2023
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.

1 participant