[issue13235] logging.warn() is not documented

2011-10-22 Thread anatoly techtonik
anatoly techtonik added the comment: Just to me it clear - why do you want warn() to be removed aside from code duplication? My argument to leave it and document is that it is convenient and makes lines shorter (and won't break existing code). From logging module I also see that there are al

[issue13235] logging.warn() is not documented

2011-10-22 Thread Ezio Melotti
Ezio Melotti added the comment: Because there should be only one way to do things. BTW, you could have used a DeprecationWarning instead of a PendingDeprecationWarning, especially if it was already deprecated. -- ___ Python tracker

[issue1548891] shlex (or perhaps cStringIO) and unicode strings

2011-10-22 Thread Georg Brandl
Georg Brandl added the comment: If you think it's fine to change this behavior, then yes :) -- ___ Python tracker ___ ___ Python-bu

[issue12659] Add tests for packaging.tests.support

2011-10-22 Thread Francisco Martín Brugué
Francisco Martín Brugué added the comment: Hi Éric, Nice! and thanks for the info: I was just waiting to the check-in to compare and try further with the tests. Now I can just commit another patch by synching against the actual tip. Cheers, francis -- __

[issue13235] logging.warn() is not documented

2011-10-22 Thread Vinay Sajip
Vinay Sajip added the comment: > Just to me it clear - why do you want warn() to be removed aside from code > duplication? > > My argument to leave it and document is that it is convenient and makes lines > shorter (and won't break existing code). From logging module I also see that > there

[issue13235] logging.warn() is not documented

2011-10-22 Thread Vinay Sajip
Vinay Sajip added the comment: > BTW, you could have used a DeprecationWarning instead of a > PendingDeprecationWarning, especially if it was already deprecated. It wasn't officially deprecated, just "deprecation via obscurity";-) which is why I made it a PendingDeprecationWarning.

[issue13235] logging.warn() is not documented

2011-10-22 Thread Ezio Melotti
Ezio Melotti added the comment: PendingDeprecations are not so useful now that warnings are silenced by default. Since it wasn't documented, you could deprecate it in 3.3 and remove it in 3.4 IMHO. -- ___ Python tracker

[issue13244] WebSocket schemes in urlparse

2011-10-22 Thread Tobias Oberstein
New submission from Tobias Oberstein : The urlparse module currently does not support the new "ws" and "wss" schemes used for the WebSocket protocol. As a workaround, we currently use the following code (which is a hack of course): import urlparse wsschemes = ["ws", "wss"] urlparse.uses_relat

[issue13235] logging.warn() is not documented

2011-10-22 Thread Vinay Sajip
Vinay Sajip added the comment: > PendingDeprecations are not so useful now that warnings are silenced by > default. > Since it wasn't documented, you could deprecate it in 3.3 and remove it in > 3.4 IMHO. Hmmm, you're probably right. I'll change it to a DeprecationWarning. --

[issue13244] WebSocket schemes in urlparse

2011-10-22 Thread Ezio Melotti
Changes by Ezio Melotti : -- keywords: +easy nosy: +ezio.melotti, orsenthil stage: -> test needed versions: +Python 3.3 -Python 2.7 ___ Python tracker ___ __

[issue12930] reindent.py inserts spaces in multiline literals

2011-10-22 Thread Dima Tisnek
Dima Tisnek added the comment: good enough for me :) -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:/

[issue13235] logging.warn() is not documented

2011-10-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset 4a90d1ed115d by Vinay Sajip in branch 'default': Closes #13235: Changed PendingDeprecationWarning to DeprecationWarning. http://hg.python.org/cpython/rev/4a90d1ed115d -- resolution: -> fixed status: open -> closed

[issue12406] msi.py needs updating for Python 3.3

2011-10-22 Thread Vinay Sajip
Vinay Sajip added the comment: Adding Antoine for the short-name conflicts caused by the *.passwd.pem files. -- nosy: +pitrou ___ Python tracker ___

[issue13201] Implement comparison operators for range objects

2011-10-22 Thread Mark Dickinson
Mark Dickinson added the comment: I've taken the liberty of updating the patch, with a few minor changes: range_equality -> range_equals (like range_contains) move identity check into range_equals move comments before the code they describe (PEP7) add whatsnew entry remove check that range.__ha

[issue13201] Implement comparison operators for range objects

2011-10-22 Thread Mark Dickinson
Mark Dickinson added the comment: Hmm. Why does my patch not get a 'review' button? -- ___ Python tracker ___ ___ Python-bugs-list m

[issue13201] Implement comparison operators for range objects

2011-10-22 Thread Mark Dickinson
Mark Dickinson added the comment: Ah, there it is. Never mind. :-) -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubs

[issue10131] deepcopying an xml.dom.minidom.Document generates an invalid XML document

2011-10-22 Thread Yevgen Yampolskiy
Yevgen Yampolskiy added the comment: You can create object copy using both copy and pickle modules. I assume that identical results should be produced. pickle handles minidom.Document correctly, however copy does not. Even if patch to NodeList will be applied, copy or pickle modules need to b

[issue12406] msi.py needs updating for Python 3.3

2011-10-22 Thread Antoine Pitrou
Antoine Pitrou added the comment: Can't you use the normal algorithm for short names? I.e. KEYCER~1.PEM etc. Or doesn't it exist anymore? -- ___ Python tracker ___

[issue10925] Document pure Python version of integer-to-float correctly-rounded conversion

2011-10-22 Thread Mark Dickinson
Mark Dickinson added the comment: Thanks for the comments. Here's an updated patch, that actually makes use of the pure Python version to test the built-in int-to-float conversion. -- versions: -Python 2.7, Python 3.2 Added file: http://bugs.python.org/file23495/pure_python_long_to_f

[issue13243] _Py_identifier should be _Py_IDENTIFER

2011-10-22 Thread Meador Inge
Meador Inge added the comment: Good catch. I see what happened. 7109f31300fb updated Python/Python-ast.c but not Parser/asdl_c.py. I will apply your patch shortly. Thanks. -- assignee: -> meador.inge nosy: +meador.inge stage: -> patch review _

[issue13243] _Py_identifier should be _Py_IDENTIFER

2011-10-22 Thread Meador Inge
Meador Inge added the comment: Oh, and just to be clear I reproduced the build break by doing: ./Parser/asdl_c.py -c ./Python ./Parser/Python.asdl make in a built tree. The reason that this wasn't caught is that the make rules have the ASDL files as dependencies on the AST C files. So, the C

[issue13245] sched.py kwargs addition and default time functions

2011-10-22 Thread Chris Clark
New submission from Chris Clark : I ended up implementing my own sched.py equivalent as I needed kwargs support. This is my attempt to improve the stdlib, so I can throw my module way ;-) Added kwargs support, and made "argument" optional. "argument" is still named argument, I would like to re

[issue13245] sched.py kwargs addition and default time functions

2011-10-22 Thread Ezio Melotti
Ezio Melotti added the comment: Hi, thanks for the patch! 2.7 receives only bug fixes, so your patch can't be applied to 2.7. If the feature is accepted it can go to 3.3 though. -- nosy: +ezio.melotti stage: -> patch review versions: +Python 3.3 -Python 2.7 ___

[issue13243] _Py_identifier should be _Py_IDENTIFER

2011-10-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset 941d015053c6 by Meador Inge in branch 'default': Issue 13243: Rename _Py_identifier to _Py_IDENTIFIER in asdl_c.py http://hg.python.org/cpython/rev/941d015053c6 -- nosy: +python-dev ___ Python tracker <

[issue13243] _Py_identifier should be _Py_IDENTIFER

2011-10-22 Thread Meador Inge
Meador Inge added the comment: Committed. Thanks! -- nosy: -python-dev resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker __

[issue12675] tokenize module happily tokenizes code with syntax errors

2011-10-22 Thread Meador Inge
Changes by Meador Inge : -- nosy: +meador.inge ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue1548891] shlex (or perhaps cStringIO) and unicode strings

2011-10-22 Thread Antoine Pitrou
Antoine Pitrou added the comment: > If you think it's fine to change this behavior, then yes :) Well, the "documented" behaviour makes no sense. Either it should raise TypeError or convert. Since write() converts, it's logical for the constructor to do so as well. -- resolution: -> f

[issue1548891] shlex (or perhaps cStringIO) and unicode strings

2011-10-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset 27ae7d4e1983 by Antoine Pitrou in branch '2.7': Issue #1548891: The cStringIO.StringIO() constructor now encodes unicode http://hg.python.org/cpython/rev/27ae7d4e1983 -- nosy: +python-dev ___ Python trac

[issue13218] test_ssl failures on Ubuntu 11.10

