aigeano / pympler

Automatically exported from code.google.com/p/pympler
Apache License 2.0
0 stars 0 forks source link

Imports fail when python interpreter is run with optimization #47

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
$> python -OO
Python 2.7.3 (v2.7.3:70274d53c1dd, Apr  9 2012, 20:52:43) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from pympler.classtracker import ClassTracker
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/kparmar/.virtualenvs/sync/lib/python2.7/site-packages/pympler/classtracker.py", line 14, in <module>
    from pympler.classtracker_stats import ConsoleStats
  File "/Users/kparmar/.virtualenvs/sync/lib/python2.7/site-packages/pympler/classtracker_stats.py", line 7, in <module>
    from pympler.util.compat import pickle
  File "/Users/kparmar/.virtualenvs/sync/lib/python2.7/site-packages/pympler/util/compat.py", line 43, in <module>
    import pympler.util.bottle2 as bottle
  File "/Users/kparmar/.virtualenvs/sync/lib/python2.7/site-packages/pympler/util/bottle2.py", line 1090, in <module>
    post.__doc__ = route.__doc__.replace('GET','POST')
AttributeError: 'NoneType' object has no attribute 'replace'

What is the expected output? What do you see instead?
No errors.

What version of the product are you using? On what operating system?
Pympler v 0.2.1
Mac OS X v 10.8.2

Fix attached.

Original issue reported on code.google.com by kunalpar...@gmail.com on 16 Oct 2012 at 2:24

Attachments:

GoogleCodeExporter commented 9 years ago
Haven't seen any progress on this. Is there more information needed?

Original comment by kunalpar...@gmail.com on 18 Nov 2012 at 2:16

GoogleCodeExporter commented 9 years ago
Thanks for the report and fix. 

I'll try to upgrade bottle.py as that might already fix the problem. 

Sorry I missed your original bug report. I'm currently moving Pympler over to 
Github to make it easier for others to participate and for us to track and 
integrate contributions: https://github.com/pympler/pympler

Original comment by lhae...@gmail.com on 22 Nov 2012 at 10:20

GoogleCodeExporter commented 9 years ago
Fixed in Pympler 0.2.2.

Could you confirm whether it does solve the problem on your end?

Thanks

Original comment by lhae...@gmail.com on 24 Nov 2012 at 4:27

GoogleCodeExporter commented 9 years ago
Yes, the issue is fixed now. Thank you!

Original comment by kunalpar...@gmail.com on 24 Nov 2012 at 9:28