Skip to content

Commit 03c3970

Browse files
authored
Merge pull request #805 from python-rope/lieryan-update-python-actions-versions
Update GHA Python versions
2 parents 084e955 + 10b00a5 commit 03c3970

File tree

5 files changed

+19
-12
lines changed

5 files changed

+19
-12
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99

1010
strategy:
1111
matrix:
12-
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
12+
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
1313
os: [ubuntu-latest, windows-latest, macos-latest]
1414
fail-fast: false
1515
steps:

rope/base/oi/type_hinting/utils.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from __future__ import annotations
22

33
import logging
4+
import sys
45
from typing import TYPE_CHECKING, Optional, Union
56

67
import rope.base.utils as base_utils
@@ -81,7 +82,10 @@ def resolve_type(
8182
"""
8283
Find proper type object from its name.
8384
"""
84-
deprecated_aliases = {"collections": "collections.abc"}
85+
if sys.version_info < (3, 13):
86+
deprecated_aliases = {"collections": "collections.abc"}
87+
else:
88+
deprecated_aliases = {"collections": "_collections_abc"}
8589
ret_type = None
8690
logging.debug("Looking for %s", type_name)
8791
if "." not in type_name:

rope/contrib/autoimport/sqlite.py

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -569,14 +569,17 @@ def filter_folders(folder: Path) -> bool:
569569
return list(OrderedDict.fromkeys(folder_paths))
570570

571571
def _safe_iterdir(self, folder: Path):
572-
dirs = folder.iterdir()
573-
while True:
574-
try:
575-
yield next(dirs)
576-
except PermissionError:
577-
pass
578-
except StopIteration:
579-
break
572+
try:
573+
dirs = folder.iterdir()
574+
while True:
575+
try:
576+
yield next(dirs)
577+
except PermissionError:
578+
pass
579+
except StopIteration:
580+
break
581+
except PermissionError:
582+
pass
580583

581584
def _get_available_packages(self) -> List[Package]:
582585
packages: List[Package] = [

rope/contrib/autoimport/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ def sort_and_deduplicate(results: List[Tuple[str, int]]) -> List[str]:
9292

9393

9494
def sort_and_deduplicate_tuple(
95-
results: List[Tuple[str, str, int]]
95+
results: List[Tuple[str, str, int]],
9696
) -> List[Tuple[str, str]]:
9797
"""Sort and deduplicate a list of name, module, source entries."""
9898
results = sorted(results, key=lambda y: y[-1])

rope/refactor/importutils/module_imports.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def _get_unbound_names(self, defined_pyobject):
3131

3232
def _get_all_star_list(self, pymodule):
3333
def _resolve_name(
34-
name: Union[pynamesdef.AssignedName, pynames.ImportedName]
34+
name: Union[pynamesdef.AssignedName, pynames.ImportedName],
3535
) -> List:
3636
while isinstance(name, pynames.ImportedName):
3737
try:

0 commit comments

Comments
 (0)