@@ -31,7 +31,7 @@ To complete a public release you need the following things:
3131* Access to modify the bug-tracker configuration.
3232
3333You 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.
3535In that case, be careful not to push any changes.
3636(Hint: if you clone from ``https://github.com/jython/jython.git ``,
3737that will prevent an unintended push.)
@@ -95,12 +95,11 @@ the last commits should be the same as in the project repository:
9595
9696.. code-block :: ps1con
9797
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
104103
105104 .. _changes-preparing-for-a-release :
106105
@@ -119,11 +118,11 @@ The following files may need to be updated to match the version you are about to
119118 * ``jython.release_serial ``.
120119
121120 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 ``.
123122 Every other expression needing a version number is derived from these 5 values.
124123* ``build.gradle ``: The version number appears as a simple string property ``version ``,
125124 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 ' ``.
127126* ``src/org/python/core/imp.java ``: If there has been any compiler change,
128127 increment the magic number ``APIVersion ``.
129128 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
144143 Bugs fixed
145144 - [ NNNN ] ...
146145
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".
148148 Add anything necessary to the section "New Features".
149149 After publication (not now),
150150 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:
179179 modified: NEWS
180180 modified: build.gradle
181181 modified: build.xml
182- modified: src/org/python/core/imp.java
183182
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(-)
187186
188187
189188 Get the JARs
@@ -208,7 +207,7 @@ Create an ``ant.properties`` correspondingly:
208207 oracle.jar = ../support/ojdbc8-19.14.0.0.jar
209208
210209 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 ``.
212211
213212
214213Check the Configuration of the Build
@@ -223,13 +222,13 @@ Run the ``full-check`` target, which does some simple checks on the repository:
223222
224223 force-snapshot-if-polluted:
225224 [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.
227226
228227 dump:
229228 [echo] --- build Jython version ---
230229 [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'
233232
234233 [echo] --- optional libraries ---
235234 [echo] informix = '../support/jdbc-4.50.8.jar'
@@ -264,17 +263,18 @@ being careful to observe the conventional pattern
264263
265264.. code-block :: ps1con
266265
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 "
268267
269268 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 `_).
271271
272272Note that ``git tag -a `` creates a sort of commit.
273273It will need to be pushed eventually,
274274but the current state of your repository is still at the change set tagged.
275275If something goes wrong after this point but before the eventual push to the repository,
276276that 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 ``,
278278and make it again at the new tip when you're ready.
279279The Git book explains why you should not `delete a tag after the push `_.
280280
@@ -310,9 +310,9 @@ Run the ``full-check`` target again:
310310 PS work> ant full-check
311311 Buildfile: D:\git\work\build.xml
312312
313- [echo] Build is for release of 2.7.3b1 .
313+ [echo] Build is for release of 2.7.3rc1 .
314314
315- [echo] jython.version = '2.7.3b1 '
315+ [echo] jython.version = '2.7.3rc1 '
316316
317317 This time the script confirms it is a release
318318and the version appears without the "SNAPSHOT" qualifier.
@@ -352,7 +352,7 @@ working in folder ``./build2``.
352352
353353 PS work> .\gradlew --console=plain publish
354354 > Task :generateVersionInfo
355- This build is for v2.7.3b1 .
355+ This build is for v2.7.3rc1 .
356356
357357 > Task :generateGrammarSource
358358 ...
@@ -374,13 +374,13 @@ working in folder ``./build2``.
374374 > Task :publishMainPublicationToStagingRepoRepository
375375 > Task :publish
376376
377- BUILD SUCCESSFUL in 5m 7s
377+ BUILD SUCCESSFUL in 6m 2s
378378 16 actionable tasks: 16 executed
379379
380380 Don't worry, this doesn't actually *publish * Jython.
381381When the build finishes, a JAR that is potentially fit to publish,
382382and 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 ``.
384384
385385It can also be "published" to your local Maven cache (usually ``~/.m2/repository ``
386386with the task ``publishMainPublicationToMavenLocal ``.
@@ -400,9 +400,9 @@ Let's use Java 11, different from the version we built with.
400400
401401.. code-block :: ps1con
402402
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
406406 WARNING: An illegal reflective access operation has occurred
407407 ...
408408 DEPRECATION: A future version of pip will drop support for Python 2.7.
@@ -413,19 +413,19 @@ It is worth checking the manifests:
413413
414414.. code-block :: ps1con
415415
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
418418 Manifest-Version: 1.0
419419 Ant-Version: Apache Ant 1.10.12
420420 Created-By: 1.8.0_321-b07 (Oracle Corporation)
421421 Main-Class: org.python.util.jython
422422 Built-By: Jeff
423423 Implementation-Vendor: Python Software Foundation
424424 Implementation-Title: Jython fat jar with stdlib
425- Implementation-Version: 2.7.3b1
425+ Implementation-Version: 2.7.3rc1
426426
427427 Name: Build-Info
428- version: 2.7.3b1
428+ version: 2.7.3rc1
429429 git-build: true
430430 oracle: true
431431 informix: true
@@ -443,8 +443,8 @@ The real test consists in running the regression tests:
443443
444444.. code-block :: ps1con
445445
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 )
448448 == [Java HotSpot(TM) 64-Bit Server VM (Oracle Corporation)]
449449 == platform: java11.0.13
450450 == 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.
475475The point of copying (only) the test directory to ``TestLib/test ``,
476476rather than putting ``inst/Lib `` on the path,
477477is 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:
479480
480481.. code-block :: ps1con
481482
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 )
486487 == [Java HotSpot(TM) 64-Bit Server VM (Oracle Corporation)]
487488 == platform: java11.0.13
488489 == encodings: stdin=ms936, stdout=ms936, FS=utf-8
@@ -540,7 +541,7 @@ such as your personal Maven cache:
540541 PS work> .\gradlew --console=plain publishMainPublicationToMavenLocal
541542
542543 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 ``.
544545One can construct an application to run with that as a dependency like this:
545546
546547.. code-block :: groovy
@@ -556,7 +557,7 @@ One can construct an application to run with that as a dependency like this:
556557 }
557558
558559 dependencies {
559- implementation 'org.python:jython-slim:2.7.3b1 '
560+ implementation 'org.python:jython-slim:2.7.3rc1 '
560561 }
561562
562563 application {
@@ -586,6 +587,7 @@ Tests have about the same success rate as for the stand-alone Jython JAR.
586587Notably ``test_ssl_jy `` passes here because a genuine (not wrapped)
587588Bouncy Castle JAR is on the path.
588589
590+ .. _jython-push-with-tag :
589591
590592Only now is it safe to ``git push ``
591593-----------------------------------
@@ -627,10 +629,10 @@ During the build, ``gpg`` may prompt you (in a dialogue box)
627629for the pass-phrase that protects your private signing key.
628630This leaves the following new artifacts in ``./publications ``:
629631
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 ``
634636
635637
636638Publication
@@ -706,15 +708,25 @@ You are now ready to upload bundles acceptable to Sonatype.
706708 select "Artifact Bundle".
707709* Navigate to the ``./publications `` folder and upload in turn:
708710
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 ``
713715
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.
715718 Each upload creates a "staging repository".
716719
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.
718730
719731* Under "Build Promotion" select the "Staging Repositories" tab.
720732* Check (on the "Activity" tab)
@@ -723,7 +735,10 @@ You are now ready to upload bundles acceptable to Sonatype.
723735* In a fresh directory,
724736 download the (as yet unreleased) artifacts from Sonatype and test them,
725737 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.
727742 This will cause them to appear in the Maven `Central Repository `_
728743 (takes an hour or two).
729744
0 commit comments