Skip to content

Commit 71c8928

Browse files
2023.1 patch 1 release code drop
1 parent 5617086 commit 71c8928

10 files changed

Lines changed: 70 additions & 24 deletions

File tree

LICENSE.txt

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -514,6 +514,7 @@ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT
514514
OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
515515
THE USE OR OTHER DEALINGS IN THE SOFTWARE.
516516

517+
517518
optional-lite and any-lite
518519
Martin Moene
519520
-----------------------
@@ -543,3 +544,28 @@ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
543544
DEALINGS IN THE SOFTWARE.
544545

545546

547+
TinyXML-2
548+
-----------------------
549+
550+
Copyright (c) 2019-present, Lee Thomason and contributors.
551+
552+
This software is provided 'as-is', without any express or implied
553+
warranty. In no event will the authors be held liable for any
554+
damages arising from the use of this software.
555+
556+
Permission is granted to anyone to use this software for any
557+
purpose, including commercial applications, and to alter it and
558+
redistribute it freely, subject to the following restrictions:
559+
560+
1. The origin of this software must not be misrepresented; you must
561+
not claim that you wrote the original software. If you use this
562+
software in a product, an acknowledgment in the product documentation
563+
would be appreciated but is not required.
564+
565+
2. Altered source versions must be plainly marked as such, and
566+
must not be misrepresented as being the original software.
567+
568+
3. This notice may not be removed or altered from any source
569+
distribution.
570+
571+

P4.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
This uses the Python type P4API.P4Adapter, which is a wrapper for the
88
Perforce ClientApi object.
99
10-
$Id: //depot/main/p4-python/P4.py#108 $
10+
$Id: //depot/main/p4-python/P4.py#109 $
1111
1212
#*******************************************************************************
1313
# Copyright (c) 2007-2010, Perforce Software, Inc. All rights reserved.
@@ -355,7 +355,7 @@ def processFilelog(h):
355355
r.change = int( h[ "change" ][ n ] )
356356
r.action = h[ "action" ][ n ]
357357
r.type = h[ "type" ][ n ]
358-
r.time = datetime.datetime.utcfromtimestamp( int( h[ "time" ][ n ]) )
358+
r.time = datetime.datetime.fromtimestamp( int( h[ "time" ][ n ]), tz=None )
359359
r.user = h[ "user" ][ n ]
360360
r.client = h[ "client" ][ n ]
361361
r.desc = h[ "desc" ][ n ]
@@ -774,7 +774,7 @@ def run_tickets(self, *args):
774774
fname = self.ticket_file
775775
with open(fname) as f:
776776
tickets_raw = f.readlines()
777-
pattern = re.compile('([^=]*)=(.*):([^:]*)\n')
777+
pattern = re.compile(r'([^=]*)=(.*):([^:]*)\n')
778778
tickets = [ pattern.match(x).groups() for x in tickets_raw ]
779779
keys = [ "Host", "User", "Ticket" ]
780780
result = [ dict(zip(keys, x)) for x in tickets ]
@@ -1082,7 +1082,7 @@ def __check_version(pathToFile):
10821082
output = output.decode('UTF-8')
10831083
chunks = output.split(os.linesep)
10841084

1085-
pattern = re.compile("Rev. (?P<Program>.+)/(?P<Platform>.+)/(?P<Release>.+)/(?P<Patch>\d+) \((\d+/\d+/\d+)\).")
1085+
pattern = re.compile(r"Rev. (?P<Program>.+)/(?P<Platform>.+)/(?P<Release>.+)/(?P<Patch>\d+) \((\d+/\d+/\d+)\).")
10861086

10871087
for c in chunks:
10881088
match = pattern.match(c)

RELNOTES.txt

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ Installation
4747

4848
python3 -m pip install --upgrade p4python
4949

50-
P4Python is distributed as a binary wheels for Python 3.7, 3.8, 3.9, 3.10
51-
and 3.11. In order for the binary wheel to be used, the ABI tag needs to
50+
P4Python is distributed as a binary wheels for Python 3.7, 3.8, 3.9, 3.10,
51+
3.11 and 3.12. In order for the binary wheel to be used, the ABI tag needs to
5252
match.This often requires updated pip, to do so issue:
5353
python3 -m pip install --upgrade pip
5454

@@ -120,7 +120,7 @@ Compatibility Statements
120120
Python Compatibility
121121

122122
This release of P4Python is supported building from source with
123-
Python 3.7, 3.8, 3.9, 3.10 and 3.11.
123+
Python 3.7, 3.8, 3.9, 3.10, 3.11 and 3.12.
124124

