Skip to content

Commit 70c3d04

Browse files
committed
- update to boost 1.84.0 with python 3.12.1
- adapted unittest cases - adapted file loading as _Py_wfopen is no longer available in PythonHandler::runScriptWorker()
1 parent 0588292 commit 70c3d04

File tree

959 files changed

+48847
-119221
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

959 files changed

+48847
-119221
lines changed

PythonLib/full/__future__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
to use the feature in question, but may continue to use such imports.
3434
3535
MandatoryRelease may also be None, meaning that a planned feature got
36-
dropped.
36+
dropped or that the release version is undetermined.
3737
3838
Instances of class _Feature have two corresponding methods,
3939
.getOptionalRelease() and .getMandatoryRelease().
@@ -96,7 +96,7 @@ def getMandatoryRelease(self):
9696
"""Return release in which this feature will become mandatory.
9797
9898
This is a 5-tuple, of the same form as sys.version_info, or, if
99-
the feature was dropped, is None.
99+
the feature was dropped, or the release date is undetermined, is None.
100100
"""
101101
return self.mandatory
102102

@@ -143,5 +143,5 @@ def __repr__(self):
143143
CO_FUTURE_GENERATOR_STOP)
144144

145145
annotations = _Feature((3, 7, 0, "beta", 1),
146-
(3, 11, 0, "alpha", 0),
146+
None,
147147
CO_FUTURE_ANNOTATIONS)

PythonLib/full/__hello__.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
initialized = True
2+
3+
class TestFrozenUtf8_1:
4+
"""\u00b6"""
5+
6+
class TestFrozenUtf8_2:
7+
"""\u03c0"""
8+
9+
class TestFrozenUtf8_4:
10+
"""\U0001f600"""
11+
12+
def main():
13+
print("Hello world!")
14+
15+
if __name__ == '__main__':
16+
main()

PythonLib/full/__phello__.foo.py

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
initialized = True
2+
3+
def main():
4+
print("Hello world!")
5+
6+
if __name__ == '__main__':
7+
main()
File renamed without changes.

PythonLib/full/lib2to3/tests/data/fixers/myfixes/__init__.py renamed to PythonLib/full/__phello__/ham/eggs.py

File renamed without changes.

PythonLib/full/__phello__/spam.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
initialized = True
2+
3+
def main():
4+
print("Hello world!")
5+
6+
if __name__ == '__main__':
7+
main()

PythonLib/full/_aix_support.py

Lines changed: 38 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,33 @@
33
import sys
44
import sysconfig
55

6-
try:
7-
import subprocess
8-
except ImportError: # pragma: no cover
9-
# _aix_support is used in distutils by setup.py to build C extensions,
10-
# before subprocess dependencies like _posixsubprocess are available.
11-
import _bootsubprocess as subprocess
6+
7+
# Taken from _osx_support _read_output function
8+
def _read_cmd_output(commandstring, capture_stderr=False):
9+
"""Output from successful command execution or None"""
10+
# Similar to os.popen(commandstring, "r").read(),
11+
# but without actually using os.popen because that
12+
# function is not usable during python bootstrap.
13+
import os
14+
import contextlib
15+
fp = open("/tmp/_aix_support.%s"%(
16+
os.getpid(),), "w+b")
17+
18+
with contextlib.closing(fp) as fp:
19+
if capture_stderr:
20+
cmd = "%s >'%s' 2>&1" % (commandstring, fp.name)
21+
else:
22+
cmd = "%s 2>/dev/null >'%s'" % (commandstring, fp.name)
23+
return fp.read() if not os.system(cmd) else None
1224

1325

1426
def _aix_tag(vrtl, bd):
1527
# type: (List[int], int) -> str
1628
# Infer the ABI bitwidth from maxsize (assuming 64 bit as the default)
1729
_sz = 32 if sys.maxsize == (2**31-1) else 64
30+
_bd = bd if bd != 0 else 9988
1831
# vrtl[version, release, technology_level]
19-
return "aix-{:1x}{:1d}{:02d}-{:04d}-{}".format(vrtl[0], vrtl[1], vrtl[2], bd, _sz)
32+
return "aix-{:1x}{:1d}{:02d}-{:04d}-{}".format(vrtl[0], vrtl[1], vrtl[2], _bd, _sz)
2033