2011-10-22 Thread Antoine Pitrou
Antoine Pitrou added the comment: Barry, perhaps you could try to know what in Ubuntu's OpenSSL build can lead to such failures? -- nosy: +barry ___ Python tracker ___

[issue12675] tokenize module happily tokenizes code with syntax errors

2011-10-22 Thread Florent Xicluna
Changes by Florent Xicluna : -- nosy: +flox ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue13246] Py_UCS4_strlen and friends needn't be public

2011-10-22 Thread Antoine Pitrou
New submission from Antoine Pitrou : It seems there's no reason to document these functions which operate on null-terminated unicode arrays. -- assignee: docs@python components: Documentation messages: 146187 nosy: docs@python, ezio.melotti, georg.brandl, haypo, loewis, pitrou priority:

[issue13244] WebSocket schemes in urlparse

2011-10-22 Thread Jyrki Pulliainen
Jyrki Pulliainen added the comment: I added a patch that adds support for WebSocket URL protocol. However, a few pointers (and questions): - The patch is now implemented according to Draft 17[1] of WebSocket protocol - Draft 17 does not support fragments, it states that the fragments should b

[issue13244] WebSocket schemes in urlparse

2011-10-22 Thread Tobias Oberstein
Tobias Oberstein added the comment: fragment identifiers: the spec says: "Fragment identifiers are meaningless in the context of WebSocket URIs, and MUST NOT be used on these URIs. The character "#" in URIs MUST be escaped as %23 if used as part of the query component." [see last line of my

[issue13244] WebSocket schemes in urlparse

2011-10-22 Thread Tobias Oberstein
Tobias Oberstein added the comment: Well, thinking about it, %23 can also appear in a percent encoded path component. I don't get the conditional "..if used as part of the query component" in the spec. -- ___ Python tracker

[issue13246] Py_UCS4_strlen and friends needn't be public

2011-10-22 Thread Georg Brandl
Georg Brandl added the comment: If they aren't public, they should get an underscore. All our API functions are either public or private; all public ones should be documented. -- ___ Python tracker _

[issue13244] WebSocket schemes in urlparse

2011-10-22 Thread Jyrki Pulliainen
Jyrki Pulliainen added the comment: Actually, if I get it right, it means that following url is valid: ws://example.com/something#somewhere/ and the # should be considered as being a part of the path. The spec does not say a thing should the # in path component be encoded, so I think it's s

[issue13244] WebSocket schemes in urlparse

2011-10-22 Thread Tobias Oberstein
Tobias Oberstein added the comment: I see how you interpret that sentence in the spec, but I would have read it differently: invalid: 1. ws://example.com/something#somewhere 2. ws://example.com/something#somewhere/ 3. ws://example.com/something#somewhere/foo 4. ws://example.com/something?quer

[issue13244] WebSocket schemes in urlparse

2011-10-22 Thread Jyrki Pulliainen
Jyrki Pulliainen added the comment: I'd take only 4. as invalid, as the WebSocket (to my interpretation) do not have fragments, so it is assumed to be a part of the path in that case. But yeah, a confirmation from HyBi would be great. Can you link to the discussion from here, if you ask them

[issue13244] WebSocket schemes in urlparse

2011-10-22 Thread Tobias Oberstein
Tobias Oberstein added the comment: I'll ask (to be sure) and link. However, after rereading the Hybi 17 section, it says """ path = """ And http://tools.ietf.org/html/rfc3986 says: """ The path is terminated by the first question mark ("?") or number sign ("#") character, or by the end of

[issue11183] Finer-grained exceptions for the ssl module

2011-10-22 Thread Antoine Pitrou
Antoine Pitrou added the comment: Here is a patch. It adds SSLZeroReturnError, SSLWantReadError, SSLWantWriteError, SSLSyscallError and SSLEOFError. -- keywords: +patch Added file: http://bugs.python.org/file23498/sslerrors.patch ___ Python tracker

[issue11183] Finer-grained exceptions for the ssl module

2011-10-22 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- stage: needs patch -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe

[issue13244] WebSocket schemes in urlparse

2011-10-22 Thread Tobias Oberstein
Tobias Oberstein added the comment: here the links to the question on the Hybi list: http://www.ietf.org/mail-archive/web/hybi/current/msg09257.html and http://www.ietf.org/mail-archive/web/hybi/current/msg09258.html http://www.ietf.org/mail-archive/web/hybi/current/msg09243.html == I'll tr

[issue13201] Implement comparison operators for range objects

