Build for Python 3.11

Python 3.11 will be released towards the end of this year (possibly October).
There is a release candidate available now (Python 3.11.0rc1, released 2022-08-29), which is expected to be a stable ABI with the final 3.11.0 release. Therefore, it is reasonable to prepare JPype against this now, and potentially make a release containing a Python 3.11 wheel already.
The changelog is available at https://docs.python.org/3.11/whatsnew/3.11.html#id6.
In terms of complexity, it seems that there are a few issues which will likely come up:

The PyFrameObject structure members have been removed from the public C API. This is used in the exception handling in JPype
_PyObject_GC_Malloc has been removed in https://github.com/python/cpython/commit/8319114feedd2a5b77378bba24eb9fb2689c5033 - since these weren't public API, there is no obvious suggestion for what to use instead.

cc @Thrameos

Not sure how we can support exception reporting without a replacement API for PyFrameObject.

Not sure how we can support exception reporting without a replacement API for PyFrameObject.

Is this something we need to raise to the CPython mailing list perhaps? It would be quite uncomfortable to lose that altogether.
FYI, I did a quick build against Python 3.11 with:
(dockerfile)
FROM quay.io/pypa/manylinux2014_x86_64
RUN yum install -y \
    java-devel \
    ccache \
;
COPY . /opt/src
RUN cd /opt/src \
 && CC="ccache gcc" python3.11 setup.py build_ext --inplace \
;

docker build .
Step 1/4 : FROM quay.io/pypa/manylinux2014_x86_64
 ---> 0b5b5fbafd04
Step 2/4 : RUN yum install -y     java-devel     ccache ;
 ---> Using cache
 ---> ff7a6bf33d03
Step 3/4 : COPY . /opt/src
 ---> f5eea5b22b9f
Step 4/4 : RUN cd /opt/src  && CC="ccache gcc" python3.11 setup.py build_ext --inplace ;
 ---> Running in 1a67a85058db
/opt/_internal/cpython-3.11.0rc1/lib/python3.11/site-packages/setuptools/dist.py:530: UserWarning: Normalizing '1.4.1_dev0' to '1.4.1.dev0'
  warnings.warn(tmpl.format(**locals()))
running build_ext
Call build extensions
Jar cache is missing, using --enable-build-jar to recreate it.
  javac -cp lib/asm-8.0.1.jar -d build/temp.linux-x86_64-cpython-311/org.jpype/classes -g:none -source 1.8 -target 1.8 -encoding UTF-8 native/java/org/jpype/JPypeContext.java native/java/org/jpype/JPypeKeywords.java native/java/org/jpype/JPypeSignal.java native/java/org/jpype/JPypeUtilities.java native/java/org/jpype/PyExceptionProxy.java native/java/org/jpype/classloader/DynamicClassLoader.java native/java/org/jpype/classloader/JPypeClassLoader.java native/java/org/jpype/html/AttrGrammar.java native/java/org/jpype/html/AttrParser.java native/java/org/jpype/html/Html.java native/java/org/jpype/html/HtmlGrammar.java native/java/org/jpype/html/HtmlHandler.java native/java/org/jpype/html/HtmlParser.java native/java/org/jpype/html/HtmlTreeHandler.java native/java/org/jpype/html/HtmlWriter.java native/java/org/jpype/html/Parser.java native/java/org/jpype/javadoc/DomUtilities.java native/java/org/jpype/javadoc/Javadoc.java native/java/org/jpype/javadoc/JavadocException.java native/java/org/jpype/javadoc/JavadocExtractor.java native/java/org/jpype/javadoc/JavadocRenderer.java native/java/org/jpype/javadoc/JavadocTransformer.java native/java/org/jpype/manager/ClassDescriptor.java native/java/org/jpype/manager/MethodResolution.java native/java/org/jpype/manager/ModifierCode.java native/java/org/jpype/manager/TypeAudit.java native/java/org/jpype/manager/TypeFactory.java native/java/org/jpype/manager/TypeFactoryNative.java native/java/org/jpype/manager/TypeManager.java native/java/org/jpype/pickle/ByteBufferInputStream.java native/java/org/jpype/pickle/Decoder.java native/java/org/jpype/pickle/Encoder.java native/java/org/jpype/pkg/JPypePackage.java native/java/org/jpype/pkg/JPypePackageManager.java native/java/org/jpype/proxy/JPypeProxy.java native/java/org/jpype/ref/JPypeReference.java native/java/org/jpype/ref/JPypeReferenceNative.java native/java/org/jpype/ref/JPypeReferenceQueue.java native/java/org/jpype/ref/JPypeReferenceSet.java
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Copy file native/java/org/jpype/html/entities.txt build/temp.linux-x86_64-cpython-311/org.jpype/classes/org/jpype/html/entities.txt
  jar cvf build/lib.linux-x86_64-cpython-311/org.jpype.jar -C build/temp.linux-x86_64-cpython-311/org.jpype/classes .
added manifest
adding: org/(in = 0) (out= 0)(stored 0%)
adding: org/jpype/(in = 0) (out= 0)(stored 0%)
adding: org/jpype/JPypeContext.class(in = 9682) (out= 4714)(deflated 51%)
adding: org/jpype/PyExceptionProxy.class(in = 223) (out= 189)(deflated 15%)
adding: org/jpype/classloader/(in = 0) (out= 0)(stored 0%)
adding: org/jpype/classloader/JPypeClassLoader.class(in = 2649) (out= 1413)(deflated 46%)
adding: org/jpype/classloader/DynamicClassLoader$1.class(in = 1876) (out= 790)(deflated 57%)
adding: org/jpype/classloader/DynamicClassLoader.class(in = 6303) (out= 3073)(deflated 51%)
adding: org/jpype/ref/(in = 0) (out= 0)(stored 0%)
adding: org/jpype/ref/JPypeReferenceQueue.class(in = 3058) (out= 1433)(deflated 53%)
adding: org/jpype/ref/JPypeReferenceSet.class(in = 1628) (out= 927)(deflated 43%)
adding: org/jpype/ref/JPypeReferenceQueue$1.class(in = 185) (out= 143)(deflated 22%)
adding: org/jpype/ref/JPypeReferenceNative.class(in = 267) (out= 204)(deflated 23%)
adding: org/jpype/ref/JPypeReferenceQueue$Worker.class(in = 1560) (out= 748)(deflated 52%)
adding: org/jpype/ref/JPypeReference.class(in = 541) (out= 355)(deflated 34%)
adding: org/jpype/ref/JPypeReferenceSet$Pool.class(in = 690) (out= 405)(deflated 41%)
adding: org/jpype/JPypeContext$1.class(in = 480) (out= 311)(deflated 35%)
adding: org/jpype/JPypeSignal$1.class(in = 576) (out= 360)(deflated 37%)
adding: org/jpype/JPypeKeywords.class(in = 1448) (out= 775)(deflated 46%)
adding: org/jpype/JPypeSignal.class(in = 1711) (out= 820)(deflated 52%)
adding: org/jpype/pkg/(in = 0) (out= 0)(stored 0%)
adding: org/jpype/pkg/JPypePackage.class(in = 4038) (out= 2090)(deflated 48%)
adding: org/jpype/pkg/JPypePackageManager$ModuleDirectory.class(in = 1752) (out= 877)(deflated 49%)
adding: org/jpype/pkg/JPypePackageManager.class(in = 7815) (out= 3609)(deflated 53%)
adding: org/jpype/manager/(in = 0) (out= 0)(stored 0%)
adding: org/jpype/manager/TypeManager$1.class(in = 177) (out= 135)(deflated 23%)
adding: org/jpype/manager/MethodResolution.class(in = 4502) (out= 2186)(deflated 51%)
adding: org/jpype/manager/ClassDescriptor.class(in = 1192) (out= 708)(deflated 40%)
adding: org/jpype/manager/TypeManager$Destroyer.class(in = 1116) (out= 626)(deflated 43%)
adding: org/jpype/manager/TypeManager.class(in = 15280) (out= 7263)(deflated 52%)
adding: org/jpype/manager/TypeFactory.class(in = 644) (out= 332)(deflated 48%)
adding: org/jpype/manager/TypeFactoryNative.class(in = 772) (out= 414)(deflated 46%)
adding: org/jpype/manager/ModifierCode.class(in = 2632) (out= 1425)(deflated 45%)
adding: org/jpype/manager/TypeAudit.class(in = 251) (out= 172)(deflated 31%)
adding: org/jpype/pickle/(in = 0) (out= 0)(stored 0%)
adding: org/jpype/pickle/Decoder.class(in = 683) (out= 406)(deflated 40%)
adding: org/jpype/pickle/Encoder.class(in = 710) (out= 421)(deflated 40%)
adding: org/jpype/pickle/ByteBufferInputStream.class(in = 1179) (out= 649)(deflated 44%)
adding: org/jpype/JPypeUtilities.class(in = 779) (out= 444)(deflated 43%)
adding: org/jpype/proxy/(in = 0) (out= 0)(stored 0%)
adding: org/jpype/proxy/JPypeProxy.class(in = 2535) (out= 1254)(deflated 50%)
adding: org/jpype/html/(in = 0) (out= 0)(stored 0%)
adding: org/jpype/html/AttrGrammar$AttrRule.class(in = 1223) (out= 641)(deflated 47%)
adding: org/jpype/html/AttrGrammar.class(in = 2221) (out= 984)(deflated 55%)
adding: org/jpype/html/Html.class(in = 5891) (out= 3223)(deflated 45%)
adding: org/jpype/html/AttrGrammar$EndQuoteRule.class(in = 1130) (out= 564)(deflated 50%)
adding: org/jpype/html/HtmlGrammar$Comment.class(in = 1744) (out= 805)(deflated 53%)
adding: org/jpype/html/AttrGrammar$QuoteRule.class(in = 1087) (out= 545)(deflated 49%)
adding: org/jpype/html/HtmlGrammar$Quoted.class(in = 1638) (out= 748)(deflated 54%)
adding: org/jpype/html/HtmlGrammar$EndCData.class(in = 1648) (out= 834)(deflated 49%)
adding: org/jpype/html/entities.txt(in = 3616) (out= 1559)(deflated 56%)
adding: org/jpype/html/AttrGrammar$BooleanRule.class(in = 1209) (out= 634)(deflated 47%)
adding: org/jpype/html/Parser$MatchRule.class(in = 1073) (out= 605)(deflated 43%)
adding: org/jpype/html/HtmlGrammar$MergeText.class(in = 996) (out= 525)(deflated 47%)
adding: org/jpype/html/HtmlGrammar$StartElement.class(in = 1624) (out= 784)(deflated 51%)
adding: org/jpype/html/HtmlGrammar$Escaped.class(in = 1048) (out= 556)(deflated 46%)
adding: org/jpype/html/Parser$Token.class(in = 215) (out= 167)(deflated 22%)
adding: org/jpype/html/Parser$Rule.class(in = 351) (out= 197)(deflated 43%)
adding: org/jpype/html/HtmlGrammar$Token.class(in = 2243) (out= 1174)(deflated 47%)
adding: org/jpype/html/HtmlGrammar$Directive.class(in = 910) (out= 476)(deflated 47%)
adding: org/jpype/html/HtmlGrammar$StartQuote.class(in = 1259) (out= 611)(deflated 51%)
adding: org/jpype/html/AttrParser.class(in = 649) (out= 360)(deflated 44%)
adding: org/jpype/html/HtmlParser.class(in = 531) (out= 306)(deflated 42%)
adding: org/jpype/html/HtmlHandler.class(in = 352) (out= 218)(deflated 38%)
adding: org/jpype/html/HtmlTreeHandler.class(in = 5222) (out= 2595)(deflated 50%)
adding: org/jpype/html/AttrGrammar$Token.class(in = 1791) (out= 931)(deflated 48%)
adding: org/jpype/html/HtmlGrammar$BeginElement.class(in = 2130) (out= 962)(deflated 54%)
adding: org/jpype/html/Parser$Grammar.class(in = 254) (out= 165)(deflated 35%)
adding: org/jpype/html/AttrGrammar$IgnoreWSRule.class(in = 819) (out= 458)(deflated 44%)
adding: org/jpype/html/HtmlGrammar$State.class(in = 2080) (out= 905)(deflated 56%)
adding: org/jpype/html/Parser.class(in = 3984) (out= 1900)(deflated 52%)
adding: org/jpype/html/Parser$State.class(in = 349) (out= 198)(deflated 43%)
adding: org/jpype/html/HtmlGrammar$1.class(in = 171) (out= 136)(deflated 20%)
adding: org/jpype/html/HtmlGrammar.class(in = 5251) (out= 2249)(deflated 57%)
adding: org/jpype/html/HtmlGrammar$EndComment.class(in = 1670) (out= 853)(deflated 48%)
adding: org/jpype/html/HtmlGrammar$EndElement.class(in = 1392) (out= 664)(deflated 52%)
adding: org/jpype/html/HtmlGrammar$CompleteElement.class(in = 1709) (out= 853)(deflated 50%)
adding: org/jpype/html/Parser$Entity.class(in = 774) (out= 391)(deflated 49%)
adding: org/jpype/html/HtmlWriter.class(in = 3444) (out= 1779)(deflated 48%)
adding: org/jpype/html/HtmlGrammar$StartComment.class(in = 1554) (out= 723)(deflated 53%)
adding: org/jpype/html/Parser$1.class(in = 161) (out= 132)(deflated 18%)
adding: org/jpype/html/HtmlGrammar$Cleanup.class(in = 2482) (out= 1179)(deflated 52%)
adding: org/jpype/html/HtmlGrammar$EndDirective.class(in = 1404) (out= 677)(deflated 51%)
adding: org/jpype/html/HtmlGrammar$CData.class(in = 1700) (out= 777)(deflated 54%)
adding: org/jpype/html/AttrGrammar$State.class(in = 1830) (out= 776)(deflated 57%)
adding: org/jpype/javadoc/(in = 0) (out= 0)(stored 0%)
adding: org/jpype/javadoc/JavadocTransformer.class(in = 9712) (out= 4497)(deflated 53%)
adding: org/jpype/javadoc/JavadocExtractor.class(in = 6448) (out= 3058)(deflated 52%)
adding: org/jpype/javadoc/JavadocException.class(in = 277) (out= 198)(deflated 28%)
adding: org/jpype/javadoc/Javadoc.class(in = 626) (out= 346)(deflated 44%)
adding: org/jpype/javadoc/DomUtilities.class(in = 3165) (out= 1450)(deflated 54%)
adding: org/jpype/javadoc/JavadocTransformer$Workspace.class(in = 916) (out= 430)(deflated 53%)
adding: org/jpype/javadoc/JavadocRenderer.class(in = 7226) (out= 3569)(deflated 50%)
Call build ext
copying build/lib.linux-x86_64-cpython-311/org.jpype.jar ->
copying build/lib.linux-x86_64-cpython-311/_jpype.cpython-311-x86_64-linux-gnu.so ->
Removing intermediate container 1a67a85058db
 ---> d58cc94938dc
