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

collections deprecation #10

Closed
dbrw opened this issue May 27, 2023 · 1 comment
Closed

collections deprecation #10

dbrw opened this issue May 27, 2023 · 1 comment

Comments

@dbrw
Copy link

dbrw commented May 27, 2023

Please be wary of collections deprecation in python 3.9, I've been hit by this. I got the error using python 3.11:

❯ ./deploy.sh
Traceback (most recent call last):
  File "/home/dim/.local/bin/docker-sdp", line 4, in <module>
    deployer.main()
  File "/home/dim/.local/lib/python3.11/site-packages/docker_stack_deploy/cli/deployer.py", line 281, in main
    docker_stack_deploy()
  File "/home/dim/.local/lib/python3.11/site-packages/docker_stack_deploy/cli/deployer.py", line 204, in docker_stack_deploy
    augmented_services = augment_services(
                         ^^^^^^^^^^^^^^^^^
  File "/home/dim/.local/lib/python3.11/site-packages/docker_stack_deploy/cli/deployer.py", line 112, in augment_services
    if not isinstance(elem, collections.Mapping):
                            ^^^^^^^^^^^^^^^^^^^
AttributeError: module 'collections' has no attribute 'Mapping'

This is the deprecation page: https://docs.python.org/3.9/library/collections.html#module-collections

For now, I just change import collections to import collections.abc as collections in this line:

@s4ke
Copy link
Member

s4ke commented May 27, 2023

should be in 0.2.11

@s4ke s4ke closed this as completed May 27, 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

No branches or pull requests

2 participants