[issue18007] CookieJar expects request objects with origin_req_host attribute instead of method

2013-05-22 Thread Senthil Kumaran
Senthil Kumaran added the comment: Hello Simon, Thanks for bringing this to attention. Since get_origin_req_host has been under deprecation was a release, I thought it was safe to remove that. Agree that documentation of cookiejar methods, which had a dependency on the change should have

[issue18031] The Python Tutorial says % string formatting will be removed

2013-05-22 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti type: - enhancement versions: +Python 3.3, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18031 ___

[issue17839] base64 module should use memoryview

2013-05-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you Ezio and Nick for your comments. I suggest renaming _bytes_from_decode_data to _bytes_for_decoding and adding _bytes_for_encoding. I rather think a TypeError exception raised by `memoryview(s).tobytes()` is good enough and we don't need a

[issue18030] IDLE shell crashes when reporting errors in Windows 7

2013-05-22 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- components: +Windows nosy: +brian.curtin, kbk, roger.serwy, terry.reedy, tim.golden ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18030

[issue18030] IDLE shell crashes when reporting errors in Windows 7

2013-05-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is a duplicate of issue13582. -- nosy: +serhiy.storchaka resolution: - duplicate stage: - committed/rejected status: open - closed superseder: - IDLE and pythonw.exe stderr problem ___ Python tracker

[issue18031] The Python Tutorial says % string formatting will be removed

2013-05-22 Thread Martin v . Löwis
Martin v. Löwis added the comment: Can you please provide some context for this report? On the abstract, I agree that there is an error in the tutorial: it is not decided whether the % formatting will be eventually removed, and I would also personally disagree with the recommendation to

[issue13612] xml.etree.ElementTree says unknown encoding of a regular encoding

2013-05-22 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- dependencies: +ElementTree incorrectly parses strings with declared encoding not UTF-8 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13612

[issue13612] xml.etree.ElementTree says unknown encoding of a regular encoding

2013-05-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: For unit tests we first should fix issue16986. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13612 ___ ___

[issue17844] Add link to alternatives for bytes-to-bytes codecs

2013-05-22 Thread Nick Coghlan
Nick Coghlan added the comment: Thanks Serhiy, that version looks great. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17844 ___ ___

[issue17140] Provide a more obvious public ThreadPool API

2013-05-22 Thread Nick Coghlan
Nick Coghlan added the comment: Actors are just as vulnerable to the new threads/processes are expensive issue as anything else, and by using a dynamic pool appropriately you can amortise those costs across multiple instances. The point is to expose a less opinionated threading model in a

[issue17716] From ... import fails when parent package failed but child module succeeded, yet works in std import case

2013-05-22 Thread Nick Coghlan
Nick Coghlan added the comment: import-sig is probably a better place to start -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17716 ___ ___

[issue17140] Provide a more obvious public ThreadPool API

2013-05-22 Thread Richard Oudkerk
Richard Oudkerk added the comment: I understand that a thread pool (in the general sense) might be used to amortise the cost. But I think you would probably have to write this from scratch rather than use the ThreadPool API. The ThreadPool API does not really expose anything that the

[issue7727] xmlrpc library returns string which contain null ( \x00 )

2013-05-22 Thread Antoine Pitrou
Antoine Pitrou added the comment: I don't really understand the issue. If you want to pass binary data (rather than unicode text), you should use a Binary object as explained in the docs: http://docs.python.org/2/library/xmlrpclib.html#binary-objects -- nosy: +pitrou

[issue18031] The Python Tutorial says % string formatting will be removed

2013-05-22 Thread Carlos Nepomuceno
Carlos Nepomuceno added the comment: According to what I have been told at python-l...@python.org str.__mod__() is not going to be deprecated and that seems to be a myth created by Python's own documentation. I do remember to have read previously in another page that it would be deprecated

[issue18031] The Python Tutorial says % string formatting will be removed

2013-05-22 Thread Ned Batchelder
Changes by Ned Batchelder n...@nedbatchelder.com: -- nosy: +nedbat ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18031 ___ ___ Python-bugs-list

