Skip to content

Declare ourselves as Python 3.9 - #2417

Merged
youknowone merged 4 commits into
masterfrom
update-python-version
Jan 29, 2021
Merged

youknowone merged 4 commits into
masterfrom
update-python-version

Conversation

@coolreader18

Copy link
Copy Markdown
Member

Python 3.5 is pretty old at this point, and I think we generally try to keep up with the latest features (e.g. assignment expression, self-documenting fstrings), so I think it makes sense to say we're 3.9. I put 3.8 in the READMEs because I don't think we have full 3.9 compatibility yet and 3.8 is more used, but I'm not really sure if that makes a difference 🤷

@coolreader18
coolreader18 force-pushed the update-python-version branch from 9089fbe to 6a1b38b Compare January 27, 2021 21:18
@coolreader18
coolreader18 force-pushed the update-python-version branch 2 times, most recently from 3b69d03 to 59794cd Compare January 28, 2021 17:05
@youknowone
youknowone merged commit 18a27ea into master Jan 29, 2021
@youknowone
youknowone deleted the update-python-version branch January 29, 2021 05:15
@domdfcoding

Copy link
Copy Markdown

What was the rationale for changing the site-packages paths to rustpythonX.Y? pip seems to be hardcoded to install to pythonX.Y and PyPy uses pythonX.Y too.

@coolreader18

Copy link
Copy Markdown
Member Author

It seems like pip respects the rustpythonX.Y path in my experience, and I think my motivation was that we don't have anywhere close to full compatibility for many libraries (especially that require native C extensions) so I feel it makes sense to keep them separate, at least for now.

@domdfcoding

Copy link
Copy Markdown

Makes sense.

I think the pip behaviour I saw is because there's still a reference to the pythonX.Y form in distutils.sysconfig:

if os.name == "posix":
libpython = os.path.join(prefix,
"lib", "python" + get_python_version())

and in distutils.command.install:

INSTALL_SCHEMES = {
'unix_prefix': {
'purelib': '$base/lib/python$py_version_short/site-packages',
'platlib': '$platbase/lib/python$py_version_short/site-packages',
'headers': '$base/include/python$py_version_short$abiflags/$dist_name',
'scripts': '$base/bin',
'data' : '$base',
},

If I change those by hand pip installs to the correct location.

@coolreader18

Copy link
Copy Markdown
Member Author

Huh, interesting, it installs to the right place on my machine but feel free to make a PR if that fixes it in your environment.

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.

3 participants