Skip to content

Commit

Permalink
Update to Python 3.12 (#180)
Browse files Browse the repository at this point in the history
* Update to Python 3.12
Use Python's StrEnum for Python 3.11+
Use LF instead of CRLF

* Fixing lint issue?

* Update .gitattributes

Co-authored-by: MatthewFlamm <[email protected]>

* Update 'python_requires' to 3.8+

---------

Co-authored-by: MatthewFlamm <[email protected]>
  • Loading branch information
lymanepp and MatthewFlamm authored Apr 25, 2024
1 parent 24b105e commit a5f97bc
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 12 deletions.
6 changes: 3 additions & 3 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "Python 3",
"image": "mcr.microsoft.com/devcontainers/python:0-3.11",
"postCreateCommand": "./.devcontainer/postcreatecommand.sh"
"name": "Python 3",
"image": "mcr.microsoft.com/vscode/devcontainers/python:3.12-bullseye",
"postCreateCommand": "./.devcontainer/postcreatecommand.sh"
}
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto eol=lf
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11"]
python-version: ["3.12"]

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

steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/typing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11"]
python-version: ["3.12"]

steps:
- uses: actions/checkout@v4
Expand Down
9 changes: 4 additions & 5 deletions pynws/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,14 @@
import os
import sys
from enum import unique
from typing import Final

from .backports.enum import StrEnum
from .version import __version__

if sys.version_info >= (3, 8):
from typing import Final
if sys.version_info >= (3, 11):
from enum import StrEnum
else:
from typing_extensions import Final

from .backports.enum import StrEnum

file_dir = os.path.join(os.path.dirname(__file__), "..")

Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,13 @@
"aiohttp",
"metar",
],
python_requires=">=3.7",
python_requires=">=3.8",
classifiers=[
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
],
)

0 comments on commit a5f97bc

Please sign in to comment.