Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f7749dc

Browse files
chore: add testing of Python 3.14
Also fix __annotations__ not working in Python 3.14 by using the annotation on the 'class' instead of on the 'instance' Closes: #3013
1 parent 3739b5d commit f7749dc

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

.github/workflows/test.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,8 @@ jobs:
3636
toxenv: py312,smoke
3737
- version: "3.13"
3838
toxenv: py313,smoke
39-
# NOTE(jlvillal): 2024-10-17: Enable this once we fix
40-
# https://github.com/python-gitlab/python-gitlab/issues/3013
41-
# - version: "3.14.0-alpha - 3.14" # SemVer's version range syntax
42-
# toxenv: py314,smoke
39+
- version: "3.14.0-alpha - 3.14" # SemVer's version range syntax
40+
toxenv: py314,smoke
4341
include:
4442
- os: macos-latest
4543
python:

gitlab/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ def _create_managers(self) -> None:
201201
# NOTE(jlvillal): We are creating our managers by looking at the class
202202
# annotations. If an attribute is annotated as being a *Manager type
203203
# then we create the manager and assign it to the attribute.
204-
for attr, annotation in sorted(self.__annotations__.items()):
204+
for attr, annotation in sorted(self.__class__.__annotations__.items()):
205205
# We ignore creating a manager for the 'manager' attribute as that
206206
# is done in the self.__init__() method
207207
if attr in ("manager",):

0 commit comments

Comments
 (0)