collections.ChainMap not support in Python2
See original GitHub issueI am using Python 2.7.13, when try to use pysnooper.snoop decorator, meet the AttributeError exception, the reason is collections.ChainMap
is used in tracer.py, which is not supported in Python2.x.
code is here: https://github.com/cool-RR/PySnooper/blob/master/pysnooper/tracer.py#L27
hoping PySnooper is fully compatible with python2
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Python's ChainMap: Manage Multiple Contexts Effectively
Python's ChainMap from the collections module provides an efficient tool for managing several dictionaries as a single one. This class is handy when...
Read more >why can I not import the Chainmap module in python [closed]
I'm using python 3.6 and I have successfully imported from the collections such modules as deque and counter but I cannot import Chainmap....
Read more >collections — Container datatypes — Python 3.11.1 ...
A ChainMap groups multiple dicts or other mappings together to create a single, updateable view. If no maps are specified, a single empty...
Read more >Collections ChainMaps in Python: Complete Guide - Datagy
The Python collections module provides Python's implementations of chain maps with the ChainMaps class. This allows you to implement ...
Read more >ChainMap in Python - GeeksforGeeks
Python contains a container called “ChainMap” which encapsulates many dictionaries into one unit. ChainMap is member of module “collections“ ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
from ConfigParser import _Chainmap as ChainMap
works fine in 2.7.unfortunately even after upgrading via pip (tested it just now) i still got:
however this works in tracer.py but requires the chainmap pip package 😕