[issue46354] AttributeError: module 'collections' has no attribute 'Mapping'

2022-01-12 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

Hi mareklachbc,

What makes you think that this is a bug? 

Since at least version 3.7, you will have seen this warning:


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


So this is not a bug.

--
nosy: +steven.daprano
stage:  -> resolved
status: pending -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46354] AttributeError: module 'collections' has no attribute 'Mapping'

2022-01-12 Thread Alex Waygood


New submission from Alex Waygood :

Hi -- thanks for the report! You haven't given us many details here, but I 
think this is intentional behaviour, not a bug -- this was changed in 
Issue37324. Importing `Mapping` (along with many other names) directly from 
`collections`, instead of from `collections.abc`, has been deprecated since 
Python 3.3, and was removed in Python 3.10. So instead of writing `from 
collections import Mapping`, simply write `from collections.abc import 
Mapping`, and you should find that no error is raised.

--
nosy: +AlexWaygood
resolution:  -> not a bug
status: open -> pending

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46354] AttributeError: module 'collections' has no attribute 'Mapping'

2022-01-12 Thread Marek Ľach

Change by Marek Ľach :


--
nosy: mareklachbc
priority: normal
severity: normal
status: open
title: AttributeError: module 'collections' has no attribute 'Mapping'
type: behavior
versions: Python 3.10

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com