Skip to content

Commit

Permalink
Add python 3.11 support (#446)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielgatis authored Jun 1, 2023
1 parent b888db7 commit 0766402
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 15 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/lint_python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- uses: actions/setup-python@v4
with:
python-version: "3.10"
python-version: 3.11
- run: pip install --upgrade pip wheel
- run: pip install --upgrade setuptools>65.5.0
- run: pip install .
- run: pip install --upgrade setuptools
- run: pip install bandit black flake8 flake8-bugbear flake8-comprehensions isort safety mypy
- run: mypy --install-types --non-interactive --ignore-missing-imports ./rembg
- run: bandit --recursive --skip B101,B104,B310,B311,B303,B110 --exclude ./rembg/_version.py ./rembg
- run: black --force-exclude rembg/_version.py --check --diff ./rembg
- run: flake8 ./rembg --count --ignore=B008,C901,E203,E266,E731,F401,F811,F841,W503 --max-line-length=120 --show-source --statistics --exclude ./rembg/_version.py
- run: isort --check-only --profile black ./rembg
- run: safety check
2 changes: 1 addition & 1 deletion .github/workflows/publish_docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/publish_pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,14 @@ jobs:
push_to_pypi:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: 3.9

python-version: 3.11
- name: "Installs dependencies"
run: |
python3 -m pip install --upgrade pip
python3 -m pip install setuptools wheel twine
- name: "Builds and uploads to PyPI"
run: |
python3 setup.py sdist bdist_wheel
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10"]
python-version: ["3.8", "3.9", "3.10", "3.11"]

steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-specific-environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10"]
python-version: ["3.8", "3.9", "3.10", "3.11"]

steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ Rembg is a tool to remove images background.
## Requirements

```
python: >3.7, <3.11
python: >3.7, <3.12
```

## Installation
Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,11 @@
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
],
keywords="remove, background, u2net",
packages=["rembg", "rembg.sessions", "rembg.commands"],
python_requires=">3.7, <3.11",
python_requires=">=3.8, <3.12",
install_requires=[
"aiohttp",
"asyncer",
Expand Down

0 comments on commit 0766402

Please sign in to comment.