Skip to content

python@3.9: update pip#65953

Closed
fxcoudert wants to merge 1 commit intoHomebrew:masterfrom
fxcoudert:python39
Closed

python@3.9: update pip#65953
fxcoudert wants to merge 1 commit intoHomebrew:masterfrom
fxcoudert:python39

Conversation

@fxcoudert
Copy link
Member

New pip release, including important Big Sur fixes

Comment on lines +89 to +92
patch do
url "https://github.com/fxcoudert/cpython/commit/cd26ccbb.patch?full_index=1"
sha256 "59c98f991f839d610d53ca5c4af1464a99adf6c85e807f8a676b3e41c5dbe0a2"
end
Copy link
Member

Choose a reason for hiding this comment

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

Can we move this to formula-patches.

Copy link
Member Author

Choose a reason for hiding this comment

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

It's the commit from the upstream pull request (which I opened myself). I tried to use the PR URL, but then it complains.

Copy link
Member

Choose a reason for hiding this comment

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

You can use the commit hash in the PR vs from your branch: https://github.com/python/cpython/commit/cd26ccbbf97be0d729196df3ec2a25ef4f0c57f8.patch?full_index=1 .

Disallowing the PR URL itself was removed because the contents of the PR can change. If there are multiple commits, then using formula-patches can make more sense.

@@ -4,7 +4,7 @@ class PythonAT39 < Formula
url "https://www.python.org/ftp/python/3.9.0/Python-3.9.0.tar.xz"
Copy link
Member

Choose a reason for hiding this comment

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

I think 3.9.1 is out already, would you care to try it?

Copy link
Member

Choose a reason for hiding this comment

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

It's still a release candidate https://www.python.org/ftp/python/3.9.1/ with it scheduled to be released on December 11 https://www.python.org/dev/peps/pep-0596/

Copy link
Member

Choose a reason for hiding this comment

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

Ah okay, we should fix the livecheck then

Copy link
Member

Choose a reason for hiding this comment

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

Not sure how we usually handle these livecheck issues. At first glance, maybe we can use https://www.python.org/downloads/source/ with a regex that matches Latest Python 3 Release - Python 3.9.\d+

@BracketMaster

This comment has been minimized.

@robandres

This comment has been minimized.

@BracketMaster

This comment has been minimized.

@robandres

This comment has been minimized.

@BracketMaster

This comment has been minimized.

@fxcoudert
Copy link
Member Author

I'm at a standstill on using brew until this is merged. Please merge it.

@robandres All Homebrew maintainers are volunteers working on this on their free time. “Please do this” does not help at all, especially when there is a clear reason we can't immediately “do this”. In the present case, the update is undergoing testing before we can merge it: because there are a lot of Python formulas, this takes time. I started this testing yesterday before going to bed, and am checking on it this morning as I wake up; seeing your comment “merge this” is actually quite annoying to me.

There are many ways to actually support Homebrew, through proposing pull requests, opening carefully described issues when you have a reproducible problem, supporting others and new users in the discussions, or sponsorship (that helps pay for hardware for testing).

@BrewTestBot
Copy link
Contributor

:shipit: @fxcoudert has triggered a merge.

@BracketMaster
Copy link

BracketMaster commented Dec 1, 2020

I will also mention that python37 and 38 have the same issues.

Does it make sense to take a similar approach to 37 and 38?

@fxcoudert
Copy link
Member Author

A patch for older pythons would be welcome

@fxcoudert fxcoudert deleted the python39 branch December 1, 2020 17:38
@BracketMaster
Copy link

@fxcoudert, appreciate your efforts on the previous patch.
I bumped into something quirky that seems to be related:
namely, pypi packages using distutils fail.

for example,

brew install python@3.9
pip3 install markupsafe

returns

# trimmed
File "/usr/local/Cellar/python@3.9/3.9.0_3/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/spawn.py", line 66, in spawn
        if _cfg_target_split > [int(x) for x in cur_target.split('.')]:
    AttributeError: 'int' object has no attribute 'split'

I suspect the underlying Apple common python uses to get
versioning has changed

in MacOS High Sierra

>>> import sysconfig
>>> sysconfig.get_config_var('MACOSX_DEPLOYMENT_TARGET')
'10.14.6'

in BigSur

>>> import sysconfig
>>> sysconfig.get_config_var('MACOSX_DEPLOYMENT_TARGET')
'11'

I'm currently looking for a tidy way to address this. I imagine this
will get addressed upstream too.

@Rylan12
Copy link
Member

Rylan12 commented Dec 2, 2020

@BracketMaster thanks! I think a fix is already in the works over in #66063 (correct me if I'm wrong and that's not a fix for this issue)

@BracketMaster
Copy link

@Rylan12 , those patches don't hit all the problems.
I think I found a simple soultion that hits all the problems especially
with pip and distutils which I describe here: #66063 (comment)

I can open a pull request for that. This should also fix the build issues for python37 and 38
on BigSur.

I know that I inserted 11.0.1 and am well aware of the 11.0 release,
but Python doesn't actually care about that as far as I can tell.

@BrewTestBot BrewTestBot added the outdated PR was locked due to age label Jan 2, 2021
@Homebrew Homebrew locked as resolved and limited conversation to collaborators Jan 2, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

outdated PR was locked due to age

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants