Ver Fonte

Add python 3.11 support (#446)

Daniel Gatis há 2 anos atrás
pai
commit
0766402109

+ 3 - 5
.github/workflows/lint_python.yml

@@ -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

+ 1 - 1
.github/workflows/publish_docker.yml

@@ -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:

+ 3 - 5
.github/workflows/publish_pypi.yml

@@ -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

+ 1 - 1
.github/workflows/test-install.yml

@@ -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

+ 1 - 1
.github/workflows/test-specific-environment.yml

@@ -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

+ 1 - 1
README.md

@@ -72,7 +72,7 @@ Rembg is a tool to remove images background.
 ## Requirements
 
 ```
-python: >3.7, <3.11
+python: >3.7, <3.12
 ```
 
 ## Installation

+ 2 - 1
setup.py

@@ -32,10 +32,11 @@ setup(
         "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",