2134

2235
# extract version, release and technology level from a VRMF string
@@ -26,32 +39,38 @@ def _aix_vrtl(vrmf):
2639
return [int(v[-1]), int(r), int(tl)]
2740

2841

29-
def _aix_bosmp64():
42+
def _aix_bos_rte():
3043
# type: () -> Tuple[str, int]
3144
"""
3245
Return a Tuple[str, int] e.g., ['7.1.4.34', 1806]
33-
The fileset bos.mp64 is the AIX kernel. It's VRMF and builddate
34-
reflect the current ABI levels of the runtime environment.
46+
The fileset bos.rte represents the current AIX run-time level. It's VRMF and
47+
builddate reflect the current ABI levels of the runtime environment.
48+
If no builddate is found give a value that will satisfy pep425 related queries
3549
"""
36-
# We expect all AIX systems to have lslpp installed in this location
37-
out = subprocess.check_output(["/usr/bin/lslpp", "-Lqc", "bos.mp64"])
50+
# All AIX systems to have lslpp installed in this location
51+
# subprocess may not be available during python bootstrap
52+
try:
53+
import subprocess
54+
out = subprocess.check_output(["/usr/bin/lslpp", "-Lqc", "bos.rte"])
55+
except ImportError:
56+
out = _read_cmd_output("/usr/bin/lslpp -Lqc bos.rte")
3857
out = out.decode("utf-8")
3958
out = out.strip().split(":") # type: ignore
40-
# Use str() and int() to help mypy see types
41-
return (str(out[2]), int(out[-1]))
59+
_bd = int(out[-1]) if out[-1] != '' else 9988
60+
return (str(out[2]), _bd)
4261

4362

4463
def aix_platform():
4564
# type: () -> str
4665
"""
4766
AIX filesets are identified by four decimal values: V.R.M.F.
48-
V (version) and R (release) can be retreived using ``uname``
67+
V (version) and R (release) can be retrieved using ``uname``
4968
Since 2007, starting with AIX 5.3 TL7, the M value has been
50-
included with the fileset bos.mp64 and represents the Technology
69+
included with the fileset bos.rte and represents the Technology
5170
Level (TL) of AIX. The F (Fix) value also increases, but is not
5271
relevant for comparing releases and binary compatibility.
5372
For binary compatibility the so-called builddate is needed.
54-
Again, the builddate of an AIX release is associated with bos.mp64.
73+
Again, the builddate of an AIX release is associated with bos.rte.
5574
AIX ABI compatibility is described as guaranteed at: https://www.ibm.com/\
5675
support/knowledgecenter/en/ssw_aix_72/install/binary_compatability.html
5776
@@ -60,7 +79,7 @@ def aix_platform():
6079
e.g., "aix-6107-1415-32" for AIX 6.1 TL7 bd 1415, 32-bit
6180
and, "aix-6107-1415-64" for AIX 6.1 TL7 bd 1415, 64-bit
6281
"""
63-
vrmf, bd = _aix_bosmp64()
82+
vrmf, bd = _aix_bos_rte()
6483
return _aix_tag(_aix_vrtl(vrmf), bd)
6584

6685

@@ -79,7 +98,7 @@ def aix_buildtag():
7998
Return the platform_tag of the system Python was built on.
8099
"""
81100
# AIX_BUILDDATE is defined by configure with:
82-
# lslpp -Lcq bos.mp64 | awk -F: '{ print $NF }'
101+
# lslpp -Lcq bos.rte | awk -F: '{ print $NF }'
83102
build_date = sysconfig.get_config_var("AIX_BUILDDATE")
84103
try:
85104
build_date = int(build_date)

PythonLib/full/_bootsubprocess.py

Lines changed: 0 additions & 97 deletions
This file was deleted.

0 commit comments

Comments
 (0)