Repository: jpype-project/jpype (language: python)

Issue:
Release 1.3.1

- [x] Start from the release branch
      ``git checkout release``
- [x] Make a new branch for the release cycle
      ``git checkout -b releases/{version}``
- [x] Merge the current master with the release
      ``git pull origin master``
- [x] Start a release
      ``bumpversion release``
- [x] Edit doc/CHANGELOG.rst
- [x] Send the release to be evaluated
      ``git push``
- [x] Verify CI on azure
- [x] Manually trigger a ``jpype.release`` on azure
      If successful, download the artifacts for publication.
- [x] Advance the release pointer
      ``git checkout release``
      ``git merge releases/<version>``
- [x] Publish the release
  - Add draft release on github
  - Attach the artifacts to the release.
- [x] Start master on a new cycle
  - Use a PR to pull release back to master
  - ``git checkout master``
  - ``git checkout -b cycle``
  - ``git merge release``
  - ``bumpversion patch``
  - Use PR to insert the cycle in master


Discussion / hints:
will this support py 3.10 on linux? currently it wants gcc installed:
```
Collecting JayDeBeApi==1.2.3
  Downloading JayDeBeApi-1.2.3-py3-none-any.whl (26 kB)
Collecting JPype1
  Downloading JPype1-1.3.0.tar.gz (820 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 820.3/820.3 KB 558.9 kB/s eta 0:00:00
  Preparing metadata (setup.py) ... done
Building wheels for collected packages: JPype1
  Building wheel for JPype1 (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [56 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-3.10
      creating build/lib.linux-x86_64-3.10/jpype
      copying jpype/__init__.py -> build/lib.linux-x86_64-3.10/jpype
      copying jpype/_classpath.py -> build/lib.linux-x86_64-3.10/jpype
      copying jpype/_core.py -> build/lib.linux-x86_64-3.10/jpype
      copying jpype/_gui.py -> build/lib.linux-x86_64-3.10/jpype
      copying jpype/_jarray.py -> build/lib.linux-x86_64-3.10/jpype
      copying jpype/_jclass.py -> build/lib.linux-x86_64-3.10/jpype
      copying jpype/_jcollection.py -> build/lib.linux-x86_64-3.10/jpype
      copying jpype/_jcustomizer.py -> build/lib.linux-x86_64-3.10/jpype
      copying jpype/_jexception.py -> build/lib.linux-x86_64-3.10/jpype
      copying jpype/_jinit.py -> build/lib.linux-x86_64-3.10/jpype
      copying jpype/_jio.py -> build/lib.linux-x86_64-3.10/jpype
      copying jpype/_jmethod.py -> build/lib.linux-x86_64-3.10/jpype
      copying jpype/_jobject.py -> build/lib.linux-x86_64-3.10/jpype
      copying jpype/_jpackage.py -> build/lib.linux-x86_64-3.10/jpype
      copying jpype/_jproxy.py -> build/lib.linux-x86_64-3.10/jpype
      copying jpype/_jstring.py -> build/lib.linux-x86_64-3.10/jpype
      copying jpype/_jthread.py -> build/lib.linux-x86_64-3.10/jpype
      copying jpype/_jvmfinder.py -> build/lib.linux-x86_64-3.10/jpype
      copying jpype/_pykeywords.py -> build/lib.linux-x86_64-3.10/jpype
      copying jpype/beans.py -> build/lib.linux-x86_64-3.10/jpype
      copying jpype/config.py -> build/lib.linux-x86_64-3.10/jpype
      copying jpype/dbapi2.py -> build/lib.linux-x86_64-3.10/jpype
      copying jpype/imports.py -> build/lib.linux-x86_64-3.10/jpype
      copying jpype/nio.py -> build/lib.linux-x86_64-3.10/jpype
      copying jpype/pickle.py -> build/lib.linux-x86_64-3.10/jpype
      copying jpype/protocol.py -> build/lib.linux-x86_64-3.10/jpype
      copying jpype/types.py -> build/lib.linux-x86_64-3.10/jpype
      package init file 'jpype/_pyinstaller/__init__.py' not found (or not a regular file)
      creating build/lib.linux-x86_64-3.10/jpype/_pyinstaller
      copying jpype/_pyinstaller/entry_points.py -> build/lib.linux-x86_64-3.10/jpype/_pyinstaller
      copying jpype/_pyinstaller/example.py -> build/lib.linux-x86_64-3.10/jpype/_pyinstaller
      copying jpype/_pyinstaller/hook-jpype.py -> build/lib.linux-x86_64-3.10/jpype/_pyinstaller
      copying jpype/_pyinstaller/test_jpype_pyinstaller.py -> build/lib.linux-x86_64-3.10/jpype/_pyinstaller
      copying jpype/_core.pyi -> build/lib.linux-x86_64-3.10/jpype
      copying jpype/_jcollection.pyi -> build/lib.linux-x86_64-3.10/jpype
      copying jpype/_jio.pyi -> build/lib.linux-x86_64-3.10/jpype
      copying jpype/_jstring.pyi -> build/lib.linux-x86_64-3.10/jpype
      copying jpype/_jthread.pyi -> build/lib.linux-x86_64-3.10/jpype
      running build_ext
      Call build extensions
      Using Jar cache
      copying native/jars/org.jpype.jar -> build/lib.linux-x86_64-3.10
      Call build ext
      building '_jpype' extension
      creating build/temp.linux-x86_64-3.10
      creating build/temp.linux-x86_64-3.10/native
      creating build/temp.linux-x86_64-3.10/native/common
      creating build/temp.linux-x86_64-3.10/native/python
      gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -Wall -fPIC -Inative/common/include -Inative/python/include -Inative/embedded/include -Inative/jni_include -I/usr/local/include/python3.10 -c native/common/jp_array.cpp -o build/temp.linux-x86_64-3.10/native/common/jp_array.o -g0 -std=c++11 -O2
      error: command 'gcc' failed: No such file or directory
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for JPype1
  Running setup.py clean for JPype1
Failed to build JPype1
Installing collected packages: JPype1, JayDeBeApi
  Running setup.py install for JPype1 ... error
  error: subprocess-exited-with-error

  × Running setup.py install for JPype1 did not run successfully.
  │ exit code: 1
  ╰─> [56 lines of output]
      running install
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-3.10
      creating build/lib.linux-x86_64-3.10/jpype
      copying jpype/__init__.py -> build/lib.linux-x86_64-3.10/jpype
      copying jpype/_classpath.py -> build/lib.linux-x86_64-3.10/jpype
      copying jpype/_core.py -> build/lib.linux-x86_64-3.10/jpype
      copying jpype/_gui.py -> build/lib.linux-x86_64-3.10/jpype
      copying jpype/_jarray.py -> build/lib.linux-x86_64-3.10/jpype
      copying jpype/_jclass.py -> build/lib.linux-x86_64-3.10/jpype
      copying jpype/_jcollection.py -> build/lib.linux-x86_64-3.10/jpype
      copying jpype/_jcustomizer.py -> build/lib.linux-x86_64-3.10/jpype
      copying jpype/_jexception.py -> build/lib.linux-x86_64-3.10/jpype
      copying jpype/_jinit.py -> build/lib.linux-x86_64-3.10/jpype
      copying jpype/_jio.py -> build/lib.linux-x86_64-3.10/jpype
      copying jpype/_jmethod.py -> build/lib.linux-x86_64-3.10/jpype
      copying jpype/_jobject.py -> build/lib.linux-x86_64-3.10/jpype
      copying jpype/_jpackage.py -> build/lib.linux-x86_64-3.10/jpype
      copying jpype/_jproxy.py -> build/lib.linux-x86_64-3.10/jpype
      copying jpype/_jstring.py -> build/lib.linux-x86_64-3.10/jpype
      copying jpype/_jthread.py -> build/lib.linux-x86_64-3.10/jpype
      copying jpype/_jvmfinder.py -> build/lib.linux-x86_64-3.10/jpype
      copying jpype/_pykeywords.py -> build/lib.linux-x86_64-3.10/jpype
      copying jpype/beans.py -> build/lib.linux-x86_64-3.10/jpype
      copying jpype/config.py -> build/lib.linux-x86_64-3.10/jpype
      copying jpype/dbapi2.py -> build/lib.linux-x86_64-3.10/jpype
      copying jpype/imports.py -> build/lib.linux-x86_64-3.10/jpype
      copying jpype/nio.py -> build/lib.linux-x86_64-3.10/jpype
      copying jpype/pickle.py -> build/lib.linux-x86_64-3.10/jpype
      copying jpype/protocol.py -> build/lib.linux-x86_64-3.10/jpype
      copying jpype/types.py -> build/lib.linux-x86_64-3.10/jpype
      package init file 'jpype/_pyinstaller/__init__.py' not found (or not a regular file)
      creating build/lib.linux-x86_64-3.10/jpype/_pyinstaller
      copying jpype/_pyinstaller/entry_points.py -> build/lib.linux-x86_64-3.10/jpype/_pyinstaller
      copying jpype/_pyinstaller/example.py -> build/lib.linux-x86_64-3.10/jpype/_pyinstaller
      copying jpype/_pyinstaller/hook-jpype.py -> build/lib.linux-x86_64-3.10/jpype/_pyinstaller
      copying jpype/_pyinstaller/test_jpype_pyinstaller.py -> build/lib.linux-x86_64-3.10/jpype/_pyinstaller
      copying jpype/_core.pyi -> build/lib.linux-x86_64-3.10/jpype
      copying jpype/_jcollection.pyi -> build/lib.linux-x86_64-3.10/jpype
      copying jpype/_jio.pyi -> build/lib.linux-x86_64-3.10/jpype
      copying jpype/_jstring.pyi -> build/lib.linux-x86_64-3.10/jpype
      copying jpype/_jthread.pyi -> build/lib.linux-x86_64-3.10/jpype
      running build_ext
      Call build extensions
      Using Jar cache
      copying native/jars/org.jpype.jar -> build/lib.linux-x86_64-3.10
      Call build ext
      building '_jpype' extension
      creating build/temp.linux-x86_64-3.10
      creating build/temp.linux-x86_64-3.10/native
      creating build/temp.linux-x86_64-3.10/native/common
      creating build/temp.linux-x86_64-3.10/native/python
      gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -Wall -fPIC -Inative/common/include -Inative/python/include -Inative/embedded/include -Inative/jni_include -I/usr/local/include/python3.10 -c native/common/jp_array.cpp -o build/temp.linux-x86_64-3.10/native/common/jp_array.o -g0 -std=c++11 -O2
      error: command 'gcc' failed: No such file or directory
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> JPype1

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
```
Once the dist is released it should have precompiled binaries available so no gcc required.
Very nice a new release is coming, especially with the improved Python 3.10 support. Is a release date expected?
Would have been out 2 weeks ago but we hit some reports of segfaults.  So I am guessing 2 weeks from now they will be resolved so I can continue the release.

