Re: What killed Smalltalk could kill Python

2015-02-08 Thread Chris Angelico
On Sun, Feb 8, 2015 at 6:59 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: If a professional games company has their coders writing the plot and designing the graphics, they deserve to fail. (Well, that's a bit harsh... there's still room in the world for small indy companies,

Re: Python is DOOMED! Again!

2015-02-08 Thread Ian Kelly
On Sat, Feb 7, 2015 at 5:45 PM, Albert van der Horst alb...@spenarnc.xs4all.nl wrote: It is too bad `` - '' as a token is now taken. I wanted to propose to replace the ternary syntax lambda .. : .. by a regular operator .. - .. then we could have x - x**2 instead of lambda x : x**2

[issue23408] Pickle tests use incorrect test data

2015-02-08 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Pickle tests use incorrect test data for protocols 0-2. This data is not compatible with Python 2 because refers to Python 3 modules builtins and copyreg (instead of __builtin__ and copy_reg). Proposed patch fixes this (data was regenerated by

[issue17896] Move Windows external libs from src\..\ to src\externals

2015-02-08 Thread Martin v . Löwis
Martin v. Löwis added the comment: I noticed this issue today when trying to make the 3.4.3rc1 build; this broke Tools/msi.py, which fails to find the license files and the tcltk files. -- ___ Python tracker rep...@bugs.python.org

Re: Python is DOOMED! Again!

2015-02-08 Thread Marko Rauhamaa
Ian Kelly ian.g.ke...@gmail.com: On Sat, Feb 7, 2015 at 5:45 PM, Albert van der Horst alb...@spenarnc.xs4all.nl wrote: x - x**2 instead of lambda x : x**2 Well, I don't think the existing syntax is incompatible with your proposal. As it is, the - token can only appear after the argument

[issue23410] Document more BaseHTTPRequestHandler attributes

2015-02-08 Thread Martin Panter
New submission from Martin Panter: [Padding to avoid Error: 'utf8' codec can't decode bytes in position 189-190: invalid continuation byte] This is a patch to document two attributes of http.server.BaseHTTPRequestHandler: “close_connection” and “requestline”. Normally these are set by the

[issue23410] Document more BaseHTTPRequestHandler attributes

2015-02-08 Thread Martin Panter
Changes by Martin Panter vadmium...@gmail.com: -- keywords: +patch Added file: http://bugs.python.org/file38042/http-attributes.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23410 ___

[issue23096] Implementation-depended pickling floats with protocol 0

2015-02-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a patch. -- keywords: +patch stage: - patch review versions: -Python 2.7, Python 3.4 Added file: http://bugs.python.org/file38039/pickle_float_repr.patch ___ Python tracker rep...@bugs.python.org

Re: Python is DOOMED! Again!

2015-02-08 Thread Steven D'Aprano
Chris Angelico wrote: On Sun, Feb 8, 2015 at 11:45 AM, Albert van der Horst alb...@spenarnc.xs4all.nl wrote: def square(x): x**2 but square = x-x**2 or mult = x,y - result = 0 for i in range(x): result +=y return result doing away with the ternary operator def def

Re: Python is DOOMED! Again!

2015-02-08 Thread Chris Angelico
On Sun, Feb 8, 2015 at 6:55 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: If this were syntax, then the compiler could just as easily set the function name from - as from def. Lambda has the limitations that it has because it is an expression, not because of magical def

Re: What killed Smalltalk could kill Python

2015-02-08 Thread Steven D'Aprano
Chris Angelico wrote: On Sun, Feb 8, 2015 at 10:54 AM, Albert van der Horst alb...@spenarnc.xs4all.nl wrote: Not to mention that mostly a game is understood, not as something like chess, but an FPS (first person shooter) game. But that is real time programming, one league beyond beginners

lxml objectify - attribute elements to list.

2015-02-08 Thread Sayth Renshaw
Hi How can I actually access the values of an element with lxml objectify? for example if I had this element in my xml file. Track VenueName=Flemington VenueDesc=Flemington VenueAbbr=FLEM VenueCode=151 TrackName=Main TrackCode=149 I can see all the attributes using this. In [86]: for child

Trac 1.0.4 Released

2015-02-08 Thread Ryan Ollos
Trac 1.0.4 Released === Trac 1.0.4, the fourth maintenance release for the current stable branch, is now available! You will find this release at the usual places: http://trac.edgewall.org/wiki/TracDownload#LatestStableRelease https://pypi.python.org/pypi/Trac/1.0.4

[issue11734] Add half-float (16-bit) support to struct module

2015-02-08 Thread Mark Dickinson
Mark Dickinson added the comment: Refreshed and updated patch, cleaning up some style issues, fixing a failure to return -1 on exception in np_halffloat, and removing some endianness-determining casty expressions in favour of using PY_LITTLE_ENDIAN. -- Added file:

[issue23411] Update urllib.parse.__all__

2015-02-08 Thread Martin Panter
Changes by Martin Panter vadmium...@gmail.com: Added file: http://bugs.python.org/file38045/urllib.parse-all.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23411 ___

[issue17023] Subprocess does not find executable on Windows if it is PATH with quotes

2015-02-08 Thread Tim Golden
Changes by Tim Golden m...@timgolden.me.uk: -- resolution: - wont fix stage: - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17023 ___

[issue3213] pydoc -p should listen to [::] if IPv6 is supported

2015-02-08 Thread Martin Panter
Changes by Martin Panter vadmium...@gmail.com: -- nosy: +vadmium ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3213 ___ ___ Python-bugs-list

[issue23411] Update urllib.parse.__all__

2015-02-08 Thread Martin Panter
Changes by Martin Panter vadmium...@gmail.com: Removed file: http://bugs.python.org/file38044/urllib.parse-all.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23411 ___

[issue23411] Update urllib.parse.__all__

2015-02-08 Thread Martin Panter
New submission from Martin Panter: +DefragResult, ParseResult, SplitResult, +DefragResultBytes, ParseResultBytes, SplitResultBytes] Also adds test case. -- components: Library (Lib) files: urllib.parse-all.patch keywords: patch messages: 235556 nosy: vadmium priority: normal severity:

Re: lxml objectify - attribute elements to list.

2015-02-08 Thread Kev Dwyer
Sayth Renshaw wrote: Hi How can I actually access the values of an element with lxml objectify? for example if I had this element in my xml file. Track VenueName=Flemington VenueDesc=Flemington VenueAbbr=FLEM VenueCode=151 TrackName=Main TrackCode=149 I can see all the attributes

'pip install nose' fails on python3 virtualenv

2015-02-08 Thread Fabien
Folks, I couldn't find any info on this problem online: Linux Mint Python 3.3 virtualenv (12.0.7) pip (6.0.8) setuptools (12.0.5) (testpy3)mowglie@flappi ~ $ pip install nose Collecting nose Exception: Traceback (most recent call last): File

[issue20680] Pickle socket enums by names

2015-02-08 Thread Ethan Furman
Ethan Furman added the comment: An IntEnum is just a fancy int. You can add them, subtract them, multiply them, all that kind of thing. If you attempt to unpickle a 3.4 _PickleByNameIntEnum on a 3.3 system, what's going to happen? -- ___ Python

[issue20680] Pickle socket enums by names

2015-02-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: If you attempt to unpickle a 3.4 _PickleByNameIntEnum on a 3.3 system, what's going to happen? The same as if you attempt to unpickle a 3.4 IntEnum on a 3.3 system -- AttributeError. -- ___ Python tracker

[issue23103] Reduce memory usage for ipaddress object instances

2015-02-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Synchronized with tip. -- Added file: http://bugs.python.org/file38047/ipaddress_lightweight_4.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23103

[issue23413] Incorrect division result

2015-02-08 Thread Martynas Brijunas
New submission from Martynas Brijunas: Dear Python team, when dividing 3 by 7, I expect to get the following result: 0.428571428571428571428571428571428571428571428571428571428571... What I am getting in the Python interpreter is this: 3 / 7 0.42857142857142855 Which in my opinion is

[issue23412] importlib sometimes fails to import a recently created module

2015-02-08 Thread SilentGhost
SilentGhost added the comment: Looks like some sort of race condition. Sleeping for a second before import_module seem to solve the problem. -- components: +Interpreter Core nosy: +SilentGhost, brett.cannon, eric.snow, ncoghlan ___ Python tracker

[issue23412] importlib sometimes fails to import a recently created module

2015-02-08 Thread SilentGhost
Changes by SilentGhost ghost@gmail.com: -- versions: +Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23412 ___ ___ Python-bugs-list

[issue21793] httplib client/server status refactor

2015-02-08 Thread Ethan Furman
Ethan Furman added the comment: Without having looked at the code I would guess the fix is as simple as changing a %s to a %d. Having said that, it would be nice if the name was also in the log -- something like: 127.0.0.1 - - [08/Feb/2015 05:05:28] GET / HTTP/1.1 200 (OK) - --

[issue23413] Incorrect division result

2015-02-08 Thread Benjamin Peterson
Benjamin Peterson added the comment: https://docs.python.org/3/tutorial/floatingpoint.html -- nosy: +benjamin.peterson resolution: - not a bug status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23413

Re: How to write a non blocking SimpleHTTPRequestHandler ?

2015-02-08 Thread Yassine Chaouche
On Tuesday, February 3, 2015 at 3:17:37 PM UTC+1, Amirouche Boubekki wrote: What you want is to prevent the socket to wait indefinetly for data (based on strace output) which is done with socket.setblocking/settimeout [1]. asynchronous (asyncio) is something else, and you would still need to

[issue23412] importlib sometimes fails to import a recently created module

2015-02-08 Thread Richard Dymond
New submission from Richard Dymond: importlib.import_module() sometimes fails to import a module that has just been written to the filesystem, aborting with an ImportError. Example output when executing the attached file with Python 3.3 or 3.4: Wrote tmpwbzb35.py Successfully imported

[issue23411] Update urllib.parse.__all__

2015-02-08 Thread Senthil Kumaran
Senthil Kumaran added the comment: Thanks for the tests. Reviewed the patch and looks good to me. -- nosy: +orsenthil stage: - commit review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23411

[issue23397] PEP 431 implementation

2015-02-08 Thread Berker Peksag
Changes by Berker Peksag berker.pek...@gmail.com: -- nosy: +lregebro ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23397 ___ ___ Python-bugs-list

[issue23414] seek(count, whence) accepts bogus whence on windows, python2.7

2015-02-08 Thread mattip
New submission from mattip: f=open('abc.txt', 'w+') f.seek(0, 42) does not raise an exception on windows, python2.7 -- components: Windows messages: 235568 nosy: mattip, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: seek(count, whence) accepts

[issue17911] traceback: add a new thin class storing a traceback without storing local variables

2015-02-08 Thread Robert Collins
Robert Collins added the comment: Sorry xonatius I wasn't clear: AFAICT your patch is going to require changes to the traceback tests, and this issue is changing the implementation substantially: I was suggesting that you make sure your patch applies on top of this issue, not that you merge

[issue17911] traceback: add a new thin class storing a traceback without storing local variables

2015-02-08 Thread Robert Collins
Robert Collins added the comment: Nick, Antoine - I'm now stuck between you. Options going forward: - I can JFDI realising you won't both be happy :) - you two can reach consensus! I could cripple __init__ by switching to __new__, but I think thats massive overcomplication and not needed.

[RELEASE] Python 3.4.3rc1 is now available

2015-02-08 Thread Larry Hastings
On behalf of the Python development community and the Python 3.4 release team, I'm happy to announce the availability of Python 3.4.3rc1. Python 3.4.3rc1 has many bugfixes and other small improvements over 3.4.2. You can download it here: https://www.python.org/download/releases/3.4.3

[RELEASE] Python 3.5.0a1 is now available

2015-02-08 Thread Larry Hastings
On behalf of the Python development community and the Python 3.5 release team, I'm also pleased to announce the availability of Python 3.5.0a1. Python 3.5.0a1 is the first alpha release of Python 3.5, which will be the next major release of Python. Python 3.5 is still under heavy

Profiler for long-running application

2015-02-08 Thread Asad Dhamani
I have a Flask application where I run a specific task asynchronously using Celery. Its basically parsing some HTML and inserting data into a Postgres database(using SQLAlchemy). However, the task seems to be running very slowly, at 1 insert per second. I'd like to find out where the

[issue10320] printf %qd is nonstandard

2015-02-08 Thread John Malmberg
John Malmberg added the comment: OpenVMS needs %lld or % PY_FORMAT_LONG_LONG d in order to build the _ctypes module. -- nosy: +John.Malmberg ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10320

Re: lxml objectify - attribute elements to list.

2015-02-08 Thread Stefan Behnel
Sayth Renshaw schrieb am 08.02.2015 um 12:22: How can I actually access the values of an element with lxml objectify? for example if I had this element in my xml file. Track VenueName=Flemington VenueDesc=Flemington VenueAbbr=FLEM VenueCode=151 TrackName=Main TrackCode=149 I can see

[issue10320] printf %qd is nonstandard

2015-02-08 Thread Mark Lawrence
Mark Lawrence added the comment: As VMS is not supported I doubt that people here are too bothered about what is needed to build the _ctypes module on it. -- nosy: +BreamoreBoy versions: +Python 3.4, Python 3.5 -Python 3.1, Python 3.2 ___ Python

Re: lxml objectify - attribute elements to list.

2015-02-08 Thread Sayth Renshaw
Awesome, thanks so much for the help. Sayth -- https://mail.python.org/mailman/listinfo/python-list

Re: [RELEASE] Python 3.4.3rc1 is now available

2015-02-08 Thread Mark Lawrence
On 08/02/2015 22:00, Larry Hastings wrote: On behalf of the Python development community and the Python 3.4 release team, I'm happy to announce the availability of Python 3.4.3rc1. Python 3.4.3rc1 has many bugfixes and other small improvements over 3.4.2. You can download it here:

[RELEASE] Python 3.5.0a1 is now available

2015-02-08 Thread Larry Hastings
On behalf of the Python development community and the Python 3.5 release team, I'm also pleased to announce the availability of Python 3.5.0a1. Python 3.5.0a1 is the first alpha release of Python 3.5, which will be the next major release of Python. Python 3.5 is still under heavy

[RELEASE] Python 3.4.3rc1 is now available

2015-02-08 Thread Larry Hastings
On behalf of the Python development community and the Python 3.4 release team, I'm happy to announce the availability of Python 3.4.3rc1. Python 3.4.3rc1 has many bugfixes and other small improvements over 3.4.2. You can download it here: https://www.python.org/download/releases/3.4.3

[issue23415] add-to-pydotorg does not support .exe installers for Windows

2015-02-08 Thread Larry Hastings
New submission from Larry Hastings: Steve is using new technology to make the installers for Windows. He generates four installers now: * .exe for Win32 * -amd64.exe for Win64 * -webinstall.exe for Win32 web-based installers * -amd64-webinstall.exe for Win64 web-based installers

Re: [RELEASE] Python 3.4.3rc1 is now available

2015-02-08 Thread Larry Hastings
On 02/08/2015 02:06 PM, Mark Lawrence wrote: On 08/02/2015 22:00, Larry Hastings wrote: On behalf of the Python development community and the Python 3.4 release team, I'm happy to announce the availability of Python 3.4.3rc1. Python 3.4.3rc1 has many bugfixes and other small improvements over

[issue23414] seek(count, whence) accepts bogus whence on windows, python2.7

2015-02-08 Thread eryksun
eryksun added the comment: The whence argument is used in a switch statement that handles SEEK_END and SEEK_CUR. It doesn't raise an error for an invalid whence value. It just falls through to the fsetpos call. _portable_fseek

[issue23415] add-to-pydotorg does not support .exe installers for Windows

2015-02-08 Thread Larry Hastings
Larry Hastings added the comment: I should add, adding the files by hand worked fine. (Which means that if you experiment with the script, when it blows away the files and re-adds them, you'll be blowing away the files I added by hand. So if you do so, it's up to you to ensure the files are

[issue17911] traceback: add a new thin class storing a traceback without storing local variables

2015-02-08 Thread Nick Coghlan
Nick Coghlan added the comment: Escalating to python-dev for API design feedback is the usual path forward if we reach an impasse in the tracker comments. I'll make one more attempt at persuading Antoine here though: the fact that we're being tempted to add do not use this API the way you would

[issue22235] httplib: TypeError with file() object in ssl.py

2015-02-08 Thread Etienne Robillard
Etienne Robillard added the comment: problem is fixed with python 2.7.9. it seem ssl.py module has been greatly improved with this release. Thanks! -- resolution: - fixed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22235

Re: [RELEASE] Python 3.4.3rc1 is now available

2015-02-08 Thread Mark Lawrence
On 08/02/2015 22:14, Larry Hastings wrote: On 02/08/2015 02:06 PM, Mark Lawrence wrote: On 08/02/2015 22:00, Larry Hastings wrote: On behalf of the Python development community and the Python 3.4 release team, I'm happy to announce the availability of Python 3.4.3rc1. Python 3.4.3rc1 has many

[issue20680] Pickle socket enums by names

2015-02-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: For the socket module constants there is even better way, which supports forward compatibility, i.e. SOCK_STREAM pickled in 3.5 could be unpickled on 3.3 (replacing ints with enums breaks forward compatibility). Here is a patch. -- Added file:

[issue10697] host and port attributes not documented well in function urllib.parse.urlparse and urlsplit

2015-02-08 Thread Martin Panter
Martin Panter added the comment: I don’t understand where the work needs to be done for this one. Even in the 3.1 and 2.7 documentation, the urlparse() and urlsplit() entries both list “port” as one of the returned attributes, and urlparse() has example code for it. -- nosy: +vadmium

[issue15009] urlsplit can't round-trip relative-host urls.

2015-02-08 Thread Martin Panter
Martin Panter added the comment: Fixing Issue 22852 or Issue 5843 should help fixing this. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15009 ___

[issue23418] Keep http.server.__all__ up to date

2015-02-08 Thread Martin Panter
New submission from Martin Panter: Here is a patch that adds the Simple/CGIHTTPRequestHandler classes to __all__, and a test case that should help keep it up to date in the future. -- components: Library (Lib) files: http.server-all.patch keywords: patch messages: 235594 nosy: vadmium

Re: Profiler for long-running application

2015-02-08 Thread dieter
Asad Dhamani dhamania...@gmail.com writes: I'd like to find out where the bottleneck is, and I've been looking for a good profiler that'd let me do this, however, I couldn't find anything. Any recommendations would be great. Python comes with a profile module in its standard library.

[issue17896] Move Windows external libs from src\..\ to src\externals

2015-02-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset 7d22dbf3a0dc by Martin v. Löwis in branch '3.4': Issue #17896: Update msi.py to new externals dir. https://hg.python.org/cpython/rev/7d22dbf3a0dc -- ___ Python tracker rep...@bugs.python.org

Re: [RELEASE] Python 3.4.3rc1 is now available

2015-02-08 Thread Terry Reedy
On 2/8/2015 5:06 PM, Mark Lawrence wrote: On 08/02/2015 22:00, Larry Hastings wrote: On behalf of the Python development community and the Python 3.4 release team, I'm happy to announce the availability of Python 3.4.3rc1. Python 3.4.3rc1 has many bugfixes and other small improvements over

Python 3.x stuffing utf-8 into SQLite db

2015-02-08 Thread Skip Montanaro
I am trying to process a CSV file using Python 3.5 (CPython tip as of a week or so ago). According to chardet[1], the file is encoded as utf-8: s = open(data/meets-usms.csv, rb).read() len(s) 562272 import chardet chardet.detect(s) {'encoding': 'utf-8', 'confidence': 0.99} so I created the

Re: Python 3.x stuffing utf-8 into SQLite db

2015-02-08 Thread Chris Angelico
On Mon, Feb 9, 2015 at 2:44 PM, Skip Montanaro skip.montan...@gmail.com wrote: Anderson Barracuda Masters - 2010 St. Patrick’s Day Swim Meet Those three characters are the CP-1252 decode of the bytes for U+2019 in UTF-8 (E2 80 99). Not sure if that helps any, but given that it was an XLSX

[issue23328] urllib2 fails for proxy credentials that contain a '/' character

2015-02-08 Thread Martin Panter
Martin Panter added the comment: The relevant code looks like it is _parse_proxy() at Lib/urllib/request.py:693. It has custom code to search for a slash (/), so it wouldn’t be hard to make it search after the last at (@) symbol. (I previously assumed it would use urlsplit() or similar, which

[issue23072] 2.7.9 multiprocessing compile conflict

2015-02-08 Thread Davin Potts
Davin Potts added the comment: It's a little unclear if one or more of the following is true: (1) you are having trouble getting the multiprocessing module to build properly on Solaris 2.8; (2) you are having trouble getting your own code to build in a similar way to the multiprocessing

[issue23417] Windows 8.1 and Windows Server 2012 R2 are not displayed properly

2015-02-08 Thread George Schizas
New submission from George Schizas: Python on Windows can now can understand that it's on Windows 8.1 and Windows Server 2012 R2, but platform.py hasn't been updated, and claims it's on post2012Server: import platform print(platform.win32_ver()) ('post2012Server', '6.3.9600', '',

I am a beginner, I designed a game is very interesting!!

2015-02-08 Thread zhutieguo
I just started to learn python, and I designed a very interesting game jail adventure. Give me some advise. Because English is not my first language, so you may find some grammar error in the story of the game. Here is the link http://pan.baidu.com/s/1i3gR6RF . press the button 下载(4KB) to

Re: Python 3.x stuffing utf-8 into SQLite db

2015-02-08 Thread Steven D'Aprano
Skip Montanaro wrote: sqlite select meetname from swimmeet where meetname like '%Barracuda%Patrick%'; Anderson Barracudas St. Patrick's Day Swim Meet Anderson Barracuda Masters - 2010 St. Patrick’s Day Swim Meet Anderson Barracuda Masters 2011 St. Patrick’s Day Swim Meet Anderson

[issue21429] Input.output error with multiprocessing

2015-02-08 Thread Davin Potts
Davin Potts added the comment: The provided links to the relevant code are unfortunately pointing at the master branch's copy of those files and not a specific version of the code making it that much harder to now discern where the issue arises. (A number of things have changed in the master

[issue23415] add-to-pydotorg does not support .exe installers for Windows

2015-02-08 Thread Georg Brandl
Georg Brandl added the comment: Can you attach the diff you made? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23415 ___ ___ Python-bugs-list

[issue22235] httplib: TypeError with file() object in ssl.py

2015-02-08 Thread Etienne Robillard
Etienne Robillard added the comment: hg push worked like a charm... but for some reasons i get another error trying to install things with setuptools: erob@nguns:~/Desktop/pyaml-14.12.10$ sudo python setup.py install --prefix=/usr/local Processing dependencies for pyaml==14.12.10 Searching

[issue12955] urllib.request example should use with ... as:

2015-02-08 Thread Martin Panter
Martin Panter added the comment: Issue 22755 is about the example arms race for contextlib.closing(). -- nosy: +vadmium ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12955 ___

[issue17911] traceback: add a new thin class storing a traceback without storing local variables

2015-02-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: You can also switch back to a single constructor, taking either an exception instance or an exception triple. That way everyone is happy - except perhaps if you are ideologically opposed to polymorphic signatures :-) Switching to python-dev would probably be

[issue3647] urlparse - relative url parsing and joins to be RFC3986 compliance

2015-02-08 Thread Martin Panter
Changes by Martin Panter vadmium...@gmail.com: -- nosy: +vadmium ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3647 ___ ___ Python-bugs-list

[issue5843] Normalization error in urlunparse

2015-02-08 Thread Martin Panter
Martin Panter added the comment: Looks like this duplicates Issue 22852, which has a patch, although its author had second thoughts on the implementation -- nosy: +vadmium ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5843

[issue18140] urlparse.urlsplit confused to fragment when password include #

2015-02-08 Thread Martin Panter
Martin Panter added the comment: Possibly related: Issue 23328. I would have thought any special characters in the password etc field should be encoded. Where do such unencoded URLs come from? It seems that this would change the behaviour of parsing a URL such as

[issue23328] urllib2 fails for proxy credentials that contain a '/' character

2015-02-08 Thread Martin Panter
Martin Panter added the comment: Related: Issue 18140. The slash character is meant to be a reserved character in URLs, so why hasn’t it been encoded? Where does the environment variable come from? -- nosy: +vadmium ___ Python tracker

[issue23328] urllib2 fails for proxy credentials that contain a '/' character

2015-02-08 Thread Andy Reitz
Andy Reitz added the comment: The proxy credentials are supplied by our sysadmin. My understanding is that the http_proxy env variable doesn't require URI encoding. In addition, the same credentials work fine with curl. -- ___ Python tracker

[issue22852] urllib.parse wrongly strips empty #fragment

2015-02-08 Thread Martin Panter
Martin Panter added the comment: I also liked the idea of returning None to distinguish a missing URL component from an empty-but-present component, and it would make them more consistent with the “username” and “password” fields. But I agree it would break backwards compabitility too much.

[issue23416] Make urllib.parse.SplitResult etc arguments optional

2015-02-08 Thread Martin Panter
New submission from Martin Panter: This would be a simple API enhancement and would allow easier building of URLs, like SplitResult(rtp, address, query=urlencode(query)).geturl() rtp://localhost:5004?rtcpport=5005 It seems the best way to do this at the moment is annoyingly verbose:

[issue12955] urllib.request example should use with ... as:

2015-02-08 Thread Martin Panter
Martin Panter added the comment: Here is a patch to change the urlopen() examples to use context managers where appropriate. There were also a few examples of handling HTTPError which I didn’t touch, because the whole file object versus exception object thing is probably a separate can of