so I defined a customizer function to set it, but I cannot for the life of me figure out what I need to import or define so that I can specify the version parameter needed in the .version method.
Here is my callable, but I just cant seem to figure it out.
Looks like now its arguing that the HttpClientBuilderImpl class in jdk.internal.net does not want to work with the java.net.http stuff, but honestly I have no idea what I am saying lol. Any ideas?
Here is my customizer:
def clientCustomizer(client):
from java.net.http import HttpClient
client.version(HttpClient.Version.HTTP_1_1)
Here is the error (happening on the last line of the customizer):
java.lang.IllegalAccessException: java.lang.IllegalAccessException: class org.python.core.PyReflectedFunction cannot access class jdk.internal.net.http.HttpClientBuilderImpl (in module java.net.http) because module java.net.http does not export jdk.internal.net.http to unnamed module @382ab8
For posterity: It’s a known bug that we’ll have to correct internally. Unfortunately, until it is, the customizer for system.net.httpClient just doesn’t work.
I’ve been scanning through the nightly changelogs and haven’t seen anything specifically mentioning this one. Is this still an active bug at this time?
If I remember what @PGriffith said there’s some tricky Java module system problem to solve that makes what seems like a trivial fix non-trivial for whatever reason.
I will add a note on the ticket that more people are running into this.