Skip to content

[Fix] browse_dataset.py not working in python3.10#533

Merged
RangiLyu merged 1 commit intoopen-mmlab:dev-1.xfrom
k-papadakis:fix/browse-dataset
Oct 11, 2022
Merged

[Fix] browse_dataset.py not working in python3.10#533
RangiLyu merged 1 commit intoopen-mmlab:dev-1.xfrom
k-papadakis:fix/browse-dataset

Conversation

@k-papadakis
Copy link

ABCs were moved from collections to collections.abc in 3.3. Since 3.10, ABCs cannot be imported directly from collections.

Motivation

Please describe the motivation of this PR and the goal you want to achieve through this PR.

The script does not work with Python 3.10. The reason is that the abstract base classes in the collections module were moved to collections.abc in Python 3.3. Until 3.9, importing an abstract base class from collections produced a deprecation warning, and in 3.10 it produces an error.

Modification

Please briefly describe what modification is made in this PR.

If version < 3.3 import from collections else import from collections.abc.

ABCs were moved from collections to collections.abc in 3.3.
Since 3.10, ABCs cannot be imported directly from collections.
@k-papadakis k-papadakis changed the base branch from main to dev-1.x September 29, 2022 16:59
@k-papadakis k-papadakis changed the title Fix: collections import error for python3.10 [Fix] browse_dataset.py not working in python3.10 Sep 29, 2022
Copy link
Collaborator

@zytx121 zytx121 left a comment

Choose a reason for hiding this comment

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

LGTM

@RangiLyu RangiLyu merged commit c0b21cd into open-mmlab:dev-1.x Oct 11, 2022
@OpenMMLab-Assistant005
Copy link

Hi @k-papadakis !First of all, we want to express our gratitude for your significant PR in the MMRotate project. Your contribution is highly appreciated, and we are grateful for your efforts in helping improve this open-source project during your personal time. We believe that many developers will benefit from your PR.

We would also like to invite you to join our Special Interest Group (SIG) private channel on Discord, where you can share your experiences, ideas, and build connections with like-minded peers. To join the SIG channel, simply message moderator— OpenMMLab on Discord or briefly share your open-source contributions in the #introductions channel and we will assist you. Look forward to seeing you there! Join us :https://discord.gg/raweFPmdzG

If you have WeChat account,welcome to join our community on WeChat. You can add our assistant :openmmlabwx. Please add "mmsig + Github ID" as a remark when adding friends:)
Thank you again for your contribution❤

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