125125
For detailed compatibility, please check the following table:
126126

@@ -131,6 +131,7 @@ Compatibility Statements
131131
3.9 | 2021.1 or later
132132
3.10 | 2022.1 or later
133133
3.11 | 2022.2 or later
134+
3.12 | 2023.1 or later
134135

135136
OpenSSL Compatibility
136137

@@ -294,6 +295,13 @@ Key to symbols used in change notes below.
294295

295296
--------------------------------------------------------------------------
296297

298+
New functionality in 2023.1 Patch 2 (2023.1/2509188) (2023/10/25)
299+
300+
#2503929 (Job #117105)
301+
Added wheels & build support for Python 3.12
302+
303+
--------------------------------------------------------------------------
304+
297305
New functionality in 2023.1 Patch 1 (2023.1/2477632) (2023/08/21)
298306

299307
#2475832, #2471641, #2468946 (Job #114714)

linux_build/build-wheels.sh

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export PATH=$PATH:/work/p4-bin/bin.linux26x86_64/
55

66
# Extract the p4api and set the P4API path var
77
mkdir -p /work/p4-api
8-
tar xvfz /work/p4-bin/bin.linux26x86_64/p4api-glibc2.3-openssl1.1.1.tgz -C /work/p4-api
8+
tar xvfz /work/p4-bin/bin.linux26x86_64/p4api-glibc2.3-openssl3.tgz -C /work/p4-api
99
P4API=`echo /work/p4-api/p4api-20*`
1010

1111
cd /work/p4-python
@@ -31,14 +31,23 @@ for VERSION in $1; do
3131
## Upgrade pip
3232
"${PYBIN}/python" -m pip install --upgrade pip
3333

34+
#Install wheel module
35+
"${PYBIN}/python" -m pip install wheel
36+
3437
# Install the wheel
3538
"${PYBIN}/python" -m pip install /work/p4-python/dist/$(ls /work/p4-python/dist/ | grep $VERSION | grep \.whl)
3639

3740
## Test the build
3841
"${PYBIN}/python" p4test.py
3942

40-
## Repair wheel with new ABI tag manylinux2010_x86_64
41-
auditwheel repair dist/p4python-*-linux_x86_64.whl --plat manylinux_2_24_x86_64 -w repair
43+
## Repair wheel with new ABI tag manylinux_2_28_x86_64
44+
#auditwheel repair dist/p4python-*-linux_x86_64.whl --plat manylinux_2_28_x86_64 -w repair
45+
46+
#Changing wheel platform ABI tag to manylinux_2_28_x86_64
47+
"${PYBIN}/python" -m wheel tags --platform-tag=manylinux_2_28_x86_64 dist/p4python-*-linux_x86_64.whl
48+
49+
#Move wheel to repair directory
50+
mv dist/p4python-*-manylinux_2_28_x86_64.whl repair
4251

4352
rm -rf build p4python.egg-info dist
4453
done

p4test.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,17 @@ def setDirectories(self):
6868
def cleanupTestTree(self):
6969
os.chdir(self.startdir)
7070
if os.path.isdir(self.server_root):
71-
shutil.rmtree(self.server_root, False, onRmTreeError)
71+
if sys.version_info.minor < 12:
72+
shutil.rmtree(self.server_root, False, onRmTreeError)
73+
else:
74+
shutil.rmtree(self.server_root, False, onexc=onRmTreeError)
7275

7376
def ensureDirectory(self, directory):
7477
if not os.path.isdir(directory):
7578
os.mkdir(directory)
7679

7780
def getServerPatchLevel(self, info):
78-
c = re.compile("[^/]*/[^/]*/[^/]*/([^/]*)\s\(\d+/\d+/\d+\)")
81+
c = re.compile(r"[^/]*/[^/]*/[^/]*/([^/]*)\s\(\d+/\d+/\d+\)")
7982

8083
serverVersion = info[0]["serverVersion"]
8184
m = c.match(serverVersion)
@@ -552,7 +555,7 @@ def testMap(self):
552555
map = P4.Map(a)
553556
self.assertEqual(map.count(), 3, "Map does not contain 3 elements")
554557

555-
map2 = P4.Map("//ws/...", "C:\Work\...")
558+
map2 = P4.Map("//ws/...", r"C:\Work\...")
556559
self.assertEqual(map2.count(), 1, "Map2 does not contain any elements")
557560

