Skip to content

Commit

Permalink
Use Python 3.12 and drop support for Python 3.7
Browse files Browse the repository at this point in the history
  • Loading branch information
WMOkiishi committed Jan 13, 2024
1 parent 290a212 commit 6ea9d1d
Show file tree
Hide file tree
Showing 19 changed files with 48 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/stubtest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
python-version: ['3.8', '3.9', '3.10', '3.11']
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
fail-fast: false
steps:
- uses: actions/checkout@v4
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/typecheck_scripts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: '3.11'
python-version: '3.12'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand All @@ -36,4 +36,4 @@ jobs:
with:
extra-args: idbstubs tests
version: 1.1.344
python-version: '3.11'
python-version: '3.12'
4 changes: 2 additions & 2 deletions .github/workflows/typecheck_stubs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
python-version: ['3.8', '3.9', '3.10', '3.11']
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
fail-fast: false
steps:
- uses: actions/checkout@v4
Expand All @@ -43,7 +43,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
python-version: ['3.8', '3.9', '3.10', '3.11']
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
fail-fast: false
steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ repos:
hooks:
- id: black
types: [pyi]
language_version: python3.11
language_version: python3.12

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ authors = [ { name = "W. M. Okiishi" } ]
description = "Type stubs for the Panda3D Python bindings"
readme = "README.md"
license = { file = "LICENSE" }
requires-python = ">=3.7"
requires-python = ">=3.8"
dependencies = ["panda3d==1.10.14"]
classifiers = [
"Programming Language :: Python :: 3",
Expand Down Expand Up @@ -39,7 +39,7 @@ extra_standard_library = ["typing_extensions"]
[tool.black]
preview = true
line_length = 130
target_version = ["py311"]
target_version = ["py312"]
include = '\.pyi$'
force_exclude = '^/src/panda3d-stubs/'
skip_string_normalization = true
Expand Down
1 change: 0 additions & 1 deletion tests/allowlists/common.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ direct.distributed.StagedObject.StagedObject.goOffStage
direct.interval.(MetaInterval|IntervalGlobal).MetaInterval.__repr__
direct.interval.(MetaInterval|IntervalGlobal).MetaInterval.__str__
direct.interval.(SoundInterval|IntervalGlobal).SoundInterval.finish
direct.p3d.Packager.metaclass_def.__new__
direct.showbase.ShowBase.ShowBase.set_background_color
direct.stdpy.file.join
direct.tkwidgets.Valuator.ValuatorGroupPanel.get
Expand Down
1 change: 1 addition & 0 deletions tests/allowlists/py310.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
direct.directscripts.gendocs # Errors on import
direct.p3d.Packager.metaclass_def.__new__
1 change: 1 addition & 0 deletions tests/allowlists/py311.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
direct.directscripts.gendocs # Errors on import
direct.p3d.Packager.metaclass_def.__new__
14 changes: 14 additions & 0 deletions tests/allowlists/py312.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# This tries to import 'parser':
direct.directscripts.gendocs

# These try to import 'imp':
direct.p3d.AppRunner
direct.p3d.DWBPackageInstaller
direct.p3d.DeploymentTools
direct.p3d.HostInfo
direct.p3d.PackageInfo
direct.p3d.PackageInstaller
direct.p3d.Packager
direct.p3d.runp3d

direct.showbase.VFSImporter
1 change: 0 additions & 1 deletion tests/allowlists/py37.txt

This file was deleted.

1 change: 1 addition & 0 deletions tests/allowlists/py38.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
direct.p3d.Packager.metaclass_def.__new__
direct.tkwidgets.MemoryExplorer.wantobjects
1 change: 1 addition & 0 deletions tests/allowlists/py39.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
direct.p3d.Packager.metaclass_def.__new__
3 changes: 3 additions & 0 deletions tests/allowlists/win32-py310.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
direct.leveleditor.ProtoObjsUI.ProtoDropTarget # Metaclass issues
direct.leveleditor.LevelEditorBase.[A-Z_]+ # Imports from DirectGlobals through CurveEditor
direct.leveleditor.LevelEditorBase.(Plain|ScreenTitle|ScreenPrompt|NameConfirm|BlackOnWhite) # Imports from DirectGui
3 changes: 3 additions & 0 deletions tests/allowlists/win32-py311.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
direct.leveleditor.ProtoObjsUI.ProtoDropTarget # Metaclass issues
direct.leveleditor.LevelEditorBase.[A-Z_]+ # Imports from DirectGlobals through CurveEditor
direct.leveleditor.LevelEditorBase.(Plain|ScreenTitle|ScreenPrompt|NameConfirm|BlackOnWhite) # Imports from DirectGui
9 changes: 9 additions & 0 deletions tests/allowlists/win32-py312.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# These try to import 'imp':
direct.leveleditor.FileMgr
direct.leveleditor.LevelEditor
direct.leveleditor.LevelLoader
direct.leveleditor.LevelLoaderBase
direct.leveleditor.ProtoObjs
direct.leveleditor.ProtoObjsUI
direct.leveleditor.ProtoPalette
direct.leveleditor.ProtoPaletteBase
3 changes: 3 additions & 0 deletions tests/allowlists/win32-py38.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
direct.leveleditor.ProtoObjsUI.ProtoDropTarget # Metaclass issues
direct.leveleditor.LevelEditorBase.[A-Z_]+ # Imports from DirectGlobals through CurveEditor
direct.leveleditor.LevelEditorBase.(Plain|ScreenTitle|ScreenPrompt|NameConfirm|BlackOnWhite) # Imports from DirectGui
3 changes: 3 additions & 0 deletions tests/allowlists/win32-py39.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
direct.leveleditor.ProtoObjsUI.ProtoDropTarget # Metaclass issues
direct.leveleditor.LevelEditorBase.[A-Z_]+ # Imports from DirectGlobals through CurveEditor
direct.leveleditor.LevelEditorBase.(Plain|ScreenTitle|ScreenPrompt|NameConfirm|BlackOnWhite) # Imports from DirectGui
3 changes: 0 additions & 3 deletions tests/allowlists/win32.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ direct.leveleditor.ObjectPropertyUI.ObjectPropUISpinner
direct.leveleditor.ObjectPropertyUI.ObjectPropUITime
direct.leveleditor.ObjectPropertyUI.ObjectPropertyUI
direct.leveleditor.PaletteTreeCtrl.PaletteTreeCtrl
direct.leveleditor.ProtoObjsUI.ProtoDropTarget
direct.leveleditor.ProtoPaletteUI.ProtoPaletteUI
direct.leveleditor.ProtoPaletteUI.UniversalDropTarget
direct.leveleditor.SceneGraphUIBase.SceneGraphUIDropTarget
Expand Down Expand Up @@ -62,7 +61,6 @@ direct.leveleditor.ObjectPropertyUI.(Vertex|Top|Left|Right|checkColour|HSVWheelI

# From direct.directtools.DirectGlobals
direct.leveleditor.CurveEditor.[A-Z_]+ # Through direct.wxwidgets.WxPandaShell
direct.leveleditor.LevelEditorBase.[A-Z_]+ # Through direct.leveleditor.CurveEditor
direct.leveleditor.LevelEditorUIBase.(?!ID_)[A-Z_]+ # Through direct.wxwidgets.WxPandaShell
direct.wxwidgets.WxPandaShell.[A-Z_]+

Expand All @@ -73,7 +71,6 @@ direct.leveleditor.LevelEditorUIBase.ivalMgr # Through direct.leveleditor.Curve

# Other
direct.leveleditor.LevelEditor.(?!LevelEditor$)\w+ # From various through direct.leveleditor.LevelEditorBase/LevelEditorUI
direct.leveleditor.LevelEditorBase.(Plain|ScreenTitle|ScreenPrompt|NameConfirm|BlackOnWhite) # From direct.gui.DirectGui
direct.leveleditor.LevelEditorUI.(?!LevelEditorUI$)\w+ # From various through direct.leveleditor.LevelEditorUIBase
direct.leveleditor.LevelEditorUIBase.(First|Last|Next|Pre)(Key)?Frame # From direct.leveleditor.AnimControlUI
direct.leveleditor.LevelEditorUIBase.(PrePlay|Play|Key|Stop|DeleteKey) # From direct.leveleditor.AnimControlUI
Expand Down
1 change: 1 addition & 0 deletions tests/test_stubtest.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ def main() -> int:
'common',
f'py{sys.version_info.major}{sys.version_info.minor}',
sys.platform,
f'{sys.platform}-py{sys.version_info.major}{sys.version_info.minor}',
]
args = [
'panda3d', 'direct',
Expand Down

0 comments on commit 6ea9d1d

Please sign in to comment.