[08:19:30] <spaceSub> I know I asked this before, but I can't get it done. I have a wheezy with python 3.2. I used pip to install virtualenv with pip-3.2. In my virtualenv I also have an pytjon 3.2 now. Can I upgrade to//install python 3.4? Can you walk me through?
[08:25:15] <spaceSub> I expected I could just make pip install it, but 'pip install python==3.4' does not find it.
[08:25:35] <mgedmin> no, pip cannot install a python for you
[08:26:36] <mgedmin> you'll need to find a Debian repository with python 3.4 (maybe use packages from jessie) or something like https://github.com/yyuu/pyenv
[08:29:16] <spaceSub> Okay, another one. Does pypi packages have metainformation about what the oldest python version is, they work with? Is there an option for pip install to only install compatible stuff?
[08:37:53] <mgedmin> to clarify, packages can declare supported python versions, e.g. see "Programming Language :: Python :: x.y" in https://pypi.python.org/pypi/objgraph
[08:38:05] <mgedmin> but pip at the moment goes for the latest version always
[08:38:27] <mgedmin> you have to manually specify constraints if a package X dropped support for the version you're on
[08:41:22] <mgedmin> hm, I thought there might be a bug open about pip downloading incompatible packages, but I can't find one at https://github.com/pypa/pip/issues
[08:41:48] <mgedmin> oh well, the current HTTP API that pip install uses doesn't expose that information anyway
[08:42:38] <apollo13> it's just metadata, the only thing pip can care about is the filename
[08:43:30] <spaceSub> Yeah, I figgured. I am stuck on wheezy and need to work with ipaddresses. I used the ipaddress module in 2.7 before, but that was ported and merged into 3.3 so I can't use that. Then I tried ipaddr but that also has only versions on pypi compatible with 3.3 or 2.X. What a paint in the bum.
[08:44:27] <spaceSub> I think I might just go with getting python 3.4 from somewhere..
[09:11:53] <spaceSub> Bleh, this sucks shit through ten bricks.
[12:49:50] <flupke> Hi, I can't build wheels for unittest2 since 0.6.0, because of a weird bug related to the way they define the version number (it's a custom class with __str__ now...), anyone found a workaround?
[12:50:58] <flupke> I see wheels for unittest2 on pypi, but I don't know how to build it myself
[12:52:22] <flupke> Oh, just have to add a sdist before bdist_wheel... (found in their Makefile)
[13:01:00] <mgedmin> not that I haven't done Bad Things in setup.py's myself *cough* https://github.com/mgedmin/zodbbrowser/blob/master/setup.py#L17
[13:08:52] <flupke> Now I have to figure out how to do this with pip...
[13:16:46] <flupke> Also pip does not set its return code to nonzero when setup.py fails
[13:20:15] <DanielHolth> doesn't the git version of pip do that by now?
[13:50:11] <flupke> In case you're wondering why I bother building wheels for packages that already offer wheels, this is for my requirements freezing tool: https://github.com/Stupeflix/freeze-requirements
[14:33:28] <cdunklau> hola, i'm trying to figure out what the right solution to #2091 would be...
[14:35:02] <cdunklau> dstufft appears to have added the IncompleteRead import to deal with a content-encoding thing... but requests doesn't have IncompleteRead imported in requests.compat anymore
[14:48:22] <mgedmin> well, that's a pretty clear debian bug
[14:48:38] <cdunklau> mgedmin: basically, pip broke with the importerror described after i upgraded. because i had requests 2.4.3 installed in the user site
[14:48:52] <mgedmin> looks like https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=744145
[14:50:17] <mgedmin> so debian's requests 2.4.3 is patched to provide that compat import
[14:50:26] <mgedmin> but you had a genuine upstream requests in your virtualenv?
[14:50:55] <cdunklau> mgedmin: i had a genuine upstream requests in the user site
[15:02:43] <cdunklau> that's my virtualenv version. yeah probably yet another debian thing
[15:03:02] <mgedmin> anyway, your paste has no errors (other than the error of importing requests before you pip install it, which is expected, I'd say)
[15:04:38] <cdunklau> mgedmin: right, i'm just trying to reason why the virtualenv's pip works after installing requests 2.4.3
[15:05:53] <mgedmin> peek inside the venv, see if its lib/pythonX.Y/site-packages/pip has a vendored requests?
[15:17:53] <cdunklau> mgedmin: so somehow the virtualenv's pip is importing requests 2.3.0 /home/cdunklau/venv/lib/python-wheels/requests-2.3.0-py2.py3-none-any.whl/requests/__init__.py
[15:18:30] <mgedmin> perhaps debian's patched pip adds the .whl to sys.path directly
[15:18:49] <mgedmin> wheels are zip files; python can import (python-only) stuff from them -- if you add each .whl into sys.path
[15:19:26] <mgedmin> they're not meant to be used that way (in the sense that things like C extension modules or python code that uses os.path.dirname(__file__) to locate data files will break)
[15:19:31] <mgedmin> but some wheels can be used that way
[15:27:09] <mgedmin> if the original reported did something like 'sudo pip3 install -U requests', well
[15:27:15] <cdunklau> mgedmin: now i just know to not trust debian. because they apparently only did that to support virtualenvs, and didn't know/care about the user site: https://bpaste.net/show/3c39ed2e718a
[15:27:33] <mgedmin> you keep talking about the user site, and I don't understand how it enters the picture
[15:28:08] <mgedmin> if I used Debian, I'd file a debian bug about this
[15:28:13] <cdunklau> it _still_ breaks when requests is installed in the user site, so apparently the sys.path hacks to get the wheel it wants available don't happen when it's running outside of virtualenv
[15:33:24] <cdunklau> mgedmin: anyway, thanks again :)
[15:34:16] <cdunklau> mgedmin: sure, sure, i understand why debian would disallow vendored packages
[15:34:24] <mgedmin> "let's not have multiple copies of the same library" sounds like a principle I can get behind -- iff you also take care to manage version incompatibilities across the whole archive
[15:35:02] <mgedmin> so I never tried pip install --user
[15:35:17] <mgedmin> if you did a pip install --user -U pip, would it work? would it put a binary in ~/bin? ~/.local/bin?
[15:36:04] <cdunklau> and vendoring lets an upstream team deal with said incompatibilities their own way... but it makes it harder on downstream maintainers when upstream doesn't fix things in a timely fashion
[15:38:04] <cdunklau> mgedmin: needs a --force too