Add Support for Python 3.13 (#6934)
* add support for Python 3.13 * bump pyinstaller * fix tests
This commit is contained in:
parent
b4bf2f2282
commit
8f5540d073
|
@ -43,10 +43,12 @@ jobs:
|
|||
matrix:
|
||||
include:
|
||||
- os: ubuntu-latest
|
||||
py: "3.12"
|
||||
py: "3.13-dev"
|
||||
- os: windows-latest
|
||||
py: "3.12"
|
||||
py: "3.13-dev"
|
||||
- os: macos-latest
|
||||
py: "3.13-dev"
|
||||
- os: ubuntu-latest
|
||||
py: "3.12"
|
||||
- os: ubuntu-latest
|
||||
py: "3.11"
|
||||
|
|
|
@ -15,6 +15,8 @@
|
|||
([#7073](https://github.com/mitmproxy/mitmproxy/pull/7073), @mhils)
|
||||
- Fix a bug where fragmented QUIC client hellos were not handled properly.
|
||||
([#7067](https://github.com/mitmproxy/mitmproxy/pull/7067), @errorxyz)
|
||||
- mitmproxy now officially supports Python 3.13.
|
||||
([#6934](https://github.com/mitmproxy/mitmproxy/pull/6934), @mhils)
|
||||
|
||||
## 02 August 2024: mitmproxy 10.4.2
|
||||
|
||||
|
|
|
@ -147,16 +147,15 @@ def identity(content):
|
|||
def decode_gzip(content: bytes) -> bytes:
|
||||
if not content:
|
||||
return b""
|
||||
gfile = gzip.GzipFile(fileobj=BytesIO(content))
|
||||
return gfile.read()
|
||||
with gzip.GzipFile(fileobj=BytesIO(content)) as f:
|
||||
return f.read()
|
||||
|
||||
|
||||
def encode_gzip(content: bytes) -> bytes:
|
||||
s = BytesIO()
|
||||
# set mtime to 0 so that gzip encoding is deterministic.
|
||||
gf = gzip.GzipFile(fileobj=s, mode="wb", mtime=0)
|
||||
gf.write(content)
|
||||
gf.close()
|
||||
with gzip.GzipFile(fileobj=s, mode="wb", mtime=0) as f:
|
||||
f.write(content)
|
||||
return s.getvalue()
|
||||
|
||||
|
||||
|
|
|
@ -19,6 +19,7 @@ classifiers = [
|
|||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
"Programming Language :: Python :: 3.12",
|
||||
"Programming Language :: Python :: 3.13",
|
||||
"Programming Language :: Python :: Implementation :: CPython",
|
||||
"Topic :: Security",
|
||||
"Topic :: Internet :: WWW/HTTP",
|
||||
|
@ -65,8 +66,8 @@ dev = [
|
|||
"click>=7.0,<=8.1.7",
|
||||
"hypothesis>=6.104.2,<=6.108.5",
|
||||
"pdoc>=14.5.1,<=14.6.0",
|
||||
"pyinstaller==6.9.0",
|
||||
"pyinstaller-hooks-contrib==2024.7",
|
||||
"pyinstaller==6.10.0",
|
||||
"pyinstaller-hooks-contrib==2024.8",
|
||||
"pytest-asyncio>=0.23.6,<=0.23.8",
|
||||
"pytest-cov>=5.0.0,<=5.0.0",
|
||||
"pytest-timeout>=2.3.1,<=2.3.1",
|
||||
|
|
Loading…
Reference in New Issue