Skip to content

Commit

Permalink
Fix for python3.11
Browse files Browse the repository at this point in the history
  • Loading branch information
isra17 committed May 1, 2023
1 parent d711d69 commit 83b530c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
persist-credentials: false
- uses: actions/setup-python@v2
with:
python-version: '3.10'
python-version: '3.11'
- run: pip install tox
- run: tox -e flake8
filename-matching:
Expand All @@ -35,7 +35,7 @@ jobs:
persist-credentials: false
- uses: actions/setup-python@v2
with:
python-version: '3.10'
python-version: '3.11'
- run: pip install tox
- run: tox -e filename_matching
mypy:
Expand All @@ -46,7 +46,7 @@ jobs:
persist-credentials: false
- uses: actions/setup-python@v2
with:
python-version: '3.10'
python-version: '3.11'
- run: pip install tox
- run: tox -e mypy
individual-coverage:
Expand All @@ -67,11 +67,11 @@ 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.10"
py: "3.11"
- os: ubuntu-latest
py: 3.9
runs-on: ${{ matrix.os }}
Expand All @@ -90,9 +90,9 @@ jobs:
- name: Run tox -e py (without internet)
run: |
# install dependencies (requires internet connectivity)
tox -e py --notest
tox -e py --notest
# run tests with loopback only. We need to sudo for unshare, which means we need an absolute path for tox.
sudo unshare --net -- sh -c "ip link set lo up; $(which tox) -e py"
sudo unshare --net -- sh -c "ip link set lo up; $(which tox) -e py"
if: matrix.os == 'ubuntu-latest'
- uses: codecov/codecov-action@a1ed4b322b4b38cb846afb5a0ebfa17086917d27
# mirrored below and at https://github.com/mitmproxy/mitmproxy/settings/actions
Expand Down Expand Up @@ -124,7 +124,7 @@ jobs:
fetch-depth: 0
- uses: actions/setup-python@v2
with:
python-version: '3.10'
python-version: '3.11'
- if: matrix.platform == 'windows'
uses: actions/cache@v2
with:
Expand Down Expand Up @@ -175,7 +175,7 @@ jobs:
persist-credentials: false
- uses: actions/setup-python@v2
with:
python-version: '3.10'
python-version: '3.11'
- run: |
wget -q https://github.com/gohugoio/hugo/releases/download/v0.92.1/hugo_extended_0.92.1_Linux-64bit.deb
echo "a9440adfd3ecce40089def287dee4e42ffae252ba08c77d1ac575b880a079ce6 hugo_extended_0.92.1_Linux-64bit.deb" | sha256sum -c
Expand Down Expand Up @@ -211,7 +211,7 @@ jobs:
persist-credentials: false
- uses: actions/setup-python@v2
with:
python-version: '3.10'
python-version: '3.11'
- uses: actions/download-artifact@v2
with:
name: binaries.linux
Expand Down Expand Up @@ -245,7 +245,7 @@ jobs:
persist-credentials: false
- uses: actions/setup-python@v2
with:
python-version: '3.10'
python-version: '3.11'
- run: sudo apt-get update
- run: sudo apt-get install -y twine awscli
- uses: actions/download-artifact@v2
Expand Down
2 changes: 1 addition & 1 deletion mitmproxy/contentviews/grpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -951,7 +951,7 @@ def format_grpc(

@dataclass
class ViewConfig:
parser_options: ProtoParser.ParserOptions = ProtoParser.ParserOptions()
parser_options: ProtoParser.ParserOptions = field(default_factory=ProtoParser.ParserOptions)
parser_rules: list[ProtoParser.ParserRule] = field(default_factory=list)


Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
"hypothesis>=5.8,<7",
"parver>=0.1,<2.0",
"pdoc>=4.0.0",
"pyinstaller==5.1",
"pyinstaller>=5.1",
"pytest-asyncio>=0.17.0,<0.19",
"pytest-cov>=2.7.1,<3.1",
"pytest-timeout>=1.3.3,<2.2",
Expand Down

0 comments on commit 83b530c

Please sign in to comment.