[issue7727] xmlrpc library returns string which contain null ( \x00 )

2013-05-22 Thread Martin v . Löwis
Martin v. Löwis added the comment: The original report really includes two parts: a) when a string containing \0 is marshalled, ill-formed XML is produced b) the expected behavior is that base64 is used IMO: While a) is correct, b) is not. Antoine is correct that xmlrpclib.Binary should be

[issue18015] python 2.7.5 fails to unpickle namedtuple pickled by 2.7.3 or 2.7.4

2013-05-22 Thread Anselm Kruis
Anselm Kruis added the comment: I created a small *.pth to monkey patch collections.py until 2.7.6 gets released. Maybe this is useful for someone else. Therefore I attach it here. The pth file runs the following code during Python startup: import collections def

[issue12641] Remove -mno-cygwin from distutils

2013-05-22 Thread Martin v . Löwis
Martin v. Löwis added the comment: Am 21.05.13 23:14, schrieb Oscar Benjamin: More generally I think that compiling non-cygwin extensions with cygwin gcc should be altogether deprecated (for Python 3.4 at least). It should be discouraged in the docs and unsupported in the future. I agree

[issue18032] set methods should specify whether they consume iterators lazily

2013-05-22 Thread Abafei
New submission from Abafei: It says here (http://docs.python.org/2/library/stdtypes.html#set-types-set-frozenset) that some of the set methods take iterables as a parameter. Usually, the expected behavior is for a iterator consumer to consume only as much data as it needs. For example, for

[issue7760] use_errno=True does not work

2013-05-22 Thread Matt Jones
Matt Jones added the comment: Is this really a documentation issue? Is it not generally understood that using absolute paths to libraries is a bad idea due to the amount of PATH/symlink spaghetti that the average file system contains? -- nosy: +Matt.Jones

[issue7727] xmlrpc library returns string which contain null ( \x00 )

2013-05-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The limitations is already documented: However, it’s the caller’s responsibility to ensure that the string is free of characters that aren’t allowed in XML, such as the control characters with ASCII values between 0 and 31 (except, of course, tab, newline

[issue13612] xml.etree.ElementTree says unknown encoding of a regular encoding

2013-05-22 Thread Eli Bendersky
Eli Bendersky added the comment: For unit tests we first should fix issue16986. I did another round of code review on issue 16986 now. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13612

[issue13612] xml.etree.ElementTree says unknown encoding of a regular encoding

2013-05-22 Thread Eli Bendersky
Eli Bendersky added the comment: Looked at Serhiy's patch here too: LGTM with a unit test :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13612 ___

[issue17844] Add link to alternatives for bytes-to-bytes codecs

2013-05-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset 85c04fdaa404 by Serhiy Storchaka in branch '2.7': Issue #17844: Refactor a documentation of Python specific encodings. http://hg.python.org/cpython/rev/85c04fdaa404 New changeset 039dc6dd2bc0 by Serhiy Storchaka in branch '3.3': Issue #17844: Add

[issue17844] Add link to alternatives for bytes-to-bytes codecs

2013-05-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you Nick. It's mainly your patch. Do you want to foreport your changes (a Python Specific Encodings subheading and followed paragraph) to 3.x? -- ___ Python tracker rep...@bugs.python.org

[issue12641] Remove -mno-cygwin from distutils

2013-05-22 Thread Oscar Benjamin
Oscar Benjamin added the comment: On 22 May 2013 12:43, Martin v. Löwis rep...@bugs.python.org wrote: Am 21.05.13 23:14, schrieb Oscar Benjamin: More generally I think that compiling non-cygwin extensions with cygwin gcc should be altogether deprecated (for Python 3.4 at least). It should be

[issue12641] Remove -mno-cygwin from distutils

2013-05-22 Thread Oscar Benjamin
Oscar Benjamin added the comment: On 22 May 2013 13:40, Oscar Benjamin rep...@bugs.python.org wrote: However on further reflection I'm a little reluctant to force an error if I can't *prove* that the setup is broken. After a little more reflection I realise that we could just do: if

[issue17272] request.full_url: unexpected results on assignment

2013-05-22 Thread Senthil Kumaran
Senthil Kumaran added the comment: Here is patch with tests and docs. I see no changes to opener is required and the selector which is sent to HTTP request is the correct one. I have added tests for redirect url with #fragment too (For testing scenario reported in Issue 8280). I shall close

[issue16986] ElementTree incorrectly parses strings with declared encoding not UTF-8

2013-05-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is an updated patch. -- Added file: http://bugs.python.org/file30341/etree_parse_str_2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16986 ___

[issue16986] ElementTree incorrectly parses strings with declared encoding not UTF-8

2013-05-22 Thread Eli Bendersky
Eli Bendersky added the comment: LGTM -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16986 ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue13612] xml.etree.ElementTree says unknown encoding of a regular encoding

2013-05-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is an updated patch. PyUnknownEncodingHandler() and expat_unknown_encoding_handler() are synchronized. Added tests. -- Added file: http://bugs.python.org/file30342/expat_unknown_encoding_handler_2.patch ___

[issue13612] xml.etree.ElementTree says unknown encoding of a regular encoding

2013-05-22 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- dependencies: -ElementTree incorrectly parses strings with declared encoding not UTF-8 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13612

[issue16986] ElementTree incorrectly parses strings with declared encoding not UTF-8

2013-05-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset 7781ccae7b9a by Serhiy Storchaka in branch '3.3': Issue #16986: ElementTree now correctly parses a string input not only when http://hg.python.org/cpython/rev/7781ccae7b9a New changeset 659c1ce8ed2f by Serhiy Storchaka in branch 'default': Issue

[issue16986] ElementTree incorrectly parses strings with declared encoding not UTF-8

2013-05-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Oh, 2.7 still uses old doctests. It's a challenge to backport tests for this issue. -- versions: -Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16986

[issue17844] Add link to alternatives for bytes-to-bytes codecs

2013-05-22 Thread Nick Coghlan
Nick Coghlan added the comment: That sounds like a good idea. Yay for not needing those arcane footnotes, though :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17844 ___

[issue7727] xmlrpc library returns string which contain null ( \x00 )

2013-05-22 Thread Martin v . Löwis
Martin v. Löwis added the comment: Serhiy: The patch fixes the OP's concern, but not the extended concern about producing ill-formed XML (at least not for 2.7). If the string contains non-UTF-8 data, yet the XML declaration says UTF-8, it's still ill-formed, and not caught by your patch. I

[issue17844] Add link to alternatives for bytes-to-bytes codecs

2013-05-22 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17844 ___ ___

[issue18033] Example for Profile Module shows incorrect method

2013-05-22 Thread Jough Dempsey
New submission from Jough Dempsey: The example on this page: http://docs.python.org/2/library/profile.html?highlight=pstats#profile.Profile Shows: import cProfile, pstats, io pr = cProfile.Profile() pr.enable() ... do something ... pr.disable() s = io.StringIO() ps = pstats.Stats(pr, stream=s)

[issue13483] Use VirtualAlloc to allocate memory arenas

2013-05-22 Thread Charles-François Natali
Charles-François Natali added the comment: I can't speak for Antoine, but I guess that the result of pybench would be enough to make sure it doesn't introduce any regression (which would be *really* suprising). As for the memory savings, the benchmark you posted earlier is conclusive enough IMO

[issue13483] Use VirtualAlloc to allocate memory arenas

2013-05-22 Thread Antoine Pitrou
Antoine Pitrou added the comment: I asked for benchmarks because I don't know anything about Windows virtual memory management, but if other people think this patch should go in then it's fine. The main point of using VirtualAlloc/VirtualFree was, in my mind, to allow *releasing* memory in

[issue18031] The Python Tutorial says % string formatting will be removed

2013-05-22 Thread Eric V. Smith
Eric V. Smith added the comment: I agree that we should not say that %-formatting will be removed from the language. Not until Python 5000, anyway. -- nosy: +eric.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18031

[issue18034] Last two entries in the programming FAQ are out of date (import related)

2013-05-22 Thread R. David Murray
New submission from R. David Murray: The second to last talks about the __import__ quirk with out calling __import__ out as deprecated. The last uses the imp module for reload. -- assignee: docs@python components: Documentation messages: 189827 nosy: brett.cannon, docs@python,

[issue18035] telnetlib incorrectly assumes that select.error has an errno attribute

2013-05-22 Thread Gregory P. Smith
New submission from Gregory P. Smith: In Python 2.7.3 through 2.7.5 the telnetlib select.poll based implementation assumes that select.error has an errno attribute when handling errors. it does not. select.error is not an EnvironmentError derived exception.

[issue18036] How do I create a .pyc file? FAQ entry is out of date

2013-05-22 Thread R. David Murray
New submission from R. David Murray: It doesn't talk about __pycache__. -- messages: 189829 nosy: barry, r.david.murray priority: normal severity: normal stage: needs patch status: open title: How do I create a .pyc file? FAQ entry is out of date type: behavior versions: Python 3.3,

[issue18035] telnetlib incorrectly assumes that select.error has an errno attribute

2013-05-22 Thread Gregory P. Smith
Gregory P. Smith added the comment: As this is only on the select.poll code path, a workaround for code that isn't going to hit select.select file descriptor limits is to set their telnetlib.Telnet instance _has_poll attribute to False before using it. my_telnet = telnetlib.Telnet(...)

[issue7727] xmlrpc library returns string which contain null ( \x00 )

2013-05-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Indeed, 2.7 needs more work. Here is a patch for 2.7. UnicodeError (which subclasses ValueError) can be raised implicitly here, that is why I think ValueError is a good exception. I'll be very grateful to you for your help with a documentation. --

[issue16986] ElementTree incorrectly parses strings with declared encoding not UTF-8

2013-05-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Due to the fact that ElementTree's documentation doesn't promise parsing Unicode string perhaps it shouldn't be backported to 2.7. At least I hadn't backported corresponded pyexpat changes (which affects pure Python ElementTree) to 2.7. --

[issue17089] Expat parser parses strings only when XML encoding is UTF-8

2013-05-22 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- versions: -Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17089 ___ ___

[issue16986] ElementTree incorrectly parses strings with declared encoding not UTF-8

2013-05-22 Thread Eli Bendersky
Eli Bendersky added the comment: Agreed re 2.7; the problem is not important enough to warrant such a backport, due to the state of maintenance of 2.7 at this point. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16986

[issue17818] aifc.Aifc_read/Aifc_write.getparams can return a namedtuple

2013-05-22 Thread Claudiu.Popa
Claudiu.Popa added the comment: Can anyone review the latest patch, please? Thanks. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17818 ___ ___

[issue17818] aifc.Aifc_read/Aifc_write.getparams can return a namedtuple

2013-05-22 Thread R. David Murray
R. David Murray added the comment: I've got it on my list, but I'm very busy for the next couple weeks. If someone else gets to it first that's good too :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17818

[issue17649] Python/Python-ast.c: No such file or directory

2013-05-22 Thread Ned Deily
Ned Deily added the comment: I believe there are two different issues here. One: since the python-dev switch to hg, Python source release tarballs no longer have had consistent file time stamps which result in unnecessary generation steps being run in a build. Python 2.7 and 3.3 now include

[issue18037] 2to3 passes through string literal which causes SyntaxError in 3.x

2013-05-22 Thread Vinay Sajip
New submission from Vinay Sajip: This string contains DOMAIN\username, which is talking about Windows and is a valid string in Python 2.x but not in 3.x. However, 2to3 passes this string through unchanged, and it causes a SyntaxError when interpreted by Python 3.x, because it contains what

[issue17532] IDLE: Always include Options menu on MacOSX

2013-05-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset e134714e3b30 by Ned Deily in branch '2.7': Issue #17532: Always include Options menu for IDLE on OS X. http://hg.python.org/cpython/rev/e134714e3b30 New changeset 75c3e9a659bc by Ned Deily in branch '3.3': Issue #17532: Always include Options menu

[issue17532] IDLE: Always include Options menu on MacOSX

2013-05-22 Thread Ned Deily
Ned Deily added the comment: Thanks again for the patch. Committed for release in 2.7.6, 3.3.3, and 3.4.0. -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org

[issue18038] Unhelpful error message on invalid encoding specification

2013-05-22 Thread Max Cantor
New submission from Max Cantor: When you specify a nonexistent encoding at the top of a file, like so for example: # -*- coding: fakefakefoobar -*- The following exception occurs: SyntaxError: encoding problem: with BOM This is very unhelpful, especially in cases where you might have made a

[issue18039] dbm.open(..., flag=n) does not work and does not give a warning

2013-05-22 Thread Sashko Kopyl
New submission from Sashko Kopyl: I use Python 3.3.2 (v3.3.2:d047928ae3f6, May 16 2013, 00:03:43) [MSC v.1600 32 bit (Intel)] on win32. dbm.open(..., flag=n) is supposed to Always create a new, empty database, open for reading and writing. In Windows case it does not. So I cannot empty a dbm

[issue6700] inspect.getsource() returns incorrect source lines

2013-05-22 Thread James Saryerwinnie
James Saryerwinnie added the comment: I confirmed the issue in tip. One of the issues with the original patch is that it modifies the tokeneater method used by getblock which won't work if the first token is any of the special cased tokens in the original patch ('@', 'def', 'class'). I've

[issue18040] SIGINT catching regression on windows in 2.7

2013-05-22 Thread David Gilman
New submission from David Gilman: I opened this StackOverflow bug with an example simplified testcase. As you can see in the first comment a user added that this code worked under Python 2.6 on Windows and no longer works on 2.7.

[issue18041] mention issues with code churn in the devguide

2013-05-22 Thread Tshepang Lekhonkhobe
New submission from Tshepang Lekhonkhobe: I've seen complaints about code churn a few times, example: http://bugs.python.org/issue16510#msg175956. Would be nice if this was documented in the devguide. -- components: Devguide messages: 189844 nosy: ezio.melotti, tshepang priority:

[issue13612] xml.etree.ElementTree says unknown encoding of a regular encoding

2013-05-22 Thread Eli Bendersky
Eli Bendersky added the comment: Serhiy, would it make sense to share the code somewhere instead of duplicating it? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13612 ___

[issue18038] Unhelpful error message on invalid encoding specification

2013-05-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a patch. -- components: +Interpreter Core, Unicode -Library (Lib) keywords: +patch nosy: +ezio.melotti, serhiy.storchaka stage: - patch review versions: +Python 3.3, Python 3.4 Added file:

[issue13612] xml.etree.ElementTree says unknown encoding of a regular encoding

2013-05-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: May be. But it needs more work for building. It is simpler just duplicate a code (the function is small enough) and add comments: /* The code is duplicated as xx() in xxx.c. Keep both functions synchronized. */ --

[issue18037] 2to3 passes through string literal which causes SyntaxError in 3.x

2013-05-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: However r'DOMAIN\username' is valid in 3.x (if this is not a regular expression in 3.3+). It would be good to emit a warning in Python 2 with -3 option. Or perhaps even emit a warning about any non-known escape in non-raw strings. -- nosy:

[issue18037] 2to3 passes through string literal which causes SyntaxError in 3.x

2013-05-22 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18037 ___

[issue18035] telnetlib incorrectly assumes that select.error has an errno attribute

2013-05-22 Thread Thayu R
Thayu R added the comment: Just to add: select.error was made an alias of OSError following PEP 3151 from 3.3 onwards. Up to 3.2, it was a pair containing the error code and the error string. http://docs.python.org/3.3/library/select.html?highlight=select.error#select.error -- nosy: