Skip to content

Canary PR merging from upstream/master by incremental cherry picks - #38

Open
ohumbel wants to merge 85 commits into
developfrom
incremental_picks
Open

Canary PR merging from upstream/master by incremental cherry picks#38
ohumbel wants to merge 85 commits into
developfrom
incremental_picks

Conversation

@ohumbel

@ohumbel ohumbel commented Aug 21, 2026

Copy link
Copy Markdown
Owner

It is not intended to merge this, because it contains too many commits and a documentation file picking_conflicts.txt.

But I hope it can serve as reference, once the regression tests pass.

robertpatrick and others added 30 commits June 15, 2026 10:40
These changes improve stability of network tests, especially the impact of tear-down, and our ability to run network tests behind an HTTP proxy. These changes are cherry-picked from PR 424 whose author we credit as author here.

We update lib-python/2.7/test/test_urllib2net.py from CPython 2.7.18 because the modified Lib/test/test_urllib2net.py is based on that.
This change is cherry-picked from PR 424.

We'll regenerate the Windows laucher (compiled from jython.py)
in a second step.
This was created from jython.py with PyInstaller.
This workflow allows us to specify which (failing) tests to run verbose. It addresses the problem that some tests pollute the machine (e.g. fail to close sockets) and the regrtest -w (re-run failing tests) option is not then able to diagnose the root cause.
This brings in an action for verbose tests on Linux.
This change is cherry-picked from PR 424.

We are able to add this having regenerated the Windows laucher
(compiled from jython.py).
These adapt to Java 17 and 25 differences. We only need what the launchers themselves do not add.

This change is cherry-picked from PR 424.
A long-standing Java bug has been fixed in Java 19.

This change is cherry-picked from PR 424.
The currency symbol in the Chinese mainland locale has changed.
We also bring in the Java 25 changes to build.gradle at this point,
since it runs the Java tests.

This change is cherry-picked from PR 424 with improvements.
The change adds a test tearDown() to remove the proxy_handler.
(Suspect the one in lib-python/2.7 to be erroneously modified.)

This change is cherry-picked from PR 424.
This change is cherry-picked from PR 424.
Also NEWS updated.

This change is cherry-picked from PR 424.
This merges a series of change sets, each addressing some aspect of Java 25 support in Jython. They were provided originally as one large change set in PR jython#424. We prefer this presentation because it makes the changes easier to understand for subsequent maintainers.
…jython#361)

This change removes synchronization from JyAttribute.getAttr to improve performance in multithreaded scenarios. Test and discussion led us to conclude the attribute data structure is correctly synchronised without the additional safeguard.
…#429)

Make bytecode loading robust against serialVersionUID mismatch for serialized code objects of oversized functions, methods and modules. Adjust launcher to possibly self-supply cpython2 property for oversized method handling. Closes jython#234. Closes jython#416.
PR429 adjusted the Windows launcher with the possibility of supplying the cpython2 property itself for oversized method handling. This change compiles it with PyInstaller to produce the Jython Windows launcher as an executable.
This change is cherry-picked from PR 424.
jffi -> 1.4.0
jnr-constants -> 0.11.0
jnr-ffi -> 2.3.0
jnr-posix -> 3.2.1
We update Bouncy Castle to 1.85, and build files. The change also fixes _sslcerts.py: Bouncy Castle changed the way it errors on malformed PEM parsing: now we must catch IOException there, too.
This changes Jython’s default Java SAX parser configuration so it no
longer resolves external entities or loads external DTDs unless a caller
explicitly re-enables those features.

The hardening is implemented in Lib/xml/sax/drivers2/drv_javasax.py by
defining a single secure default feature set and applying it both to the
JAXP factory and to each created XML reader.
We have to pin icu4j to latest 77.x until Jython moves to Java 11 as minimum.
Changes to commons compress mean that it is now an error to call
finish() on a compressed stream followed by close(), and so this change
set removes those calls from compression methods.
Optionally, when multiple Java varargs overloads match a Python argument list,
rank the candidates by conversion quality before falling back to signature
ordering. This preserves the preference for non-varargs overloads added
for jython#221 while avoiding last-match or first-match behavior among varargs
methods.

Add regression coverage for mixed varargs overloads such as
insert(String, String...) and insert(String, boolean...), plus boolean
varargs cases that previously exposed unstable overload selection.

Introduce ReflectedArgs.setLegacyMode(boolean) so the default is the
previous last-matching-varargs behavior while keeping the improved conversion
cost ranking as an opt-in (for now).
Fixes jython#452. The packages under com.google were not renamed in the JarJar task because of the META-INF sub-folder was not skipped in failureaccess-1.0.3.jar, which occupies some of the same namespace.
We conform to requirements newly enforced by Sonatype on the contents of a
bundle file. We also switch to using a ZIP containing JARs, and greatly reduce the
size of source JARs, which until now included much unintended material.
jeff5 and others added 15 commits August 21, 2026 08:35
jffi -> 1.4.0
jnr-constants -> 0.11.0
jnr-ffi -> 2.3.0
jnr-posix -> 3.2.1

Conflicts:
 build.gradle
 build.xml
We update Bouncy Castle to 1.85, and build files. The change also fixes _sslcerts.py: Bouncy Castle changed the way it errors on malformed PEM parsing: now we must catch IOException there, too.

Conflicts:
 build.gradle
This changes Jython’s default Java SAX parser configuration so it no
longer resolves external entities or loads external DTDs unless a caller
explicitly re-enables those features.

The hardening is implemented in Lib/xml/sax/drivers2/drv_javasax.py by
defining a single secure default feature set and applying it both to the
JAXP factory and to each created XML reader.
We have to pin icu4j to latest 77.x until Jython moves to Java 11 as minimum.

Conflicts:
 build.gradle
 build.xml
 extlibs/icu4j-78.3.jar
Changes to commons compress mean that it is now an error to call
finish() on a compressed stream followed by close(), and so this change
set removes those calls from compression methods.

Conflicts:
 build.gradle
 build.xml
 src/org/python/modules/bz2/PyBZ2Compressor.java
 src/org/python/modules/bz2/bz2.java
…gly. (jython#450)

Conflicts:
 b/.idea/libraries/extlibs.xml
 build.gradle
 build.xml
Optionally, when multiple Java varargs overloads match a Python argument list,
rank the candidates by conversion quality before falling back to signature
ordering. This preserves the preference for non-varargs overloads added
for jython#221 while avoiding last-match or first-match behavior among varargs
methods.

Add regression coverage for mixed varargs overloads such as
insert(String, String...) and insert(String, boolean...), plus boolean
varargs cases that previously exposed unstable overload selection.

Introduce ReflectedArgs.setLegacyMode(boolean) so the default is the
previous last-matching-varargs behavior while keeping the improved conversion
cost ranking as an opt-in (for now).
Fixes jython#452. The packages under com.google were not renamed in the JarJar task because of the META-INF sub-folder was not skipped in failureaccess-1.0.3.jar, which occupies some of the same namespace.

Conflicts:
 build.gradle
We conform to requirements newly enforced by Sonatype on the contents of a
bundle file. We also switch to using a ZIP containing JARs, and greatly reduce the
size of source JARs, which until now included much unintended material.
@github-actions

github-actions Bot commented Aug 21, 2026

Copy link
Copy Markdown

Gradle Test Results

34 766 tests  ±0   34 766 ✅ +1   15s ⏱️ -1s
    39 suites ±0        0 💤  - 1 
    39 files   ±0        0 ❌ ±0 

Results for commit be2c7f7. ± Comparison against base commit f505689.

♻️ This comment has been updated with latest results.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants