Deprecated Java methods in Python

Hi folks,

If I’m not wrong, at the moment, with the jpype wrapper (it’s probably the same with the JCC one, but it’s meant to be abandonned at some point anyway), the stubs do not show the deprecation status of the methods from Java. Would there be any (easy) way of doing it? I was just thinking it would facilitate the life of the Orekit Python users. No big deal if not possible.

Cheers,
Romain.

Interesting thought. Technically it should be possible, python 3.13 and onwards has support for @depriciated flags in the stubs (Writing and Maintaining Stub Files — typing documentation). The tool stubgenj (scripting-tools / stubgenj · GitLab) that is used to generate the stubs do not support extracting that from the javadoc but it “should” be doable.

1 Like