Skip to content

Commit 06b7f0d

Browse files
Merge branch 'main' into adjust-releasepy-files
2 parents 26d760d + 5f92ae8 commit 06b7f0d

7 files changed

Lines changed: 58 additions & 74 deletions

File tree

.github/workflows/build-release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,5 +322,6 @@ jobs:
322322

323323
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
324324
with:
325+
name: ios
325326
path: cross-build/dist/*
326327
if-no-files-found: error

release.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,9 @@ def normalized(self) -> str:
193193

194194
@property
195195
def branch(self) -> str:
196-
return "main" if self.is_alpha_release else f"{self.major}.{self.minor}"
196+
if self.is_alpha_release or self.is_feature_freeze_release:
197+
return "main"
198+
return f"{self.major}.{self.minor}"
197199

198200
@property
199201
def is_alpha_release(self) -> bool:

requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -969,8 +969,8 @@ typing-extensions==4.15.0 \
969969
typing-inspection==0.4.2 \
970970
--hash=sha256:4ed1cacbdc298c220f1bd249ed5287caa16f34d44ef4e9c3d0cbad5b521545e7
971971
# via pydantic
972-
urllib3==2.6.3 \
973-
--hash=sha256:bf272323e553dfb2e87d9bfd225ca7b0f467b919d7bbd355436d3fd37cb0acd4
972+
urllib3==2.7.0 \
973+
--hash=sha256:9fb4c81ebbb1ce9531cce37674bbc6f1360472bc18ca9a553ede278ef7276897
974974
# via
975975
# requests
976976
# tuf

run_release.py

Lines changed: 21 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -46,41 +46,19 @@
4646
DOCS_SERVER = "docs.nyc1.psf.io"
4747

4848
WHATS_NEW_TEMPLATE = """
49-
****************************
49+
*****************************
5050
What's new in Python {version}
51-
****************************
51+
*****************************
5252
5353
:Editor: TBD
5454
5555
.. Rules for maintenance:
5656
57-
* Anyone can add text to this document. Do not spend very much time
58-
on the wording of your changes, because your text will probably
59-
get rewritten to some degree.
60-
61-
* The maintainer will go through Misc/NEWS periodically and add
62-
changes; it's therefore more important to add your changes to
63-
Misc/NEWS than to this file.
64-
6557
* This is not a complete list of every single change; completeness
66-
is the purpose of Misc/NEWS. Some changes I consider too small
67-
or esoteric to include. If such a change is added to the text,
68-
I'll just remove it. (This is another reason you shouldn't spend
69-
too much time on writing your addition.)
70-
71-
* If you want to draw your new text to the attention of the
72-
maintainer, add 'XXX' to the beginning of the paragraph or
73-
section.
58+
is the purpose of Misc/NEWS. The editor may remove changes they
59+
consider too small or esoteric to include.
7460
75-
* It's OK to just add a fragmentary note about a change. For
76-
example: "XXX Describe the transmogrify() function added to the
77-
socket module." The maintainer will research the change and
78-
write the necessary text.
79-
80-
* You can comment out your additions if you like, but it's not
81-
necessary (especially when a final release is some months away).
82-
83-
* Credit the author of a patch or bugfix. Just the name is
61+
* Credit the author of a patch or bugfix. Just the name is
8462
sufficient; the e-mail address isn't necessary.
8563
8664
* It's helpful to add the issue number as a comment:
@@ -89,9 +67,6 @@
8967
module.
9068
(Contributed by P.Y. Developer in :gh:`12345`.)
9169
92-
This saves the maintainer the effort of going through the VCS log
93-
when researching a change.
94-
9570
This article explains the new features in Python {version}, compared to {prev_version}.
9671
9772
For full details, see the :ref:`changelog <changelog>`.
@@ -113,17 +88,14 @@
11388
.. PEP-sized items next.
11489
11590
116-
11791
New features
11892
============
11993
12094
121-
12295
Other language changes
12396
======================
12497
12598
126-
12799
New modules
128100
===========
129101
@@ -140,6 +112,7 @@
140112
141113
.. Add improved modules above alphabetically, not here at the end.
142114
115+
143116
Optimizations
144117
=============
145118
@@ -149,14 +122,14 @@
149122
* TODO
150123
151124
152-
153125
Removed
154126
=======
155127
156128
module_name
157129
-----------
158130
159131
* TODO
132+
160133
.. Add removals above alphabetically, not here at the end.
161134
162135
@@ -166,7 +139,6 @@
166139
* module_name:
167140
TODO
168141
169-
170142
.. Add deprecations above alphabetically, not here at the end.
171143
172144
@@ -189,21 +161,23 @@
189161
190162
* TODO
191163
164+
192165
Porting to Python {version}
193166
----------------------
194167
195168
* TODO
196169
170+
197171
Deprecated C APIs
198172
-----------------
199173
200174
* TODO
201175
202176
.. Add C API deprecations above alphabetically, not here at the end.
203177
178+
204179
Removed C APIs
205180
--------------
206-
207181
"""
208182

209183

@@ -627,6 +601,10 @@ def wait_for_build_release(db: ReleaseShelf) -> None:
627601
downloads_path / f"python-{release_tag}-{arch}-linux-android.tar.gz"
628602
for arch in ["aarch64", "x86_64"]
629603
]
604+
if release_tag.as_tuple() >= (3, 15):
605+
wait_for_paths.append(
606+
downloads_path / f"python-{release_tag}-iOS-XCframework.tar.gz"
607+
)
630608
if should_wait_for_docs:
631609
docs_path = release_path / "docs"
632610
docs_path.mkdir(parents=True, exist_ok=True)
@@ -1168,8 +1146,13 @@ def post_release_tagging(db: ReleaseShelf) -> None:
11681146
cwd=db["git_repo"],
11691147
)
11701148

1149+
if release_tag.is_feature_freeze_release:
1150+
checkout_branch = release_tag.basic_version
1151+
else:
1152+
checkout_branch = release_tag.branch
1153+
11711154
subprocess.check_call(
1172-
["git", "checkout", release_tag.branch],
1155+
["git", "checkout", checkout_branch],
11731156
cwd=db["git_repo"],
11741157
)
11751158

@@ -1245,7 +1228,7 @@ def branch_new_versions(db: ReleaseShelf) -> None:
12451228
subprocess.check_call(["git", "checkout", "main"], cwd=db["git_repo"])
12461229

12471230
subprocess.check_call(
1248-
["git", "checkout", "-b", release_tag.branch],
1231+
["git", "checkout", "-b", release_tag.basic_version],
12491232
cwd=db["git_repo"],
12501233
)
12511234

tests/test_release_tag.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,26 +41,31 @@ def test_tag_phase() -> None:
4141
assert alpha.is_feature_freeze_release is False
4242
assert alpha.is_release_candidate is False
4343
assert alpha.is_final is False
44+
assert alpha.branch == "main"
4445

4546
assert beta1.is_alpha_release is False
4647
assert beta1.is_feature_freeze_release is True
4748
assert beta1.is_release_candidate is False
4849
assert beta1.is_final is False
50+
assert beta1.branch == "main"
4951

5052
assert beta4.is_alpha_release is False
5153
assert beta4.is_feature_freeze_release is False
5254
assert beta4.is_release_candidate is False
5355
assert beta4.is_final is False
56+
assert beta4.branch == "3.13"
5457

5558
assert rc.is_alpha_release is False
5659
assert rc.is_feature_freeze_release is False
5760
assert rc.is_release_candidate is True
5861
assert rc.is_final is False
62+
assert rc.branch == "3.13"
5963

6064
assert final.is_alpha_release is False
6165
assert final.is_feature_freeze_release is False
6266
assert final.is_release_candidate is False
6367
assert final.is_final is True
68+
assert final.branch == "3.13"
6469

6570

6671
def test_tag_committed_at_not_found() -> None:

tests/test_run_release.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,9 @@ def test_invalid_extract_github_owner() -> None:
5959
[
6060
# Success cases
6161
("3.15.0rc1", "3.15\n", does_not_raise()),
62-
("3.15.0b1", "3.15\n", does_not_raise()),
62+
("3.15.0b3", "3.15\n", does_not_raise()),
63+
("3.15.0b2", "3.15\n", does_not_raise()),
64+
("3.15.0b1", "main\n", does_not_raise()),
6365
("3.15.0a6", "main\n", does_not_raise()),
6466
("3.14.3", "3.14\n", does_not_raise()),
6567
("3.13.12", "3.13\n", does_not_raise()),
@@ -71,8 +73,8 @@ def test_invalid_extract_github_owner() -> None:
7173
),
7274
(
7375
"3.15.0b1",
74-
"main\n",
75-
pytest.raises(ReleaseException, match="on main branch, expected 3.15"),
76+
"3.15\n",
77+
pytest.raises(ReleaseException, match="on 3.15 branch, expected main"),
7678
),
7779
(
7880
"3.15.0a6",

windows-release/tcltk-build.yml

Lines changed: 21 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
parameters:
2-
- name: TclSourceTag
3-
displayName: 'Tcl Source Tag'
2+
- name: TclVersion
3+
displayName: 'Tcl Version'
44
type: string
5-
- name: TkSourceTag
6-
displayName: 'Tk Source Tag'
5+
- name: TkVersion
6+
displayName: 'Tk Version'
7+
type: string
8+
- name: TclTagPrefix
9+
displayName: 'Tcl source tag prefix'
710
type: string
8-
- name: IncludeTix
9-
displayName: 'Include Tix (pre-3.13)'
10-
type: boolean
11-
default: false
12-
- name: TixSourceTag
13-
displayName: 'Tix Source Tag'
11+
default: 'tcl-'
12+
- name: TkTagPrefix
13+
displayName: 'Tk source tag prefix'
1414
type: string
15-
default: tix-8.4.3.6
15+
default: 'tk-'
1616
- name: SigningCertificate
1717
displayName: "Code signing certificate"
1818
type: string
@@ -27,7 +27,7 @@ parameters:
2727
default: 'https://github.com/python/cpython-source-deps'
2828

2929

30-
name: tcltk$(TkSourceTag)_$(Date:yyyyMMdd)$(Rev:.rr)
30+
name: tcltk$(TkVersion)_$(Date:yyyyMMdd)$(Rev:.rr)
3131

3232

3333
resources:
@@ -52,15 +52,17 @@ variables:
5252
- name: Configuration
5353
value: 'Release'
5454
- name: SigningDescription
55-
value: 'Tcl/Tk for Python (${{ parameters.TclSourceTag }})'
55+
value: 'Tcl/Tk for Python (${{ parameters.TkVersion }})'
5656
- name: SourcesRepo
5757
value: ${{ parameters.SourcesRepo }}
58+
- name: TclVersion
59+
value: ${{ parameters.TclVersion }}
60+
- name: TkVersion
61+
value: ${{ parameters.TkVersion }}
5862
- name: TclSourceTag
59-
value: ${{ parameters.TclSourceTag }}
63+
value: ${{ parameters.TclTagPrefix }}${{ parameters.TclVersion }}
6064
- name: TkSourceTag
61-
value: ${{ parameters.TkSourceTag }}
62-
- name: TixSourceTag
63-
value: ${{ parameters.TixSourceTag }}
65+
value: ${{ parameters.TkTagPrefix }}${{ parameters.TkVersion }}
6466

6567

6668
jobs:
@@ -85,19 +87,15 @@ jobs:
8587
git clone $(SourcesRepo) -b $(TkSourceTag) --depth 1 "$(ExternalsDir)\$(TkSourceTag)"
8688
displayName: 'Check out Tk sources'
8789
88-
- ${{ if eq(parameters.IncludeTix, 'true') }}:
89-
- powershell: |
90-
git clone $(SourcesRepo) -b $(TixSourceTag) --depth 1 "$(ExternalsDir)\$(TixSourceTag)"
91-
displayName: 'Check out Tix sources'
92-
9390
# This msbuild.rsp file will be used by the build to forcibly override these variables
9491
- powershell: |
9592
del -Force -EA 0 msbuild.rsp
9693
"/p:IntDir=$(IntDir)\" >> msbuild.rsp
9794
"/p:ExternalsDir=$(ExternalsDir)\" >> msbuild.rsp
9895
"/p:tclDir=$(ExternalsDir)\$(TclSourceTag)\" >> msbuild.rsp
9996
"/p:tkDir=$(ExternalsDir)\$(TkSourceTag)\" >> msbuild.rsp
100-
"/p:tixDir=$(ExternalsDir)\$(TixSourceTag)\" >> msbuild.rsp
97+
"/p:TclVersion=$(TclVersion)" >> msbuild.rsp
98+
"/p:TkVersion=$(TkVersion)" >> msbuild.rsp
10199
displayName: 'Generate msbuild.rsp'
102100
103101
- powershell: |
@@ -115,13 +113,6 @@ jobs:
115113
& "$(msbuild)" cpython\PCbuild\tk.vcxproj "@msbuild.rsp" /p:Platform=ARM64 /p:tcltkDir="$(OutDir)\arm64"
116114
displayName: 'Build for arm64'
117115
118-
- ${{ if eq(parameters.IncludeTix, 'true') }}:
119-
- powershell: |
120-
& "$(msbuild)" cpython\PCbuild\tix.vcxproj "@msbuild.rsp" /p:Platform=Win32 /p:tcltkDir="$(OutDir)\win32"
121-
& "$(msbuild)" cpython\PCbuild\tix.vcxproj "@msbuild.rsp" /p:Platform=x64 /p:tcltkDir="$(OutDir)\amd64"
122-
& "$(msbuild)" cpython\PCbuild\tix.vcxproj "@msbuild.rsp" /p:Platform=ARM64 /p:tcltkDir="$(OutDir)\arm64"
123-
displayName: 'Build Tix'
124-
125116
- ${{ if ne(parameters.SigningCertificate, 'Unsigned') }}:
126117
- template: sign-files.yml
127118
parameters:

0 commit comments

Comments
 (0)