Fix patch:
diff --git a/.azure/release.yml b/.azure/release.yml
index 6d5e04355..ba104823d 100644
--- a/.azure/release.yml
+++ b/.azure/release.yml
@@ -61,9 +61,6 @@ stages:
     condition: eq(1,1)
     strategy:
       matrix:
-        Python36:
-          python.version: '3.6'
-          python.architecture: 'x64'
         Python37:
           python.version: '3.7'
           python.architecture: 'x64'
@@ -73,8 +70,11 @@ stages:
         Python39:
           python.version: '3.9'
           python.architecture: 'x64'
+        Python310:
+          python.version: '3.10'
+          python.architecture: 'x64'
     pool:
-      vmImage: 'vs2017-win2016'
+      vmImage: "windows-2019"
     steps:
     - template: scripts/deps.yml
     - task: UsePythonVersion@0
@@ -93,16 +93,16 @@ stages:
       python.architecture: 'x64'
     strategy:
       matrix:
-        Python36:
-          python.version: '3.6'
         Python37:
           python.version: '3.7'
         Python38:
           python.version: '3.8'
         Python39:
           python.version: '3.9'
+        Python310:
+          python.version: '3.10'
     pool:
-      vmImage: "macOS-10.14"
+      vmImage: "macos-11"
     steps:
     - template: scripts/deps.yml
     - script: .azure/scripts/osx-python.sh '$(python.version)'