Successfully built d58cc94938dc
(base) pelson@pelson-X1:~/github/jpype/jpype$ docker build .
Sending build context to Docker daemon  129.9MB
Step 1/4 : FROM quay.io/pypa/manylinux2014_x86_64
 ---> 0b5b5fbafd04
Step 2/4 : RUN yum install -y     java-devel     ccache ;
 ---> Using cache
 ---> ff7a6bf33d03
Step 3/4 : COPY . /opt/src
 ---> 4704e5325ca3
Step 4/4 : RUN cd /opt/src  && CC="ccache gcc" python3.11 setup.py build_ext --inplace ;
 ---> Running in 714e9067964b
/opt/_internal/cpython-3.11.0rc1/lib/python3.11/site-packages/setuptools/dist.py:530: UserWarning: Normalizing '1.4.1_dev0' to '1.4.1.dev0'
  warnings.warn(tmpl.format(**locals()))
running build_ext
Call build extensions
Jar cache is missing, using --enable-build-jar to recreate it.
  javac -cp lib/asm-8.0.1.jar -d build/temp.linux-x86_64-cpython-311/org.jpype/classes -g:none -source 1.8 -target 1.8 -encoding UTF-8 native/java/org/jpype/JPypeContext.java native/java/org/jpype/JPypeKeywords.java native/java/org/jpype/JPypeSignal.java native/java/org/jpype/JPypeUtilities.java native/java/org/jpype/PyExceptionProxy.java native/java/org/jpype/classloader/DynamicClassLoader.java native/java/org/jpype/classloader/JPypeClassLoader.java native/java/org/jpype/html/AttrGrammar.java native/java/org/jpype/html/AttrParser.java native/java/org/jpype/html/Html.java native/java/org/jpype/html/HtmlGrammar.java native/java/org/jpype/html/HtmlHandler.java native/java/org/jpype/html/HtmlParser.java native/java/org/jpype/html/HtmlTreeHandler.java native/java/org/jpype/html/HtmlWriter.java native/java/org/jpype/html/Parser.java native/java/org/jpype/javadoc/DomUtilities.java native/java/org/jpype/javadoc/Javadoc.java native/java/org/jpype/javadoc/JavadocException.java native/java/org/jpype/javadoc/JavadocExtractor.java native/java/org/jpype/javadoc/JavadocRenderer.java native/java/org/jpype/javadoc/JavadocTransformer.java native/java/org/jpype/manager/ClassDescriptor.java native/java/org/jpype/manager/MethodResolution.java native/java/org/jpype/manager/ModifierCode.java native/java/org/jpype/manager/TypeAudit.java native/java/org/jpype/manager/TypeFactory.java native/java/org/jpype/manager/TypeFactoryNative.java native/java/org/jpype/manager/TypeManager.java native/java/org/jpype/pickle/ByteBufferInputStream.java native/java/org/jpype/pickle/Decoder.java native/java/org/jpype/pickle/Encoder.java native/java/org/jpype/pkg/JPypePackage.java native/java/org/jpype/pkg/JPypePackageManager.java native/java/org/jpype/proxy/JPypeProxy.java native/java/org/jpype/ref/JPypeReference.java native/java/org/jpype/ref/JPypeReferenceNative.java native/java/org/jpype/ref/JPypeReferenceQueue.java native/java/org/jpype/ref/JPypeReferenceSet.java
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Copy file native/java/org/jpype/html/entities.txt build/temp.linux-x86_64-cpython-311/org.jpype/classes/org/jpype/html/entities.txt
  jar cvf build/lib.linux-x86_64-cpython-311/org.jpype.jar -C build/temp.linux-x86_64-cpython-311/org.jpype/classes .