2011-10-22 Thread Sven Marnach
Sven Marnach added the comment: Thanks for the updates, Mark. I was just about to look into this again. The changes are fine with me. -- ___ Python tracker ___ __

[issue13201] Implement comparison operators for range objects

2011-10-22 Thread Sven Marnach
Sven Marnach added the comment: Victor Stinner wrote: > If would be nice to have a PyLong_CompareLong() function. In most cases, global variables Py_Zero and Py_One would be enough to simplify this kind of code. -- ___ Python tracker

[issue6988] shlex.split() converts unicode input to UCS-4 output

2011-10-22 Thread Éric Araujo
Éric Araujo added the comment: $ ./python Python 2.7.2+ (2.7:27ae7d4e1983+, Oct 23 2011, 00:09:06) [GCC 4.6.1] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import shlex >>> shlex.split(u'Hello, World!') ['Hello,', 'World!'] This was fixed indirectly by

[issue13140] ThreadingMixIn.daemon_threads is not honored when parent is daemon

2011-10-22 Thread Florent Xicluna
Florent Xicluna added the comment: I would prefer to preserve the inheritance by default, and to change the daemonic attribute only if it is explicitly set to True or False. This way it will be backward compatible. Patch attached. -- versions: -Python 2.6 Added file: http://bugs.pyth

[issue13244] WebSocket schemes in urlparse

2011-10-22 Thread Éric Araujo
Éric Araujo added the comment: > Actually, if I get it right, it means that following url is valid: > ws://example.com/something#somewhere/ I don’t think so. The URI syntax RFC is generic, so a scheme spec cannot redefine the parsing to mean that in your above example, there is no fragment a

[issue13244] WebSocket schemes in urlparse

2011-10-22 Thread Tobias Oberstein
Tobias Oberstein added the comment: sorry for "throw" .. somewhat bad habit (stemming from wandering between languages). uses_fragment extended: [autobahn@autobahnhub ~/Autobahn]$ python Python 2.7.1 (r271:86832, Dec 13 2010, 15:52:15) [GCC 4.2.1 20070719 [FreeBSD]] on freebsd8 Type "help",

[issue13247] os.path.abspath returns unicode paths as question marks

2011-10-22 Thread Yuval Greenfield
New submission from Yuval Greenfield : For Python 2: Python 2.7.1 (r271:86832, Nov 27 2010, 18:30:46) [MSC v.1500 32 bit (Intel)] on win32 >>> os.path.abspath('.') 'C:\\Users\\yuv\\Desktop\\YuvDesktop\\??' >>> os.path.abspath(u'.') u'C:\\Users\\yuv\\Desktop\\YuvDesktop\\

[issue13244] WebSocket schemes in urlparse

2011-10-22 Thread Éric Araujo
Éric Araujo added the comment: >>> urlparse.urlparse("ws://example.com/something#somewhere") ParseResult(scheme='ws', netloc='example.com', path='/something#somewhere', params='', query='', fragment='') This makes me sad. I thought we had fixed urllib months ago to follow the damn rules that

[issue13247] os.path.abspath returns unicode paths as question marks

2011-10-22 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +haypo versions: -Python 3.4 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue6210] Exception Chaining missing method for suppressing context

2011-10-22 Thread Éric Araujo
Éric Araujo added the comment: I like the class method idea, but not the no_context name. Would without_context be too long? I don’t dislike raise MyError from None, but a method will be more easy to search and will help people reading code and discovering this unknown idiom. I think it’s

[issue11751] Increase distutils.filelist / packaging.manifest test coverage

2011-10-22 Thread Éric Araujo
Éric Araujo added the comment: > Still can't reproduce It only shows in 2.4 and 2.5. > (though I got one failure and three other errors) If these are not covered in #13170, please add them to that report. -- ___ Python tracker

[issue11751] Increase distutils.filelist / packaging.manifest test coverage

2011-10-22 Thread Éric Araujo
Éric Araujo added the comment: I’ve found the reason: #6665. fnmatch.translate (used by _glob_to_re was changed to support filenames with embedded newlines. I don’t think it’s a concern for us: As the input we give to _glob_to_re comes one line at a time from a file, we just never have file

[issue12930] reindent.py inserts spaces in multiline literals

2011-10-22 Thread Éric Araujo
Éric Araujo added the comment: I want to look at this but lack time right now. Could someone make one up-to-date patch with all changes, code and tests? It will be much easier to review and test than an archive. -- ___ Python tracker