diff --git a/.azure/scripts/build-wheels.sh b/.azure/scripts/build-wheels.sh
index a419ba303..a55c361b3 100755
--- a/.azure/scripts/build-wheels.sh
+++ b/.azure/scripts/build-wheels.sh
@@ -5,6 +5,8 @@ set -e -x
 pys=(/opt/python/*/bin)
 
 # Filter out Python 3.4
+pys=(${pys[@]//*36*/})
+pys=(${pys[@]//*35*/})
 pys=(${pys[@]//*34*/})
 pys=(${pys[@]//*27*/})
 
diff --git a/.azure/scripts/osx-python.sh b/.azure/scripts/osx-python.sh
index 995aa2cf8..c2ad3e0b8 100755
--- a/.azure/scripts/osx-python.sh
+++ b/.azure/scripts/osx-python.sh
@@ -3,21 +3,24 @@
 PYTHON_VERSION="$1"
 
 case $PYTHON_VERSION in
-3.6)
-  FULL_VERSION=3.6.8
-  ;;
 3.7)
   FULL_VERSION=3.7.9
+  INSTALLER_NAME=python-$FULL_VERSION-macosx10.9.pkg
   ;;
 3.8)
-  FULL_VERSION=3.8.6
+  FULL_VERSION=3.8.10
+  INSTALLER_NAME=python-$FULL_VERSION-macosx10.9.pkg
   ;;
 3.9)
-  FULL_VERSION=3.9.0
+  FULL_VERSION=3.9.12
+  INSTALLER_NAME=python-$FULL_VERSION-macosx10.9.pkg
+  ;;
+3.10)
+  FULL_VERSION=3.10.4
+  INSTALLER_NAME=python-$FULL_VERSION-macos11.pkg
   ;;
 esac
 
-INSTALLER_NAME=python-$FULL_VERSION-macosx10.9.pkg
 URL=https://www.python.org/ftp/python/$FULL_VERSION/$INSTALLER_NAME
 
 PY_PREFIX=/Library/Frameworks/Python.framework/Versions
diff --git a/.bumpversion.cfg b/.bumpversion.cfg
index 8b3bad655..075183a65 100644
--- a/.bumpversion.cfg
+++ b/.bumpversion.cfg
@@ -1,5 +1,5 @@
 [bumpversion]
-current_version = 1.3.1_dev0
+current_version = 1.4.1_dev0
 commit = True
 tag = False
 parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\_(?P<release>[a-z]+)(?P<build>\d+))?