added manifest
adding: org/(in = 0) (out= 0)(stored 0%)
adding: org/jpype/(in = 0) (out= 0)(stored 0%)
adding: org/jpype/JPypeContext.class(in = 9682) (out= 4714)(deflated 51%)
adding: org/jpype/PyExceptionProxy.class(in = 223) (out= 189)(deflated 15%)
adding: org/jpype/classloader/(in = 0) (out= 0)(stored 0%)
adding: org/jpype/classloader/JPypeClassLoader.class(in = 2649) (out= 1413)(deflated 46%)
adding: org/jpype/classloader/DynamicClassLoader$1.class(in = 1876) (out= 790)(deflated 57%)
adding: org/jpype/classloader/DynamicClassLoader.class(in = 6303) (out= 3073)(deflated 51%)
adding: org/jpype/ref/(in = 0) (out= 0)(stored 0%)
adding: org/jpype/ref/JPypeReferenceQueue.class(in = 3058) (out= 1433)(deflated 53%)
adding: org/jpype/ref/JPypeReferenceSet.class(in = 1628) (out= 927)(deflated 43%)
adding: org/jpype/ref/JPypeReferenceQueue$1.class(in = 185) (out= 143)(deflated 22%)
adding: org/jpype/ref/JPypeReferenceNative.class(in = 267) (out= 204)(deflated 23%)
adding: org/jpype/ref/JPypeReferenceQueue$Worker.class(in = 1560) (out= 748)(deflated 52%)
adding: org/jpype/ref/JPypeReference.class(in = 541) (out= 355)(deflated 34%)
adding: org/jpype/ref/JPypeReferenceSet$Pool.class(in = 690) (out= 405)(deflated 41%)
adding: org/jpype/JPypeContext$1.class(in = 480) (out= 311)(deflated 35%)
adding: org/jpype/JPypeSignal$1.class(in = 576) (out= 360)(deflated 37%)
adding: org/jpype/JPypeKeywords.class(in = 1448) (out= 775)(deflated 46%)
adding: org/jpype/JPypeSignal.class(in = 1711) (out= 820)(deflated 52%)
adding: org/jpype/pkg/(in = 0) (out= 0)(stored 0%)
adding: org/jpype/pkg/JPypePackage.class(in = 4038) (out= 2090)(deflated 48%)
adding: org/jpype/pkg/JPypePackageManager$ModuleDirectory.class(in = 1752) (out= 877)(deflated 49%)
adding: org/jpype/pkg/JPypePackageManager.class(in = 7815) (out= 3609)(deflated 53%)
adding: org/jpype/manager/(in = 0) (out= 0)(stored 0%)
adding: org/jpype/manager/TypeManager$1.class(in = 177) (out= 135)(deflated 23%)
adding: org/jpype/manager/MethodResolution.class(in = 4502) (out= 2186)(deflated 51%)
adding: org/jpype/manager/ClassDescriptor.class(in = 1192) (out= 708)(deflated 40%)
adding: org/jpype/manager/TypeManager$Destroyer.class(in = 1116) (out= 626)(deflated 43%)
adding: org/jpype/manager/TypeManager.class(in = 15280) (out= 7263)(deflated 52%)
adding: org/jpype/manager/TypeFactory.class(in = 644) (out= 332)(deflated 48%)
adding: org/jpype/manager/TypeFactoryNative.class(in = 772) (out= 414)(deflated 46%)
adding: org/jpype/manager/ModifierCode.class(in = 2632) (out= 1425)(deflated 45%)
adding: org/jpype/manager/TypeAudit.class(in = 251) (out= 172)(deflated 31%)
adding: org/jpype/pickle/(in = 0) (out= 0)(stored 0%)
adding: org/jpype/pickle/Decoder.class(in = 683) (out= 406)(deflated 40%)
adding: org/jpype/pickle/Encoder.class(in = 710) (out= 421)(deflated 40%)
adding: org/jpype/pickle/ByteBufferInputStream.class(in = 1179) (out= 649)(deflated 44%)
adding: org/jpype/JPypeUtilities.class(in = 779) (out= 444)(deflated 43%)
adding: org/jpype/proxy/(in = 0) (out= 0)(stored 0%)
adding: org/jpype/proxy/JPypeProxy.class(in = 2535) (out= 1254)(deflated 50%)
adding: org/jpype/html/(in = 0) (out= 0)(stored 0%)
adding: org/jpype/html/AttrGrammar$AttrRule.class(in = 1223) (out= 641)(deflated 47%)
adding: org/jpype/html/AttrGrammar.class(in = 2221) (out= 984)(deflated 55%)
adding: org/jpype/html/Html.class(in = 5891) (out= 3223)(deflated 45%)
adding: org/jpype/html/AttrGrammar$EndQuoteRule.class(in = 1130) (out= 564)(deflated 50%)
adding: org/jpype/html/HtmlGrammar$Comment.class(in = 1744) (out= 805)(deflated 53%)
adding: org/jpype/html/AttrGrammar$QuoteRule.class(in = 1087) (out= 545)(deflated 49%)
adding: org/jpype/html/HtmlGrammar$Quoted.class(in = 1638) (out= 748)(deflated 54%)
adding: org/jpype/html/HtmlGrammar$EndCData.class(in = 1648) (out= 834)(deflated 49%)
adding: org/jpype/html/entities.txt(in = 3616) (out= 1559)(deflated 56%)
adding: org/jpype/html/AttrGrammar$BooleanRule.class(in = 1209) (out= 634)(deflated 47%)
adding: org/jpype/html/Parser$MatchRule.class(in = 1073) (out= 605)(deflated 43%)
adding: org/jpype/html/HtmlGrammar$MergeText.class(in = 996) (out= 525)(deflated 47%)
adding: org/jpype/html/HtmlGrammar$StartElement.class(in = 1624) (out= 784)(deflated 51%)
adding: org/jpype/html/HtmlGrammar$Escaped.class(in = 1048) (out= 556)(deflated 46%)
adding: org/jpype/html/Parser$Token.class(in = 215) (out= 167)(deflated 22%)
adding: org/jpype/html/Parser$Rule.class(in = 351) (out= 197)(deflated 43%)
adding: org/jpype/html/HtmlGrammar$Token.class(in = 2243) (out= 1174)(deflated 47%)
adding: org/jpype/html/HtmlGrammar$Directive.class(in = 910) (out= 476)(deflated 47%)
adding: org/jpype/html/HtmlGrammar$StartQuote.class(in = 1259) (out= 611)(deflated 51%)
adding: org/jpype/html/AttrParser.class(in = 649) (out= 360)(deflated 44%)
adding: org/jpype/html/HtmlParser.class(in = 531) (out= 306)(deflated 42%)
adding: org/jpype/html/HtmlHandler.class(in = 352) (out= 218)(deflated 38%)
adding: org/jpype/html/HtmlTreeHandler.class(in = 5222) (out= 2595)(deflated 50%)
adding: org/jpype/html/AttrGrammar$Token.class(in = 1791) (out= 931)(deflated 48%)
adding: org/jpype/html/HtmlGrammar$BeginElement.class(in = 2130) (out= 962)(deflated 54%)
adding: org/jpype/html/Parser$Grammar.class(in = 254) (out= 165)(deflated 35%)
adding: org/jpype/html/AttrGrammar$IgnoreWSRule.class(in = 819) (out= 458)(deflated 44%)
adding: org/jpype/html/HtmlGrammar$State.class(in = 2080) (out= 905)(deflated 56%)
adding: org/jpype/html/Parser.class(in = 3984) (out= 1900)(deflated 52%)
adding: org/jpype/html/Parser$State.class(in = 349) (out= 198)(deflated 43%)
adding: org/jpype/html/HtmlGrammar$1.class(in = 171) (out= 136)(deflated 20%)
adding: org/jpype/html/HtmlGrammar.class(in = 5251) (out= 2249)(deflated 57%)
adding: org/jpype/html/HtmlGrammar$EndComment.class(in = 1670) (out= 853)(deflated 48%)
adding: org/jpype/html/HtmlGrammar$EndElement.class(in = 1392) (out= 664)(deflated 52%)
adding: org/jpype/html/HtmlGrammar$CompleteElement.class(in = 1709) (out= 853)(deflated 50%)
adding: org/jpype/html/Parser$Entity.class(in = 774) (out= 391)(deflated 49%)
adding: org/jpype/html/HtmlWriter.class(in = 3444) (out= 1779)(deflated 48%)
adding: org/jpype/html/HtmlGrammar$StartComment.class(in = 1554) (out= 723)(deflated 53%)
adding: org/jpype/html/Parser$1.class(in = 161) (out= 132)(deflated 18%)
adding: org/jpype/html/HtmlGrammar$Cleanup.class(in = 2482) (out= 1179)(deflated 52%)
adding: org/jpype/html/HtmlGrammar$EndDirective.class(in = 1404) (out= 677)(deflated 51%)
adding: org/jpype/html/HtmlGrammar$CData.class(in = 1700) (out= 777)(deflated 54%)
adding: org/jpype/html/AttrGrammar$State.class(in = 1830) (out= 776)(deflated 57%)
adding: org/jpype/javadoc/(in = 0) (out= 0)(stored 0%)
adding: org/jpype/javadoc/JavadocTransformer.class(in = 9712) (out= 4497)(deflated 53%)
adding: org/jpype/javadoc/JavadocExtractor.class(in = 6448) (out= 3058)(deflated 52%)
adding: org/jpype/javadoc/JavadocException.class(in = 277) (out= 198)(deflated 28%)
adding: org/jpype/javadoc/Javadoc.class(in = 626) (out= 346)(deflated 44%)
adding: org/jpype/javadoc/DomUtilities.class(in = 3165) (out= 1450)(deflated 54%)
adding: org/jpype/javadoc/JavadocTransformer$Workspace.class(in = 916) (out= 430)(deflated 53%)
adding: org/jpype/javadoc/JavadocRenderer.class(in = 7226) (out= 3569)(deflated 50%)
Call build ext
building '_jpype' extension
ccache gcc -Wsign-compare -DNDEBUG -fwrapv -Wall -fPIC -Inative/common/include -Inative/python/include -Inative/embedded/include -Inative/jni_include -I/opt/_internal/cpython-3.11.0rc1/include/python3.11 -c native/common/jp_array.cpp -o build/temp.linux-x86_64-cpython-311/native/common/jp_array.o -g0 -std=c++11 -O2
ccache gcc -Wsign-compare -DNDEBUG -fwrapv -Wall -fPIC -Inative/common/include -Inative/python/include -Inative/embedded/include -Inative/jni_include -I/opt/_internal/cpython-3.11.0rc1/include/python3.11 -c native/common/jp_arrayclass.cpp -o build/temp.linux-x86_64-cpython-311/native/common/jp_arrayclass.o -g0 -std=c++11 -O2
ccache gcc -Wsign-compare -DNDEBUG -fwrapv -Wall -fPIC -Inative/common/include -Inative/python/include -Inative/embedded/include -Inative/jni_include -I/opt/_internal/cpython-3.11.0rc1/include/python3.11 -c native/common/jp_booleantype.cpp -o build/temp.linux-x86_64-cpython-311/native/common/jp_booleantype.o -g0 -std=c++11 -O2
ccache gcc -Wsign-compare -DNDEBUG -fwrapv -Wall -fPIC -Inative/common/include -Inative/python/include -Inative/embedded/include -Inative/jni_include -I/opt/_internal/cpython-3.11.0rc1/include/python3.11 -c native/common/jp_boxedtype.cpp -o build/temp.linux-x86_64-cpython-311/native/common/jp_boxedtype.o -g0 -std=c++11 -O2
ccache gcc -Wsign-compare -DNDEBUG -fwrapv -Wall -fPIC -Inative/common/include -Inative/python/include -Inative/embedded/include -Inative/jni_include -I/opt/_internal/cpython-3.11.0rc1/include/python3.11 -c native/common/jp_buffer.cpp -o build/temp.linux-x86_64-cpython-311/native/common/jp_buffer.o -g0 -std=c++11 -O2
ccache gcc -Wsign-compare -DNDEBUG -fwrapv -Wall -fPIC -Inative/common/include -Inative/python/include -Inative/embedded/include -Inative/jni_include -I/opt/_internal/cpython-3.11.0rc1/include/python3.11 -c native/common/jp_buffertype.cpp -o build/temp.linux-x86_64-cpython-311/native/common/jp_buffertype.o -g0 -std=c++11 -O2
ccache gcc -Wsign-compare -DNDEBUG -fwrapv -Wall -fPIC -Inative/common/include -Inative/python/include -Inative/embedded/include -Inative/jni_include -I/opt/_internal/cpython-3.11.0rc1/include/python3.11 -c native/common/jp_bytetype.cpp -o build/temp.linux-x86_64-cpython-311/native/common/jp_bytetype.o -g0 -std=c++11 -O2
ccache gcc -Wsign-compare -DNDEBUG -fwrapv -Wall -fPIC -Inative/common/include -Inative/python/include -Inative/embedded/include -Inative/jni_include -I/opt/_internal/cpython-3.11.0rc1/include/python3.11 -c native/common/jp_chartype.cpp -o build/temp.linux-x86_64-cpython-311/native/common/jp_chartype.o -g0 -std=c++11 -O2
ccache gcc -Wsign-compare -DNDEBUG -fwrapv -Wall -fPIC -Inative/common/include -Inative/python/include -Inative/embedded/include -Inative/jni_include -I/opt/_internal/cpython-3.11.0rc1/include/python3.11 -c native/common/jp_class.cpp -o build/temp.linux-x86_64-cpython-311/native/common/jp_class.o -g0 -std=c++11 -O2
ccache gcc -Wsign-compare -DNDEBUG -fwrapv -Wall -fPIC -Inative/common/include -Inative/python/include -Inative/embedded/include -Inative/jni_include -I/opt/_internal/cpython-3.11.0rc1/include/python3.11 -c native/common/jp_classhints.cpp -o build/temp.linux-x86_64-cpython-311/native/common/jp_classhints.o -g0 -std=c++11 -O2
ccache gcc -Wsign-compare -DNDEBUG -fwrapv -Wall -fPIC -Inative/common/include -Inative/python/include -Inative/embedded/include -Inative/jni_include -I/opt/_internal/cpython-3.11.0rc1/include/python3.11 -c native/common/jp_classloader.cpp -o build/temp.linux-x86_64-cpython-311/native/common/jp_classloader.o -g0 -std=c++11 -O2
ccache gcc -Wsign-compare -DNDEBUG -fwrapv -Wall -fPIC -Inative/common/include -Inative/python/include -Inative/embedded/include -Inative/jni_include -I/opt/_internal/cpython-3.11.0rc1/include/python3.11 -c native/common/jp_classtype.cpp -o build/temp.linux-x86_64-cpython-311/native/common/jp_classtype.o -g0 -std=c++11 -O2
ccache gcc -Wsign-compare -DNDEBUG -fwrapv -Wall -fPIC -Inative/common/include -Inative/python/include -Inative/embedded/include -Inative/jni_include -I/opt/_internal/cpython-3.11.0rc1/include/python3.11 -c native/common/jp_context.cpp -o build/temp.linux-x86_64-cpython-311/native/common/jp_context.o -g0 -std=c++11 -O2
ccache gcc -Wsign-compare -DNDEBUG -fwrapv -Wall -fPIC -Inative/common/include -Inative/python/include -Inative/embedded/include -Inative/jni_include -I/opt/_internal/cpython-3.11.0rc1/include/python3.11 -c native/common/jp_convert.cpp -o build/temp.linux-x86_64-cpython-311/native/common/jp_convert.o -g0 -std=c++11 -O2
ccache gcc -Wsign-compare -DNDEBUG -fwrapv -Wall -fPIC -Inative/common/include -Inative/python/include -Inative/embedded/include -Inative/jni_include -I/opt/_internal/cpython-3.11.0rc1/include/python3.11 -c native/common/jp_doubletype.cpp -o build/temp.linux-x86_64-cpython-311/native/common/jp_doubletype.o -g0 -std=c++11 -O2
ccache gcc -Wsign-compare -DNDEBUG -fwrapv -Wall -fPIC -Inative/common/include -Inative/python/include -Inative/embedded/include -Inative/jni_include -I/opt/_internal/cpython-3.11.0rc1/include/python3.11 -c native/common/jp_encoding.cpp -o build/temp.linux-x86_64-cpython-311/native/common/jp_encoding.o -g0 -std=c++11 -O2
ccache gcc -Wsign-compare -DNDEBUG -fwrapv -Wall -fPIC -Inative/common/include -Inative/python/include -Inative/embedded/include -Inative/jni_include -I/opt/_internal/cpython-3.11.0rc1/include/python3.11 -c native/common/jp_exception.cpp -o build/temp.linux-x86_64-cpython-311/native/common/jp_exception.o -g0 -std=c++11 -O2
native/common/jp_exception.cpp: In function ‘PyTracebackObject* tb_create(PyTracebackObject*, PyObject*, const char*, const char*, int)’:
native/common/jp_exception.cpp:524:9: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘frame’; did you mean ‘cframe’?
  524 |   state.frame = last_traceback->tb_frame;
      |         ^~~~~
      |         cframe
