@@ -31,7 +31,7 @@ To complete a public release you need the following things:
31
31
* Access to modify the bug-tracker configuration.
32
32
33
33
You can dry-run this process with only the first pre-requisite (driver JARs),
34
- and a Mercurial clone of the official repository.
34
+ and a Git clone of the official repository.
35
35
In that case, be careful not to push any changes.
36
36
(Hint: if you clone from ``https://github.com/jython/jython.git ``,
37
37
that will prevent an unintended push.)
@@ -95,12 +95,11 @@ the last commits should be the same as in the project repository:
95
95
96
96
.. code-block :: ps1con
97
97
98
- PS git> cd work
99
- PS work> git log --oneline --graph -3
100
- * 257d6cb6d (HEAD -> master, origin/master, origin/HEAD) Use language-neutral locale to infer Python class name
101
- * 87f92b82c Support "from __future__ import print_function" interactively (bjo 2007)
102
- * 26731ea80 Cache strings in imp to avoid repeat FS decode
103
-
98
+ PS work> git log --oneline --graph -4
99
+ * f17fc25c3 (HEAD -> master, origin/master, origin/HEAD) Support vararg constructors (#201)
100
+ * 98953f713 Prepare for work on v2.7.3b2.
101
+ * da3bfb368 (tag: v2.7.3b1) Prepare for 2.7.3b1 release.
102
+ * 257d6cb6d Use language-neutral locale to infer Python class name
104
103
105
104
.. _changes-preparing-for-a-release :
106
105
@@ -119,11 +118,11 @@ The following files may need to be updated to match the version you are about to
119
118
* ``jython.release_serial ``.
120
119
121
120
In the language of these properties,
122
- version 2.7.3b1 is spelled ``2 ``, ``7 ``, ``3 ``, ``${PY_RELEASE_LEVEL_BETA } ``, ``1 ``.
121
+ version 2.7.3rc1 is spelled ``2 ``, ``7 ``, ``3 ``, ``${PY_RELEASE_LEVEL_GAMMA } ``, ``1 ``.
123
122
Every other expression needing a version number is derived from these 5 values.
124
123
* ``build.gradle ``: The version number appears as a simple string property ``version ``,
125
124
near the top of the file.
126
- Version 2.7.3b1 is simply set like this: ``version = '2.7.3b1 ' ``.
125
+ Version 2.7.3rc1 is simply set like this: ``version = '2.7.3rc1 ' ``.
127
126
* ``src/org/python/core/imp.java ``: If there has been any compiler change,
128
127
increment the magic number ``APIVersion ``.
129
128
This magic declares old compiled files incompatible, forcing a fresh compilation for users.
@@ -144,7 +143,8 @@ The following files may need to be updated to match the version you are about to
144
143
Bugs fixed
145
144
- [ NNNN ] ...
146
145
147
- Replace the first line with the release you are building e,g, "Jython 2.7.3b1".
146
+ Replace the first line with the release you are building
147
+ e.g. "Jython 2.7.3rc1".
148
148
Add anything necessary to the section "New Features".
149
149
After publication (not now),
150
150
we will add a new, empty, section for the version then under development.
@@ -179,11 +179,10 @@ If you changed anything, commit this set of changes locally:
179
179
modified: NEWS
180
180
modified: build.gradle
181
181
modified: build.xml
182
- modified: src/org/python/core/imp.java
183
182
184
- $ git commit -m" Prepare for 2.7.3b1 release."
185
- [master da3bfb368 ] Prepare for 2.7.3b1 release.
186
- 4 files changed, 4 insertions(+), 4 deletions(-)
183
+ $ git commit -m" Prepare for 2.7.3rc1 release."
184
+ [master 63359da88 ] Prepare for 2.7.3rc1 release.
185
+ 3 files changed, 6 insertions(+), 6 deletions(-)
187
186
188
187
189
188
Get the JARs
@@ -208,7 +207,7 @@ Create an ``ant.properties`` correspondingly:
208
207
oracle.jar = ../support/ojdbc8-19.14.0.0.jar
209
208
210
209
Note that this file is ephemeral and local:
211
- it is ignored by Mercurial because it is named in ``.gitignore ``.
210
+ it is ignored by Git because it is named in ``.gitignore ``.
212
211
213
212
214
213
Check the Configuration of the Build
@@ -223,13 +222,13 @@ Run the ``full-check`` target, which does some simple checks on the repository:
223
222
224
223
force-snapshot-if-polluted:
225
224
[echo]
226
- [echo] Change set da3bfb368 is not tagged 'v2.7.3b1 ' - build is a snapshot.
225
+ [echo] Change set 63359da88 is not tagged 'v2.7.3rc1 ' - build is a snapshot.
227
226
228
227
dump:
229
228
[echo] --- build Jython version ---
230
229
[echo] jython.version.short = '2.7.3'
231
- [echo] jython.release = '2.7.3b1 '
232
- [echo] jython.version = '2.7.3b1 -SNAPSHOT'
230
+ [echo] jython.release = '2.7.3rc1 '
231
+ [echo] jython.version = '2.7.3rc1 -SNAPSHOT'
233
232
234
233
[echo] --- optional libraries ---
235
234
[echo] informix = '../support/jdbc-4.50.8.jar'
@@ -264,17 +263,18 @@ being careful to observe the conventional pattern
264
263
265
264
.. code-block :: ps1con
266
265
267
- PS work> git tag -a -s v2.7.3b1 -m"Jython 2.7.3b1 "
266
+ PS work> git tag -a -s v2.7.3rc1 -m"Jython 2.7.3rc1 "
268
267
269
268
This may open a pop-up from GPG
270
- that requires a password to unlock your signing key (see below).
269
+ that requires a password to unlock your signing key
270
+ (see `PGP-signing `_).
271
271
272
272
Note that ``git tag -a `` creates a sort of commit.
273
273
It will need to be pushed eventually,
274
274
but the current state of your repository is still at the change set tagged.
275
275
If something goes wrong after this point but before the eventual push to the repository,
276
276
that requires changes and a fresh commit,
277
- it is possible to delete the tag with ``git tag -d v2.7.3b1 ``,
277
+ it is possible to delete the tag with ``git tag -d v2.7.3rc1 ``,
278
278
and make it again at the new tip when you're ready.
279
279
The Git book explains why you should not `delete a tag after the push `_.
280
280
@@ -310,9 +310,9 @@ Run the ``full-check`` target again:
310
310
PS work> ant full-check
311
311
Buildfile: D:\git\work\build.xml
312
312
313
- [echo] Build is for release of 2.7.3b1 .
313
+ [echo] Build is for release of 2.7.3rc1 .
314
314
315
- [echo] jython.version = '2.7.3b1 '
315
+ [echo] jython.version = '2.7.3rc1 '
316
316
317
317
This time the script confirms it is a release
318
318
and the version appears without the "SNAPSHOT" qualifier.
@@ -352,7 +352,7 @@ working in folder ``./build2``.
352
352
353
353
PS work> .\gradlew --console=plain publish
354
354
> Task :generateVersionInfo
355
- This build is for v2.7.3b1 .
355
+ This build is for v2.7.3rc1 .
356
356
357
357
> Task :generateGrammarSource
358
358
...
@@ -374,13 +374,13 @@ working in folder ``./build2``.
374
374
> Task :publishMainPublicationToStagingRepoRepository
375
375
> Task :publish
376
376
377
- BUILD SUCCESSFUL in 5m 7s
377
+ BUILD SUCCESSFUL in 6m 2s
378
378
16 actionable tasks: 16 executed
379
379
380
380
Don't worry, this doesn't actually *publish * Jython.
381
381
When the build finishes, a JAR that is potentially fit to publish,
382
382
and its subsidiary artifacts (source, javadoc, checksums),
383
- will have been created in ``./build2/stagingRepo/org/python/jython-slim/2.7.3b1 ``.
383
+ will have been created in ``./build2/stagingRepo/org/python/jython-slim/2.7.3rc1 ``.
384
384
385
385
It can also be "published" to your local Maven cache (usually ``~/.m2/repository ``
386
386
with the task ``publishMainPublicationToMavenLocal ``.
@@ -400,9 +400,9 @@ Let's use Java 11, different from the version we built with.
400
400
401
401
.. code-block :: ps1con
402
402
403
- PS 273b1 -trial> mkdir kit
404
- PS 273b1 -trial> copy "D:\git\work\dist\jython*.jar" .\kit
405
- PS 273b1 -trial> java -jar kit\jython-installer.jar
403
+ PS 273rc1 -trial> mkdir kit
404
+ PS 273rc1 -trial> copy "D:\git\work\dist\jython*.jar" .\kit
405
+ PS 273rc1 -trial> java -jar kit\jython-installer.jar
406
406
WARNING: An illegal reflective access operation has occurred
407
407
...
408
408
DEPRECATION: A future version of pip will drop support for Python 2.7.
@@ -413,19 +413,19 @@ It is worth checking the manifests:
413
413
414
414
.. code-block :: ps1con
415
415
416
- PS 273b1 -trial> jar -xf .\kit\jython-standalone.jar META-INF
417
- PS 273b1 -trial> cat .\META-INF\MANIFEST.MF
416
+ PS 273rc1 -trial> jar -xf .\kit\jython-standalone.jar META-INF
417
+ PS 273rc1 -trial> cat .\META-INF\MANIFEST.MF
418
418
Manifest-Version: 1.0
419
419
Ant-Version: Apache Ant 1.10.12
420
420
Created-By: 1.8.0_321-b07 (Oracle Corporation)
421
421
Main-Class: org.python.util.jython
422
422
Built-By: Jeff
423
423
Implementation-Vendor: Python Software Foundation
424
424
Implementation-Title: Jython fat jar with stdlib
425
- Implementation-Version: 2.7.3b1
425
+ Implementation-Version: 2.7.3rc1
426
426
427
427
Name: Build-Info
428
- version: 2.7.3b1
428
+ version: 2.7.3rc1
429
429
git-build: true
430
430
oracle: true
431
431
informix: true
@@ -443,8 +443,8 @@ The real test consists in running the regression tests:
443
443
444
444
.. code-block :: ps1con
445
445
446
- PS 273b1 -trial> inst\bin\jython -m test.regrtest -e
447
- == 2.7.3b1 (tags/v2.7.3b1:da3bfb368, Jul 8 2022, 18:32:48 )
446
+ PS 273rc1 -trial> inst\bin\jython -m test.regrtest -e
447
+ == 2.7.3rc1 (tags/v2.7.3rc1:63359da88, Aug 28 2022, 07:26:35 )
448
448
== [Java HotSpot(TM) 64-Bit Server VM (Oracle Corporation)]
449
449
== platform: java11.0.13
450
450
== encodings: stdin=ms936, stdout=ms936, FS=utf-8
@@ -475,14 +475,15 @@ but one may run them by supplying a copy of the test modules as below.
475
475
The point of copying (only) the test directory to ``TestLib/test ``,
476
476
rather than putting ``inst/Lib `` on the path,
477
477
is to ensure that other modules are tested from the stand-alone JAR itself.
478
- There will be many failures (34 when the author last tried).
478
+ There will be many failures.
479
+ When the author last tried, they were these:
479
480
480
481
.. code-block :: ps1con
481
482
482
- PS 273b1 -trial> copy -r inst\Lib\test TestLib\test
483
- PS 273b1 -trial> $env:JYTHONPATH = ".\TestLib"
484
- PS 273b1 -trial> java -jar .\kit\jython-standalone.jar -m test.regrtest -e
485
- == 2.7.3b1 (tags/v2.7.3b1:da3bfb368, Jul 8 2022, 18:32:48 )
483
+ PS 273rc1 -trial> copy -r inst\Lib\test TestLib\test
484
+ PS 273rc1 -trial> $env:JYTHONPATH = ".\TestLib"
485
+ PS 273rc1 -trial> java -jar .\kit\jython-standalone.jar -m test.regrtest -e
486
+ == 2.7.3rc1 (tags/v2.7.3rc1:63359da88, Aug 28 2022, 07:26:35 )
486
487
== [Java HotSpot(TM) 64-Bit Server VM (Oracle Corporation)]
487
488
== platform: java11.0.13
488
489
== encodings: stdin=ms936, stdout=ms936, FS=utf-8
@@ -540,7 +541,7 @@ such as your personal Maven cache:
540
541
PS work> .\gradlew --console=plain publishMainPublicationToMavenLocal
541
542
542
543
This will deliver build artifacts to
543
- ``~/.m2/repository/org/python/jython-slim/2.7.3b1 ``.
544
+ ``~/.m2/repository/org/python/jython-slim/2.7.3rc1 ``.
544
545
One can construct an application to run with that as a dependency like this:
545
546
546
547
.. code-block :: groovy
@@ -556,7 +557,7 @@ One can construct an application to run with that as a dependency like this:
556
557
}
557
558
558
559
dependencies {
559
- implementation 'org.python:jython-slim:2.7.3b1 '
560
+ implementation 'org.python:jython-slim:2.7.3rc1 '
560
561
}
561
562
562
563
application {
@@ -586,6 +587,7 @@ Tests have about the same success rate as for the stand-alone Jython JAR.
586
587
Notably ``test_ssl_jy `` passes here because a genuine (not wrapped)
587
588
Bouncy Castle JAR is on the path.
588
589
590
+ .. _jython-push-with-tag :
589
591
590
592
Only now is it safe to ``git push ``
591
593
-----------------------------------
@@ -627,10 +629,10 @@ During the build, ``gpg`` may prompt you (in a dialogue box)
627
629
for the pass-phrase that protects your private signing key.
628
630
This leaves the following new artifacts in ``./publications ``:
629
631
630
- * ``jython-2.7.3b1 -bundle.jar ``
631
- * ``jython-standalone-2.7.3b1 -bundle.jar ``
632
- * ``jython-installer-2.7.3b1 -bundle.jar ``
633
- * ``jython-slim-2.7.3b1 -bundle.jar ``
632
+ * ``jython-2.7.3rc1 -bundle.jar ``
633
+ * ``jython-standalone-2.7.3rc1 -bundle.jar ``
634
+ * ``jython-installer-2.7.3rc1 -bundle.jar ``
635
+ * ``jython-slim-2.7.3rc1 -bundle.jar ``
634
636
635
637
636
638
Publication
@@ -706,15 +708,25 @@ You are now ready to upload bundles acceptable to Sonatype.
706
708
select "Artifact Bundle".
707
709
* Navigate to the ``./publications `` folder and upload in turn:
708
710
709
- * ``jython-2.7.3b1 -bundle.jar ``
710
- * ``jython-standalone- 2.7.3b1 -bundle.jar ``
711
- * ``jython-installer -2.7.3b1 -bundle.jar ``
712
- * ``jython-slim -2.7.3b1 -bundle.jar ``
711
+ * ``jython-slim- 2.7.3rc1 -bundle.jar ``
712
+ * ``jython-2.7.3rc1 -bundle.jar ``
713
+ * ``jython-standalone -2.7.3rc1 -bundle.jar ``
714
+ * ``jython-installer -2.7.3rc1 -bundle.jar ``
713
715
714
- For some reason the display shows a fake file path but the name is correct.
716
+ For some reason (privacy?) the display shows a fake file path
717
+ but the name is correct.
715
718
Each upload creates a "staging repository".
716
719
717
- .. Staging URL has form: https://oss.sonatype.org/content/repositories/orgpython-1073
720
+ .. note :: You may get a report (e-mail) from Sonatype Lift at this point
721
+ reporting potential vulnerabilities in dependencies.
722
+ (It seems only to work on the ``-slim `` JAR, which is why we upload it first.)
723
+ If any vulnerability is sufficiently serious to warrant upgrading JARs,
724
+ treat this as a late test failure:
725
+ assuming you pushed the tag (`jython-push-with-tag `_ above),
726
+ increment the patch level number and repeat the release process (this page).
727
+
728
+ You may discard (drop) Repositories that you decide not to publish
729
+ from the "Staging Repositories" tab in the repository manager.
718
730
719
731
* Under "Build Promotion" select the "Staging Repositories" tab.
720
732
* Check (on the "Activity" tab)
@@ -723,7 +735,10 @@ You are now ready to upload bundles acceptable to Sonatype.
723
735
* In a fresh directory,
724
736
download the (as yet unreleased) artifacts from Sonatype and test them,
725
737
repeating the section :ref: `test-what-you-built `.
726
- * When you are absolutely satisfied, ... "Release" the bundles.
738
+ A staging URL has form:
739
+ ``https://oss.sonatype.org/content/repositories/orgpython-1110 ``
740
+ where the final number increments with each upload.
741
+ * When you are absolutely satisfied ... "Release" the bundles.
727
742
This will cause them to appear in the Maven `Central Repository `_
728
743
(takes an hour or two).
729
744
0 commit comments