@@ -28,4 +28,3 @@ values =
 search = Latest Changes:
 replace = Latest Changes:
 	- **{new_version} - {now:%Y-%m-%d}**
-
diff --git a/doc/CHANGELOG.rst b/doc/CHANGELOG.rst
index 876e50f4b..b79367435 100644
--- a/doc/CHANGELOG.rst
+++ b/doc/CHANGELOG.rst
@@ -4,13 +4,37 @@ Changelog
 This changelog *only* contains changes from the *first* pypi release (0.5.4.3) onwards.
 
 Latest Changes:
-- **1.3.1_dev0 - 2021-06-05**
+- **1.4.1_dev0 - 2022-05-14**
+- **1.4.0 - 2022-05-14**
+
+  - Support for all different buffer type conversions.
+
+    - Improved buffer transfers to numpy as guaranteed to match Java types.
+      However, exact dtype for conversions is os/numpy version dependent.
+
+    - Support for byte order channels on buffer transfers.
+
+    - Byte size for buffers now fixed to Java definitions.
+      
+    - When directly accessing Java arrays using memory view, Python requires a
+      cast from buffers.  Required because Python does not support memory view
+      alterations on non-native sizes.
+
+  - Fix crash when comparing JChar.
+
+     - Order handling for numerical operations with JChar fixed.
+
+  - Improved matching for Java functors based on parameter count.
+
+  - Dropped support for Python 3.5 and 3.6
+
+  - dbapi2 handles drivers that don't support autocommit.
 
   - Fixed issue when Java classes with dunder methods such as  ``__del__`` 
     caused conflicts in Python type system.   Java method which match dunder 
     patterns are longer translated to Python.
 
-  - Fix issue with numpy arrays with no dimensions resulting in crash..
+  - Fix issue with numpy arrays with no dimensions resulting in crash.
 
   - Support for user defined conversions for java.lang.Class and array types.
 
