Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Python3.11 tests #5196

Merged
merged 3 commits into from
Nov 27, 2023
Merged

Fix Python3.11 tests #5196

merged 3 commits into from
Nov 27, 2023

Conversation

JanuszL
Copy link
Contributor

@JanuszL JanuszL commented Nov 24, 2023

  • moves to a newer PaddlePaddle version that supports Python3.11
  • moves to a newer OpenCV version that supports Python3.11
  • fixes deprecated the usage of inspect.getargspec on nose

Category:

Other (e.g. Documentation, Tests, Configuration)

Description:

  • moves to a newer PaddlePaddle version that supports Python3.11
  • moves to a newer OpenCV version that supports Python3.11
  • fixes deprecated the usage of inspect.getargspec on nose

Additional information:

Affected modules and functionalities:

  • nose_wrapper
  • setup_packages.py

Key points relevant for the review:

  • NA

Tests:

  • Existing tests apply
    • TL1_tensorflow_plugin
    • TL0_FW_iterators
    • TL1_python-self-test-slow
  • New tests added
    • Python tests
    • GTests
    • Benchmark
    • Other
  • N/A

Checklist

Documentation

  • Existing documentation applies
  • Documentation updated
    • Docstring
    • Doxygen
    • RST
    • Jupyter
    • Other
  • N/A

DALI team only

Requirements

  • Implements new requirements
  • Affects existing requirements
  • N/A

REQ IDs: N/A

JIRA TASK: N/A

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [11011153]: BUILD STARTED

@awolant awolant self-assigned this Nov 24, 2023
- moves to a newer PaddlePaddle version that supports Python3.11
- moves to a newer OpenCV version that supports Python3.11
- fixes deprecated the usage of inspect.getargspec on nose

Signed-off-by: Janusz Lisiecki <jlisiecki@nvidia.com>
@dali-automaton
Copy link
Collaborator

CI MESSAGE: [11011153]: BUILD PASSED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [11016116]: BUILD STARTED

@@ -45,7 +45,7 @@ def assert_stmt(expression1, expression2):
"""
if not callable(expression2):
raise ValueError('{} must be a callable'.format(expression2))
args, _, keywords, _ = inspect.getargspec(expression2)
args, _, keywords, _, _, _, _ = inspect.getfullargspec(expression2)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe:

Suggested change
args, _, keywords, _, _, _, _ = inspect.getfullargspec(expression2)
args, _, keywords, *_ = inspect.getfullargspec(expression2)

?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Signed-off-by: Janusz Lisiecki <jlisiecki@nvidia.com>
if sys.version_info >= (3, 10) and not hasattr(collections, "Callable"):
nose.case.collections = collections.abc
nose.inspector.collections = collections.abc
nose.loader.collections = collections.abc
nose.suite.collections = collections.abc
nose.plugins.attrib.collections = collections.abc
if sys.version_info >= (3, 11):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Total nitpick: some empty lines to separate those rather unrelated workarounds.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Signed-off-by: Janusz Lisiecki <jlisiecki@nvidia.com>
@dali-automaton
Copy link
Collaborator

CI MESSAGE: [11018266]: BUILD STARTED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [11016116]: BUILD PASSED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [11018266]: BUILD FAILED

@JanuszL JanuszL merged commit 8318b0b into NVIDIA:main Nov 27, 2023
3 of 4 checks passed
@JanuszL JanuszL deleted the fix_python3.11 branch November 27, 2023 08:36
@JanuszL JanuszL mentioned this pull request Nov 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants