Skip to content

Commit 4eae025

Browse files
authored
Merge pull request #545 from tlsfuzzer/ci-updates
add py3.13 to CI
2 parents c93df82 + f38a6fe commit 4eae025

File tree

2 files changed

+34
-3
lines changed

2 files changed

+34
-3
lines changed

.github/workflows/ci.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ jobs:
4040
- name: py3.12
4141
os: ubuntu-latest
4242
python-version: '3.12'
43+
- name: py3.13
44+
os: ubuntu-latest
45+
python-version: '3.13'
4346
- name: py2.6
4447
os: ubuntu-latest
4548
container: centos:6
@@ -149,6 +152,10 @@ jobs:
149152
os: ubuntu-latest
150153
python-version: '3.12'
151154
opt-deps: ['gmpy2']
155+
- name: py3.13 with gmpy2
156+
os: ubuntu-latest
157+
python-version: '3.13'
158+
opt-deps: ['gmpy2']
152159
- name: py2.7 with brotli
153160
os: ubuntu-20.04
154161
python-version: 2.7
@@ -184,6 +191,10 @@ jobs:
184191
os: ubuntu-latest
185192
python-version: '3.12'
186193
opt-deps: ['brotli', 'zstd']
194+
- name: py3.13 with brotli and zstandard
195+
os: ubuntu-latest
196+
python-version: '3.13'
197+
opt-deps: ['brotli', 'zstd']
187198
- name: py3.9 with kyber-py
188199
os: ubuntu-latest
189200
python-version: "3.9"
@@ -200,6 +211,10 @@ jobs:
200211
os: ubuntu-latest
201212
python-version: "3.12"
202213
opt-deps: ["kyber_py"]
214+
- name: py3.13 with kyber-py
215+
os: ubuntu-latest
216+
python-version: "3.13"
217+
opt-deps: ["kyber_py"]
203218
# finally test with multiple dependencies installed at the same time
204219
- name: py2.7 with m2crypto, pycrypto, gmpy, gmpy2, and brotli
205220
os: ubuntu-20.04
@@ -234,6 +249,11 @@ jobs:
234249
os: ubuntu-latest
235250
python-version: '3.12'
236251
# gmpy doesn't build with 3.12
252+
opt-deps: ['m2crypto', 'gmpy2', 'brotli', 'zstd', 'kyber_py']
253+
- name: py3.13 with m2crypto, gmpy, gmpy2, brotli, and zstandard
254+
os: ubuntu-latest
255+
python-version: '3.13'
256+
# gmpy doesn't build with 3.13
237257
# coverage to codeclimate can be submitted just once
238258
opt-deps: ['m2crypto', 'gmpy2', 'codeclimate', 'brotli', 'zstd', 'kyber_py']
239259
steps:

tlslite/basedb.py

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,12 @@ def create(self):
3939
logger.debug('server %s - create - setting type', time.time())
4040
self.db["--Reserved--type"] = self.type
4141
logger.debug('server %s - create - syncing', time.time())
42-
self.db.sync()
42+
try:
43+
self.db.sync()
44+
except AttributeError:
45+
# some backends, like the py3.13 default sqlite , don't support
46+
# sync() method, so ignore it missing
47+
pass
4348
logger.debug('server %s - create - fun exit', time.time())
4449
else:
4550
logger.debug('server %s - create - using dict() as DB',
@@ -84,7 +89,10 @@ def __setitem__(self, username, value):
8489
try:
8590
self.db[username] = valueStr
8691
if self.filename:
87-
self.db.sync()
92+
try:
93+
self.db.sync()
94+
except AttributeError:
95+
pass
8896
finally:
8997
self.lock.release()
9098

@@ -96,7 +104,10 @@ def __delitem__(self, username):
96104
try:
97105
del(self.db[username])
98106
if self.filename:
99-
self.db.sync()
107+
try:
108+
self.db.sync()
109+
except AttributeError:
110+
pass
100111
finally:
101112
self.lock.release()
102113

0 commit comments

Comments
 (0)