Skip to content

Conversation

sagar-ctds
Copy link

No description provided.

jeff5 and others added 30 commits May 22, 2017 23:27
Fixes regression in launcher that prevents running from bin directory.
…rous tests. Issue is kept open to discuss better future solutions.
…ibs where an update attempt caused notable issues were left unmodified.
This removes an obsolete defence against encoding errors during the
processing of exceptions, which is now dealt with in Py.dispayException.
Problem was a missing assignment to the message variable. Also brought
words closer to CPython 2.7.13.
These functions now match CPython expectations. In many cases, the root
cause was in _socket.py.
This partially backs out cffe5b824a21, to restore synchronisation, but
keeps the IOD singleton pattern to protect the type registry. It backs
out f3458ef83e08, now unnecessary with PyType synchronised. See also
discussion in #2487.
This was a regresion caused when trying to deal with non-ascii paths in
the preparation of a log message. Thanks to James Mudd for diagnosing
this. Also jython#86.
jeff5 and others added 30 commits December 22, 2019 16:33
We leave exiting to the JVM when a main Python program was run and ended
with good status.
Where a unicode argument is given, it is interpreted as bytes through
the default encoding. A test suite is added (missing from CPython 2) to
extend test_binascii to unicode arguments (ASCII decoding only).

There is some tidying up in binascii.java, but more is needed.
There are no functional changes, but some re-ordering and renaming, and
some dead statics are removed. The choice of data types is reconsidered
to reduce masking and casting.
A change to PrePy.getJarFileNameFromURL(URL) in cset:159c277c4a80 broke
the test. getJarFileNameFromURL now no longer insists on a particular
class as target (so we can avoid e.g. waking the type system).

Also, let's test it with non-ascii file names.
This is to investigate issue #2834, but is not a fix. It provides a
failing test (except that the failing assertions are commented out).

These assert that importing the same class definition to interpreters
with distinct class loaders results in distinct Python type objects and
Java classes. In fact, the first interpreter ends up sharing them with
all subsequent ones through the common package manager.
Part of the investigation of #2834, adds use of Thread.sleep to some of
the test scripts, access to which fails quite frequently. The case
testSeparateLoader2() does not produce failures because incorrect
behaviour is currently not tested.
It is necessary to allow PyType.fromClass() to return incompletely
consructed types when building dependent PyTypes in a single thread.
This change intends they should not escape to other threads. We use a
RuntimeException to return a PyType without binding it to its class
prematurely.

Succinct debug methods are left in the code (disabled). We've had to
write these several times to address similar bugs.
CVE-2013-2027 points out that Jython may be run with umask 0, and then
files cached will be world-writable affecting later sessions. #2044
claimed this fixed by other work, but this change fixes the permissions
explicitly in the compiler and package manager.
This change causes the default engine context in a PyScriptEngine to be
created as a module __main__, and __name__ to be defined, comparable to
the environment found when executing a Python program. The thread-local
name space concept is otherwise undisturbed.

org.python.jsr223.ScriptEngineTest cases are modified correspondingly,
and testThreadLocalBindings is fixed to test isolation within a thread.

--HG--
extra : amend_source : 936c178b0add1449e2d1d83a4d2161cd5bcd0ce0
This change updates lib2to3 tests from the CPython stdlib, skipping
where necessary. Rather than call out to the shell for diff (fails on
Windows) we use a comparison function in Python, being careful to choose
the mode rbU to deal with CRLF line endings.
This change addresses a test failure observed in test_jython_initializer
where the build Java is ahead of the default installed Java.
We "inherit" java.home in the otherwise-stripped environment.

--HG--
extra : amend_source : b595dda0ceda305384b4b9fb5cd2f9a84af79df1
We allow up to 2 seconds discrepancy in the logic that decides whether
to re-compile .py source to $py.class files. This is to accommodate the
rounding of last-modified time that occurs when storing and extracting
files from a JAR, as during installation. We choose to round times down
when JARring and allow 2 seconds positive difference in the check.

This has benefits beyond #2862, in avoiding spurious recompilation, so
is made a distinct commit.

At the same time the implications of #2862 are arguably not addressed
fully until the JAR cache is made user-local.

--HG--
extra : amend_source : b01f31c727008f16808e4095db542f9af3949967
We no longer try to cache every user's JARs in the installation
directory, ineffective since fix of #2044. Behaviour for applications
that set an absolute location (or skip) is unchanged.
If the map was modified during a call to keys(), the keyset would change
size and cause an ArrayIndexOutOfBoundsException. This creates a copy of
the keyset and uses that throughout the method.

--HG--
extra : amend_source : 025dd98595b444af0c4ffb67ae4bd4252fb752b4
Shading the Bouncy Castle classes in our JAR makes them untrusted as a
security provider. We document that to work around this, users provide
the JARs directly.
Update version numbers. Add jffi-dll-droppings to .hgignore so as to avoid
complaints from the build after test.
... whilst hoping the next release is actually 2.7.2
Fix options so they actually work, set hard defaults
The commit includes changes to Build.xml to version the
jython-standalone jar file.The commit also includes
a Jenkinsfile which will be used to build the
project with ant and publish the artifacts to
artifactory.
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.