diff --git a/jpype/__init__.py b/jpype/__init__.py
index e4c7aeb6d..bd704f265 100644
--- a/jpype/__init__.py
+++ b/jpype/__init__.py
@@ -51,7 +51,7 @@
 __all__.extend(_jcustomizer.__all__)
 __all__.extend(_gui.__all__)
 
-__version__ = "1.3.1_dev0"
+__version__ = "1.4.1_dev0"
 __version_info__ = __version__.split('.')
 
 
diff --git a/native/java/org/jpype/JPypeContext.java b/native/java/org/jpype/JPypeContext.java
index 425e0ae44..cd6a3aa9e 100644
--- a/native/java/org/jpype/JPypeContext.java
+++ b/native/java/org/jpype/JPypeContext.java
@@ -73,7 +73,7 @@
 public class JPypeContext
 {
 
-  public final String VERSION = "1.3.1_dev0";
+  public final String VERSION = "1.4.1_dev0";
 
   private static JPypeContext INSTANCE = new JPypeContext();
   // This is the C++ portion of the context.
diff --git a/native/python/pyjp_module.cpp b/native/python/pyjp_module.cpp
index 90917df62..341328621 100644
--- a/native/python/pyjp_module.cpp
+++ b/native/python/pyjp_module.cpp
@@ -719,7 +719,7 @@ PyMODINIT_FUNC PyInit__jpype()
 	// PyJPModule = module;
 	Py_INCREF(module);
 	PyJPModule = module;
-	PyModule_AddStringConstant(module, "__version__", "1.3.1_dev0");
+	PyModule_AddStringConstant(module, "__version__", "1.4.1_dev0");
 	
 	// Our module will be used for PyFrame object and it is a requirement that
 	// we have a builtins in our dictionary.
diff --git a/setup.py b/setup.py
index f587649a7..8e428e0e2 100644
--- a/setup.py
+++ b/setup.py
@@ -50,7 +50,7 @@
 
 setup(
     name='JPype1',
-    version='1.3.1_dev0',
+    version='1.4.1_dev0',
     description='A Python to Java bridge.',
     long_description=open('README.rst').read(),
     license='License :: OSI Approved :: Apache Software License',


Test patch:
diff --git a/setupext/test_java.py b/setupext/test_java.py
index c08780bec..d0a02dec5 100644
--- a/setupext/test_java.py
+++ b/setupext/test_java.py
@@ -87,4 +87,4 @@ def run(self):
         cmdStr = compileJava()
         self.announce("  %s" % " ".join(cmdStr), level=distutils.log.INFO)
         subprocess.check_call(cmdStr)
-        subprocess.check_call(shlex.split("javadoc test/harness/jpype/doc/Test.java -d test/classes/"))
+        subprocess.check_call(shlex.split("javadoc -Xdoclint:none test/harness/jpype/doc/Test.java -d test/classes/"))
diff --git a/test-requirements.txt b/test-requirements.txt
index e4a9c7143..a6108b5c8 100644
--- a/test-requirements.txt
+++ b/test-requirements.txt
@@ -1,3 +1,3 @@
 pytest==7.1.1
 pyinstaller==4.10
-jedi==0.17.0
+jedi==0.18.0
diff --git a/test/harness/jpype/doc/Test.java b/test/harness/jpype/doc/Test.java
index 5108b3c02..a2de9ec68 100644
--- a/test/harness/jpype/doc/Test.java
+++ b/test/harness/jpype/doc/Test.java
@@ -32,7 +32,7 @@ public class Test
    *    hey.method(1, SecretMap());
    * }</pre></blockquote>
    * <p>
-   * <table style="width:100%" summary="Test table">
+   * <table style="width:100%" summary="foo">
    * <tr><th>North</th><th>East</th><th>Steps</th></tr>
    * <tr><td>Y</td><td>N</td><td>10</td></tr>
    * <tr><td>N</td><td>Y</td><td>20</td></tr>
@@ -54,7 +54,7 @@ public class Test
    *
    * @throws java.lang.NoSuchMethodException if something bad happens.
    * @param i an argument <code>a</code>. {@value #QQ}
-   * @param j
+   * @param j another argument.
    * @return a secret code.
    * @since 1.5
    *