Skip to content

Commit

Permalink
Use a SimpleNamespace for setdefault compatibility.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Mar 6, 2024
1 parent f3f4b0a commit 414e4c0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
12 changes: 6 additions & 6 deletions importlib_resources/tests/compat/py39.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@
"""

import os
import types

from jaraco.collections import Projection


try:
from test.support import import_helper # type: ignore
except ImportError:
import test.support

class import_helper: # type: ignore
from test.support import (
modules_setup,
modules_cleanup,
DirsOnSysPath,
)
names = 'modules_setup', 'modules_cleanup', 'DirsOnSysPath'
import_helper = types.SimpleNamespace(**Projection(names, vars(test.support)))


try:
Expand Down
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ testing =

# local
zipp >= 3.17
jaraco.collections

docs =
# upstream
Expand Down

0 comments on commit 414e4c0

Please sign in to comment.