-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
Closed
Labels
stdlibPython modules in the Lib dirPython modules in the Lib dirtype-featureA feature request or enhancementA feature request or enhancement
Description
Feature or enhancement
What do you think about deprecating platform.java_ver
? It is never used on CPython, it is a helper for Jython
only, which is basically stuck on 2.7 for the last 10 years.
I think that we should deprecate and remove such compat parts with tools that no longer exist. In the future Jython can add its own implementation to its own stdlib, if ever.
Lines 516 to 547 in a29998a
def java_ver(release='', vendor='', vminfo=('', '', ''), osinfo=('', '', '')): | |
""" Version interface for Jython. | |
Returns a tuple (release, vendor, vminfo, osinfo) with vminfo being | |
a tuple (vm_name, vm_release, vm_vendor) and osinfo being a | |
tuple (os_name, os_version, os_arch). | |
Values which cannot be determined are set to the defaults | |
given as parameters (which all default to ''). | |
""" | |
# Import the needed APIs | |
try: | |
import java.lang | |
except ImportError: | |
return release, vendor, vminfo, osinfo | |
vendor = _java_getprop('java.vendor', vendor) | |
release = _java_getprop('java.version', release) | |
vm_name, vm_release, vm_vendor = vminfo | |
vm_name = _java_getprop('java.vm.name', vm_name) | |
vm_vendor = _java_getprop('java.vm.vendor', vm_vendor) | |
vm_release = _java_getprop('java.vm.version', vm_release) | |
vminfo = vm_name, vm_release, vm_vendor | |
os_name, os_version, os_arch = osinfo | |
os_arch = _java_getprop('java.os.arch', os_arch) | |
os_name = _java_getprop('java.os.name', os_name) | |
os_version = _java_getprop('java.os.version', os_version) | |
osinfo = os_name, os_version, os_arch | |
return release, vendor, vminfo, osinfo |
I propose to depreacate / remove it in 3.13 / 3.15
Linked PRs
Eclips4, vstinner and CAM-Gerlach
Metadata
Metadata
Assignees
Labels
stdlibPython modules in the Lib dirPython modules in the Lib dirtype-featureA feature request or enhancementA feature request or enhancement