From jython-checkins at python.org Sat Jul 20 17:16:28 2019 From: jython-checkins at python.org (jeff.allen) Date: Sat, 20 Jul 2019 21:16:28 +0000 Subject: [Jython-checkins] =?utf-8?q?jython=3A_Backed_out_changeset=3A_e3?= =?utf-8?q?aeea3760a3_=28to_restore_README=2Etxt=29?= Message-ID: <20190720211628.1.129950B4AA17E6F5@mg.python.org> https://hg.python.org/jython/rev/ed2036696840 changeset: 8253:ed2036696840 parent: 8251:c3f584b2e220 user: Jeff Allen date: Fri Jul 19 21:09:27 2019 +0100 summary: Backed out changeset: e3aeea3760a3 (to restore README.txt) files: README.txt | 38 ++++++++++++++++++++++++++++++++++++++ 1 files changed, 38 insertions(+), 0 deletions(-) diff --git a/README.txt b/README.txt new file mode 100644 --- /dev/null +++ b/README.txt @@ -0,0 +1,38 @@ +Jython: Python for the Java Platform + +Welcome to Jython 2.7.2a1. + +This is an alpha release of the 2.7.2 version of Jython. Along with +language and runtime compatibility with CPython 2.7, Jython 2.7 +provides substantial support of the Python ecosystem. This includes +built-in support of pip/setuptools (you can use with bin/pip) and a +native launcher for Windows (bin/jython.exe), with the implication +that you can finally install Jython scripts on Windows. + +**Note that if you have JYTHON_HOME set, you should unset it to avoid +problems with the installer and pip/setuptools.** + +Jim Baker presented a talk at PyCon 2015 about Jython 2.7, including +demos of new features: https://www.youtube.com/watch?v=hLm3garVQFo + +The release was compiled on OSX using JDK 7 and requires a minimum of +Java 7 to run. + +Please try this release out and report any bugs at +http://bugs.jython.org You can test your installation of Jython (not +the standalone jar) by running the regression tests, with the command: + +jython -m test.regrtest -e -m regrtest_memo.txt + +For Windows, there is a simple script to do this: jython_regrtest.bat. +In either case, the memo file regrtest_memo.txt will be useful in the +bug report if you see test failures. The regression tests can take +about half an hour. + +See ACKNOWLEDGMENTS for details about Jython's copyright, license, +contributors, and mailing lists; and NEWS for detailed release notes, +including bugs fixed, backwards breaking changes, and new features. We +sincerely thank all who contribute to Jython, including - but not +limited to - bug reports, patches, pull requests, documentation +changes, support emails, and fantastic conversation on Freenode at +#jython. Join us there for your questions and answers! -- Repository URL: https://hg.python.org/jython From jython-checkins at python.org Sat Jul 20 17:16:29 2019 From: jython-checkins at python.org (jeff.allen) Date: Sat, 20 Jul 2019 21:16:29 +0000 Subject: [Jython-checkins] =?utf-8?q?jython=3A_Ignore_JYTHON=5FHOME_durin?= =?utf-8?q?g_installation_of_pip_=28fixes_=232345=29=2E?= Message-ID: <20190720211629.1.3958D0854301B43A@mg.python.org> https://hg.python.org/jython/rev/6e1f58fc7445 changeset: 8254:6e1f58fc7445 user: Jeff Allen date: Sat Jul 20 19:13:11 2019 +0100 summary: Ignore JYTHON_HOME during installation of pip (fixes #2345). And stop warning people about it in README too. files: NEWS | 1 + README.md | 4 - README.txt | 16 +- installer/src/java/org/python/util/install/ChildProcess.java | 54 ++++++--- installer/src/java/org/python/util/install/JarInstaller.java | 2 + 5 files changed, 46 insertions(+), 31 deletions(-) diff --git a/NEWS b/NEWS --- a/NEWS +++ b/NEWS @@ -5,6 +5,7 @@ Development tip Bugs fixed + - [ 2345 ] Installing pip fails if JYTHON_HOME points to old installation - [ 2774 ] test_ssl failures from weak certificate - [ 2768 ] Allow bytearray + and += to accept buffer protocol objects - [ 2742 ] JARs for bouncycastle out of date (upgrade to 1.16) diff --git a/README.md b/README.md --- a/README.md +++ b/README.md @@ -3,12 +3,8 @@ This is the development repository of Jython. Along with language and runtime compatibility with CPython 2.7, Jython 2.7 provides substantial support of the Python ecosystem. This includes built-in support of *pip/setuptools* (you can use with `bin/pip`) and a native launcher for Windows (`bin/jython.exe`), with the implication that you can finally install Jython scripts on Windows. -**Note that if you have `JYTHON_HOME` set, you should unset it to avoid problems with the installer and pip/setuptools.** - Jim Baker presented a talk at PyCon 2015 about Jython 2.7, including demos of new features: https://www.youtube.com/watch?v=hLm3garVQFo -The release was compiled on OSX using JDK 7 and requires a minimum of Java 7 to run. - Please try this release out and report any bugs at http://bugs.jython.org You can test your installation of Jython (not the standalone jar) by running the regression tests, with the command: diff --git a/README.txt b/README.txt --- a/README.txt +++ b/README.txt @@ -6,11 +6,7 @@ language and runtime compatibility with CPython 2.7, Jython 2.7 provides substantial support of the Python ecosystem. This includes built-in support of pip/setuptools (you can use with bin/pip) and a -native launcher for Windows (bin/jython.exe), with the implication -that you can finally install Jython scripts on Windows. - -**Note that if you have JYTHON_HOME set, you should unset it to avoid -problems with the installer and pip/setuptools.** +native launcher for Windows (bin/jython.exe). Jim Baker presented a talk at PyCon 2015 about Jython 2.7, including demos of new features: https://www.youtube.com/watch?v=hLm3garVQFo @@ -31,8 +27,8 @@ See ACKNOWLEDGMENTS for details about Jython's copyright, license, contributors, and mailing lists; and NEWS for detailed release notes, -including bugs fixed, backwards breaking changes, and new features. We -sincerely thank all who contribute to Jython, including - but not -limited to - bug reports, patches, pull requests, documentation -changes, support emails, and fantastic conversation on Freenode at -#jython. Join us there for your questions and answers! +including bugs fixed, backwards breaking changes, and new features. + +We sincerely thank all who contributed to this release of Jython, +through bug reports, patches, pull requests, documentation changes, +email and conversation in all media. diff --git a/installer/src/java/org/python/util/install/ChildProcess.java b/installer/src/java/org/python/util/install/ChildProcess.java --- a/installer/src/java/org/python/util/install/ChildProcess.java +++ b/installer/src/java/org/python/util/install/ChildProcess.java @@ -6,7 +6,9 @@ import java.io.InputStreamReader; import java.nio.file.Path; import java.util.ArrayList; +import java.util.HashMap; import java.util.List; +import java.util.Map; /** * Easy start of a child process. @@ -86,6 +88,11 @@ private String _command[] = null; /** + * Environment name-value pairs to add or remove (if null) at the start of {@link #run()}. + */ + private Map _environmentChanges = new HashMap<>(); + + /** * The timeout (in milliseconds) */ private long _timeout = INFINITE_TIMEOUT; @@ -170,6 +177,16 @@ public void setCWD(Path cwd) { _cwd = cwd; } + /** + * Set or delete an environment variable for the subsequently run command. + * + * @param key name of variable + * @param value new value or {@code null} to delete it. + */ + public void putEnvironment(String key, String value) { + _environmentChanges.put(key, value); + } + public Path getCWD() { return _cwd; } /** @@ -263,14 +280,23 @@ try { // determine start time _startTime = System.currentTimeMillis(); - // start the process + // Create and configure the process specification ProcessBuilder pb = new ProcessBuilder(); pb.command(getCommand()); if (getCWD() != null) { pb.directory(getCWD().toFile()); } + // Adjust the environment variables from the default System.getenv() + for (Map.Entry change : _environmentChanges.entrySet()) { + if (change.getValue() == null) { + pb.environment().remove(change.getKey()); + } else { + pb.environment().put(change.getKey(), change.getValue()); + } + } + // Run the process with redirected input and error streams. + debugCommand(pb); _process = pb.start(); - debugCommand(); // handle stdout and stderr OutputMonitor stdoutMonitor = new OutputMonitor(_process.getInputStream()); stdoutMonitor.start(); @@ -349,21 +375,15 @@ /** * Lists the submitted command (if so indicated) */ - private void debugCommand() { + private void debugCommand(ProcessBuilder pb) { if (isDebug()) { - String[] command = getCommand(); - if (command != null) { - System.out.print("[ChildProcess] command '"); - for (int i = 0; i < command.length; i++) { - String commandPart = command[i]; - if (i == 0) { - System.out.print(commandPart); - } else { - System.out.print(" " + commandPart); - } - } - System.out.println("' is now running..."); - } + System.out.print("[ChildProcess] command = "); + System.out.println(pb.command()); + System.out.print("[ChildProcess] environment = "); + System.out.println(pb.environment()); + System.out.print("[ChildProcess] working directory = "); + System.out.println(pb.directory()); } } -} \ No newline at end of file +} + diff --git a/installer/src/java/org/python/util/install/JarInstaller.java b/installer/src/java/org/python/util/install/JarInstaller.java --- a/installer/src/java/org/python/util/install/JarInstaller.java +++ b/installer/src/java/org/python/util/install/JarInstaller.java @@ -188,6 +188,8 @@ } ChildProcess childProcess = new ChildProcess(command); childProcess.setCWD(bindir); + // JYTHON_HOME will be wrong if set: see https://bugs.jython.org/issue2345 + childProcess.putEnvironment("JYTHON_HOME", null); errorCode = childProcess.run(); } catch (Throwable t) { errorCode = 1; -- Repository URL: https://hg.python.org/jython From jython-checkins at python.org Sat Jul 20 17:16:29 2019 From: jython-checkins at python.org (jeff.allen) Date: Sat, 20 Jul 2019 21:16:29 +0000 Subject: [Jython-checkins] =?utf-8?q?jython=3A_Provide_README=2E=28md=7Ct?= =?utf-8?q?xt=29_with_distinct_content_=28completes_=232764=29?= Message-ID: <20190720211629.1.7887AAE89422197B@mg.python.org> https://hg.python.org/jython/rev/5deb7d7984e8 changeset: 8255:5deb7d7984e8 user: Jeff Allen date: Sat Jul 20 19:51:23 2019 +0100 summary: Provide README.(md|txt) with distinct content (completes #2764) This reflects the idea that README.md describes the project for GitHub visitors (build instructions, etc.), and README.txt is to be seen during/after installation. Also, note our use of Gradle as a feature. files: NEWS | 4 + README.md | 88 +++++++++++++++++++++++++++++++++++++++--- 2 files changed, 84 insertions(+), 8 deletions(-) diff --git a/NEWS b/NEWS --- a/NEWS +++ b/NEWS @@ -5,6 +5,7 @@ Development tip Bugs fixed + - [ 2764 ] Readme is not displayed when using the GUI installer - [ 2345 ] Installing pip fails if JYTHON_HOME points to old installation - [ 2774 ] test_ssl failures from weak certificate - [ 2768 ] Allow bytearray + and += to accept buffer protocol objects @@ -69,6 +70,9 @@ - We no longer recommend overriding toString in PyObject sub-classes as a way of defining string forms. Override __repr__, and if necessary __str__, as is usual in Python. We recommend toString should return the same as __str__ (or __unicode__). + - Experimentally, we use Gradle to build a JAR and POM that may be cited as a dependency by + other projects. The Jython project would like to know if this is being done suitably + for downstream use. Jython 2.7.2a1 Bugs fixed diff --git a/README.md b/README.md --- a/README.md +++ b/README.md @@ -1,16 +1,88 @@ # Jython: Python for the Java Platform -[![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.python/jython-standalone/badge.svg)](https://search.maven.org/artifact/org.python/jython-standalone/) [![Javadocs](https://www.javadoc.io/badge/org.python/jython-standalone.svg)](https://www.javadoc.io/doc/org.python/jython-standalone) +[![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.python/jython-standalone/badge.svg)](https://search.maven.org/artifact/org.python/jython-standalone/) +[![Javadocs](https://www.javadoc.io/badge/org.python/jython-standalone.svg)](https://www.javadoc.io/doc/org.python/jython-standalone) + +This is the development repository of Jython, +the implementation of Python 2.7 in Java. +Along with good (not perfect!) language +and runtime compatibility with CPython 2.7, +Jython 2.7 provides substantial support of the Python ecosystem. +This includes built-in support of *pip/setuptools* +(you can use `bin/pip` if the targets do not include `C` extensions) +and a native launcher for Windows (`bin/jython.exe`) +that works essentially as the `python` command. + +Jim Baker presented a talk at PyCon 2015 about Jython 2.7, +including demos of new features: https://www.youtube.com/watch?v=hLm3garVQFo -This is the development repository of Jython. Along with language and runtime compatibility with CPython 2.7, Jython 2.7 provides substantial support of the Python ecosystem. This includes built-in support of *pip/setuptools* (you can use with `bin/pip`) and a native launcher for Windows (`bin/jython.exe`), with the implication that you can finally install Jython scripts on Windows. +See [ACKNOWLEDGMENTS](ACKNOWLEDGMENTS) for details about Jython's copyright, +license, contributors, and mailing lists. +Consult [NEWS](NEWS) for detailed release notes, including bugs fixed, +backwards breaking changes, and new features. +We sincerely thank all who contribute to Jython, by bug reports, patches, +pull requests, documentation changes and e-mail discussions. -Jim Baker presented a talk at PyCon 2015 about Jython 2.7, including demos of new features: https://www.youtube.com/watch?v=hLm3garVQFo +## How to build Jython + +The project uses Mercurial for version-control, +and the master repository is at https://hg.python.org/jython/, +while the repository on GitHub is just a mirror of that. +You may clone either repository to create a buildable copy of the latest state +of the Jython source. + +### Build using `ant` for development -Please try this release out and report any bugs at http://bugs.jython.org +Jython is normally built using `ant`. +It is necessary to have Ant and at least a Java 7 SDK on the path. +To build Jython development use, we generally use the command: +``` +ant +``` +This leaves an executable in `dist/bin` +that you may run from the check-out root with: +``` +dist/bin/jython +``` +Other `ant` targets exist, notably `clean`, and `jar`. -You can test your installation of Jython (not the standalone jar) by running the regression tests, with the command: +You can test your build of Jython (by running the regression tests), +with the command: +``` +dist/bin/jython -m test.regrtest -e -m regrtest_memo.txt +``` + +### Build an installer using `ant` + +If you want to install a snapshot build of Jython, use the command: +``` +ant installer ``` -jython -m test.regrtest -e -m regrtest_memo.txt +This will leave you with a snapshot installer JAR in `dist`, +that you can run with: +``` +java -jar jython-installer.jar +``` +for the graphical installer, or: +``` +java -jar jython-installer.jar --console ``` -For Windows, there is a simple script to do this: `jython_regrtest.bat`. In either case, the memo file `regrtest_memo.txt` will be useful in the bug report if you see test failures. The regression tests can take about half an hour. +For the console version. (A `--help` option gives you the full story.) + +### Build a JAR using Gradle -See [ACKNOWLEDGMENTS](ACKNOWLEDGMENTS) for details about Jython's copyright, license, contributors, and mailing lists; and [NEWS](NEWS) for detailed release notes, including bugs fixed, backwards breaking changes, and new features. We sincerely thank all who contribute to Jython, including - but not limited to - bug reports, patches, pull requests, documentation changes, support emails, and fantastic conversation on Freenode at #jython. Join us there for your questions and answers! +Experimentally, we have a Gradle build that results in a family of JARs, +and a POM. +This is intended to provide the Jython core in a form that Gradle and Maven +users can consume as a dependency. +Invoke this with: +``` +PS> .\gradlew publish +``` +and a JAR and POM are delivered to ` .build2\repo` + +Whereas the JARs delivered by the installer are somewhat "fat", +embedding certain dependencies in shaded (renamed) form, +the JARs from the Gradle build are "spare" +and cite their dependencies externally through a POM. +The project would like to know if this is being done suitably +for downstream use. -- Repository URL: https://hg.python.org/jython From jython-checkins at python.org Sat Jul 20 17:16:30 2019 From: jython-checkins at python.org (jeff.allen) Date: Sat, 20 Jul 2019 21:16:30 +0000 Subject: [Jython-checkins] =?utf-8?q?jython_=28merge_default_-=3E_default?= =?utf-8?q?=29=3A_Merge_commit?= Message-ID: <20190720211630.1.FCEA24D70C143630@mg.python.org> https://hg.python.org/jython/rev/91d69ae5d35d changeset: 8256:91d69ae5d35d parent: 8252:f3baccd1fc34 parent: 8255:5deb7d7984e8 user: Jeff Allen date: Sat Jul 20 20:07:46 2019 +0100 summary: Merge commit files: NEWS | 5 + README.md | 88 ++++++++- README.txt | 34 +++ installer/src/java/org/python/util/install/ChildProcess.java | 54 ++++- installer/src/java/org/python/util/install/JarInstaller.java | 2 + 5 files changed, 156 insertions(+), 27 deletions(-) diff --git a/NEWS b/NEWS --- a/NEWS +++ b/NEWS @@ -6,6 +6,8 @@ Development tip Bugs fixed - [ 2708 ] test_urllib2net fails (on Travis CI) + - [ 2764 ] Readme is not displayed when using the GUI installer + - [ 2345 ] Installing pip fails if JYTHON_HOME points to old installation - [ 2774 ] test_ssl failures from weak certificate - [ 2768 ] Allow bytearray + and += to accept buffer protocol objects - [ 2742 ] JARs for bouncycastle out of date (upgrade to 1.16) @@ -69,6 +71,9 @@ - We no longer recommend overriding toString in PyObject sub-classes as a way of defining string forms. Override __repr__, and if necessary __str__, as is usual in Python. We recommend toString should return the same as __str__ (or __unicode__). + - Experimentally, we use Gradle to build a JAR and POM that may be cited as a dependency by + other projects. The Jython project would like to know if this is being done suitably + for downstream use. Jython 2.7.2a1 Bugs fixed diff --git a/README.md b/README.md --- a/README.md +++ b/README.md @@ -1,20 +1,88 @@ # Jython: Python for the Java Platform -[![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.python/jython-standalone/badge.svg)](https://search.maven.org/artifact/org.python/jython-standalone/) [![Javadocs](https://www.javadoc.io/badge/org.python/jython-standalone.svg)](https://www.javadoc.io/doc/org.python/jython-standalone) +[![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.python/jython-standalone/badge.svg)](https://search.maven.org/artifact/org.python/jython-standalone/) +[![Javadocs](https://www.javadoc.io/badge/org.python/jython-standalone.svg)](https://www.javadoc.io/doc/org.python/jython-standalone) + +This is the development repository of Jython, +the implementation of Python 2.7 in Java. +Along with good (not perfect!) language +and runtime compatibility with CPython 2.7, +Jython 2.7 provides substantial support of the Python ecosystem. +This includes built-in support of *pip/setuptools* +(you can use `bin/pip` if the targets do not include `C` extensions) +and a native launcher for Windows (`bin/jython.exe`) +that works essentially as the `python` command. + +Jim Baker presented a talk at PyCon 2015 about Jython 2.7, +including demos of new features: https://www.youtube.com/watch?v=hLm3garVQFo -This is the development repository of Jython. Along with language and runtime compatibility with CPython 2.7, Jython 2.7 provides substantial support of the Python ecosystem. This includes built-in support of *pip/setuptools* (you can use with `bin/pip`) and a native launcher for Windows (`bin/jython.exe`), with the implication that you can finally install Jython scripts on Windows. +See [ACKNOWLEDGMENTS](ACKNOWLEDGMENTS) for details about Jython's copyright, +license, contributors, and mailing lists. +Consult [NEWS](NEWS) for detailed release notes, including bugs fixed, +backwards breaking changes, and new features. +We sincerely thank all who contribute to Jython, by bug reports, patches, +pull requests, documentation changes and e-mail discussions. -**Note that if you have `JYTHON_HOME` set, you should unset it to avoid problems with the installer and pip/setuptools.** +## How to build Jython -Jim Baker presented a talk at PyCon 2015 about Jython 2.7, including demos of new features: https://www.youtube.com/watch?v=hLm3garVQFo +The project uses Mercurial for version-control, +and the master repository is at https://hg.python.org/jython/, +while the repository on GitHub is just a mirror of that. +You may clone either repository to create a buildable copy of the latest state +of the Jython source. + +### Build using `ant` for development -The release was compiled on OSX using JDK 7 and requires a minimum of Java 7 to run. +Jython is normally built using `ant`. +It is necessary to have Ant and at least a Java 7 SDK on the path. +To build Jython development use, we generally use the command: +``` +ant +``` +This leaves an executable in `dist/bin` +that you may run from the check-out root with: +``` +dist/bin/jython +``` +Other `ant` targets exist, notably `clean`, and `jar`. -Please try this release out and report any bugs at http://bugs.jython.org +You can test your build of Jython (by running the regression tests), +with the command: +``` +dist/bin/jython -m test.regrtest -e -m regrtest_memo.txt +``` -You can test your installation of Jython (not the standalone jar) by running the regression tests, with the command: +### Build an installer using `ant` + +If you want to install a snapshot build of Jython, use the command: +``` +ant installer ``` -jython -m test.regrtest -e -m regrtest_memo.txt +This will leave you with a snapshot installer JAR in `dist`, +that you can run with: +``` +java -jar jython-installer.jar +``` +for the graphical installer, or: +``` +java -jar jython-installer.jar --console ``` -For Windows, there is a simple script to do this: `jython_regrtest.bat`. In either case, the memo file `regrtest_memo.txt` will be useful in the bug report if you see test failures. The regression tests can take about half an hour. +For the console version. (A `--help` option gives you the full story.) + +### Build a JAR using Gradle -See [ACKNOWLEDGMENTS](ACKNOWLEDGMENTS) for details about Jython's copyright, license, contributors, and mailing lists; and [NEWS](NEWS) for detailed release notes, including bugs fixed, backwards breaking changes, and new features. We sincerely thank all who contribute to Jython, including - but not limited to - bug reports, patches, pull requests, documentation changes, support emails, and fantastic conversation on Freenode at #jython. Join us there for your questions and answers! +Experimentally, we have a Gradle build that results in a family of JARs, +and a POM. +This is intended to provide the Jython core in a form that Gradle and Maven +users can consume as a dependency. +Invoke this with: +``` +PS> .\gradlew publish +``` +and a JAR and POM are delivered to ` .build2\repo` + +Whereas the JARs delivered by the installer are somewhat "fat", +embedding certain dependencies in shaded (renamed) form, +the JARs from the Gradle build are "spare" +and cite their dependencies externally through a POM. +The project would like to know if this is being done suitably +for downstream use. diff --git a/README.txt b/README.txt new file mode 100644 --- /dev/null +++ b/README.txt @@ -0,0 +1,34 @@ +Jython: Python for the Java Platform + +Welcome to Jython 2.7.2a1. + +This is an alpha release of the 2.7.2 version of Jython. Along with +language and runtime compatibility with CPython 2.7, Jython 2.7 +provides substantial support of the Python ecosystem. This includes +built-in support of pip/setuptools (you can use with bin/pip) and a +native launcher for Windows (bin/jython.exe). + +Jim Baker presented a talk at PyCon 2015 about Jython 2.7, including +demos of new features: https://www.youtube.com/watch?v=hLm3garVQFo + +The release was compiled on OSX using JDK 7 and requires a minimum of +Java 7 to run. + +Please try this release out and report any bugs at +http://bugs.jython.org You can test your installation of Jython (not +the standalone jar) by running the regression tests, with the command: + +jython -m test.regrtest -e -m regrtest_memo.txt + +For Windows, there is a simple script to do this: jython_regrtest.bat. +In either case, the memo file regrtest_memo.txt will be useful in the +bug report if you see test failures. The regression tests can take +about half an hour. + +See ACKNOWLEDGMENTS for details about Jython's copyright, license, +contributors, and mailing lists; and NEWS for detailed release notes, +including bugs fixed, backwards breaking changes, and new features. + +We sincerely thank all who contributed to this release of Jython, +through bug reports, patches, pull requests, documentation changes, +email and conversation in all media. diff --git a/installer/src/java/org/python/util/install/ChildProcess.java b/installer/src/java/org/python/util/install/ChildProcess.java --- a/installer/src/java/org/python/util/install/ChildProcess.java +++ b/installer/src/java/org/python/util/install/ChildProcess.java @@ -6,7 +6,9 @@ import java.io.InputStreamReader; import java.nio.file.Path; import java.util.ArrayList; +import java.util.HashMap; import java.util.List; +import java.util.Map; /** * Easy start of a child process. @@ -86,6 +88,11 @@ private String _command[] = null; /** + * Environment name-value pairs to add or remove (if null) at the start of {@link #run()}. + */ + private Map _environmentChanges = new HashMap<>(); + + /** * The timeout (in milliseconds) */ private long _timeout = INFINITE_TIMEOUT; @@ -170,6 +177,16 @@ public void setCWD(Path cwd) { _cwd = cwd; } + /** + * Set or delete an environment variable for the subsequently run command. + * + * @param key name of variable + * @param value new value or {@code null} to delete it. + */ + public void putEnvironment(String key, String value) { + _environmentChanges.put(key, value); + } + public Path getCWD() { return _cwd; } /** @@ -263,14 +280,23 @@ try { // determine start time _startTime = System.currentTimeMillis(); - // start the process + // Create and configure the process specification ProcessBuilder pb = new ProcessBuilder(); pb.command(getCommand()); if (getCWD() != null) { pb.directory(getCWD().toFile()); } + // Adjust the environment variables from the default System.getenv() + for (Map.Entry change : _environmentChanges.entrySet()) { + if (change.getValue() == null) { + pb.environment().remove(change.getKey()); + } else { + pb.environment().put(change.getKey(), change.getValue()); + } + } + // Run the process with redirected input and error streams. + debugCommand(pb); _process = pb.start(); - debugCommand(); // handle stdout and stderr OutputMonitor stdoutMonitor = new OutputMonitor(_process.getInputStream()); stdoutMonitor.start(); @@ -349,21 +375,15 @@ /** * Lists the submitted command (if so indicated) */ - private void debugCommand() { + private void debugCommand(ProcessBuilder pb) { if (isDebug()) { - String[] command = getCommand(); - if (command != null) { - System.out.print("[ChildProcess] command '"); - for (int i = 0; i < command.length; i++) { - String commandPart = command[i]; - if (i == 0) { - System.out.print(commandPart); - } else { - System.out.print(" " + commandPart); - } - } - System.out.println("' is now running..."); - } + System.out.print("[ChildProcess] command = "); + System.out.println(pb.command()); + System.out.print("[ChildProcess] environment = "); + System.out.println(pb.environment()); + System.out.print("[ChildProcess] working directory = "); + System.out.println(pb.directory()); } } -} \ No newline at end of file +} + diff --git a/installer/src/java/org/python/util/install/JarInstaller.java b/installer/src/java/org/python/util/install/JarInstaller.java --- a/installer/src/java/org/python/util/install/JarInstaller.java +++ b/installer/src/java/org/python/util/install/JarInstaller.java @@ -188,6 +188,8 @@ } ChildProcess childProcess = new ChildProcess(command); childProcess.setCWD(bindir); + // JYTHON_HOME will be wrong if set: see https://bugs.jython.org/issue2345 + childProcess.putEnvironment("JYTHON_HOME", null); errorCode = childProcess.run(); } catch (Throwable t) { errorCode = 1; -- Repository URL: https://hg.python.org/jython From jython-checkins at python.org Sun Jul 21 15:20:50 2019 From: jython-checkins at python.org (jeff.allen) Date: Sun, 21 Jul 2019 19:20:50 +0000 Subject: [Jython-checkins] =?utf-8?q?jython=3A_Narrow_the_range_of_org=2E?= =?utf-8?q?apache_packages_renamed_in_jars_=28fixes_=232703=29=2E?= Message-ID: <20190721192050.1.C9684D8BE1348952@mg.python.org> https://hg.python.org/jython/rev/a19b28c28fe6 changeset: 8257:a19b28c28fe6 user: Jeff Allen date: Sun Jul 21 20:10:45 2019 +0100 summary: Narrow the range of org.apache packages renamed in jars (fixes #2703). The JarJar links task that embeds certain dependencies no longer renames org.apache classes outside the ranges we need. In particular, components of Apache Ant are now identified by their real names. files: NEWS | 1 + build.xml | 2 +- 2 files changed, 2 insertions(+), 1 deletions(-) diff --git a/NEWS b/NEWS --- a/NEWS +++ b/NEWS @@ -5,6 +5,7 @@ Development tip Bugs fixed + - [ 2703 ] JycompileAntTask cannot find ...ant.taskdefs.MatchingTask - [ 2708 ] test_urllib2net fails (on Travis CI) - [ 2764 ] Readme is not displayed when using the GUI installer - [ 2345 ] Installing pip fails if JYTHON_HOME points to old installation diff --git a/build.xml b/build.xml --- a/build.xml +++ b/build.xml @@ -559,7 +559,7 @@ - + -- Repository URL: https://hg.python.org/jython From jython-checkins at python.org Tue Jul 23 02:54:03 2019 From: jython-checkins at python.org (jeff.allen) Date: Tue, 23 Jul 2019 06:54:03 +0000 Subject: [Jython-checkins] =?utf-8?q?jython=3A_Enable_regrtest_option_-w_?= =?utf-8?q?=28re-run_failures_verbose=29_to_co-exist_with_-j?= Message-ID: <20190723065403.1.881D60A2DA42ED04@mg.python.org> https://hg.python.org/jython/rev/f28f5cd9a2f1 changeset: 8258:f28f5cd9a2f1 user: Jeff Allen date: Mon Jul 22 22:39:42 2019 +0100 summary: Enable regrtest option -w (re-run failures verbose) to co-exist with -j test_support.junit_xml_dir once set, would interfere with the intent of the -w option. Arrange to set and *reset* it in runtest_inner. This should not allow us to see which tests failed in Travis and other CI. files: Lib/test/regrtest.py | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py --- a/Lib/test/regrtest.py +++ b/Lib/test/regrtest.py @@ -378,7 +378,6 @@ test_times = [] test_support.verbose = verbose # Tell tests to be moderately quiet test_support.use_resources = use_resources - test_support.junit_xml_dir = junit_xml save_modules = sys.modules.keys() skips = _ExpectedSkips() @@ -600,6 +599,7 @@ save_stderr = sys.stderr sys.stdout = stdout = Tee(sys.stdout) sys.stderr = stderr = Tee(sys.stderr) + test_support.junit_xml_dir = junit_xml_dir try: if capture_stdout: sys.stdout = capture_stdout @@ -630,6 +630,7 @@ test_times.append((test_time, test)) finally: sys.stdout = save_stdout + test_support.junit_xml_dir = None if junit_xml_dir: sys.stderr = save_stderr test_time = time.time() - start_time -- Repository URL: https://hg.python.org/jython From jython-checkins at python.org Wed Jul 24 14:19:52 2019 From: jython-checkins at python.org (jeff.allen) Date: Wed, 24 Jul 2019 18:19:52 +0000 Subject: [Jython-checkins] =?utf-8?q?jython=3A_Centralize_constants_and_d?= =?utf-8?q?ocumentation_for_registry_keys=2E?= Message-ID: <20190724181952.1.819F26FEEAA8037A@mg.python.org> https://hg.python.org/jython/rev/6e30f4eb4c99 changeset: 8259:6e30f4eb4c99 user: Adam Burke date: Tue Jul 23 08:16:48 2019 +0100 summary: Centralize constants and documentation for registry keys. This change places the registry keys supported by jython into a single constants class so that users may find the documenation more easily. python.division.warning: The deprecation notice was added by this change, but follows the CPython approach. python.options.caseok: The code check is still in place and still seems to match the description, but perhaps this property should be history. python.security.respectJavaAccessibility: adds note on --illegal-access. Changes to the supplied registry file are minor in this change. The documentation there might be shortened in future. files: registry | 4 + src/org/python/compiler/Module.java | 15 +- src/org/python/core/Console.java | 2 + src/org/python/core/Options.java | 47 +- src/org/python/core/PlainConsole.java | 2 + src/org/python/core/PySystemState.java | 19 +- src/org/python/core/RegistryKey.java | 249 ++++++++++ src/org/python/core/packagecache/SysPackageManager.java | 26 +- src/org/python/modules/posix/OS.java | 4 +- src/org/python/util/JycompileAntTask.java | 3 +- src/org/python/util/ProxyCompiler.java | 3 +- src/org/python/util/jython.java | 10 +- tests/java/javatests/Issue1972.java | 1 - tests/java/org/python/compiler/JavaMakerSmokeTest.java | 3 +- tests/java/org/python/expose/generate/InterpTestCase.java | 3 +- tests/java/org/python/util/jythonTestPlain.java | 2 +- 16 files changed, 334 insertions(+), 59 deletions(-) diff --git a/registry b/registry --- a/registry +++ b/registry @@ -1,6 +1,10 @@ # Python Registry -*- sh -*- # This default registry sets many common options to their default values # All of these settings could be erased with no change in behavior +# +# Definitive descriptions of supported keys and values is in the javadoc +# for org.python.core.RegistryKey +# # This is how Jim sets his path on his Windows development machine #python.path=.;c:\\Jython\\Lib;d:\\Python-1.5.2\\Lib diff --git a/src/org/python/compiler/Module.java b/src/org/python/compiler/Module.java --- a/src/org/python/compiler/Module.java +++ b/src/org/python/compiler/Module.java @@ -1,6 +1,7 @@ // Copyright (c) Corporation for National Research Initiatives package org.python.compiler; +import static org.python.core.RegistryKey.PYTHON_CPYTHON; import static org.python.util.CodegenUtils.ci; import static org.python.util.CodegenUtils.p; import static org.python.util.CodegenUtils.sig; @@ -54,6 +55,8 @@ import org.python.core.ThreadState; import org.python.modules._marshal; + + class PyIntegerConstant extends Constant implements ClassConstants, Opcodes { final int value; @@ -717,9 +720,6 @@ module.mainCode = main; } - /** Property naming the cpython executable. */ - private static String CPYTHON = "python.cpython2"; - // Error message formats required by loadPyBytecode private static String TRIED_CREATE_PYC_MSG = "\nJython tried to create a pyc-file by executing\n %s\nwhich failed because %s"; @@ -729,10 +729,11 @@ + "\n python -m py_compile %s"; private static String CPYTHON_CMD_MSG = "\n\nAlternatively, specify a CPython 2.7 command via the " // - + CPYTHON + " property, e.g.:" // - + "\n jython -D" + CPYTHON + "=python" // + + PYTHON_CPYTHON + " property, e.g.:" // + + "\n jython -D" + PYTHON_CPYTHON + "=python" // + "\nor (e.g. for pip) through the environment variable JYTHON_OPTS:" // - + "\n export JYTHON_OPTS=\"-D" + CPYTHON + "=python\"\n"; + + "\n export JYTHON_OPTS=\"-D" + PYTHON_CPYTHON + + "=python\"\n"; private static PyBytecode loadPyBytecode(String filename, boolean try_cpython) throws RuntimeException { @@ -780,7 +781,7 @@ + String.format(PLEASE_PROVIDE_MSG, filename)); } else { - String CPython_command = System.getProperty(CPYTHON); + String CPython_command = System.getProperty(PYTHON_CPYTHON); if (try_cpython && CPython_command != null) { // check version... String command_ver = CPython_command + " --version"; diff --git a/src/org/python/core/Console.java b/src/org/python/core/Console.java --- a/src/org/python/core/Console.java +++ b/src/org/python/core/Console.java @@ -11,6 +11,8 @@ * use on the console. Such a class may provide line editing and history recall to an interactive * console. A default implementation (that does not provide any such facilities) is available as * {@link PlainConsole}. + * + * @see org.python.core.RegistryKey.PYTHON_CONSOLE */ public interface Console { diff --git a/src/org/python/core/Options.java b/src/org/python/core/Options.java --- a/src/org/python/core/Options.java +++ b/src/org/python/core/Options.java @@ -1,6 +1,8 @@ // Copyright (c) Corporation for National Research Initiatives package org.python.core; +import static org.python.core.RegistryKey.*; + /** * A class with static fields for each of the settable options. The options from * registry and command line is copied into the fields here and the rest of @@ -20,6 +22,8 @@ * If true, exceptions raised from Python code will include a Java stack * trace in addition to the Python traceback. This can slow raising * considerably. + * + * @see org.python.core.RegistryKey#PYTHON_OPTIONS_INCLUDE_JAVA_STACK_IN_EXCEPTIONS */ public static boolean includeJavaStackInExceptions = true; @@ -29,6 +33,8 @@ * implementing CORBA server. Some CORBA servers will turn python exception * (say a NameError) into an anonymous user exception without any * stacktrace. Setting this option will show the stacktrace. + * + * @see org.python.core.RegistryKey#PYTHON_OPTIONS_SHOW_PYTHON_PROXY_EXCEPTIONS */ public static boolean showPythonProxyExceptions = false; @@ -37,6 +43,8 @@ * methods, and constructors. This means you can only access public members. * Set this to false to access all members by toggling the accessible flag * on the member. + * + * @see org.python.core.RegistryKey#PYTHON_SECURITY_RESPECT_JAVA_ACCESSIBILITY */ public static boolean respectJavaAccessibility = true; @@ -46,6 +54,7 @@ * {@link org.python.util.PythonInterpreter}. * * @see #no_site + * @see org.python.core.RegistryKey#PYTHON_IMPORT_SITE */ public static boolean importSite = true; @@ -96,11 +105,15 @@ * File.isFile() returns true. Setting this to true have no effect on * unix-type filesystems. On Windows/HFS+ systems setting it to true will * enable Jython-2.0 behaviour. + * + * @see org.python.core.RegistryKey#PYTHON_OPTIONS_CASE_OK */ public static boolean caseok = false; /** * If true, enable truedivision for the '/' operator. + * + * @see org.python.core.RegistryKey#PYTHON_OPTIONS_Q_NEW; */ public static boolean Qnew = false; @@ -160,7 +173,7 @@ } private static boolean getBooleanOption(String name, boolean defaultValue) { - String prop = PySystemState.registry.getProperty("python." + name); + String prop = PySystemState.registry.getProperty(name); if (prop == null) { return defaultValue; } @@ -168,7 +181,7 @@ } private static String getStringOption(String name, String defaultValue) { - String prop = PySystemState.registry.getProperty("python." + name); + String prop = PySystemState.registry.getProperty(name); if (prop == null) { return defaultValue; } @@ -181,24 +194,27 @@ public static void setFromRegistry() { // Set the more unusual options Options.showJavaExceptions = getBooleanOption( - "options.showJavaExceptions", Options.showJavaExceptions); + PYTHON_OPTIONS_SHOW_JAVA_EXCEPTIONS, + Options.showJavaExceptions); Options.includeJavaStackInExceptions = getBooleanOption( - "options.includeJavaStackInExceptions", Options.includeJavaStackInExceptions); + PYTHON_OPTIONS_INCLUDE_JAVA_STACK_IN_EXCEPTIONS, + Options.includeJavaStackInExceptions); Options.showPythonProxyExceptions = getBooleanOption( - "options.showPythonProxyExceptions", + PYTHON_OPTIONS_SHOW_PYTHON_PROXY_EXCEPTIONS, Options.showPythonProxyExceptions); Options.respectJavaAccessibility = getBooleanOption( - "security.respectJavaAccessibility", + PYTHON_SECURITY_RESPECT_JAVA_ACCESSIBILITY, Options.respectJavaAccessibility); Options.proxyDebugDirectory = getStringOption( - "options.proxyDebugDirectory", Options.proxyDebugDirectory); + PYTHON_OPTIONS_PROXY_DEBUG_DIRECTORY, + Options.proxyDebugDirectory); // verbosity is more complicated: - String prop = PySystemState.registry.getProperty("python.verbose"); + String prop = PySystemState.registry.getProperty(PYTHON_VERBOSE); if (prop != null) { if (prop.equalsIgnoreCase("error")) { Options.verbose = Py.ERROR; @@ -216,11 +232,12 @@ } } - Options.caseok = getBooleanOption("options.caseok", Options.caseok); + Options.caseok = getBooleanOption(PYTHON_OPTIONS_CASE_OK, + Options.caseok); - Options.Qnew = getBooleanOption("options.Qnew", Options.Qnew); + Options.Qnew = getBooleanOption(PYTHON_OPTIONS_Q_NEW, Options.Qnew); - prop = PySystemState.registry.getProperty("python.division_warning"); + prop = PySystemState.registry.getProperty(PYTHON_DIVISION_WARNING); if (prop != null) { if (prop.equalsIgnoreCase("old")) { Options.division_warning = 0; @@ -234,9 +251,11 @@ } } - Options.sreCacheSpec = getStringOption("sre.cachespec", Options.sreCacheSpec); - Options.inspect |= getStringOption("inspect", "").length() > 0; - Options.importSite = getBooleanOption("import.site", Options.importSite); + Options.sreCacheSpec = getStringOption(PYTHON_SRE_CACHESPEC, + Options.sreCacheSpec); + Options.inspect |= getStringOption(PYTHON_INSPECT, "").length() > 0; + Options.importSite = getBooleanOption(PYTHON_IMPORT_SITE, + Options.importSite); Options.no_site = !Options.importSite; } } diff --git a/src/org/python/core/PlainConsole.java b/src/org/python/core/PlainConsole.java --- a/src/org/python/core/PlainConsole.java +++ b/src/org/python/core/PlainConsole.java @@ -17,6 +17,8 @@ * System.in or System.out, or use a native library. It prompts on * System.out and reads from System.in (wrapped with the console * encoding). + * + * @see org.python.core.RegistryKey#PYTHON_CONSOLE */ public class PlainConsole implements Console { diff --git a/src/org/python/core/PySystemState.java b/src/org/python/core/PySystemState.java --- a/src/org/python/core/PySystemState.java +++ b/src/org/python/core/PySystemState.java @@ -48,6 +48,9 @@ import jnr.posix.util.Platform; +import static org.python.core.RegistryKey.*; + + /** * The "sys" module. */ @@ -56,11 +59,6 @@ public class PySystemState extends PyObject implements AutoCloseable, ClassDictInit, Closeable, Traverseproc { - public static final String PYTHON_CACHEDIR = "python.cachedir"; - public static final String PYTHON_CACHEDIR_SKIP = "python.cachedir.skip"; - public static final String PYTHON_CONSOLE_ENCODING = "python.console.encoding"; - public static final String PYTHON_IO_ENCODING = "python.io.encoding"; - public static final String PYTHON_IO_ERRORS = "python.io.errors"; protected static final String CACHEDIR_DEFAULT_NAME = "cachedir"; public static final String JYTHON_JAR = "jython.jar"; @@ -942,7 +940,8 @@ } try { // user registry has precedence over installed registry - File homeFile = new File(registry.getProperty("user.home"), ".jython"); + File homeFile = new File(registry.getProperty(USER_HOME), + ".jython"); addRegistryFile(homeFile); addRegistryFile(new File(prefix, "registry")); } catch (Exception exc) { @@ -1335,12 +1334,14 @@ * object may be accessed via {@link Py#getConsole()}. * * @param props containing (or not) python.console + * + * @see org.python.core.RegistryKey#PYTHON_CONSOLE */ private static void initConsole(Properties props) { // At this stage python.console.encoding is always defined (but null=default) String encoding = props.getProperty(PYTHON_CONSOLE_ENCODING); // The console type is chosen by this registry entry: - String consoleName = props.getProperty("python.console", "").trim(); + String consoleName = props.getProperty(PYTHON_CONSOLE, "").trim(); // And must be of type ... final Class consoleType = Console.class; @@ -1441,7 +1442,7 @@ } // add builtins specified in the registry file - String builtinprop = props.getProperty("python.modules.builtin", ""); + String builtinprop = props.getProperty(PYTHON_MODULES_BUILTIN, ""); StringTokenizer tok = new StringTokenizer(builtinprop, ","); while (tok.hasMoreTokens()) { addBuiltin(tok.nextToken()); @@ -1462,7 +1463,7 @@ private static PyList initPath(Properties props, boolean standalone, String jarFileName) { PyList path = new PyList(); - addPaths(path, props.getProperty("python.path", "")); + addPaths(path, props.getProperty(PYTHON_PATH, "")); if (prefix != null) { String libpath = new File(Py.fileSystemDecode(prefix), "Lib").toString(); path.append(Py.fileSystemEncode(libpath)); // XXX or newUnicode? diff --git a/src/org/python/core/RegistryKey.java b/src/org/python/core/RegistryKey.java new file mode 100644 --- /dev/null +++ b/src/org/python/core/RegistryKey.java @@ -0,0 +1,249 @@ +package org.python.core; + +/** + * Supported registry keys and their usage. + * + * Boolean properties are set with the String values {@code true} or {@code yes} for true, or + * {@code false} or {@code no} for false. + */ +public class RegistryKey { + + private RegistryKey() {} + + /** + * {@code python.cachedir} defines the directory to use for caches (currently just package + * information). This directory should be writable by the user. If this is an absolute path it + * is used as given, otherwise it is interpreted relative to sys.prefix (typically the directory + * of this file). + */ + public static final String PYTHON_CACHEDIR = "python.cachedir"; + + /** + * Setting {@code python.cachedir.skip} to true disables the package scan for the cachedir (as + * defined by {@code python.cachedir} or a default). Please be aware that disabling this will + * break importing from java packages. + */ + public static final String PYTHON_CACHEDIR_SKIP = "python.cachedir.skip"; + + /** + * {@code python.cpython2} is the name of a CPython executable, version 2.7. + */ + public static final String PYTHON_CPYTHON = "python.cpython2"; + + /** + * {@code python.division.warning} will print deprecation warnings when doing forced floor + * rounding with the / division operator. + *

