Skip to content

Commit

Permalink
Update to work with PY3.11. (#320)
Browse files Browse the repository at this point in the history
  • Loading branch information
cglouch committed Apr 29, 2024
1 parent c7d44d6 commit 9f42461
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 11 deletions.
2 changes: 1 addition & 1 deletion apitools/base/protorpclite/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ def positional_wrapper(*args, **kwargs):
if isinstance(max_positional_args, six.integer_types):
return positional_decorator
else:
args, _, _, defaults = inspect.getargspec(max_positional_args)
args, _, _, defaults, *_ = inspect.getfullargspec(max_positional_args)
if defaults is None:
raise ValueError(
'Functions with no keyword arguments must specify '
Expand Down
4 changes: 0 additions & 4 deletions samples/uptodate_check_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,6 @@ def _CheckGeneratedFiles(self, api_name, api_version):
prefix + '_messages.py',
'__init__.py']))
self.assertEquals(expected_files, set(os.listdir(tmp_dir_path)))
if six.PY3:
# The source files won't be identical under python3,
# so we exit early.
return
for expected_file in expected_files:
self.AssertDiffEqual(
_GetContent(GetSampleClientPath(
Expand Down
11 changes: 5 additions & 6 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
[tox]
envlist =
py27-oauth2client{1,2,3,4}
py35-oauth2client{1,2,3,4}
py311-oauth2client{1,2,3,4}

[testenv]
deps =
nose
nose-py3
python-gflags
oauth2client1: oauth2client<1.5dev
oauth2client2: oauth2client>=2,<=3dev
Expand All @@ -18,7 +17,7 @@ passenv = TRAVIS*

[testenv:lint]
basepython =
python2.7
python3.11
commands =
pip install six google-apitools
pycodestyle apitools
Expand All @@ -28,7 +27,7 @@ deps =

[testenv:cover]
basepython =
python2.7
python3.11
commands =
nosetests --with-xunit --with-xcoverage --cover-package=apitools --nocapture --cover-erase --cover-tests --cover-branches []
deps =
Expand All @@ -49,7 +48,7 @@ deps =

[testenv:transfer_coverage]
basepython =
python2.7
python3.11
deps =
mock
nose
Expand Down

0 comments on commit 9f42461

Please sign in to comment.