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

python 2 support? #4

Closed
ignatenkobrain opened this issue Jul 7, 2016 · 9 comments
Closed

python 2 support? #4

ignatenkobrain opened this issue Jul 7, 2016 · 9 comments

Comments

@ignatenkobrain
Copy link

Hi, I'm not sure if multidict has python2 support, at least there are some compatibility problems like FileNotFoundError is not in py2 and yield from is not valid construction in py2.

@asvetlov
Copy link
Member

asvetlov commented Jul 7, 2016

Technically it may be Python 2 compatible but I see no reason to do it.
All my usage is Python 3 only.
Even Django will drop python 2 support next year with Django 2.0 release :)

@ignatenkobrain
Copy link
Author

@asvetlov honestly I don't care, was just wondering if it's just broken ;)

@denis-trofimov
Copy link

Broken in python 2.7 virtualenv.

(py27) denis@ra:~/p$ python
Python 2.7.13 (default, Jan 19 2017, 14:48:08) 
[GCC 6.3.0 20170118] on linux2

(py27) denis@ra:~/p$ sudo -H pip install multidict
Collecting multidict
  Downloading multidict-3.2.0.tar.gz
Building wheels for collected packages: multidict
  Running setup.py bdist_wheel for multidict ... error
  Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-YtkVSv/multidict/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmp0gUvUZpip-wheel- --python-tag cp27:
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-2.7
  creating build/lib.linux-x86_64-2.7/multidict
  copying multidict/_multidict_py.py -> build/lib.linux-x86_64-2.7/multidict
  copying multidict/__init__.py -> build/lib.linux-x86_64-2.7/multidict
  running egg_info
  writing multidict.egg-info/PKG-INFO
  writing top-level names to multidict.egg-info/top_level.txt
  writing dependency_links to multidict.egg-info/dependency_links.txt
  reading manifest file 'multidict.egg-info/SOURCES.txt'
  reading manifest template 'MANIFEST.in'
  warning: no previously-included files matching '*.pyc' found anywhere in distribution
  warning: no previously-included files found matching 'multidict/_multidict.html'
  warning: no previously-included files found matching 'multidict/_multidict.*.so'
  warning: no previously-included files found matching 'multidict/_multidict.pyd'
  warning: no previously-included files found matching 'multidict/_multidict.*.pyd'
  no previously-included directories found matching 'docs/_build'
  writing manifest file 'multidict.egg-info/SOURCES.txt'
  copying multidict/__init__.pyi -> build/lib.linux-x86_64-2.7/multidict
  copying multidict/_istr.c -> build/lib.linux-x86_64-2.7/multidict
  copying multidict/_multidict.pyx -> build/lib.linux-x86_64-2.7/multidict
  running build_ext
  building 'multidict._multidict' extension
  creating build/temp.linux-x86_64-2.7
  creating build/temp.linux-x86_64-2.7/multidict
  x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-ZZaKJ6/python2.7-2.7.13=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c multidict/_multidict.c -o build/temp.linux-x86_64-2.7/multidict/_multidict.o
  x86_64-linux-gnu-gcc: error: multidict/_multidict.c: Нет такого файла или каталога
  x86_64-linux-gnu-gcc: fatal error: no input files
  compilation terminated.
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/tmp/pip-build-YtkVSv/multidict/setup.py", line 107, in <module>
      setup(**args)
    File "/usr/lib/python2.7/distutils/core.py", line 151, in setup
      dist.run_commands()
    File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
      self.run_command(cmd)
    File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
      cmd_obj.run()
    File "/usr/lib/python2.7/dist-packages/wheel/bdist_wheel.py", line 179, in run
      self.run_command('build')
    File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command
      self.distribution.run_command(command)
    File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
      cmd_obj.run()
    File "/usr/lib/python2.7/distutils/command/build.py", line 128, in run
      self.run_command(cmd_name)
    File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command
      self.distribution.run_command(command)
    File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
      cmd_obj.run()
    File "/tmp/pip-build-YtkVSv/multidict/setup.py", line 44, in run
      except (DistutilsPlatformError, FileNotFoundError):
  NameError: global name 'FileNotFoundError' is not defined
  
  ----------------------------------------
  Failed building wheel for multidict
  Running setup.py clean for multidict