[issue13238] Add shell command helpers to shutil module

2011-10-22 Thread Éric Araujo
Éric Araujo added the comment: > [snip rationale about why shutil and not subprocess] I’m convinced (with one nit: sh in the shutil name does not ring a security alarm for me, as I understand it as “shell-like conveniences in nice, dont-do-nasty-things-with-stings Python” :) but the shell in c

[issue13238] Add shell command helpers to shutil module

2011-10-22 Thread Éric Araujo
Éric Araujo added the comment: s/stings/strings/ -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mai

[issue12930] reindent.py inserts spaces in multiline literals

2011-10-22 Thread Éric Araujo
Éric Araujo added the comment: Forget that, there are no automated tests for tools. So, a text version of the files would be nice. -- ___ Python tracker ___ __

[issue12930] reindent.py inserts spaces in multiline literals

2011-10-22 Thread Caio Romão
Caio Romão added the comment: Attaching files from tarball as requested. See http://bugs.python.org/issue12930#msg144314 for explanation -- Added file: http://bugs.python.org/file23500/testfile-original.py ___ Python tracker

[issue12930] reindent.py inserts spaces in multiline literals

2011-10-22 Thread Caio Romão
Changes by Caio Romão : Added file: http://bugs.python.org/file23501/testfile-expected.py ___ Python tracker ___ ___ Python-bugs-list mailing

[issue12930] reindent.py inserts spaces in multiline literals

2011-10-22 Thread Caio Romão
Changes by Caio Romão : Added file: http://bugs.python.org/file23502/testfile-issue.py ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue13132] distutils sends non-RFC compliant HTTP request

2011-10-22 Thread Éric Araujo
Éric Araujo added the comment: The requests we send are multipart/form-data, so the RFC exception for text/* would not apply. I’m closing this bug as a duplicate and will ask on the other one if we should reopen it. -- resolution: -> duplicate stage: -> committed/rejected status: p

[issue10510] packaging upload/register should use CRLF in HTTP requests

2011-10-22 Thread Éric Araujo
Éric Araujo added the comment: Mitchell Hashimoto provided this link on a duplicate report: > RFC2616 page 31 (http://tools.ietf.org/html/rfc2616#page-31) states that > headers must be separated > by CRLF. Specifically, the above "\n\n" for the header separator is causing > issues with some >

[issue10510] distutils upload/register should use CRLF in HTTP requests

2011-10-22 Thread Éric Araujo
Changes by Éric Araujo : -- resolution: duplicate -> stage: committed/rejected -> superseder: Factor out common code for d2 commands register, upload and upload_docs -> title: packaging upload/register should use CRLF in HTTP requests -> distutils upload/register should use CRLF in

[issue13237] subprocess docs should emphasise convenience functions

2011-10-22 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +eric.araujo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue13224] Change str(class) to return only the class name

2011-10-22 Thread Éric Araujo
Éric Araujo added the comment: Here’s the python-ideas thread: http://mail.python.org/pipermail/python-ideas/2011-October/thread.html#12459 -- ___ Python tracker ___ __

[issue1548891] shlex (or perhaps cStringIO) and unicode strings

2011-10-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset 0b39f2486314 by Éric Araujo in branch '2.7': Note that the #1548891 fix indirectly fixes shlex (#6988, #1170) http://hg.python.org/cpython/rev/0b39f2486314 -- ___ Python tracker

[issue12394] packaging: generate scripts from callable (dotted paths)

2011-10-22 Thread Éric Araujo
Éric Araujo added the comment: FTR, distribute recently committed two fixes for the exe wrappers: https://bitbucket.org/tarek/distribute/issue/238 and https://bitbucket.org/tarek/distribute/issue/207 -- ___ Python tracker

[issue1170] shlex have problems with parsing unicode

2011-10-22 Thread Éric Araujo
Éric Araujo added the comment: $ ./python Python 2.7.2+ (2.7:27ae7d4e1983+, Oct 23 2011, 00:09:06) [GCC 4.6.1] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import shlex >>> shlex.split(u'Hello, World!') ['Hello,', 'World!'] This bug was fixed indirectly

[issue1170] shlex have problems with parsing unicode

2011-10-22 Thread Éric Araujo
Éric Araujo added the comment: The second message in this page reports that StringIO.StringIO works, but when I pass a unicode string with non-ASCII chars there’s a method call that fails because of implicit unicode-to-str conversion: Traceback (most recent call last): File "/usr/lib/python