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

added collections.abc import #36

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jbalchan
Copy link

@jbalchan jbalchan commented Jul 9, 2020

This is to fix this issue
#35

@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
from __future__ import absolute_import, print_function, unicode_literals
import collections
import collections.abc

Choose a reason for hiding this comment

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

The library still support Python 2. Mapping is available through collections. So the fix would be to import Mapping from collections on Python 2 and collections.abc to be used for Python 3 as mentioned in the bug ticket.

try:
    # try collections.abc for Python 3.4+
    from collections.abc import Mapping
except ImportError:
    # fallback to collections for Python 2 compatibility.
    from collections import Maping

six already supports this move as from six.moves.collections_abc import Mapping from benjaminp/six@0dc54ea (six 1.13.0)

Copy link
Author

Choose a reason for hiding this comment

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

Thank you.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 180434f on shreeju:Fix-deprecated-warnings-Importing-ABC-directly-from-collections into f8af888 on miki725:master.

@johncrisostomo
Copy link

I just saw this deprecation notice now, I hope this gets merged

@blaisegarant
Copy link

Deprecation was changed to python 3.9 which came out last week. This PR is simple but still more than 3 months old. Given no changes were made to this project in the last year, anyone else think this project is no longer supported?

@perbu
Copy link

perbu commented Oct 20, 2020

Any word on this? I really like alchemy-mock and would love to keep using it.

@GvandeSteeg
Copy link

Bumping almost 2 years later, my team is exclusively on 3.10 now and we can't use alchemy-mock like this

@jtruty
Copy link

jtruty commented Oct 18, 2022

another bump

@jeswils-ap
Copy link

On Python 3.11 now, bypassing the issue by updating the local package, but would be great to get this merged.

@GvandeSteeg
Copy link

GvandeSteeg commented Mar 22, 2023

I've switched to mock-alchemy as mentioned in !40

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.

9 participants