Skip to content

Commit

Permalink
feat: update templates to include Python 3.12
Browse files Browse the repository at this point in the history
  • Loading branch information
bernardcooke53 committed Oct 17, 2023
1 parent 9d62c6e commit e54759b
Show file tree
Hide file tree
Showing 13 changed files with 23 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ jobs:
strategy:
fail-fast: false
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
3 changes: 2 additions & 1 deletion src/hatch/template/files_default.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ class PyProject(File):
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
]
Expand Down Expand Up @@ -152,7 +153,7 @@ def __init__(self, template_config: dict, plugin_config: dict):
]
[[tool.hatch.envs.all.matrix]]
python = ["3.8", "3.9", "3.10", "3.11"]
python = ["3.8", "3.9", "3.10", "3.11", "3.12"]
[tool.hatch.envs.lint]
detached = true
Expand Down
2 changes: 1 addition & 1 deletion src/hatch/template/files_feature_ci.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class CommandLinePackage(File):
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
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@v3
Expand Down
3 changes: 3 additions & 0 deletions tests/cli/project/test_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ def test_default_all(self, hatch, temp_dir, helpers):
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy"
],
Expand Down Expand Up @@ -213,6 +214,7 @@ def test_default_all(self, hatch, temp_dir, helpers):
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy"
],
Expand Down Expand Up @@ -364,6 +366,7 @@ def test_plugin_dependencies_unmet(self, hatch, temp_dir, helpers, mock_plugin_i
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy"
],
Expand Down
1 change: 1 addition & 0 deletions tests/helpers/templates/new/basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ def get_files(**kwargs):
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
]
Expand Down
3 changes: 2 additions & 1 deletion tests/helpers/templates/new/default.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ def get_files(**kwargs):
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
]
Expand Down Expand Up @@ -121,7 +122,7 @@ def get_files(**kwargs):
]
[[tool.hatch.envs.all.matrix]]
python = ["3.8", "3.9", "3.10", "3.11"]
python = ["3.8", "3.9", "3.10", "3.11", "3.12"]
[tool.hatch.envs.lint]
detached = true
Expand Down
2 changes: 1 addition & 1 deletion tests/helpers/templates/new/feature_ci.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def get_files(**kwargs):
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
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@v3
Expand Down
3 changes: 2 additions & 1 deletion tests/helpers/templates/new/feature_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ def {kwargs['package_name']}():
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
]
Expand Down Expand Up @@ -155,7 +156,7 @@ def {kwargs['package_name']}():
]
[[tool.hatch.envs.all.matrix]]
python = ["3.8", "3.9", "3.10", "3.11"]
python = ["3.8", "3.9", "3.10", "3.11", "3.12"]
[tool.hatch.envs.lint]
detached = true
Expand Down
3 changes: 2 additions & 1 deletion tests/helpers/templates/new/feature_no_src_layout.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ def get_files(**kwargs):
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
]
Expand Down Expand Up @@ -121,7 +122,7 @@ def get_files(**kwargs):
]
[[tool.hatch.envs.all.matrix]]
python = ["3.8", "3.9", "3.10", "3.11"]
python = ["3.8", "3.9", "3.10", "3.11", "3.12"]
[tool.hatch.envs.lint]
detached = true
Expand Down
3 changes: 2 additions & 1 deletion tests/helpers/templates/new/licenses_empty.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ def get_files(**kwargs):
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
]
Expand Down Expand Up @@ -84,7 +85,7 @@ def get_files(**kwargs):
]
[[tool.hatch.envs.all.matrix]]
python = ["3.8", "3.9", "3.10", "3.11"]
python = ["3.8", "3.9", "3.10", "3.11", "3.12"]
[tool.hatch.envs.lint]
detached = true
Expand Down
3 changes: 2 additions & 1 deletion tests/helpers/templates/new/licenses_multiple.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ def get_files(**kwargs):
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
]
Expand Down Expand Up @@ -124,7 +125,7 @@ def get_files(**kwargs):
]
[[tool.hatch.envs.all.matrix]]
python = ["3.8", "3.9", "3.10", "3.11"]
python = ["3.8", "3.9", "3.10", "3.11", "3.12"]
[tool.hatch.envs.lint]
detached = true
Expand Down
3 changes: 2 additions & 1 deletion tests/helpers/templates/new/projects_urls_empty.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ def get_files(**kwargs):
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
]
Expand Down Expand Up @@ -116,7 +117,7 @@ def get_files(**kwargs):
]
[[tool.hatch.envs.all.matrix]]
python = ["3.8", "3.9", "3.10", "3.11"]
python = ["3.8", "3.9", "3.10", "3.11", "3.12"]
[tool.hatch.envs.lint]
detached = true
Expand Down
3 changes: 2 additions & 1 deletion tests/helpers/templates/new/projects_urls_space_in_label.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ def get_files(**kwargs):
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
]
Expand Down Expand Up @@ -119,7 +120,7 @@ def get_files(**kwargs):
]
[[tool.hatch.envs.all.matrix]]
python = ["3.8", "3.9", "3.10", "3.11"]
python = ["3.8", "3.9", "3.10", "3.11", "3.12"]
[tool.hatch.envs.lint]
detached = true
Expand Down

0 comments on commit e54759b

Please sign in to comment.