Skip to content

Commit a40352e

Browse files
chore: add testing of Python 3.14
Also fix __annotations__ not working in Python 3.14
1 parent 3739b5d commit a40352e

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-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: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import copy
22
import importlib
3+
import inspect
34
import json
45
import pprint
56
import textwrap
@@ -201,7 +202,8 @@ def _create_managers(self) -> None:
201202
# NOTE(jlvillal): We are creating our managers by looking at the class
202203
# annotations. If an attribute is annotated as being a *Manager type
203204
# then we create the manager and assign it to the attribute.
204-
for attr, annotation in sorted(self.__annotations__.items()):
205+
# for attr, annotation in sorted(inspect.get_annotations(self.__class__).items()):
206+
for attr, annotation in sorted(self.__class__.__annotations__.items()):
205207
# We ignore creating a manager for the 'manager' attribute as that
206208
# is done in the self.__init__() method
207209
if attr in ("manager",):

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy