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

Avoid deprecated import via collections.abc.Mapping #148

Closed

Conversation

lorenzwalthert
Copy link

@lorenzwalthert lorenzwalthert commented Sep 26, 2022

Issue #, if available:

Partly fixes #129 by removing most obvious problem (my training script ran afterwards, but this is no guarantee).

Description of changes:

Since Python 3.3 (over 10 years ago), the following is deprecated: from collections import Mapping. In Python 3.9:

<stdin>:1: DeprecationWarning: Using or importing the ABCs
  from 'collections' instead of from 'collections.abc' is deprecated
  since Python 3.3, and in 3.10 it will stop working

This PR replaces the offending statement as advised in the warning message.

Testing done:

Merge Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your pull request.

General

  • I have read the CONTRIBUTING doc
  • I used the commit message format described in CONTRIBUTING
  • I have used the regional endpoint when creating S3 and/or STS clients (if appropriate)
  • I have updated any necessary documentation, including READMEs

Tests

  • I have added tests that prove my fix is effective or that my feature works (if appropriate)
  • I have checked that my tests are not configured for a specific region or account (if appropriate)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@lorenzwalthert
Copy link
Author

lorenzwalthert commented Oct 22, 2022

@vishwakaria can you please have a look? This fixes a 10 (!) year old depreciation warning and is a trivial change.

@vishwakaria
Copy link
Contributor

vishwakaria commented Oct 24, 2022

@vishwakaria can you please have a look? This fixes a 10 (!) year old depreciation warning and is a trivial change.

Adding package owner @satishpasumarthi to review.

@satishpasumarthi
Copy link
Collaborator

Addressed this in #156

@lorenzwalthert lorenzwalthert deleted the deprecated-collections-mapping branch November 30, 2022 15:48
@lorenzwalthert
Copy link
Author

Thanks @satishpasumarthi. I do understand that it's sometimes easier to fix things yourself, but in general I feel like AWS could try to adhere a bit more to open-source culture and try to let people also commit to their repos 🙃

@satishpasumarthi
Copy link
Collaborator

Hi @lorenzwalthert , We are in the process of adding extra layer of security when the PR contributions are coming from away contributors. As of now, we are in the middle of the transition. We will be opening up the PR contributions from non-aws contributors very soon. sorry for any inconvenience.

@lorenzwalthert lorenzwalthert restored the deprecated-collections-mapping branch December 5, 2022 17:11
@lorenzwalthert lorenzwalthert deleted the deprecated-collections-mapping branch May 5, 2024 18:57
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.

No support for Python 3.10
3 participants