askeing / python-progressbar

Automatically exported from code.google.com/p/python-progressbar
Other
0 stars 0 forks source link

Cannot install with pip #42

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
pip3 install progressbar

Collecting progressbar
  Using cached progressbar-2.3.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 20, in <module>
      File "/private/var/folders/w_/6ddpl57d1hx5m1m_nbhwd3qw0000gn/T/pip-build-3lzw6hbv/progressbar/setup.py", line 5, in <module>
        import progressbar
      File "/private/var/folders/w_/6ddpl57d1hx5m1m_nbhwd3qw0000gn/T/pip-build-3lzw6hbv/progressbar/progressbar/__init__.py", line 59, in <module>
        from progressbar.widgets import *
      File "/private/var/folders/w_/6ddpl57d1hx5m1m_nbhwd3qw0000gn/T/pip-build-3lzw6hbv/progressbar/progressbar/widgets.py", line 121, in <module>
        class FileTransferSpeed(Widget):
      File "/Users/mortenb/Downloads/test/env/bin/../lib/python3.4/abc.py", line 133, in __new__
        cls = super().__new__(mcls, name, bases, namespace)
    ValueError: 'format' in __slots__ conflicts with class variable

    ----------------------------------------
    Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/w_/6ddpl57d1hx5m1m_nbhwd3qw0000gn/T/pip-build-3lzw6hbv/progressbar

Original issue reported on code.google.com by mort...@gmail.com on 11 Apr 2015 at 11:16

GoogleCodeExporter commented 9 years ago
This is a straight up Python 3 bug: 
https://docs.python.org/3/reference/datamodel.html?highlight=__slots__#object.__
slots__

"__slots__ are implemented at the class level by creating descriptors 
(Implementing Descriptors) for each variable name. As a result, class 
attributes cannot be used to set default values for instance variables defined 
by __slots__; otherwise, the class attribute would overwrite the descriptor 
assignment."

The fix should be easy; assign default values in the __init__() instead of 
class variable.

Original comment by war...@gmail.com on 1 Jun 2015 at 10:30

GoogleCodeExporter commented 9 years ago
Looks like this is already fixed in their upstream, but not yet released.

Original comment by war...@gmail.com on 1 Jun 2015 at 10:34

GoogleCodeExporter commented 9 years ago
Yes, it was fixed on 
https://code.google.com/p/python-progressbar/source/detail?spec=svn235f632a9c86d
7a84c607151d5127652102549ab&r=3c94a3a1ebe1325c7c605cc8f11126dcc632b04d

I thought this was included in the 2.3 release. I'll probably have to do 
another release, then

Original comment by nilton.v...@gmail.com on 2 Jun 2015 at 12:21