558561
map3 = P4.Map.join(map, map2)
@@ -997,7 +1000,7 @@ def testEncoding( self ):
9971000
# create a file with windows encoding for its filename
9981001
uname = platform.uname()
9991002
if uname.system == 'Darwin':
1000-
comp = re.compile('(\d+)\.(\d+)\.(\d+)')
1003+
comp = re.compile(r'(\d+)\.(\d+)\.(\d+)')
10011004
match = comp.match(uname.release)
10021005
major = int(match.group(1))
10031006
if major >= 16: # macos Sierra or higher

tools/P4APIFtp.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def findPlatform(self):
8888
return platform_str
8989

9090
def get_glib_ver(self):
91-
pattern = re.compile("ldd\s+\(.*\)\s+(\d+)\.(\d+)")
91+
pattern = re.compile(r"ldd\s+\(.*\)\s+(\d+)\.(\d+)")
9292
gentry = subprocess.check_output("ldd --version | grep ldd", executable="/bin/bash", shell="True")
9393
if type(gentry) == bytes:
9494
gentry = gentry.decode()
@@ -100,7 +100,7 @@ def get_glib_ver(self):
100100

101101

102102
def get_ssl_ver(self, ssl_ver_string):
103-
pattern = re.compile("(\d+)\.(\d+).(\d+).*")
103+
pattern = re.compile(r"(\d+)\.(\d+).(\d+).*")
104104
match = pattern.match(str(ssl_ver_string))
105105
if match:
106106
return match.group(1), match.group(2), match.group(3)

tools/P4APIHttps.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
class P4APIHttps:
1111

1212
def get_ssl_ver(self, ssl_ver_string):
13-
pattern = re.compile("(\d+)\.(\d+).(\d+).*")
13+
pattern = re.compile(r"(\d+)\.(\d+).(\d+).*")
1414
match = pattern.match(str(ssl_ver_string))
1515
if match:
1616
return match.group(1), match.group(2), match.group(3)

tools/PlatformInfo.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ def __init__(self, api_version, release_version, ssl, ssl_ver):
127127

128128
elif unameOut[0] == "SunOS":
129129
unix = "SOLARIS"
130-
release = re.match("5.(\d+)", unameOut[2]).group(1)
130+
release = re.match(r"5.(\d+)", unameOut[2]).group(1)
131131
arch = self.architecture(unameOut[4])
132132
elif unameOut[0] == 'FreeBSD':
133133
unix = "FREEBSD"
@@ -184,7 +184,7 @@ def architecture(self, str):
184184
return "ARM"
185185

186186
def get_ssl_ver(self, ssl_ver_string):
187-
pattern = re.compile("(\d+)\.(\d+).(\d+).*")
187+
pattern = re.compile(r"(\d+)\.(\d+).(\d+).*")
188188
match = pattern.match(ssl_ver_string)
189189
if match:
190190
return match.group(1), match.group(2), match.group(3)

tools/Version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ def __init__(self, version_string):
88
self.process(version_string)
99

1010
def process(self, version_string):
11-
r = re.compile("r(\d+).(\d+)")
11+
r = re.compile(r"r(\d+).(\d+)")
1212
m = r.match(version_string)
1313
if m:
1414
self.year = m.group(1)

tools/VersionInfo.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ def __init__(self, p4api_dir):
1414
self.suppdate_month = None
1515
self.suppdate_day = None
1616

17-
releasePattern = re.compile("RELEASE\s+=\s+(?P<year>\d+)\s+(?P<version>\d+)\s*(?P<special>.*?)\s*;")
18-
patchlevelPattern = re.compile("PATCHLEVEL\s+=\s+(?P<level>\d+)")
19-
suppdatePattern = re.compile("SUPPDATE\s+=\s+(?P<year>\d+)\s+(?P<month>\d+)\s+(?P<day>\d+)")
17+
releasePattern = re.compile(r"RELEASE\s+=\s+(?P<year>\d+)\s+(?P<version>\d+)\s*(?P<special>.*?)\s*;")
18+
patchlevelPattern = re.compile(r"PATCHLEVEL\s+=\s+(?P<level>\d+)")
19+
suppdatePattern = re.compile(r"SUPPDATE\s+=\s+(?P<year>\d+)\s+(?P<month>\d+)\s+(?P<day>\d+)")
2020

2121
self.patterns=[]
2222
self.patterns.append((releasePattern, self.handleRelease))
@@ -37,7 +37,7 @@ def __init__(self, p4api_dir):
3737
def handleRelease(self, year=0, version=0, special=''):
3838
self.release_year = year
3939
self.release_version = version
40-
self.release_special = re.sub("\s+", ".", special)
40+
self.release_special = re.sub(r"\s+", ".", special)
4141

4242
def handlePatchlevel(self, level=0):
4343
self.patchlevel = level

0 commit comments

Comments
 (0)