native/common/jp_exception.cpp:526:9: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘frame’; did you mean ‘cframe’?
  526 |   state.frame = NULL;
      |         ^~~~~
      |         cframe
native/common/jp_exception.cpp:552:29: error: invalid use of incomplete type ‘PyFrameObject’ {aka ‘struct _frame’}
  552 |  traceback->tb_lasti = frame->f_lasti;
      |                             ^~
In file included from /opt/_internal/cpython-3.11.0rc1/include/python3.11/Python.h:42,
                 from native/common/jp_exception.cpp:16:
/opt/_internal/cpython-3.11.0rc1/include/python3.11/pytypedefs.h:22:16: note: forward declaration of ‘PyFrameObject’ {aka ‘struct _frame’}
   22 | typedef struct _frame PyFrameObject;
      |                ^~~~~~
error: command '/usr/bin/ccache' failed with exit code 1
The command '/bin/sh -c cd /opt/src  && CC="ccache gcc" python3.11 setup.py build_ext --inplace ;' returned a non-zero code: 1

It was pointed out that we need a formal method to construct a stacktrace and register it as part of a cause chain in the past.   Unfortunately, I have had other work related activities so I haven't had time to follow up to see.   We should locate the contact in Python developers and make sure that it is possible.
If worst case, we will have to copy paste the PyFrameObject struct into JPype code for a few versions so that our old code will work until a new API is resolved.  It is a maintenance pain, but completely doable.

It was pointed out that we need a formal method to construct a stacktrace and register it as part of a cause chain in the past. Unfortunately, I have had other work related activities so I haven't had time to follow up to see. We should locate the contact in Python developers and make sure that it is possible.

Some relevant links:

<EMAIL_ADDRESS>https://bugs.python.org/issue39947
https://bugs.python.org/issue40421
<EMAIL_ADDRESS>
I didn't find (1, 2) a specific topic on python-dev related to JPype and constructing stacktraces.
Given some of the mails I found on the list, I wonder if we should be engaging earlier with the CPython developers. I saw the discussion on https://github.com/jpype-project/jpype/discussions/1071 which looks like a really positive engagement (:crossed_fingers: it leads to some improvements).

Sorry to bother you @vstinner, but I suspect it may be interesting for you to see the current approach and motivation for how certain things are done in JPype.
The two interesting places for Python 3.11 compatibility problems are:

https://github.com/jpype-project/jpype/blob/82a7658277b36c628ea305ea705cd012d81471dd/native/common/jp_exception.cpp#L492-L560
https://github.com/jpype-project/jpype/blob/82a7658277b36c628ea305ea705cd012d81471dd/native/python/pyjp_value.cpp#L26-L71

