[Distutils] easy_install doesn't work when there are multiple Content-Length headers
Hi all, Just today I'm using easy_install to install mechanize and it is failing with the error ValueError: invalid literal for int() with base 10: '382727, 382727'. By reading the source code and looking at the headers I see that the server is returning 2 Content-Length headers (same value, 382727), which is turned into '382727, 382727'. Fixing this should be very easy and I can do it then submit a patch. I'm just wondering, as distutils seem to be in a forking process, what's the best way to solve this? Hoàng Xuân Phú ___ Distutils-SIG maillist - Distutils-SIG@python.org http://mail.python.org/mailman/listinfo/distutils-sig
Re: [Distutils] easy_install doesn't work when there are multiple Content-Length headers
On Mon, Mar 28, 2011 at 11:08 AM, Hoang Xuan Phu phuneh...@gmail.com wrote: Just today I'm using easy_install to install mechanize and it is failing with the error ValueError: invalid literal for int() with base 10: '382727, 382727'. By reading the source code and looking at the headers I see that the server is returning 2 Content-Length headers (same value, 382727), which is turned into '382727, 382727'. Fixing this should be very easy and I can do it then submit a patch. I'm just wondering, as distutils seem to be in a forking process, what's the best way to solve this? This is a problem with httplib, which should be resilient to this situation. I've already filed a bug against SourceForge, for generating an extra (useless) header, but it's only vaguely a bug. -Fred -- Fred L. Drake, Jr. fdrake at acm.org A storm broke loose in my mind. --Albert Einstein ___ Distutils-SIG maillist - Distutils-SIG@python.org http://mail.python.org/mailman/listinfo/distutils-sig
Re: [Distutils] easy_install doesn't work when there are multiple Content-Length headers
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 03/28/2011 11:08 AM, Hoang Xuan Phu wrote: Hi all, Just today I'm using easy_install to install mechanize and it is failing with the error ValueError: invalid literal for int() with base 10: '382727, 382727'. By reading the source code and looking at the headers I see that the server is returning 2 Content-Length headers (same value, 382727), which is turned into '382727, 382727'. Fixing this should be very easy and I can do it then submit a patch. I'm just wondering, as distutils seem to be in a forking process, what's the best way to solve this? I reported this SF bug: http://sourceforge.net/apps/trac/sourceforge/ticket/18486 PJE has checked in my patch working around this bug. See issue 123: http://bugs.python.org/setuptools/issue123 Tres. - -- === Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software Excellence by Designhttp://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk2QvEMACgkQ+gerLs4ltQ6M8ACdEjNaxg1w3M2jCc0JuqfAJeLa SG8AoLOfZdbIpvDwrgvidOk4g72i61zU =ZoDQ -END PGP SIGNATURE- ___ Distutils-SIG maillist - Distutils-SIG@python.org http://mail.python.org/mailman/listinfo/distutils-sig
Re: [Distutils] easy_install doesn't work when there are multiple Content-Length headers
At 10:08 PM 3/28/2011 +0700, Hoang Xuan Phu wrote: Hi all, Just today I'm using easy_install to install mechanize and it is failing with the error ValueError: invalid literal for int() with base 10: '382727, 382727'. By reading the source code and looking at the headers I see that the server is returning 2 Content-Length headers (same value, 382727), which is turned into '382727, 382727'. Fixing this should be very easy and I can do it then submit a patch. I'm just wondering, as distutils seem to be in a forking process, what's the best way to solve this? easy_install -U setuptools will update you to a version that fixes this, as I've already checked in a fix. ___ Distutils-SIG maillist - Distutils-SIG@python.org http://mail.python.org/mailman/listinfo/distutils-sig
Re: [Distutils] easy_install doesn't work when there are multiple Content-Length headers
Thanks a lot P.J. Eby It's great that things get fixed! Hoàng Xuân Phú On Tue, Mar 29, 2011 at 12:58 AM, P.J. Eby p...@telecommunity.com wrote: At 10:08 PM 3/28/2011 +0700, Hoang Xuan Phu wrote: Hi all, Just today I'm using easy_install to install mechanize and it is failing with the error ValueError: invalid literal for int() with base 10: '382727, 382727'. By reading the source code and looking at the headers I see that the server is returning 2 Content-Length headers (same value, 382727), which is turned into '382727, 382727'. Fixing this should be very easy and I can do it then submit a patch. I'm just wondering, as distutils seem to be in a forking process, what's the best way to solve this? easy_install -U setuptools will update you to a version that fixes this, as I've already checked in a fix. ___ Distutils-SIG maillist - Distutils-SIG@python.org http://mail.python.org/mailman/listinfo/distutils-sig