diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bef0c775b4..5905ef3031 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -50,7 +50,7 @@ jobs: name: 🧪 Unit tests strategy: matrix: - python: ["3.7", "3.8", "3.9", "3.10", "3.11"] + python: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -84,7 +84,7 @@ jobs: needs: build strategy: matrix: - python: ["3.7", "3.8", "3.9", "3.10", "3.11"] + python: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"] installable: ["wheel", "sdist"] runs-on: ubuntu-latest steps: diff --git a/README.md b/README.md index de841841b8..a533954b59 100644 --- a/README.md +++ b/README.md @@ -86,7 +86,7 @@ access control as necessary. OctoPrint depends on a few python modules to do its job. Those are automatically installed when installing OctoPrint via `pip`. -OctoPrint currently supports Python 3.7, 3.8, 3.9, 3.10 and 3.11. +OctoPrint currently supports Python 3.7, 3.8, 3.9, 3.10, 3.11 and 3.12. ## Usage diff --git a/setup.py b/setup.py index 76bb69c915..ce3772aede 100644 --- a/setup.py +++ b/setup.py @@ -27,7 +27,7 @@ # ---------------------------------------------------------------------------------------- # Supported python versions -PYTHON_REQUIRES = ">=3.7, <3.12" +PYTHON_REQUIRES = ">=3.7, <3.13" # Requirements for setup.py SETUP_REQUIRES = [] @@ -350,6 +350,7 @@ def params(): "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: JavaScript", diff --git a/versioneer.py b/versioneer.py index 5cd5a62651..db00c8f19f 100644 --- a/versioneer.py +++ b/versioneer.py @@ -443,10 +443,14 @@ def get_config_from_root(root): # the top of versioneer.py for instructions on writing your setup.cfg . setup_cfg = os.path.join(root, "setup.cfg") - # TODO: find a py2 compatible solution for the configparser deprecation issues - parser = configparser.SafeConfigParser() - with io.open(setup_cfg, "rt", encoding="utf-8") as f: - parser.readfp(f) + try: + parser = configparser.SafeConfigParser() + with io.open(setup_cfg, "rt", encoding="utf-8") as f: + parser.readfp(f) + except AttributeError: # python 3.12 no longer has SafeConfigParser + parser = configparser.ConfigParser() + with io.open(setup_cfg, "rt", encoding="utf-8") as f: + parser.read_file(f) VCS = parser.get("versioneer", "VCS") # mandatory