timothycrosley / deprecated.pies

The simplest (and tastiest) way to write one program that runs on both Python 2 and Python 3.
MIT License
148 stars 7 forks source link

Please stop using pies2overrides #19

Closed douglarek closed 10 years ago

douglarek commented 10 years ago

If you have used tox, maybe you will not develop pies2overrides. It is evil to virtualenv.

When I use it in tox.ini:

envlist = py27, py33, py34

It occured this:

Traceback (most recent call last):
  File "/home/lingchax/.pyenv/versions/2.7.6/lib/python2.7/site-packages/virtualenv.py", line 43, in <module>
    import configparser as ConfigParser
  File "/home/lingchax/.pyenv/versions/2.7.6/lib/python2.7/site-packages/configparser.py", line 3, in <module>
    from ConfigParser import *
ImportError: No module named 'ConfigParser'
Running virtualenv with interpreter /home/lingchax/.pyenv/shims/python3.3

and also:

Traceback (most recent call last):
  File "/home/lingchax/.pyenv/versions/2.7.6/lib/python2.7/site-packages/virtualenv.py", line 8, in <module>
    import base64
  File "/home/lingchax/.pyenv/versions/3.4.0rc1/lib/python3.4/base64.py", line 9, in <module>
    import re
  File "/home/lingchax/.pyenv/versions/3.4.0rc1/lib/python3.4/re.py", line 324, in <module>
    import copyreg
  File "/home/lingchax/.pyenv/versions/2.7.6/lib/python2.7/site-packages/copyreg.py", line 3, in <module>
    from copy_reg import *
ImportError: No module named 'copy_reg'
Running virtualenv with interpreter /home/lingchax/.pyenv/shims/python3.4
douglarek commented 10 years ago

Please use py2 and py3 judgement instead of overriding.

timothycrosley commented 10 years ago

@douglarek, I agree that this is an issue, and I appreciate your feed back. That said, I do not want to use py2 / py3 judgement as the lack of a need for this is indeed the reason pies exists: pies does the judgement so individual projects don't have to. That said, I will be thinking of a good technical solution for this, that still enables nice clean Python 3 code to work on Python 2, without said logic.

Thanks!

Timothy

douglarek commented 10 years ago

@timothycrosley thanks for your reply, expect a better technical solution.

douglarek commented 10 years ago

@msabramo thanks, I will have a test when i have time.