Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Update Windows download popup and list for 3.9. (#1611)#1655

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
ewdurbin merged 1 commit intopython:masterfromned-deily:39-windows-support
Oct 5, 2020

Conversation

ned-deily
Copy link
Member

As of Python 3.9, only Windows 7 and later systems are supported. With the release of 3.9.0, change the download popup to state that (since we assume the download popup button will never move back to 3.8.x or earlier) and change the Windows download list to show Windows 7 for 3.9 and later releases and continue to show Windows XP for 3.5 through 3.8..

@ned-deilyned-deily added the app/downloadsRelates to the downloads app labelOct 5, 2020
{% if os.slug == 'windows' and r.name >= 'Python 3.5' %}
<p><strong>Note that {{ r.name }} <em>cannot</em> be used on Windows XP or earlier.</strong></p>
{% if os.slug == 'windows' %}
{% if r.name >= 'Python 3.9' %}
Copy link
Member

Choose a reason for hiding this comment

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

Wouldn't this returnFalse ifr.name is'Python 3.10'?

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Probably! But that's just what the existing code does. I was going to open a separate issue to go through the whole repo to fix all similar version checks prior to 3.10.0 a year from now. Do you have any idea if there are other such version checks?

Copy link
Member

Choose a reason for hiding this comment

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

Yep!

>>>'Python 3.10'>='Python 3.9'False

A quick grep doesn't show any more of this pattern:

$git grep -E"[23]\..* [<>][=]?"$git grep -E" [<>][=]? .*[23]\."static/sass/_layout.scss:        & > .column { width: 33.3333%; }templates/downloads/os_list.html:                        {% if os.slug == 'windows' and r.name >= 'Python 3.5' %}

Runninghttps://github.com/asottile/flake8-2020/ doesn't find anything:

$pip install -qU flake8-2020&& flake8 --select YTT$

Still worth a more thorough review.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

If anyone wants to come up with a proper version test, please feel free to do so! My immediate concern is the imminent 3.9.0 release.

Copy link
Member

Choose a reason for hiding this comment

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

Agreed, this PR looks good for 3.9.0, and we've a year to fix it properly for 3.10.0.


Something like this?

>>>from packagingimport version# pip install packaging>>>defparse_version(version_string):...return version.parse(version_string.split()[1])...>>> parse_version("Python 3.10")>= parse_version("Python 3.9")True>>> parse_version("Python 3.10")<= parse_version("Python 3.9")False>>> parse_version("Python 3.10")== parse_version("Python 3.10")True>>>

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Oh, that looks like a good approach. I forgot about packaging.

Copy link
Member

Choose a reason for hiding this comment

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

And rather than the.split()[1], looks like we could user.get_version():

defparse_version(version_string):returnversion.parse(version_string)

defget_version(self):
version=re.match(r'Python\s([\d.]+)',self.name)
ifversionisnotNone:
returnversion.group(1)
returnNone

deftest_get_version_27(self):
release=Release.objects.create(name='Python 2.7.12')
self.assertEqual(release.name,'Python 2.7.12')
self.assertEqual(release.get_version(),'2.7.12')

@ambv
Copy link
Contributor

ambv commentedOct 5, 2020

OK, including this is urgent for 3.9 to not mislead the users to think 3.9 works on Windows Vista and Windows 7. My vote is: let's merge the current state, unblocking 3.9.0, and fix forward for 3.10.

hugovk and ewdurbin reacted with thumbs up emoji

@ewdurbinewdurbin merged commit802aa1e intopython:masterOct 5, 2020
@ned-deilyned-deily deleted the 39-windows-support branchJune 6, 2023 18:29
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@berkerpeksagberkerpeksagberkerpeksag left review comments

@hugovkhugovkhugovk left review comments

Assignees
No one assigned
Labels
app/downloadsRelates to the downloads app
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

5 participants
@ned-deily@ambv@berkerpeksag@hugovk@ewdurbin

[8]ページ先頭

©2009-2025 Movatter.jp