There are plenty of other interesting parts about JPype that might be worth picking up for CPython development (see https://github.com/jpype-project/jpype/discussions/1071), but these are the two that are impacted by recent (internal) Python C-API changes.
I'm pinging you for your interest as much as anything else, but if you have suggestions/recommendations, they are also very welcome!

It seems like multiple issues come from this function:
 PyTracebackObject *tb_create(
 		PyTracebackObject *last_traceback,
 		PyObject *dict,
 		const char* filename,
 		const char* funcname,
 		int linenum)

I suggest you using the public types.TracebackType() constructor and create a frame with requested filename, function name and line number. Check how Cython does that. Example:
>>> import sys, types
>>> frame=sys._getframe()
>>> lasti=0
>>> lineno=1
>>> tb=types.TracebackType(None, frame, lasti, lineno)

For traceback->tb_lasti = frame->f_lasti, you can use PyFrame_GetLasti(): https://docs.python.org/dev/c-api/frame.html#c.PyFrame_GetLasti
To get this function on Python 3.10 and older, the https://pythoncapi-compat.readthedocs.io/ project can be used.
PyJPValue_alloc() calls _PyObject_GC_Malloc() and then PyObject_Init()/PyObject_InitVar(): the public PyObject_GC_New() and PyObject_GC_NewVar() seem to fit this code. In general, you should not (must not) call private function (name starting with _Py or _PY).

cc @encukou

Check how Cython does that

Cython __Pyx_AddTraceback() function: https://github.com/cython/cython/blob/3424926e9c8f03061b55516d2516a9f98999399e/Cython/Utility/Exceptions.c#L793-L907
Cython __Pyx_PyCode_New() function: https://github.com/cython/cython/blob/3424926e9c8f03061b55516d2516a9f98999399e/Cython/Utility/ModuleSetupCode.c#L601-L669

Cython __Pyx_AddTraceback() has a short implementation using the private _PyTraceback_Add() function, and a long implementation calling only the public functions: in short, it calls PyCode_NewEmpty() + PyFrame_New() + PyTraceBack_Here().
Maybe we should add a new public function in Python to provide such feature: create a traceback with requested filename and line number.

A public method for creating a stack trace would be helpful.   Though it would also be helpful to add a stackframe to the current traceback as well.   We get a Java stacktrace from a call and as we don't have anyplace to add it to the Python one we are simply inserting it as a cause.  This can become confusing if you have complex code in which Python calls Java calls Python calls Java as the output will be all of the Python ones and a cause with all Java ones.  Though that is a larger issue.
We just need a public equivalent of
PyTracebackObject *tb_create(
		PyTracebackObject *last_traceback,
		PyObject *dict,
		const char* filename,
		const char* funcname,
		int linenum)
{
	// Create a code for this frame. (ref count is 1)
	PyCodeObject *code = PyCode_NewEmpty(filename, funcname, linenum);

	// If we don't get the code object there is no point
	if (code == NULL)
		return NULL;

	// This is a bit of a kludge.  Python lacks a way to directly create
	// a frame from a code object except when creating from the threadstate.
	//
	// In reviewing Python implementation, I find that the only element accessed
	// in the thread state was the previous frame to link to.  Because frame
	// objects change a lot between different Python versions, trying to
	// replicate the actions of setting up a frame is difficult to keep portable.
	//
	// Python 3.10 introduces the additional requirement that the global
	// dictionary supplied must have a __builtins__.  We can do this once
	// when create the module.
	//
	// If instead we create a thread state and point the field it needs to the
	// previous frame we create the frames using the defined API.  Much more
	// portable, but we have to create a big (uninitialized object) each time we
	// want to pass in the previous frame.
	PyThreadState state;
	if (last_traceback != NULL)
		state.frame = last_traceback->tb_frame;
	else
		state.frame = NULL;

	// Create a frame for the traceback.
	PyFrameObject *frame = PyFrame_New(&state, code, dict, NULL);

	// frame just borrows the reference rather than claiming it
	// so we need to get rid of the extra reference here.
	Py_DECREF(code);

	// If we don't get the frame object there is no point
	if (frame == NULL)
		return NULL;

	// Create a traceback
	PyTracebackObject *traceback = (PyTracebackObject*)
		        PyObject_GC_New(PyTracebackObject, &PyTraceBack_Type);

	// We could fail in process
	if (traceback == NULL)
	{
		Py_DECREF(frame);
		return NULL;
	}

	// Set the fields
	traceback->tb_frame = frame; // Steal the reference from frame
	traceback->tb_lasti = frame->f_lasti;
	traceback->tb_lineno = linenum;
	Py_XINCREF(last_traceback);
	traceback->tb_next = last_traceback;

	// Allow GC on the object
	PyObject_GC_Track(traceback);
	return traceback;
}

@vstinner   I looked at it does not appear that PyObject_GC_New will work for us.   The issue is that we need to add extra memory to the end of the object because we need to perform a true mixin in which we are storing a Python type and our own type structure in the same object.
https://github.com/jpype-project/jpype/blob/82a7658277b36c628ea305ea705cd012d81471dd/native/python/pyjp_value.cpp#L45
If you allocate the space requested only by Python then there is no room for the additional data required.  This extra data must be located after the other Python automatically added structures such as the weak-reference table and the dict structure.   I am aware of the attempt to add a user supported PEP 697
https://github.com/python/peps/pull/2772/commits/7e5dcfac7dad0fda4c7dc07887896a6e2abb730d
But that code does not exist and I have no working demonstrations that it will achieve the same type of polymorphism that we require.   That is we need to be able to mixin Java type struct plus PyObject, PyType, PyException,PyInt, PyFloat, etc.   I believe that the proposed PyObject_GetTypeData is in line with that though I haven't tried it.

@vstinner  I should mention that even if I can get the Traceback method working, it is going to be very suboptimal.   The issue is that Python is demanding that the entire traceback be generated even if noone ever accesses it.    The better solution would be to have an abstract call such that the traceback is only filled out when needed rather than preemptively converted.
Much like our issue with strings the traceback and exception classes don't provide a method for storing a callback procedure and corresponding data required to ready the object.   Further, as all access are direct to C we can't derived a type which does our lazy conversion.   Instead I am forced to muck around with C types and set private fields or call private methods to get work done.   I understand that it would slow Python down if it things like stack tracing didn't use direct access to C structs, but that is what is forcing this type of hacking.   I tried very hard to create a new exception type which would virtually create the required elements as need, but that effort proved pointless as the stack dump utilities skipped calling any derived methods.

@pelson can you try #1087?

I have tried for multiple days and I really don't see much hope for 3.11 as they plan to release.   They have completely closed off the ability to allocate a garbage collected memory space with the extra memory we required for our allocator.      Unless they have a working user extension API that I can tap they have effectively prevented JPype from running.
Additionally all of the suggestions for the traceback have been unfruitful.   The code examples are all for adding traceback to the existing frame, but we need to create a new frame to use as a cause which won't ever be linked to as part of the state.   I am not really sure what is going on in that code.   The kludge of trying to set the f_back object so that I could satisfy the traceback printing routine was the only one I could get working.   It isn't even clear if that linkage is necessary as I think the bug in the printing routine that was requiring the linkage may not be there.  But until I get the allocator working again I really can't know.
Honestly, I really don't want to be messing with the Python backend.   They have zero documentation in the code and the API is IMHO poorly planned.   What is the point of a custom allocator if you can't choose how much memory to allocate for an object?  (The answer is that custom allocators are legacy and never a thought was given to how it would interact with the GC system which is why the only way to use it was to call _PyObject_GC_Malloc.)  Why is the concept of a traceback object so tied up with frame and state objects?  (The answer being that tracebacks are normally created as part of the state operations, but that just means they haven't considered foreign originated stacktraces at all in the API which is why creating a frame requires the state from which it steals the f_back.)   Without documentation of what the authors thought the next person who worked on it was only guessing and for a user like me it means trying to guess the intentions the authors without any assistance.   Yes there is a new API but I have yet to get any working prototype of that and I have already burned my weekly allocation trying to understand the stacktrace part.
I can give it another shot in 2 weeks when my next free period opens up.

I should note that because https://peps.python.org/pep-0697/ is not in 3.11 my only choice is to mess with the GC stuff as there is no mechanism to safely allocate extra memory in 3.11 which we did in all versions before.   This leaves me with only horrible options like faking a type with needed size, call the allocator via GC_New, then hot swap the type to the actual type object needed.   Those sort of horrible hacks take weeks of time to develop and test properly.
@pelson  I took my best shot at the GC allocator kludge.   It is currently passing tests with the exception of the stack trace code.   Unfortunately I have exhausted my allocated time.   Please give it some tests to see if it is close to working.   I will have to figure out the other problem next session and then start working backwards in versions to see if the solution is a 3.11 thing or a universally working pattern.

I took my best shot at the GC allocator kludge. Please give it some tests to see if it is close to working.

I don't see a new commit in #1087. Did you forget to push? Or is it a different branch?

Unfortunately I have exhausted my allocated time.

I completely understand. I'm not rolling in spare time either, but would be happy to coordinate to make sure that we can make the most of your experience in this part of the codebase. That could be that I take on some of the testing, or even productionize your prototypes.
When we finally have a viable solution, the SO question would be good to answer https://stackoverflow.com/questions/27138440/how-to-create-a-traceback-object. Perhaps we should answer there for Python <=3.10 for historical purposes :smile:.

I have tried for multiple days and I really don't see much hope for 3.11 as they plan to release

Ouch. Thanks for the honesty. It is indeed concerning - not so much the fact that we won't be ready for Python 3.11, but more the fact that we might never be able to use Python 3.11. Logistically, perhaps we need to upper bound pin the supported Python version now to avoid issues in the coming weeks.

Logistically, perhaps we need to upper bound pin the supported Python version now to avoid issues in the coming weeks.

As much as I would want to shield users from version conflicts, I'm not sure that does it. As far as I understand, if we were to upper-cap the Python version, Pip  on Python 3.11 would just go and install the JPype version that it (Pip) thinks supports Python 3.11. Which would be the latest JPype version that doesn't have a version cap, such as the current one: 1.4.0. And that would fail either way.

Sorry about that.  Yes it appears that I checked in to Thrameos/master rather than the branch I wanted.  Current I show one fail...
__________________________________________________________________________________________ JCallerSensitiveCase.testStackWalker2 ___________________________________________________________________________________________

>   ???
E   Exception: Java Exception

Caller.java:78: Exception

The above exception was the direct cause of the following exception:

self = <test_caller_sensitive.JCallerSensitiveCase testMethod=testStackWalker2>

    def testStackWalker2(self):
>       self.assertEqual(self.obj.callStackWalker2(), jpype.JClass(
            jpype.java.lang.Class.forName("org.jpype.JPypeContext")).class_)
E       java.lang.java.lang.IllegalCallerException: java.lang.IllegalCallerException: no caller frame

test/jpypetest/test_caller_sensitive.py:111: java.lang.IllegalCallerException```

@pelson  Given that I managed to get the tests to pass except one I think that we may just lose some diagnostics which would be a shame, but perhaps not fatal.
The kludge I came with is because they hid the base allocator.
static inline size_t
_PyType_PreHeaderSize(PyTypeObject *tp)
{
    return _PyType_IS_GC(tp) * sizeof(PyGC_Head) +  // <=== these two go in the front.
        _PyType_HasFeature(tp, Py_TPFLAGS_MANAGED_DICT) * 2 * sizeof(PyObject *); // <== here is where they add their hidden memory for the back.   We need to add our memory (JValue) after that.
}

static PyObject *
gc_alloc(size_t basicsize, size_t presize)  // <==== this was _PyObject_GC_Alloc before
{
    PyThreadState *tstate = _PyThreadState_GET();
    if (basicsize > PY_SSIZE_T_MAX - presize) {
        return _PyErr_NoMemory(tstate);
    }
    size_t size = presize + basicsize;
    char *mem = PyObject_Malloc(size);
    if (mem == NULL) {
        return _PyErr_NoMemory(tstate);
    }
    ((PyObject **)mem)[0] = NULL;
    ((PyObject **)mem)[1] = NULL;
    PyObject *op = (PyObject *)(mem + presize);
    _PyObject_GC_Link(op);  // Private call to place in the GC pool
    return op;
}

PyObject *
_PyObject_GC_New(PyTypeObject *tp)
{
    size_t presize = _PyType_PreHeaderSize(tp);  // They are forcing the size of the object here
    PyObject *op = gc_alloc(_PyObject_SIZE(tp), presize);  // Private method gc_alloc and _PyObject_SIZE
    if (op == NULL) {
        return NULL;
    }
    _PyObject_Init(op, tp);
    return op;
}

So that problem is there is no way to add our bytes to the object using the type description.   There is a proposed API but it doesn't exist yet.
So here is what I did.... (EVIL STARTS HERE.)
PyObject* PyJPValue_alloc(PyTypeObject* type, Py_ssize_t nitems )
{
        JP_PY_TRY("PyJPValue_alloc");
        // Modification from Python to add size elements
        const size_t size = _PyObject_VAR_SIZE(type, nitems + 1) + sizeof (JPValue);
        PyObject *obj = NULL;
        if (PyType_IS_GC(type))
        {
                // Horrible kludge because python lacks an API for allocating a GC type with extra memory
                // The privor method _PyObject_GC_Alloc is no longer visible, so we are forced to allocate
                // a different type with the extra memory and then hot swap the type to the real one.
                PyTypeObject type2;
                type2.tp_basicsize = size;
                type2.tp_itemsize = 0;
                type2.tp_name = NULL;
                type2.tp_flags = type->tp_flags;
                type2.tp_traverse = type->tp_traverse;

                // Allocate the fake type
                obj = PyObject_GC_New(PyObject, &type2);

                // Note the object will be inited twice which should not leak. (fingers crossed)
        }
        else
        {
                obj = (PyObject*) PyObject_MALLOC(size);
        }
       ...
   The next point is PyObject_GC_New which is public (which means that it can't break).   It reserves memory for the object, adds it the GC, then calls PyObject_Init.   But we need an uninitialized object so we have to unboil the egg.  So we create a new type which is totally bogus with the required size for the allocation.   We then hot swap the type to the desired type which now has the proper layout.
The side effects are that our bogus type is part of the GC for the period of time from PyObject_GC_New until we start the swap.   Any calls to the object during that time are going to go to lala land, and we have no idea what calls may be possible.  I know flags and traverse are required to get it through, but it is almost impossible to know ever potential path that could happen because we can't make this a critical section at least as far as I can see.   I am guessing this will work 99.9% of the time, but then we will have those other 0.1% where some action like an exception in PyObject_Init or something weird like that will trigger a crash.  Until I see a log from those crashes it will be hard to make this bullet proof.  We are going to call PyObject_Init twice.  Once with the bogus type and the second with the real type.  The bogus type is getting clobbered anyway and PyObject_Init assumes uninitialized memory so it likely won't care.
If this is successful then we don't need a cap, we just have to disable that frame test or find a way to make it work when I cycle back in 2 weeks.

If this is successful then we don't need a cap, we just have to disable that frame test or find a way to make it work when I cycle back in 2 weeks

So I can't get any of the SQL tests to run (java.sql.java.sql.SQLException: java.sql.SQLException: No suitable driver found for jdbc:sqlite::memory:, so doesn't look like it is related to this change). But if I exclude those:
$ pytest ./test/jpypetest/ -k 'not sql' -q
========================================================================================== test session starts ==========================================================================================
platform linux -- Python 3.11.0rc2+, pytest-7.1.3, pluggy-1.0.0
rootdir: /media/important/github/jpype/jpype, configfile: setup.cfg
collected 1709 items / 277 deselected / 1432 selected

test/jpypetest/test_array.py .....ssssssssssssssss.........ss...s....sss.s.ss.sss.....s..s                                                                                [  4%]
test/jpypetest/test_attr.py ................................                                                                                [  6%]
test/jpypetest/test_boxed.py .....................................................                                                                                [ 10%]
test/jpypetest/test_buffer.py ssssssss.ssss.ssssssss.ssss.sss...........ss.ssss.                                                                                [ 13%]
test/jpypetest/test_bytebuffer.py ...                                                                                [ 13%]
test/jpypetest/test_caller_sensitive.py ....................                                                                                [ 15%]
test/jpypetest/test_charSequence.py .                                                                                [ 15%]
test/jpypetest/test_classhints.py .........                                                                                [ 15%]
test/jpypetest/test_closeable.py ........                                                                                [ 16%]
test/jpypetest/test_closed.py ...                                                                                [ 16%]
test/jpypetest/test_collection.py ............................                                                                                [ 18%]
test/jpypetest/test_comparable.py ...                                                                                [ 18%]
test/jpypetest/test_conversion.py ...............                                                                                [ 19%]
test/jpypetest/test_conversionInt.py ..ssssssss..                                                                                [ 20%]
test/jpypetest/test_conversionLong.py ..ssssssss..                                                                                [ 21%]
test/jpypetest/test_conversionShort.py ..ssssssss..                                                                                [ 22%]
test/jpypetest/test_core.py ..                                                                                [ 22%]
test/jpypetest/test_coverage.py ..........................s.............                                                                                [ 25%]
test/jpypetest/test_customizer.py .                                                                                [ 25%]
test/jpypetest/test_directbuffer.py ....s.s.s.s.s..                                                                                [ 26%]
test/jpypetest/test_docstring.py ...                                                                                [ 26%]
test/jpypetest/test_exc.py ...............                                                                                [ 27%]
test/jpypetest/test_fault.py ..sssss.s.s..ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss.                                                                                [ 33%]
test/jpypetest/test_fields.py .........                                                                                [ 34%]
test/jpypetest/test_forname.py ..                                                                                [ 34%]
test/jpypetest/test_generic.py ........                                                                                [ 34%]
test/jpypetest/test_hash.py ............                                                                                [ 35%]
test/jpypetest/test_hints.py ........................................                                                                                [ 38%]
test/jpypetest/test_imports.py .................                                                                                [ 39%]
test/jpypetest/test_inherit.py .......                                                                                [ 40%]
test/jpypetest/test_javacoverage.py ....                                                                                [ 40%]
test/jpypetest/test_javadoc.py ...                                                                                [ 40%]
test/jpypetest/test_jboolean.py ..s..ssssssss..ssss                                                                                [ 42%]
test/jpypetest/test_jbyte.py ..ss.......ssssssss..s...                                                                                [ 43%]
test/jpypetest/test_jchar.py ........ssss..................................................                                                                                [ 48%]
test/jpypetest/test_jclass.py ....................s..................                                                                                [ 50%]
test/jpypetest/test_jdouble.py ..s.s.ssss................ssssss.ss.......ssssss..                                                                                [ 54%]
test/jpypetest/test_jedi.py ssss                                                                                [ 54%]
test/jpypetest/test_jfloat.py ..s.s.ssss..............ssssss.ss........ssssss.                                                                                [ 58%]
test/jpypetest/test_jint.py ..s......s....sssssss....................ssssss.s.s.....ssssss..                                                                                [ 62%]
test/jpypetest/test_jlong.py ..s......s....sssssss...................ssssss.s.s.....ssssss..                                                                                [ 66%]
test/jpypetest/test_jmethod.py .sss...s.ss...s.s.ss.................                                                                                [ 69%]
test/jpypetest/test_jobject.py .s................s.......................s..                                                                                [ 72%]
test/jpypetest/test_jpackage.py ...........                                                                                [ 73%]
test/jpypetest/test_jshort.py ..s......s....sssssss....................ssssss.s.s.....ssssss..                                                                                [ 77%]
test/jpypetest/test_jstring.py .......................                                                                                [ 79%]
test/jpypetest/test_jvmfinder.py s..s...                                                                                [ 79%]
test/jpypetest/test_keywords.py .                                                                                [ 80%]
test/jpypetest/test_lambdas.py .....                                                                                [ 80%]
test/jpypetest/test_leak.py .....                                                                                [ 80%]
test/jpypetest/test_leak2.py ....                                                                                [ 81%]
test/jpypetest/test_legacy.py .......                                                                                [ 81%]
test/jpypetest/test_list.py .....................                                                                                [ 82%]
test/jpypetest/test_map.py ....                                                                                [ 83%]
test/jpypetest/test_module.py .............                                                                                [ 84%]
test/jpypetest/test_module2.py ...........                                                                                [ 84%]
test/jpypetest/test_mro.py ..                                                                                [ 85%]
test/jpypetest/test_number.py .s.                                                                                [ 85%]
test/jpypetest/test_numeric.py .....sssssss.                                                                                [ 86%]
test/jpypetest/test_objectwrapper.py ............                                                                                [ 87%]
test/jpypetest/test_overloads.py ................                                                                                [ 88%]
test/jpypetest/test_pickle.py ....                                                                                [ 88%]
test/jpypetest/test_properties.py ...................                                                                                [ 89%]
test/jpypetest/test_proxy.py ..........................................                                                                                [ 92%]
test/jpypetest/test_proxy_multithreaded.py ...                                                                                [ 92%]
test/jpypetest/test_ref.py ...                                                                                [ 93%]
test/jpypetest/test_reflect.py ......                                                                                [ 93%]
test/jpypetest/test_repr.py ......                                                                                [ 93%]
test/jpypetest/test_serial.py .                                                                                [ 93%]
test/jpypetest/test_shutdown.py ..........                                                                                [ 94%]
test/jpypetest/test_startup.py ...............                                                                                [ 95%]
test/jpypetest/test_synchronized.py ..                                                                                [ 95%]
test/jpypetest/test_thread.py ..                                                                                [ 96%]
test/jpypetest/test_utf8.py ........                                                                                [ 96%]
test/jpypetest/test_varargs.py ........                                                                                [ 97%]
test/jpypetest/test_virtual.py ........................................                                                                                [ 99%]
test/jpypetest/test_zzz.py .                                                                                [100%]

=========================================================================================== warnings summary ============================================================================================
test/jpypetest/test_jobject.py::JClassTestCase::testDeprecated
  /media/important/github/jpype/jpype/test/jpypetest/test_jobject.py:295: DeprecationWarning: Using JObject with a Python type is deprecated.
    self.assertIsInstance(JObject(None, object), jo)

test/jpypetest/test_jvmfinder.py::JVMFinderTest::testDarwinBinary
test/jpypetest/test_jvmfinder.py::JVMFinderTest::testDarwinBinary
  /media/important/github/jpype/jpype/jpype/_jvmfinder.py:325: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
    current = StrictVersion(platform.mac_ver()[0][:4])

test/jpypetest/test_jvmfinder.py::JVMFinderTest::testDarwinBinary
test/jpypetest/test_jvmfinder.py::JVMFinderTest::testDarwinBinary
test/jpypetest/test_jvmfinder.py::JVMFinderTest::testDarwinBinary
  /media/important/github/jpype/jpype/jpype/_jvmfinder.py:326: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
    if current >= StrictVersion('10.6') and current < StrictVersion('10.9'):

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
==================================================================== 1097 passed, 335 skipped, 277 deselected, 6 warnings in 17.59s =====================================================================

Just to be sure:
$ pytest ./test/jpypetest/ -k 'testStackWalker2' -q
========================================================================================== test session starts ==========================================================================================
platform linux -- Python 3.11.0rc2+, pytest-7.1.3, pluggy-1.0.0
rootdir: /media/important/github/jpype/jpype, configfile: setup.cfg
collected 1709 items / 1708 deselected / 1 selected

test/jpypetest/test_caller_sensitive.py .                                                                                [100%]

================================================================================== 1 passed, 1708 deselected in 0.62s ===================================================================================
(base) pelson@pelson-X1:~/github/jpype/jpype$ pytest ./test/jpypetest/ -k 'testStackWalker2'
========================================================================================== test session starts ==========================================================================================
platform linux -- Python 3.11.0rc2+, pytest-7.1.3, pluggy-1.0.0 -- /media/important/github/jpype/jpype/env_py311_b/bin/python
cachedir: .pytest_cache
rootdir: /media/important/github/jpype/jpype, configfile: setup.cfg
collected 1709 items / 1708 deselected / 1 selected

test/jpypetest/test_caller_sensitive.py::JCallerSensitiveCase::testStackWalker2 PASSED                                                                                [100%]

================================================================================== 1 passed, 1708 deselected in 0.65s ===================================================================================

This is built against Python 3.11 b5196faff3 (and JPype 68c246f0), on the 3.11 branch. Does this suggest you have fixed it already, or have you been testing with a different Python build, or are you on a different platform?

I wasn't entirely sure how to exercise the part that you've had to tweak, but based on some of the tests I went for:
import jpype as jp

jp.startJVM()

@jp.JImplements("java.util.Comparator")
class RaiseException(object):
    def __init__(self, exc):
        self.exc = exc

    @jp.JOverride
    def compare(self, _o1, _o2):
        raise self.exc("nobody expects the Python exception!")

    @jp.JOverride
    def equals(self, _obj):
        return True

arr = jp.JArray(jp.JString)(["a", "b"])
jp.java.util.Arrays.sort(arr, RaiseException(ValueError))

The exception in both Python 3.9 and Python 3.11 are the same:
Traceback (most recent call last):
  File "exception_case.py", line 19, in <module>
    jp.java.util.Arrays.sort(arr, RaiseException(ValueError))
ValueError: nobody expects the Python exception!

It would be the dream to be able to get the full traceback, but that looks like something we don't currently have either.
If I get a chance, I will add the version guards into your implementation so that we can have a version that builds against all supported Python versions.

Everything now passes.  As far as testing I don't think that exception tracing through a JImplements was ever working.  The main thing to check is if a Java exception reports as the cause.
import jpype
jpype.startJVM( classpath="test/classes")

cls = jpype.JClass("jpype.exc.ExceptionTest")
cls.throwChain()

Gives
Traceback (most recent call last):
  File "ExceptionTest.java", line 55, in jpype.exc.ExceptionTest.throwChain
  File "ExceptionTest.java", line 60, in jpype.exc.ExceptionTest.method1
  File "ExceptionTest.java", line 65, in jpype.exc.ExceptionTest.method2
Exception: Java Exception

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/mnt/c/Users/nelson85/Documents/devel/open/jpype/test4.py", line 8, in <module>
    cls.throwChain()
java.lang.java.lang.RuntimeException: java.lang.RuntimeException: Inner

So all of the exceptions did get converted properly.

Thrameos closed this as completed in #1087 8 days ago

Great! Congrats :-)


Feature select to copy

iTerm has a very nice feature that automatically copies selected text when selection happens, and a lot of people use that.
Also, there was someone who wanted this feature, so I've implemented it.
https://github.com/platformio/platformio-atom-ide-terminal/issues/123

Thanks a lot!

@Barbayar It is a nice feature, however it has some issues when copied text is used later in the application. For example,

if I select multiple word text in terminal and try to search for it in atom in open document, it can't find it.
If selected text is used in code, and it is used in string comparison, it fails.
Retyping or right-click/copy works fine, single word selections also work.
Very weird.

@ahavriluk yeah, I noticed that too. I suspect that Atom replaces a blank space with another character that looks a blank space.
Or, Atom puts a hidden characters between words or something.
Unfortunately, I stopped using Atom, I hope you can fix the issue and send a PR.
Best,
Barbayar


GH-1134: Fix stop(Runnable) usage

Fixes https://github.com/spring-projects/spring-kafka/issues/1134
We always have to call callback in the stop(Runnable) implementation
independently of the component state
Cherry-pick until 1.1.x to support Spring Boot 1.5.x

@garyrussell ,
Looks like the Spring Boot 1.5.x is not affected, but to avoid an issue in the end-user applications would be better to back-port at least until 1.3.x.
Thanks

New Boot 1.5.x apps from initializr gets 1.3.x. Versions before 1.3.x are no longer supported so the backport stops there.

Cherry picked to all (back to 1.3.x).


Exceptions should handle response codes

Thought it'll be cool if we can pass response codes to exception so we can properly handle that errors such as 429 Too Many Requests, etc

It would be utterly useful!

@Sorgor thank you for contribution


chore: replacing hard coded string

Description

TL;DR replacing hardcoded strings to use the same macros in EE implementation

Type of change

Chore (housekeeping or task changes that don't impact user perception)

How Has This Been Tested?

[x] Manual

Checklist:
Dev activity

[x] My code follows the style guidelines of this project
[x] I have performed a self-review of my own code
[ ] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[x] My changes generate no new warnings
[ ] I have added tests that prove my fix is effective or that my feature works
[x] New and existing unit tests pass locally with my changes
[ ] PR is being merged under a feature flag

/ok-to-test

/ok-to-test


Facebook probably removed ms.type === 'pages_messaging'

I have been using "listen messages as page" part of this module for a few months but it stopped working few days ago. I tried listening as normal user and it works as expected.
This is what I got when I was listening message as page:
{
  "t": "msg",
  "seq": 12,
  "u":<PHONE_NUMBER>47010,
  "ms": [
    {
      "alert_id":<PHONE_NUMBER>399073,
      "markup": null,
      "time":<PHONE_NUMBER>,
      "realtime_viewer_fbid":<PHONE_NUMBER>47010,
      "type": "notification"
    },
    {
      "nodes": [
        {
          "id": "c3Rvcnk6MTAwMDE2OTE1NDQ3MDEwOjE0OTM5MDk5MTEzOTkwNzM6NDUxNzYxNzExNTI2Njg3",
          "actors": [
            {
              "name": "Howard Chang",
              "profile_picture": {
                "uri": "https://scontent.xx.fbcdn.net/v/t1.0-1/p50x50/18194599_1671049849577906_6281358476598181203_n.jpg?_nc_ad=z-m&oh=1bf30b76b90362ece49cae322e0edd99&oe=597A56AC"
              }
            }
          ],
          "title": {
            "ranges": [
              {
                "offset": 0,
                "length": 6,
                "entity": {
                  "url": "https://www.facebook.com/ArtBot-971921452915404/"
                }
              }
            ],
            "aggregated_ranges": [],
            "text": "ArtBot received a new message."
          },
          "application": {
            "id": "2530096808",
            "name": "Pages",
            "is_facebook_app": true
          },
          "attachments": [
            {
              "media": null,
              "style_list": [
                "fallback",
                "fallback",
                "notification_target",
                "fallback"
              ]
            }
          ],
          "feedback_context": null,
          "attached_story": null,
          "icon": {
            "uri": "https://static.xx.fbcdn.net/rsrc.php/v3/yt/r/C8K1hbkDbLf.png"
          },
          "seen_state": "UNSEEN_AND_UNREAD",
          "tracking": "{\"notif_type\":\"page_message\",\"context_id\":\"971921452915404\",\"alert_id\":\"1493909911399073\",\"unread\":1,\"microtime_sent\":\"1493914795282197\",\"content_id\":\"\"}",
          "url": "https://www.facebook.com/ArtBot-971921452915404/manager/messages/inbox/?ref=notif&notif_t=page_message&notif_id=1493909911399073",
          "creation_time":<PHONE_NUMBER>,
          "substory_count": 0,
          "negative": {
            "subscription_level": 1
          },
          "menu_options": [
            {
              "client_action": "HIDE",
              "server_action": "Tm90aWZPcHRpb25TZXJ2ZXJBY3Rpb25Ub2tlbjsxNDkzOTA5OTExMzk5MDczfHsiSElERSI6IkhJREUifQ==",
              "text": "Hide this notification",
              "subtext": null
            },
            {
              "client_action": "UNSUB",
              "server_action": "Tm90aWZPcHRpb25TZXJ2ZXJBY3Rpb25Ub2tlbjsxNDkzOTA5OTExMzk5MDczfHsidHlwZSI6IjI2Iiwic3ViX3N0YXR1cyI6IiIsImxldmVsIjoiMiJ9",
              "text": "Turn off notifications about new Messages for this page",
              "subtext": null
            }
          ],
          "alert_id": "100016915447010:1493909911399073",
          "showBeep": true,
          "beepUpdatesOnTop": true,
          "beepRenderer": null,
          "rendererData": null,
          "biz_asset_id":<PHONE_NUMBER>15404,
          "ajaxify_url": null,
          "timestamp": {
            "time":<PHONE_NUMBER>,
            "text": "",
            "verbose": "Friday, May 5, 2017 at 12:19am"
          },
          "notif_type": "page_message",
          "isCommunity": null,
          "unaggregatedTitle": {
            "ranges": [
              {
                "offset": 0,
                "length": 6,
                "entity": {
                  "url": "https://www.facebook.com/ArtBot-971921452915404/"
                }
              }
            ],
            "aggregated_ranges": [],
            "text": "ArtBot received a new message: \"Message sent to page\"."
          },
          "unaggregatedActors": [
            {
              "name": "Howard Chang",
              "profile_picture": {
                "uri": "https://scontent.xx.fbcdn.net/v/t1.0-1/p50x50/18194599_1671049849577906_6281358476598181203_n.jpg?_nc_ad=z-m&oh=1bf30b76b90362ece49cae322e0edd99&oe=597A56AC"
              }
            }
          ],
          "sound": false
        }
      ],
      "servertime":<PHONE_NUMBER>,
      "realtime_viewer_fbid":<PHONE_NUMBER>47010,
      "type": "notification_json"
    },
    {
      "n": true,
      "i": 30000,
      "realtime_viewer_fbid":<PHONE_NUMBER>47010,
      "type": "notifications_sync"
    }
  ]
}

It seems that facebook has removed the  'pages_messaging' message from ms array
#473
#468

Thanks a lot for your investigation, I have a few things to say but I'm going to close this issue and continue the discussion in #468 in order to keep everything in the same place.


league/players endpoint optional week parameter does not work as expected

Only tested this for NFL, so it might be unique to an NFL league since they do the week thing a bit different. When you call the league.players endpoint with a league_key and player_key and additionally a week value such as 1, it ignores the week and just returns the total season points/stats instead.
You can reproduce this in the docs tester. I attached a sample response and screenshot from the tester, but you'd need to use a league that you are in since this is a private league.

response.json
This does however work on the player.stats endpoint, so it seems to be something about the league specificity. I see that week: "1" gets sent in the request payload, so I wonder if this is unfortunately just a Yahoo limitation not supporting weekly stats per league 🤔

This may be a design of Yahoo! to keep some of their stuff proprietary... but I can dig in more a bit later this week to see why the coverage type is being ignored and where the difference(s) may be. Thanks for pointing it out!

I could swear I had something like this working at some time, but I see a number of the issues that seem to indicate exactly what you're saying, it only works on the player endpoint... and my guess is that you're looking for additional stats that are league dependant because I don't believe they will give you every single stat, just a selection of stats that is missing what you're looking for? I can try to prod my contacts at Yahoo! but it's been a while...

It's mainly because I wanted to get a per week breakdown of players' points within the context of a league and didn't want to do the calculation myself. The alternative, which has some benefits over using the league.players endpoint, is that I can cache the player.stats response for each player in a KV, and then use the league settings to calculate points from the player stats on a per week basis.
All in all, not the end of the world, but it would certainly be nice to be able to get a player's calculated points for a given week within the context of a league.

100%
I've reached out to someone I know at Yahoo!
In baseball this is especially frustrating because it won't bring back all of the stats, and if you play in a league that uses, as an example, OPS, there's not really a way to get that.
Hopefully I can get some good news from them.


Move openness-element outside of organization.html-snippet or contain it in a block

Why is the element with the openness stars inside snippets/organization.html? Could it be moved to package/snippets/info.html for easier customization since it is not related to the organization at all?
Or could the code be contained in a block so that it could be overwritten more easily elsewhere?

We want the stars to show on the package read page on the sidebar, between the info about the organization and the social links. With the existing package/read_base.html template, the choice is either to replace the entire side bar block secondary_content or we attach it to either package_organization or package_social, and I just went for the package_organization block, which is defined in snippets/organization.html.
Does it still work if you move it to info.html, like you say?
Is the problem with you overwriting snippets/organization.html again is that it is being overwritten twice and it only works if you load the extensions in the right order? If that's the case then maybe adding another layer of blocks would work.
Feel free to play around to see what works and suggest a PR.

Provided a pull request. This solution requires minimal effort and still provides the customizability I mentioned above.


Remove ability for org admins to edit org names

Related Issue or Background Info

Closes #1687

Changes Proposed

Adds an alert and disables the org name input on the Manage Organizations page for org admins (i.e., not site/super admins)
Moves the updateOrganization mutation from the main.graphqls file to the admin.grahqls file
Changes required permission level for the updateOrganization method in OrganizationService

Additional Information

Adds unit tests for the Manage Organization frontend view
Adds a unit test to verify org admins can't update organizations
Adds an e2e test to verify users can navigate to the Manage Organization page and the input is disabled

Screenshots / Demos
This is the appearance for org admins (i.e., not site/super admins). The format and positioning of the "you can't edit this" text wasn't specified, so I made it up. Please let me know if this should change.

Checklist for Author and Reviewer
UI

[ ] Any changes to the UI/UX are approved by design
[ ] Any new or updated content (e.g. error messages) are approved by design

Testing

[X] Includes a summary of what a code reviewer should verify

Changes are Backwards Compatible

[N/A] Database changes are submitted as a separate PR

[N/A] Any new tables that do not contain PII are accompanied by a GRANT SELECT to the no-PHI user
[N/A] Any changes to tables that have custom no-PHI views are accompanied by changes to those views
(including re-granting permission to the no-PHI user if need be)
[N/A] Liquibase rollback has been tested locally using ./gradlew liquibaseRollbackSQL or liquibaseRollback

[N/A] GraphQL schema changes are backward compatible with older version of the front-end

Security

[N/A] Changes with security implications have been approved by a security engineer (changes to  authentication, encryption, handling of PII, etc.)
[N/A] Any dependencies introduced have been vetted and discussed

Cloud

[N/A] DevOps team has been notified if PR requires ops support
[N/A] If there are changes that cannot be tested locally, this has been deployed to our Azure test environment for verification

Feedback from @hmyers-cms regarding the design:

Using the info banner is fine, but I’d get rid of the save button entirely, probably not display the input box and instead just have label/text, and change the language to “Please contact<EMAIL_ADDRESS>if you need to change it”


Actions are still referring to "distroless/actions" instead of "chainguard-images/actions"?

Hi,
not sure if this is intentional or just a leftover, but the action READMEs still contain references to the distroless/actions repository.
E.g. here:
uses: distroless/actions/apko-publish@main
Kind Regards,
Johannes

was not, we move from another org, will update


Fix assassin pathing and behaviour

Assassins will no longer stop and forget their destination in the middle of the map after encountering an enemy on the way
Assassins will no longer attack units on atop the keep after descending the wall into a 1 tile gap path between the wall and the keep

See #632

Important: There is another bug with the assassins which this bug fix does not solve. When you order an assassin to climb an outer wall, and he attacks an enemy on the way there. The assassin will just stand next to the wall upon arrival and does not scale it. If you order the assassin on the other side of the wall, or an inner wall, then it works just fine. This may be solved in a different bugfix, but I just could not solve this issue.
Still, this fix is good enough I think.

The link below contains this PR's test build:
https://we.tl/t-2VWVuNxpfD
Files in zip:

UnofficialCrusaderPatch.dll (38 287 872 bytes)
UnofficialCrusaderPatchGUI.exe (122 368 bytes)

WeTransfer link update:
https://we.tl/t-Grs1GptXpS

Don't know if it is intended behavior, but in this bugfix you completely remove descending action for assassin. So instead of actual climbing down, assassin just teleport to the ground.

@JuGGerNaunT how did this appear? For me the assassins had a normal animation. Can you give us a way to recrete the issue? For me it works fine!


gh-1735 - ExtractGroup function and tests added

Codecov Report

Merging #1736 into develop will decrease coverage by 0.75%.
The diff coverage is 100%.

@@              Coverage Diff              @@
##             develop    #1736      +/-   ##
=============================================
- Coverage      65.97%   65.22%   -0.76%
+ Complexity      2009     2008       -1
=============================================
  Files            816      752      -64
  Lines          26597    23770    -2827
  Branches        3412     2892     -520
=============================================
- Hits           17548    15504    -2044
+ Misses          7674     7074     -600
+ Partials        1375     1192     -183

Impacted Files
Coverage Δ
Complexity Δ

...chq/gaffer/data/element/function/ExtractGroup.java
100% <100%> (ø)
0 <0> (?)

...onutil/iterable/LimitedInMemorySortedIterable.java
47.22% <0%> (-2.78%)
15% <0%> (-1%)

...e/serialisation/impl/FreqMapParquetSerialiser.java

...ion/addelements/impl/AggregateAndSortTempData.java

...ddelements/impl/rdd/WriteUnsortedDataFunction.java

...re/serialisation/impl/DoubleParquetSerialiser.java

...tore/io/reader/converter/BypassGroupConverter.java

...ements/handler/ImportJavaRDDOfElementsHandler.java

.../operation/addelements/impl/WriteUnsortedData.java

...alisation/impl/TreeSetStringParquetSerialiser.java

... and 58 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3044541...b1a97ad. Read the comment docs.


Direct database access

Prisma is a multi tenant environment that allow you to operate multiple services on a single cluster. An application will typically have access to only a subset of services.
A Prisma Cluster has one or more databases with the following schemas:

a schema called prisma that stores meta data about all services
a schema for each service on the cluster containing the actual data.

There are two levels of direct database access:
Service
There should be a simple way to retrieve database credentials for either read access or read/write access to the database schema for a particular service. This should not grant access to the graphcool schema
Cluster
There should be a way for cluster administrators to get full access to all schemas.

@marktani is this still relevant?


Show activity during Extracting...

Proposal: keep writing dots e.g. every 2s during "Extracting..." to prevent "freeze" user conclusion. Some packages are large, extraction can last minutes.

Unfortunately, it's not possible. Scoop calls unzip, 7zip and others to extract files.
We could only output the progress of these processes.


DeepDream tutorial notebook for TensorFlow

Can one of the admins verify this patch?

CLA update

Jenkins, test this please.

This should be put into the models repo: https://github.com/tensorflow/models

Can one of the admins verify this patch?

https://github.com/tensorflow/models/pull/22

Should me move it to 'examples' instead?


Android failed to upload

From @stevealbertwong on August 2, 2016 7:29
i keep having could not create upload task when try to upload for both home and feed tab.
Copied from original issue: firebase/friendlypix#29

From @stevealbertwong on August 2, 2016 7:39
also in post fragment there is a couple of TODO task, the FirebaseRecyclerAdapter code does not seem have finished?

From @patricknasc on December 20, 2016 8:36
The upload recently is working fine. If you're still having this issue, probably your Firebase project isn't configured properly. How are your Storage rules? It shoud be something like this:
service firebase.storage {   match /b/friendlypix-XPTO.appspot.com/o {     match /{allPaths=**} {       allow read, write: if request.auth != null;     }   } }

Cleaning up issue fixed in upcoming v2.


Javacode fails to read dotted environment variables since 08/09/23

Hello all,
we have noticed that since about 2 days our java servlet cannot read environment variables which have a "." in the name.
Short example:
System.getenv("variable.with.a.dot") returns null
where
System.getenv("variablewithoutdot") returns the correct variable value.
We set the environment variables via the docker compose .env file.
Is this a known issue or does anyone know why the behavior has changed recently?
Thank you very much for your help and hints.

We have exactly same issue so I think this is a real issue. I am running in kubernetes tomcat based docker image using tomcat:9.0-jdk17-temurin-focal. So that one is using these versions:
OpenJDK Runtime Environment Temurin-17.0.8+7 (build 17.0.8+7)
Server version: Apache Tomcat/9.0.78
Server number:  <IP_ADDRESS>
OS Name:        Linux
OS Version:     5.15.0-69-generic
Architecture:   amd64
JVM Version:    17.0.8+7
JVM Vendor:     Eclipse Adoptium

Based on my investigation, I think 9.0.78 docker image was already released about a month ago since we have been running 9.0.78 tomcat about a month ago already. Everything was working fine at that time. But a few days ago there was an image push with the same tag name and since that 9.0.78 docker image is unable to read these dotted environment variables. At least that is how I have interpreted this one which shows last push 2 days ago: https://hub.docker.com/layers/library/tomcat/9.0-jdk17-temurin-focal/images/sha256-546ed8e4e0eb770203b713be7a0de3905d3cf8a7d25df22683479f8af5994814?context=explore .

Current fix I have made is to switch back to image tomcat:9.0.76-jdk17-temurin-focal which does not have this issue. But this should be fixed for the 9.0.78 image.

As you can see from the Dockerfiles, we have haven't changed anything directly in the tomcat image. This sounds very much like https://github.com/docker-library/tomcat/issues/77. The recent images updates are caused by changes/updates in the eclipse-temurin images (which we then rebuild official-images FROM them).
After reviewing the changes added in the eclipse-temurin images (specifically https://github.com/docker-library/official-images/pull/15162 which means https://github.com/adoptium/containers/pull/392 is included in all temurin images), I see that some of their entrypoint scripts are running sh which is the exact cause of #77.  I'll go file an issue over there to fix it (so other images don't hit this too) and I'll make a PR to apply a fix here.  If you set both ENTRYPOINT and CMD, you can work around it, like this:
$ docker run -it --rm -e 'variable.with.a.dot=foo' tomcat:9.0-jdk17-temurin-focal env | grep foo
[no output]
$ docker run -it --rm -e 'variable.with.a.dot=foo' --entrypoint='' tomcat:9.0-jdk17-temurin-focal env | grep foo
variable.with.a.dot=foo

$ # really you'll have to set something like this to run tomcat:
$ docker run -it --rm -e 'variable.with.a.dot=foo' --entrypoint='' tomcat:9.0-jdk17-temurin-focal catalina.sh run
$ # or this
$ docker run -it --rm -e 'variable.with.a.dot=foo' --entrypoint=catalina.sh tomcat:9.0-jdk17-temurin-focal run


Moved setting up of account views in PaymentReviewActivity. Fixes #157

This change is

Reviewed 1 of 1 files at r1.
Review status: all files reviewed at latest revision, all discussions resolved.

Comments from Reviewable

Review status: all files reviewed at latest revision, all discussions resolved.

Comments from Reviewable


feat(mat-button): add progress-spinner option

Bug, feature request, or proposal:
Proposal
What is the expected behavior?
Allow for a properly-sized and positioned progress spinner to be triggered inside a mat-button, temporarily overriding its initial content
What is the current behavior?
No configuration available, can manually place and position a progress spinner inside a mat-button
What are the steps to reproduce?
This is a sample template thrown together (very unoptimized): https://stackblitz.com/edit/angular-material2-issue-qbjrmi?file=app%2Fapp.component.html
Click on LOADING to trigger the spinner
What is the use-case or motivation for changing an existing behavior?
Defined in the spec: https://material.io/design/components/progress-indicators.html#circular-progress-indicators under “Integrating with actions”
Is there anything else we should know?
Probably needs an a11y review since the content of the button will change

Proposed API:

The code would live in mat-button, with an added configuration option. This would add a dependency on the MatProgressSpinnerModule (though we may be able to do some DI to avoid the bloat)
Another option would be to have the spinner live elsewhere in the template, and use a TemplateRef to link to it in the button (like mat-menu
The option would be for a manual trigger to shift the template to the spinner, like matProgress="someBoolean"

We definitely can't introduce a dependency on spinner from button. Rather than making it specific to button, what about something that more generically adds a spinner to some arbitrary container?

Yeah that's what I was thinking with option 2: we could create a mixin or something for each container component that can accept a mat-spinner. I'm just trying to think of other "container" use cases, do you have another one in mind?

After looking at it, there are definitely use cases beyond mat-button, for instance mat-menu or mat-select, where content can be lazy-loaded (or even just respond to user events).
So here's the proposed design:

We create a new container component called mat-progress-container that doesn't render on the page, but can be triggered and injected into various other components:

<mat-progress-container #progress>
  <mat-progress-spinner mode="indeterminate" diameter="25"></mat-progress-spinner>
</mat-progress-container>
<button mat-raised-button matProgress="progress" [matProgressTrigger]="someBoolean">SUBMIT</button>

This would allow us, when we add the matProgress directive to transclude anything when matProgressTrigger is false, and replace it with the ng-template from the container when true

I don't quite follow what the matProgress directive is doing in that example.
Also, you are right that changing the content of the button will break the accessibility of the element. I'm not sure if adding a role="progress" inside of a button is a supported interaction; we'd have to try it out on the screen-readers we support (especially JAWS) and see how they respond.

It's analogous to the menu API [matMenuTriggerFor]="menu", but instead of triggering an overlay somewhere to appear, it replaces the content of the button with the TemplateRef contents.

As for a11y, I was looking at this article on doing the same but just with CSS. It seems applicable, though it would have to go through the same review.

Discussed with @crisbeto offline, and we've come up with two options:

We'll introduce a mat-progress-container, but its purpose is to center content inside another container element like mat-button or mat-menu
We'll also introduce a matProgress directive that sits on the container (ie the mat-button or mat-menu) to set position: relative and necessary ARIA attributes based on a boolean trigger

Here's where the ideas diverge:

In the first idea, we leave the rest to the user, likely to use this template:

<button mat-raised-button [matProgress]="trigger">
  <mat-progress-container *ngIf="trigger; else content">...</mat-progress-container>
  <ng-template #content>Upload</ng-template>
</button>

In the second idea, the burden of templating is on us. IMO this makes for a much nicer UX, but complicates the code a bit

<button mat-raised-button [matProgress]="trigger">
  <mat-progress-container>...</mat-progress-container>
  <mat-progress-content>Upload</mat-progress-content>
</button>

This not only provides a clear differentiation between the progress and the content, it also reduces the redundancy and possibility for failure by removing the dual trigger uses. Here, the progress-container is responsible for marshaling content inside the button/menu, replacing the content based on the value of the host's progress directive.
The only issues with both approaches are a) the best way to handle a11y, and b) the best way to swap content while maintaining size concerns (i.e. making sure the container height stays the same)

Any updates on this one?

Until this is in, there's a fairly simple directive that covers it.
Usage that swaps out an icon:
<button ... [disabled]="isLoading"><mat-icon *appSpinOn="isLoading">save</mat-icon> Submit</button>

Or an empty span to not have an icon
<button ... [disabled]="isLoading"><span *appSpinOn="isLoading"></span> Submit</button>

Directive:
/**
 * This directive swaps the attached template for a spinner based upon some expression
 * @example `<mat-icon *appSpinOn="isLoading"></mat-icon>`
 */
@Directive({
  selector: '[appSpinOn]',
})
export class SpinOnDirective {
  private hasView = false;

  constructor(
    private componentFactoryResolver: ComponentFactoryResolver,
    private templateRef: TemplateRef<any>,
    private viewContainer: ViewContainerRef
  ) {}

  @Input() set appSpinOn(condition: boolean) {
    if (!condition && !this.hasView) {
      this.viewContainer.clear();
      this.viewContainer.createEmbeddedView(this.templateRef);
      this.hasView = true;
    } else if (condition && this.hasView) {
      this.viewContainer.clear();
      this.addSpinner();
      this.hasView = false;
    }
  }

  addSpinner() {
    const componentFactory = this.componentFactoryResolver.resolveComponentFactory(MatProgressSpinner);
    this.viewContainer.clear();

    const componentRef = this.viewContainer.createComponent<MatProgressSpinner>(componentFactory);
    componentRef.instance.diameter = 18;
    componentRef.instance.color = 'accent';
    componentRef.instance.mode = 'indeterminate';
    componentRef.instance._elementRef.nativeElement.classList.add('button-spinner');
  }
}

CSS:
.button-spinner, .mat-progress-spinner.button-spinner {
  vertical-align: middle;
  display: inline-block;
}

How come this is still not implemented? Is is specifically stated in the Material Design guidelines that you should "Use circular indicators for short, indeterminate activities (< 5 seconds) requiring user attention." (https://material.io/components/progress-indicators#circular-progress-indicators) - i.e. anything that requires a trip to the server when clicking the button. If this library is supposed to follow the Material Design guidelines, this feature needs to be implemented.
I know you can do it manually, but this really is something that I would expect a library like Angular Material to just take care of.
Of the proposed APIs by @CaerusKaru, I'd definitely prefer option 2. I don't think you should have to manually do *ngIf and templates to make this feature work.

:skull:


i18n(de): update nav.tsx

Description (required)

update nav.tsx

Related issues & labels (optional)

Closes #9687
Suggested label:

Lunaria Status Overview
🌕 This pull request will trigger status changes.

Learn more
By default, every PR changing files present in the Lunaria configuration's files property will be considered and trigger status changes accordingly.
You can change this by adding one of the keywords present in the ignoreKeywords property in your Lunaria configuration file in the PR's title (ignoring all files) or by including a tracker directive in the merged commit's description.

Tracked Files

Locale
File
Note

de
nav.ts
Localization changed, will be marked as complete.

Warnings reference

Icon
Description

🔄
The source for this localization has been updated since the creation of this pull request, make sure all changes in the source have been applied.


SAK-29602 - Announcements made on a .anon site should be public by default

Announcements made on a .anon site should be public by default

This look good from MT review!


encounter error when resuming from a trained .pth file

i ran :
python train.py --resume ./checkpoints/model_best_my_train.pth.tar
and i got :
{'img_h': 352, 'img_w': 352, 'batch_size': 32, 'train_img_size': [[352, 352], [320, 320], [288, 288], [384, 384], [416, 416]], 'expand_scale': 2.1610954191879452, 'mosaic_num': [1, 4], 'iou_weighting': 0.021830872589525777, 'yolo': {'num_classes': 20, 'num_anchors': 3, 'ignore_thresh': [0.6076333316652263, 0.5623606200028424], 'iou_thresh': 0.5497280113447018, 'anchors': [[143, 265], [153, 121], [280, 279], [20, 37], [49, 94], [73, 201]], 'classes': 20, 'mask': [[0, 1, 2], [3, 4, 5]]}}
==> Resuming from checkpoint..
./checkpoints/model_best_my_train.pth.tar
Traceback (most recent call last):
File "train2.py", line 433, in
main(params)
File "train2.py", line 122, in main
best_acc = checkpoint['best_acc']
TypeError: 'yolo' object is not subscriptable
would you pls figure out that how to get the right result? thanks a lot 💯

I removed the optimizer of 'model_best_my_train.pth.tar' , just only can be used in deploy or inference
Intermediate save code
model_best save code

ModuleNotFoundError: No module named 'models.voc.mobilenetv2'
Fixed by moving *.py models into /models/voc/.