Failed to build multidict
Installing collected packages: multidict
  Running setup.py install for multidict ... error
    Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-YtkVSv/multidict/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-9tzZCk-record/install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-2.7
    creating build/lib.linux-x86_64-2.7/multidict
    copying multidict/_multidict_py.py -> build/lib.linux-x86_64-2.7/multidict
    copying multidict/__init__.py -> build/lib.linux-x86_64-2.7/multidict
    running egg_info
    writing multidict.egg-info/PKG-INFO
    writing top-level names to multidict.egg-info/top_level.txt
    writing dependency_links to multidict.egg-info/dependency_links.txt
    reading manifest file 'multidict.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    warning: no previously-included files matching '*.pyc' found anywhere in distribution
    warning: no previously-included files found matching 'multidict/_multidict.html'
    warning: no previously-included files found matching 'multidict/_multidict.*.so'
    warning: no previously-included files found matching 'multidict/_multidict.pyd'
    warning: no previously-included files found matching 'multidict/_multidict.*.pyd'
    no previously-included directories found matching 'docs/_build'
    writing manifest file 'multidict.egg-info/SOURCES.txt'
    copying multidict/__init__.pyi -> build/lib.linux-x86_64-2.7/multidict
    copying multidict/_istr.c -> build/lib.linux-x86_64-2.7/multidict
    copying multidict/_multidict.pyx -> build/lib.linux-x86_64-2.7/multidict
    running build_ext
    building 'multidict._multidict' extension
    creating build/temp.linux-x86_64-2.7
    creating build/temp.linux-x86_64-2.7/multidict
    x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-ZZaKJ6/python2.7-2.7.13=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c multidict/_multidict.c -o build/temp.linux-x86_64-2.7/multidict/_multidict.o
    x86_64-linux-gnu-gcc: error: multidict/_multidict.c: Нет такого файла или каталога
    x86_64-linux-gnu-gcc: fatal error: no input files
    compilation terminated.
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-YtkVSv/multidict/setup.py", line 107, in <module>
        setup(**args)
      File "/usr/lib/python2.7/distutils/core.py", line 151, in setup
        dist.run_commands()
      File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
        self.run_command(cmd)
      File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
        cmd_obj.run()
      File "/usr/lib/python2.7/dist-packages/setuptools/command/install.py", line 61, in run
        return orig.install.run(self)
      File "/usr/lib/python2.7/distutils/command/install.py", line 601, in run
        self.run_command('build')
      File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command
        self.distribution.run_command(command)
      File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
        cmd_obj.run()
      File "/usr/lib/python2.7/distutils/command/build.py", line 128, in run
        self.run_command(cmd_name)
      File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command
        self.distribution.run_command(command)
      File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
        cmd_obj.run()
      File "/tmp/pip-build-YtkVSv/multidict/setup.py", line 44, in run
        except (DistutilsPlatformError, FileNotFoundError):
    NameError: global name 'FileNotFoundError' is not defined
    
    ----------------------------------------
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-YtkVSv/multidict/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-9tzZCk-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-YtkVSv/multidict/

@asvetlov
Copy link
Member

multidict never supported python 2.7

@denis-trofimov
Copy link

denis-trofimov commented Sep 21, 2017

Thank you for your replies. @asvetlov @webknjaz
@asvetlov

Technically it may be Python 2 compatible but I see no reason to do it.

As I report, it is not for sure.

@webknjaz

https://github.com/aio-libs/multidict/blob/f68edd3/setup.py#L89-L92

Can you please update the Readme? Is it sounds reasonable?

@asvetlov
Copy link
Member

What kind of update do you propose? Making a Pull Request would be nice.

@webknjaz
Copy link
Member

There's a nice badge which shows supported versions based on the Trove classifiers, I'd just add it.

@asvetlov
Copy link
Member

Cool!

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

4 participants