[issue11326] connect_ex() implementation missing for SSL sockets

2011-02-25 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Ok, one issue is that connect_ex() isn't implemented for SSL sockets, so it defers to the normal implementation instead, which is wrong. But your still is wrong too. connect_ex() returns an error, meaning the socket isn't connected and you must

[issue11326] connect_ex() implementation missing for SSL sockets

2011-02-25 Thread Florian Mayer
Florian Mayer florma...@aim.com added the comment: A workaround would be exposing _ssl.wrapssl in ssl so that it can be called once the socket is connected and no non-public API had to be used. -- ___ Python tracker rep...@bugs.python.org

[issue11326] connect_ex() implementation missing for SSL sockets

2011-02-25 Thread Florian Mayer
Florian Mayer florma...@aim.com added the comment: The select call after the connect_ex waits until the connection is done, for the first write event is fired then, so the socket is connected afterwards. -- ___ Python tracker rep...@bugs.python.org

[issue11326] connect_ex() implementation missing for SSL sockets

2011-02-25 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: The select call after the connect_ex waits until the connection is done, for the first write event is fired then, so the socket is connected afterwards. You are right. Here is a patch for py3k implementing connect_ex() and solving the issue

[issue11326] connect_ex() implementation missing for SSL sockets

2011-02-25 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: Removed file: http://bugs.python.org/file20900/ssl_connect.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11326 ___

[issue11326] connect_ex() implementation missing for SSL sockets

2011-02-25 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: Added file: http://bugs.python.org/file20901/ssl_connect.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11326 ___

[issue11297] Make ChainMap() public in the collections module.

2011-02-25 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Antoine. Thanks. I put in a paragraph re-emphasizing that ChainMap is a view and that changes in the underlying mappings get reflected in the ChainMap. Also, the first sentence says that ChainMap groups multiple dicts or

[issue11297] Make ChainMap() public in the collections module.

2011-02-25 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: I was thinking of adding a recipes section to show how to extend or override the class: class DjangoContext(ChainMap): def push(self): self.maps.insert(0, {}) def pop(self): self.maps.pop(0) class

[issue11297] Make ChainMap() public in the collections module.

2011-02-25 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Raymond: Sorry I was imprecise. I was referring specifically to “import __builtin__” in collections.rst. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11297

[issue11303] b'x'.decode('latin1') is much slower than b'x'.decode('latin-1')

2011-02-25 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: If you agree, Raymond, I'll backport the patch. Yes. That will address Antoine's legitimate concern about making other backports harder, and it will get all the Python's to use the canonical spelling. For other spellings

[issue11303] b'x'.decode('latin1') is much slower than b'x'.decode('latin-1')

2011-02-25 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Such warnings about performance seem to me to be the domain of code analysis or lint tools, not the interpreter. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11303

[issue11318] Python 3.2 FAQ example code typo?

2011-02-25 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: What this part means is: “If you create an instance of C named c, and get c.count, it will get the attribute count defined on C.” IOW: You can get a class variable from any instance. In the example, the code in __init__ cannot assign to

[issue11303] b'x'.decode('latin1') is much slower than b'x'.decode('latin-1')

2011-02-25 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: For other spellings like utf8 or latin1, I wonder if it would be useful to emit a warning/suggestion to use the standard spelling. No, it would be an useless annoyance. -- ___ Python tracker

[issue11318] Python 3.2 FAQ example code typo?

2011-02-25 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- assignee: docs@python - nosy: -docs@python, eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11318 ___

[issue11298] unittest discovery needs better explanation

2011-02-25 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: I like that. Is it true that test discovery requires tests to be in a Python package, as opposed to top-level modules? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11298

[issue11303] b'x'.decode('latin1') is much slower than b'x'.decode('latin-1')

2011-02-25 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: For other spellings like utf8 or latin1, I wonder if it would be useful to emit a warning/suggestion to use the standard spelling. Why do you want to emit a warning? utf8 is now as fast as utf-8. --

[issue11303] b'x'.decode('latin1') is much slower than b'x'.decode('latin-1')

2011-02-25 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: For other spellings like utf8 or latin1, I wonder if it would be useful to emit a warning/suggestion to use the standard spelling. It would prefer to see the note added by Alexander in the doc mention *only* the preferred spellings (i.e.

[issue11303] b'x'.decode('latin1') is much slower than b'x'.decode('latin-1')

2011-02-25 Thread Alexander Belopolsky
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: On Fri, Feb 25, 2011 at 8:29 PM, Antoine Pitrou rep...@bugs.python.org wrote: .. For other spellings like utf8 or latin1, I wonder if it would be useful to emit a warning/suggestion to use the standard spelling. No, it

[issue11303] b'x'.decode('latin1') is much slower than b'x'.decode('latin-1')

2011-02-25 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: If we ever decide to get rid of codec aliases in the core If. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11303 ___

[issue11303] b'x'.decode('latin1') is much slower than b'x'.decode('latin-1')

2011-02-25 Thread Alexander Belopolsky
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: On Fri, Feb 25, 2011 at 8:39 PM, Ezio Melotti rep...@bugs.python.org wrote: .. It would prefer to see the note added by Alexander in the doc mention *only* the preferred spellings (i.e. 'utf-8' and 'iso-8859-1') rather

[issue8271] str.decode('utf8', 'replace') -- conformance with Unicode 5.2.0

2011-02-25 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: After a mail I sent to the Unicode Consortium about the corner case I found, they updated the Best Practices for Using U+FFFD[0] and now it says: Another example illustrates the application of the concept of maximal subpart for UTF-8

[issue11281] smtplib: add ability to bind to specific source IP address/port

2011-02-25 Thread Paulo Scardine
Paulo Scardine pa...@scardine.com.br added the comment: Giampaolo, Thanks for your kind review, I will send a patch with suggested changes this weekend. Grazie, -- Paulo -- ___ Python tracker rep...@bugs.python.org

[issue10228] Refleak run of test_dbm fails when several dbm modules are available

2011-02-25 Thread Senthil Kumaran
Senthil Kumaran orsent...@gmail.com added the comment: Fixed in revision 88631 -- nosy: +orsenthil resolution: - fixed stage: needs patch - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org

[issue11287] Add context manager support to dbm modules

2011-02-25 Thread Ray.Allen
Ray.Allen ysj@gmail.com added the comment: Update: change unittest code following eric's comments. -- Added file: http://bugs.python.org/file20902/issue11287.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11287

[issue10228] Refleak run of test_dbm fails when several dbm modules are available

2011-02-25 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Can you backport to 3.2? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10228 ___ ___

[issue11325] compilation warning with sendfile

2011-02-25 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Fixed in r88626, and it *did* fix the buildbot crash! -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11325

[issue10784] os.getpriority() and os.setpriority()

2011-02-25 Thread Senthil Kumaran
Senthil Kumaran orsent...@gmail.com added the comment: On Sat, Feb 26, 2011 at 12:11:10AM +, Antoine Pitrou wrote: if err.errno != errno.EACCESS: AttributeError: 'module' object has no attribute 'EACCESS' That was one 'S' too many. Should be errno.EACCES Looks like Antoine has fixed

[issue11327] Running test_time.py in python27 caused python to unexpectedly quit

2011-02-25 Thread Anthony Long
New submission from Anthony Long antl...@gmail.com: I ran python test_time.py and python immediately crashed. This is the trace from mac's error reporter: http://dpaste.de/Jsw7/ -- components: Tests messages: 129502 nosy: antlong priority: normal severity: normal status: open

[issue11325] compilation warning with sendfile

2011-02-25 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Fixed in r88626, and it *did* fix the buildbot crash! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11325 ___

[issue10784] os.getpriority() and os.setpriority()

2011-02-25 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Indeed. -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10784 ___ ___

[issue11325] compilation warning with sendfile

2011-02-25 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- Removed message: http://bugs.python.org/msg129503 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11325 ___

[issue10228] Refleak run of test_dbm fails when several dbm modules are available

2011-02-25 Thread Senthil Kumaran
Senthil Kumaran orsent...@gmail.com added the comment: Done in r88634. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10228 ___ ___

[issue11328] NESTED WHILE CYCLES ERROR

2011-02-25 Thread Dmitry Negius
New submission from Dmitry Negius dmitrygeni...@gmail.com: Nested while cycles does not work. This make impossible to write a class of programs with nested while cycles. -- components: Interpreter Core files: bug.py messages: 129506 nosy: negius priority: normal severity: normal

<    1   2   3