Upgrade to Python 3.11 (#5678)

* upgrade to Python 3.11

* compatibility fixes
This commit is contained in:
Maximilian Hils 2022-10-26 13:13:37 +02:00 committed by GitHub
parent 201651c357
commit b5302ab522
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 17 additions and 12 deletions

View File

@ -1 +1 @@
3.10
3.11

View File

@ -70,13 +70,15 @@ jobs:
matrix:
include:
- os: ubuntu-latest
py: "3.10"
py: "3.11"
- os: windows-latest
py: "3.10"
py: "3.11"
- os: macos-latest
py: "3.11"
- os: ubuntu-latest
py: "3.10"
- os: ubuntu-latest
py: 3.9
py: "3.9"
runs-on: ${{ matrix.os }}
steps:
- run: printenv

View File

@ -17,6 +17,8 @@
([#5487](https://github.com/mitmproxy/mitmproxy/pull/5487), @mhils)
* Fix `tls_version_server_min` and `tls_version_server_max` options.
([#5546](https://github.com/mitmproxy/mitmproxy/issues/5546), @mhils)
* Mitmproxy binaries now ship with Python 3.11.
([#5678](https://github.com/mitmproxy/mitmproxy/issues/5678), @mhils)
* DTLS support ([#5397](https://github.com/mitmproxy/mitmproxy/pull/5397), @kckeiks).
* Added Magisk module generation for Android onboarding (@jorants).
* Update Linux binary builder to Ubuntu 20.04, bumping the minimum glibc version to 2.31. (@jorants)

View File

@ -38,7 +38,7 @@ class Master:
try:
self.should_exit = asyncio.Event()
except RuntimeError: # python 3.9 and below
self.should_exit = asyncio.Event(loop=self.event_loop)
self.should_exit = asyncio.Event(loop=self.event_loop) # type: ignore
mitmproxy_ctx.master = self
mitmproxy_ctx.log = self.log # deprecated, do not use.
mitmproxy_ctx.options = self.options

View File

@ -1,10 +1,10 @@
FROM python:3.10-bullseye as wheelbuilder
FROM python:3.11-bullseye as wheelbuilder
ARG MITMPROXY_WHEEL
COPY $MITMPROXY_WHEEL /wheels/
RUN pip install wheel && pip wheel --wheel-dir /wheels /wheels/${MITMPROXY_WHEEL}
FROM python:3.10-slim-bullseye
FROM python:3.11-slim-bullseye
RUN useradd -mU mitmproxy
RUN apt-get update \

View File

@ -38,6 +38,7 @@ setup(
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: Implementation :: CPython",
"Topic :: Security",
"Topic :: Internet :: WWW/HTTP",
@ -107,15 +108,15 @@ setup(
"hypothesis>=5.8,<7",
"parver>=0.1,<2.0",
"pdoc>=4.0.0",
"pyinstaller==5.5",
"pytest-asyncio>=0.17,<0.20",
"pyinstaller==5.6",
"pytest-asyncio>=0.17,<0.21",
"pytest-cov>=2.7.1,<4.1",
"pytest-timeout>=1.3.3,<2.2",
"pytest-xdist>=2.1.0,<3",
"pytest>=6.1.0,<8",
"requests>=2.9.1,<3",
"tox>=3.5,<4",
"wheel>=0.36.2,<0.38",
"wheel>=0.36.2,<0.39",
],
},
)

View File

@ -34,8 +34,8 @@ deps =
types-Flask==1.1.6
types-Werkzeug==1.0.9
types-requests==2.28.11.2
types-cryptography==3.3.23
types-pyOpenSSL==22.1.0.0
types-cryptography==3.3.23.1
types-pyOpenSSL==22.1.0.1
-e .[dev]
commands =