+ * "3/2" equals 1 in Python 2.x (forced floor rounding) and 1.5 in Python 3 (convert ints to + * floats). This is equivalent to -Qwarn on the command line. See PEP 238. + *

+ * Values: {@code old}, {@code warn}, {@code warnall}. + *

+ * This property will be deprecated and removed in 3.x. + */ + public static final String PYTHON_DIVISION_WARNING = "python.division.warning"; + + /** + * {@code python.console} names the class used for the Jython console. Jython ships with a JLine + * console (http://jline.sourceforge.net/) out of the box. This is selected by default in the + * Jython command-line application ({@link org.python.util.jython}) if you do not define + * {@code python.console} to be another class on the command line. Alternatively, you can set + * python.console in the registry, but be aware that this will also affect the console in + * applications that embed a PythonInterpreter, or use Jython as a JSR-223 script engine. + *

+ * Values: + * + * + * + * + * + * + * + *
{@link org.python.util.JLineConsole} (default)
{@link org.python.core.PlainConsole} (featureless)
+ *

+ * You may also set this to the name of a different console class in your classpath that extends + * PlainConsole. Note that {@code org.python.util.ReadlineConsole} has been removed in 2.7. + */ + public static final String PYTHON_CONSOLE = "python.console"; + + /** + * {@code python.console.encoding} is the encoding used reading commands from the console. Must + * be a valid Java codec name, such as cp850. + */ + public static final String PYTHON_CONSOLE_ENCODING = "python.console.encoding"; + + /** + * {@code python.import.site} controls whether to import {@code site.py}. Boolean. + *

+ * Equivalent to -S on the command line. + */ + public static final String PYTHON_IMPORT_SITE = "python.import.site"; + + /** + * When {@code python.inspect} is set, and a script given on the command line finishes, start an + * interactive interpreter. Any non-empty string value will enable this behaviour. + *

+ * Equivalent to the {@code -i} option on the command-line, or The session only actually starts + * if the console is interactive. + */ + public static final String PYTHON_INSPECT = "python.inspect"; + + /** + * {@code python.io.encoding} controls the encoding of {@code sys.stdin}, {@codesys.stdout}, and + * {@code sys.stderr}. The encoding must name a Python codec, as in {@code codecs.encode()}. + */ + public static final String PYTHON_IO_ENCODING = "python.io.encoding"; + + /** + * {@code python.io.errors} is the unicode error handler for I/O encoding problems. + */ + public static final String PYTHON_IO_ERRORS = "python.io.errors"; + + /** + * {@code python.modules.builtin} controls the list of builtin modules; you can add, remove, or + * override builtin modules. The value for this registry key is a comma separated list of module + * entries, each entry of which has the following allowable forms: + *

+ * + * + * + * + * + * + * + * + * + * + * + * + *
{@code name}The module name is {@code name} and the class name is + * {@code org.python.modules.name}
{@code name:class}The module name is {@code name} and the class name is {@code class} where class must be a + * fully qualified Java class name
{@code name:null}The module {@code name} is removed from the list of builtin modules
+ *

+ * A good example would be to use a jni version of os for more functionality by having an entry + * such as {@code os:com.foo.jni.os} + */ + public static final String PYTHON_MODULES_BUILTIN = "python.modules.builtin"; + + /** + * If {@code python.options.caseok} is true, Jython will use the first module found on + * {@code sys.path} where java {@code File.isFile()} returns true. Setting this will have no + * effect on unix-type filesystems. On Windows/HFS+ systems setting it to true will enable + * Jython-2.0 behaviour. + */ + public static final String PYTHON_OPTIONS_CASE_OK = "python.options.caseok"; + + /** + * {@code python.options.includeJavaStackInExceptions} controls whether exceptions raised from + * Python code will include a Java stack trace in addition to the Python traceback. This can + * slow raising considerably. Boolean, true by default. + */ + public static final String PYTHON_OPTIONS_INCLUDE_JAVA_STACK_IN_EXCEPTIONS = + "python.options.includeJavaStackInExceptions"; + + /** + * When an exception occurs in Java code, and it is not caught, + * {@code python.options.showJavaExceptions} controls whether the interpreter prints out the + * Java exception in the traceback. + * + * Boolean, false by default. + */ + public static final String PYTHON_OPTIONS_SHOW_JAVA_EXCEPTIONS = + "python.options.showJavaExceptions"; + + /** + * When {@code python.options.showPythonProxyExceptions} is true, python exceptions raised in + * overridden methods will be shown on stderr. + * + */ + public static final String PYTHON_OPTIONS_SHOW_PYTHON_PROXY_EXCEPTIONS = + "python.options.showPythonProxyExceptions"; + + /** + * {@code python.options.proxyDebugDirectory} is the directory where dynamically generated + * classes are written. Nothing is ever read from here, it is only for debugging purposes. + * + */ + public static final String PYTHON_OPTIONS_PROXY_DEBUG_DIRECTORY = + "python.options.proxyDebugDirectory"; + + /** + * {@code python.options.Qnew} controls whether true division is enabled for the / operator. See + * PEP 238. Boolean. + *

+ * Equivalent to -Qnew on the command line. + */ + public static final String PYTHON_OPTIONS_Q_NEW = "python.options.Qnew"; + + /** + * {@code python.os} defines the string used to report the underlying operating system. Used as + * prefix when resolving which operating system, impacting * some OS-specific behaviour. + */ + public static final String PYTHON_OS = "python.os"; + + /** + * {@code python.packages.fakepath} defines a sequence of directories and JARs * that are to be + * sources of Python packages. + */ + public static final String PYTHON_PACKAGES_FAKEPATH = "python.packages.fakepath"; + + /** + * {@code python.packages.paths} defines a sequence of property names. Each property is a path + * string. The default setting causes directories and JARs on the classpath and in the JRE + * (before Java 9) to be sources of Python packages. + */ + public static final String PYTHON_PACKAGES_PATHS = "python.packages.paths"; + + /** + * {@code python.packages.directories} defines a sequence of property names. Each property name + * is a path string, in which the elements are directories. Each directory contains JAR/ZIP + * files that are to be a source of Python packages. By default, these directories are those + * where the JVM stores its optional packages as JARs (a mechanism withdrawn in Java 9). + */ + public static final String PYTHON_PACKAGES_DIRECTORIES = "python.packages.directories"; + + /** + * {@code python.path} is the search path for Python modules, equivalent to CPython's + * {@code PYTHONPATH} environment variable. + */ + public static final String PYTHON_PATH = "python.path"; + + /** + * If {@code python.security.respectJavaAccessibility} is false, and you are using a Java + * version before Java 9, then Jython can access non-public fields, methods, and constructors. + * Normally, Jython can only provide access to public members of classes. + *

+ * This may be deprecated in the future due to Java changes to accessibility from version 9 (at + * least for Oracle JDK and OpenJDK). See documentation on the {@code --illegal-access} (new) + * and {@code --permit-illegal-access} java command line flags for more detail. + *

+ * Boolean. + */ + public static final String PYTHON_SECURITY_RESPECT_JAVA_ACCESSIBILITY = + "python.security.respectJavaAccessibility"; + + /** + * {@code python.sre.cachespec} is the specification for the SRE_STATE code point cache used by + * regular expressions. The spec string is in the comma separated key=value format of + * {@code com.google.common.cache.CacheBuilder}, within guava (which is also the source of the + * cache implementation). + */ + public static final String PYTHON_SRE_CACHESPEC = "python.sre.cachespec"; + + /** + * {@code python.startup} is the name of a file to be run at the start of each interactive + * session, but not when dropping in with the -i flag in after a script has run. + */ + public static final String PYTHON_STARTUP = "python.startup"; + + /** + * {@code python.verbose} sets the verbosity level for varying degrees of informative messages. + * Valid values in order of increasing verbosity are {@code error}, {@code warning}, + * {@code message}, {@code comment}, {@code debug}. + */ + public static final String PYTHON_VERBOSE = "python.verbose"; + + /** {@code user.home} sets the user home directory. */ + public static final String USER_HOME = "user.home"; + +} diff --git a/src/org/python/core/packagecache/SysPackageManager.java b/src/org/python/core/packagecache/SysPackageManager.java --- a/src/org/python/core/packagecache/SysPackageManager.java +++ b/src/org/python/core/packagecache/SysPackageManager.java @@ -7,6 +7,7 @@ import org.python.core.PyJavaPackage; import org.python.core.PyList; import org.python.core.PySystemState; +import org.python.core.RegistryKey; import java.io.File; import java.io.IOException; @@ -171,12 +172,8 @@ defaultDirectories = "java.ext.dirs"; } - /* - * python.packages.paths defines a sequence of property names. Each property is a path - * string. The default setting causes directories and JARs on the classpath and in the JRE - * (before Java 9) to be sources of Python packages. - */ - Set cps = split(registry.getProperty("python.packages.paths", defaultClassPaths)); + Set cps = split(registry.getProperty( + RegistryKey.PYTHON_PACKAGES_PATHS, defaultClassPaths)); for (String name : cps) { // Each property is a class-path string containing JARS and directories String classPath = registry.getProperty(name); @@ -186,14 +183,10 @@ } } - /* - * python.packages.directories defines a sequence of property names. Each property name is a - * path string, in which the elements are directories. Each directory contains JAR/ZIP files - * that are to be a source of Python packages. By default, these directories are those where - * the JVM stores its optional packages as JARs (a mechanism withdrawn in Java 9). - */ Set directories = - split(registry.getProperty("python.packages.directories", defaultDirectories)); + split(registry.getProperty( + RegistryKey.PYTHON_PACKAGES_DIRECTORIES, + defaultDirectories)); for (String name : directories) { // Each property defines a path string containing directories String path = registry.getProperty(name); @@ -203,11 +196,8 @@ } } - /* - * python.packages.fakepath defines a sequence of directories and JARs that are to be - * sources of Python packages. - */ - String fakepath = registry.getProperty("python.packages.fakepath", null); + String fakepath = registry.getProperty( + RegistryKey.PYTHON_PACKAGES_FAKEPATH, null); if (fakepath != null) { addClassPath(fakepath); } diff --git a/src/org/python/modules/posix/OS.java b/src/org/python/modules/posix/OS.java --- a/src/org/python/modules/posix/OS.java +++ b/src/org/python/modules/posix/OS.java @@ -3,6 +3,7 @@ import java.util.Locale; import org.python.core.PySystemState; +import org.python.core.RegistryKey; /** * A Marker tagging what OS we're running on, with some accompanying information about @@ -44,7 +45,8 @@ * Return the OS we're running on. */ static OS getOS() { - String osName = PySystemState.registry.getProperty("python.os"); + String osName = PySystemState.registry.getProperty( + RegistryKey.PYTHON_OS); if (osName == null) { osName = System.getProperty("os.name"); } diff --git a/src/org/python/util/JycompileAntTask.java b/src/org/python/util/JycompileAntTask.java --- a/src/org/python/util/JycompileAntTask.java +++ b/src/org/python/util/JycompileAntTask.java @@ -7,6 +7,7 @@ import org.apache.tools.ant.BuildException; import org.python.core.PyException; import org.python.core.PySystemState; +import org.python.core.RegistryKey; import org.python.core.imp; import org.python.modules._py_compile; @@ -26,7 +27,7 @@ log("Compiling 1 file"); } Properties props = new Properties(); - props.setProperty(PySystemState.PYTHON_CACHEDIR_SKIP, "true"); + props.setProperty(RegistryKey.PYTHON_CACHEDIR_SKIP, "true"); PySystemState.initialize(System.getProperties(), props); for (File src : toCompile) { try { diff --git a/src/org/python/util/ProxyCompiler.java b/src/org/python/util/ProxyCompiler.java --- a/src/org/python/util/ProxyCompiler.java +++ b/src/org/python/util/ProxyCompiler.java @@ -3,6 +3,7 @@ import java.util.Properties; import org.python.core.PySystemState; +import org.python.core.RegistryKey; public class ProxyCompiler { @@ -17,7 +18,7 @@ */ public static void compile(String filename, String destDir) { Properties props = new Properties(System.getProperties()); - props.setProperty(PySystemState.PYTHON_CACHEDIR_SKIP, "true"); + props.setProperty(RegistryKey.PYTHON_CACHEDIR_SKIP, "true"); PySystemState.initialize(props, null); PythonInterpreter interp = new PythonInterpreter(); diff --git a/src/org/python/util/jython.java b/src/org/python/util/jython.java --- a/src/org/python/util/jython.java +++ b/src/org/python/util/jython.java @@ -28,6 +28,7 @@ import org.python.core.PyString; import org.python.core.PyStringMap; import org.python.core.PySystemState; +import org.python.core.RegistryKey; import org.python.core.imp; public class jython { @@ -348,7 +349,7 @@ * @param interp to do the work */ private static void runStartupFile(InteractiveConsole interp) { - String filename = PySystemState.registry.getProperty("python.startup", null); + String filename = PySystemState.registry.getProperty(RegistryKey.PYTHON_STARTUP, null); if (filename != null) { try (InputStream fp = new FileInputStream(filename)) { // May raise exceptions, (including SystemExit) @@ -416,7 +417,8 @@ // We'll be going interactive eventually. condition an interactive console. if (PrePy.haveConsole()) { // Set the default console type if nothing else has - addDefault(preProperties, "python.console", PYTHON_CONSOLE_CLASS); + addDefault(preProperties, RegistryKey.PYTHON_CONSOLE, + PYTHON_CONSOLE_CLASS); } } @@ -622,9 +624,9 @@ if (pythonIoEncoding != null) { String[] spec = pythonIoEncoding.split(":", 2); // Note that if encoding or errors is blank (=null), the registry value wins. - addDefault(registry, PySystemState.PYTHON_IO_ENCODING, spec[0]); + addDefault(registry, RegistryKey.PYTHON_IO_ENCODING, spec[0]); if (spec.length > 1) { - addDefault(registry, PySystemState.PYTHON_IO_ERRORS, spec[1]); + addDefault(registry, RegistryKey.PYTHON_IO_ERRORS, spec[1]); } } } diff --git a/tests/java/javatests/Issue1972.java b/tests/java/javatests/Issue1972.java --- a/tests/java/javatests/Issue1972.java +++ b/tests/java/javatests/Issue1972.java @@ -289,7 +289,6 @@ // Run Jython simple readline programme setProcJava( // "-Dpython.console=org.python.util.JLineConsole", // - // "-Dpython.console.interactive=True", // "-Dpython.home=" + pythonHome, // "org.python.util.jython", // "-c", // diff --git a/tests/java/org/python/compiler/JavaMakerSmokeTest.java b/tests/java/org/python/compiler/JavaMakerSmokeTest.java --- a/tests/java/org/python/compiler/JavaMakerSmokeTest.java +++ b/tests/java/org/python/compiler/JavaMakerSmokeTest.java @@ -12,6 +12,7 @@ import static org.junit.Assert.*; import org.python.core.PySystemState; +import org.python.core.RegistryKey; import org.python.util.PythonInterpreter; @@ -23,7 +24,7 @@ @Before public void setUp() throws Exception { Properties props = new Properties(System.getProperties()); - props.setProperty(PySystemState.PYTHON_CACHEDIR_SKIP, "true"); + props.setProperty(RegistryKey.PYTHON_CACHEDIR_SKIP, "true"); PySystemState.initialize(props, null); interp = new PythonInterpreter(); diff --git a/tests/java/org/python/expose/generate/InterpTestCase.java b/tests/java/org/python/expose/generate/InterpTestCase.java --- a/tests/java/org/python/expose/generate/InterpTestCase.java +++ b/tests/java/org/python/expose/generate/InterpTestCase.java @@ -2,6 +2,7 @@ import org.python.core.Py; import org.python.core.PySystemState; +import org.python.core.RegistryKey; import junit.framework.TestCase; @@ -11,7 +12,7 @@ public abstract class InterpTestCase extends TestCase { public void setUp() throws Exception { - System.setProperty(PySystemState.PYTHON_CACHEDIR_SKIP, "true"); + System.setProperty(RegistryKey.PYTHON_CACHEDIR_SKIP, "true"); PySystemState.initialize(); } } diff --git a/tests/java/org/python/util/jythonTestPlain.java b/tests/java/org/python/util/jythonTestPlain.java --- a/tests/java/org/python/util/jythonTestPlain.java +++ b/tests/java/org/python/util/jythonTestPlain.java @@ -1,6 +1,7 @@ package org.python.util; import static org.junit.Assert.*; +import static org.python.core.RegistryKey.PYTHON_CONSOLE; import org.junit.Test; import org.python.core.Console; @@ -27,7 +28,6 @@ */ public class jythonTestPlain { - private static final String PYTHON_CONSOLE = "python.console"; private static String[] commands = {"-c", "import sys; print type(sys._jy_console)"}; /** -- Repository URL: https://hg.python.org/jython From jython-checkins at python.org Wed Jul 24 15:49:31 2019 From: jython-checkins at python.org (jeff.allen) Date: Wed, 24 Jul 2019 19:49:31 +0000 Subject: [Jython-checkins] =?utf-8?q?jython=3A_Hostname_addon_to_fix_open?= =?utf-8?q?jdk7_buffer_overflow_=28=232651=2C_GH-145=29=2E?= Message-ID: <20190724194931.1.F09A287C34154DE0@mg.python.org> https://hg.python.org/jython/rev/ef7b8771ce6d changeset: 8260:ef7b8771ce6d user: Adam Burke date: Wed Jul 24 20:40:01 2019 +0100 summary: Hostname addon to fix openjdk7 buffer overflow (#2651, GH-145). files: .travis.yml | 9 +++------ NEWS | 1 + 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml --- a/.travis.yml +++ b/.travis.yml @@ -28,13 +28,10 @@ - os: linux env: CUSTOM_JDK="default" +addons: + hostname: jyshort + before_install: - # Patch for buffer overflow bug, see https://github.com/travis-ci/travis-ci/issues/5227 - - hostname - - cat /etc/hosts # optionally check the content *before* - - sudo hostname "$(hostname | cut -c1-63)" - - sed -e "s/^\\(127\\.0\\.0\\.1.*\\)/\\1 $(hostname | cut -c1-63)/" /etc/hosts | sudo tee /etc/hosts - - hostname - cat /etc/hosts # optionally check the content *after* - if [ "$TRAVIS_OS_NAME" == "osx" ]; then export JAVA_HOME=$(/usr/libexec/java_home); fi - if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew update; fi diff --git a/NEWS b/NEWS --- a/NEWS +++ b/NEWS @@ -5,6 +5,7 @@ Development tip Bugs fixed + - [ 2651 ] Travis builds failing with *** buffer overflow detected *** - [ 2703 ] JycompileAntTask cannot find ...ant.taskdefs.MatchingTask - [ 2708 ] test_urllib2net fails (on Travis CI) - [ 2764 ] Readme is not displayed when using the GUI installer -- Repository URL: https://hg.python.org/jython From jython-checkins at python.org Wed Jul 31 14:53:05 2019 From: jython-checkins at python.org (jeff.allen) Date: Wed, 31 Jul 2019 18:53:05 +0000 Subject: [Jython-checkins] =?utf-8?q?jython=3A_Update_Apache_xerces_JAR_t?= =?utf-8?q?o_2=2E12=2E0?= Message-ID: <20190731185305.1.274888DE01DB65A7@mg.python.org> https://hg.python.org/jython/rev/e8a8e98fd086 changeset: 8261:e8a8e98fd086 user: Jeff Allen date: Tue Jul 30 17:07:13 2019 +0100 summary: Update Apache xerces JAR to 2.12.0 files: build.xml | 2 +- extlibs/xercesImpl-2.11.0.jar | Bin extlibs/xercesImpl-2.12.0.jar | Bin 3 files changed, 1 insertions(+), 1 deletions(-) diff --git a/build.xml b/build.xml --- a/build.xml +++ b/build.xml @@ -607,7 +607,7 @@ - + diff --git a/extlibs/xercesImpl-2.11.0.jar b/extlibs/xercesImpl-2.11.0.jar deleted file mode 100644 index 0aaa990f3ecadf60d28b5395dc87bbe49da0cdd7..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 GIT binary patch [stripped] diff --git a/extlibs/xercesImpl-2.12.0.jar b/extlibs/xercesImpl-2.12.0.jar new file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..b69d01dac3753830955e945e6e96e06fca567a8c GIT binary patch [stripped] -- Repository URL: https://hg.python.org/jython From jython-checkins at python.org Wed Jul 31 14:53:07 2019 From: jython-checkins at python.org (jeff.allen) Date: Wed, 31 Jul 2019 18:53:07 +0000 Subject: [Jython-checkins] =?utf-8?q?jython=3A_Update_JNR_to_jffi-1=2E2?= =?utf-8?q?=2E19=2C_jnr-ffi-2=2E1=2E10=2C_jnr-posix-3=2E0=2E50?= Message-ID: <20190731185307.1.044F8ACC9378D032@mg.python.org> https://hg.python.org/jython/rev/3ced9d4c981b changeset: 8264:3ced9d4c981b user: Jeff Allen date: Wed Jul 31 07:14:38 2019 +0100 summary: Update JNR to jffi-1.2.19, jnr-ffi-2.1.10, jnr-posix-3.0.50 jnr-constants and jnr-netdb already at latest. files: build.gradle | 6 +++--- build.xml | 12 ++++++------ extlibs/bcpkix-jdk15on-1.61.jar | Bin extlibs/bcprov-jdk15on-1.61.jar | Bin extlibs/jffi-1.2.18.jar | Bin extlibs/jffi-1.2.19.jar | Bin extlibs/jnr-ffi-2.1.10.jar | Bin extlibs/jnr-ffi-2.1.9.jar | Bin extlibs/jnr-posix-3.0.49.jar | Bin extlibs/jnr-posix-3.0.50.jar | Bin 10 files changed, 9 insertions(+), 9 deletions(-) diff --git a/build.gradle b/build.gradle --- a/build.gradle +++ b/build.gradle @@ -168,10 +168,10 @@ implementation 'com.carrotsearch:java-sizeof:0.0.5' - implementation 'com.github.jnr:jffi:1.2.18' + implementation 'com.github.jnr:jffi:1.2.19' implementation 'com.github.jnr:jnr-netdb:1.1.6' - implementation 'com.github.jnr:jnr-ffi:2.1.9' - implementation 'com.github.jnr:jnr-posix:3.0.49' + implementation 'com.github.jnr:jnr-ffi:2.1.10' + implementation 'com.github.jnr:jnr-posix:3.0.50' implementation 'com.github.jnr:jnr-constants:0.9.12' implementation 'jline:jline:2.14.5' diff --git a/build.xml b/build.xml --- a/build.xml +++ b/build.xml @@ -153,11 +153,11 @@ - + - + - + @@ -602,10 +602,10 @@ - - + + - + diff --git a/extlibs/bcpkix-jdk15on-1.61.jar b/extlibs/bcpkix-jdk15on-1.61.jar new file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..c9657cdbe99a935787404edc2a83d1e6b1732cf9 GIT binary patch [stripped] diff --git a/extlibs/bcprov-jdk15on-1.61.jar b/extlibs/bcprov-jdk15on-1.61.jar new file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..1fdff384b720e6ac563c80a6bdf7e8bc9f883367 GIT binary patch [stripped] diff --git a/extlibs/jffi-1.2.18.jar b/extlibs/jffi-1.2.18.jar deleted file mode 100644 index d5218fad127e17baa4e761a03b218d99026f8eb6..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 GIT binary patch [stripped] diff --git a/extlibs/jffi-1.2.19.jar b/extlibs/jffi-1.2.19.jar new file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..b92013e1ca14f2785a9a44a41190d905c0d5d1fc GIT binary patch [stripped] diff --git a/extlibs/jnr-ffi-2.1.10.jar b/extlibs/jnr-ffi-2.1.10.jar new file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..d3382b5c45f56dfff6868e99ceae5dcdc705862a GIT binary patch [stripped] diff --git a/extlibs/jnr-ffi-2.1.9.jar b/extlibs/jnr-ffi-2.1.9.jar deleted file mode 100644 index df68592b92a779289093cf4569c952ab31432a5f..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 GIT binary patch [stripped] diff --git a/extlibs/jnr-posix-3.0.49.jar b/extlibs/jnr-posix-3.0.49.jar deleted file mode 100644 index bb75e304f466390878396ed62bf746cf8286149c..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 GIT binary patch [stripped] diff --git a/extlibs/jnr-posix-3.0.50.jar b/extlibs/jnr-posix-3.0.50.jar new file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..1288fce57c83b7daedda506d03ea17394f4e32f9 GIT binary patch [stripped] -- Repository URL: https://hg.python.org/jython From jython-checkins at python.org Wed Jul 31 14:53:05 2019 From: jython-checkins at python.org (jeff.allen) Date: Wed, 31 Jul 2019 18:53:05 +0000 Subject: [Jython-checkins] =?utf-8?q?jython=3A_Update_Guava_JAR_to_28=2E0?= =?utf-8?q?-android?= Message-ID: <20190731185305.1.A7CA7075E3558065@mg.python.org> https://hg.python.org/jython/rev/8caca606b7ba changeset: 8262:8caca606b7ba user: Jeff Allen date: Tue Jul 30 21:41:49 2019 +0100 summary: Update Guava JAR to 28.0-android We need the Android version for compatibility with Java 7. files: build.gradle | 2 +- build.xml | 4 ++-- extlibs/guava-27.1-android.jar | Bin extlibs/guava-28.0-android.jar | Bin 4 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build.gradle b/build.gradle --- a/build.gradle +++ b/build.gradle @@ -160,7 +160,7 @@ implementation 'org.ow2.asm:asm-util:7.0' // The Android Guava and "failureaccess" are necessary to support Java 7. - implementation 'com.google.guava:guava:27.1-android' + implementation 'com.google.guava:guava:28.0-android' implementation 'com.google.guava:failureaccess:1.0.1' // Swap for regular Guava at Java 8. diff --git a/build.xml b/build.xml --- a/build.xml +++ b/build.xml @@ -151,7 +151,7 @@ - + @@ -561,7 +561,7 @@ - + diff --git a/extlibs/guava-27.1-android.jar b/extlibs/guava-27.1-android.jar deleted file mode 100644 index 8648a6050037adf7b5eaccdf1c50f3f18d6f0740..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 GIT binary patch [stripped] diff --git a/extlibs/guava-28.0-android.jar b/extlibs/guava-28.0-android.jar new file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..516fc5fa1b0499cd57a16ddd6d390c4c17b60fdd GIT binary patch [stripped] -- Repository URL: https://hg.python.org/jython From jython-checkins at python.org Wed Jul 31 14:53:06 2019 From: jython-checkins at python.org (jeff.allen) Date: Wed, 31 Jul 2019 18:53:06 +0000 Subject: [Jython-checkins] =?utf-8?q?jython=3A_Update_Bouncy_Castle_JARs_?= =?utf-8?q?to_version_1=2E62?= Message-ID: <20190731185306.1.E2B07E513BF4568D@mg.python.org> https://hg.python.org/jython/rev/52f272960586 changeset: 8263:52f272960586 user: Jeff Allen date: Wed Jul 31 05:35:25 2019 +0100 summary: Update Bouncy Castle JARs to version 1.62 files: build.gradle | 4 ++-- build.xml | 4 ++-- extlibs/bcpkix-jdk15on-1.61.jar | Bin extlibs/bcpkix-jdk15on-162.jar | Bin extlibs/bcprov-jdk15on-1.61.jar | Bin extlibs/bcprov-jdk15on-162.jar | Bin 6 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build.gradle b/build.gradle --- a/build.gradle +++ b/build.gradle @@ -152,8 +152,8 @@ implementation 'org.apache.commons:commons-compress:1.18' - implementation 'org.bouncycastle:bcpkix-jdk15on:1.61' - implementation 'org.bouncycastle:bcprov-jdk15on:1.61' + implementation 'org.bouncycastle:bcpkix-jdk15on:1.62' + implementation 'org.bouncycastle:bcprov-jdk15on:1.62' implementation 'org.ow2.asm:asm:7.0' implementation 'org.ow2.asm:asm-commons:7.0' diff --git a/build.xml b/build.xml --- a/build.xml +++ b/build.xml @@ -554,9 +554,9 @@ - + - + diff --git a/extlibs/bcpkix-jdk15on-1.61.jar b/extlibs/bcpkix-jdk15on-1.61.jar deleted file mode 100644 index c9657cdbe99a935787404edc2a83d1e6b1732cf9..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 GIT binary patch [stripped] diff --git a/extlibs/bcpkix-jdk15on-162.jar b/extlibs/bcpkix-jdk15on-162.jar new file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..d63da57bd23601cc7a8684c2860c1ba1642ae248 GIT binary patch [stripped] diff --git a/extlibs/bcprov-jdk15on-1.61.jar b/extlibs/bcprov-jdk15on-1.61.jar deleted file mode 100644 index 1fdff384b720e6ac563c80a6bdf7e8bc9f883367..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 GIT binary patch [stripped] diff --git a/extlibs/bcprov-jdk15on-162.jar b/extlibs/bcprov-jdk15on-162.jar new file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..c52b16e4e963de88690cd0eb36ea976ff4d4e346 GIT binary patch [stripped] -- Repository URL: https://hg.python.org/jython