[issue18818] Empty PYTHONIOENCODING is not the same as nonexistent

2013-08-22 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file31433/empty_pythonioencoding.patch ___ Python tracker ___ ___ Python-bugs

[issue18818] Empty PYTHONIOENCODING is not the same as nonexistent

2013-08-22 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file31432/empty_pythonioencoding.patch ___ Python tracker ___ ___ Python-bu

[issue18713] Clearly document the use of PYTHONIOENCODING to set surrogateescape

2013-08-22 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- dependencies: +Empty PYTHONIOENCODING is not the same as nonexistent ___ Python tracker ___ ___ Pytho

[issue18818] Empty PYTHONIOENCODING is not the same as nonexistent

2013-08-22 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: $ PYTHONIOENCODING= ./python Fatal Python error: Py_Initialize: can't initialize sys standard streams LookupError: unknown encoding: Aborted (core dumped) As a consequence we can't set only the error handler. $ PYTHONIOENCODING=:surrogateescape ./python Fa

[issue17741] event-driven XML parser

2013-08-22 Thread Stefan Behnel
Stefan Behnel added the comment: Ok, so what are we going to do for the next alpha? -- ___ Python tracker ___ ___ Python-bugs-list mai

[issue18813] Speed up slice object processing

2013-08-22 Thread Stefan Behnel
Stefan Behnel added the comment: Here is another patch that remembers the Py_ssize_t slice indices if they are known at instantiation time. It only makes a very small difference for the "fannkuch" benchmark, so that's no reason to add both the complexity and the (IMHO ignorable) memory overhea

[issue18817] Got resource warning when running Lib/aifc.py

2013-08-22 Thread Vajrasky Kok
New submission from Vajrasky Kok: The python is compiled with debug option. cpython$ ./python Lib/aifc.py Lib/test/sndhdrdata/sndhdr.aiff Reading Lib/test/sndhdrdata/sndhdr.aiff nchannels = 2 nframes = 5 sampwidth = 2 framerate = 44100 comptype = b'NONE' compname = b'not compressed' sys:1:

[issue18623] Factor out the _SuppressCoreFiles context manager

2013-08-22 Thread Charles-François Natali
Charles-François Natali added the comment: Could you post your patch without the '--git' option? Apparently it doesn't work well with the code review tool. > It would be nice if there was a more explicit way to test the > creation of core files, however. One possibility would be to fork() a chi

[issue18816] "mmap.flush()" is always synchronous, hurting performance

2013-08-22 Thread Jesús Cea Avión
New submission from Jesús Cea Avión: Currently, "mmap.flush()" does a synchronous write to the backend file. The call will wait until data is actually flushed to disk, because internally it is doing a "msync(MS_SYNC)". But the value of "mmap.flush()" is to synchronize file and memory. You don'

[issue18814] Add tools for "cleaning" surrogate escaped strings

2013-08-22 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue16396] Importing ctypes.wintypes on Linux gives a traceback

2013-08-22 Thread Benjamin Peterson
Benjamin Peterson added the comment: This is not a regression, though, so most people wouldn't be able to simplify their code because they have to support older Python versions. -- ___ Python tracker _

[issue18815] DOCUMENTATION: "mmap .close()" doesn't close the underlying file

2013-08-22 Thread Jesús Cea Avión
New submission from Jesús Cea Avión: In documentation http://docs.python.org/3.3/library/mmap.html#mmap.close you can read: "Close the file". I could interpret that it is going to close the file vinculated to the MMAP. But it doesn't. It only close the MMAP object (as it should). Please, upda

[issue18713] Clearly document the use of PYTHONIOENCODING to set surrogateescape

2013-08-22 Thread Nick Coghlan
Nick Coghlan added the comment: Note: I created issue 18814 to cover some additional tools for working with surrogate escaped strings. For this issue, we currently have http://docs.python.org/3/howto/unicode.html, which aims to be a more comprehensive guide to understanding Unicode issues. I'

[issue18814] Add tools for "cleaning" surrogate escaped strings

2013-08-22 Thread Nick Coghlan
New submission from Nick Coghlan: Prompted by issue 18713 and http://lucumr.pocoo.org/2013/7/2/the-updated-guide-to-unicode/, here are some possible utilities we could add to the codecs module to help deal with/debug issues related to surrogate escaped strings: def has_escaped_bytes(s):

[issue18811] add ssl-based generator to random module

2013-08-22 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: -> rhettinger nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue18812] PyImport_Import redundant calls to find module

2013-08-22 Thread Eric Snow
Eric Snow added the comment: My guess is that, in part, it's left-over code from before the switch to importlib. However, it relies on builtins.__import__(), which isn't guaranteed to work correctly, hence one last sync with sys.modules. I'm not convinced that justifies not simply returning

[issue16902] Add OSS module support for Solaris

2013-08-22 Thread Tim Mooney
Tim Mooney added the comment: For what it's worth, I've been using a patch nearly identical to this one with python 2.6.x and 2.7.x with good success, and in my case it was under Solaris 10 with the no-cost "oss" package from 4Front. I now have a new workstation and I've installed OpenIndiana

[issue18811] add ssl-based generator to random module

2013-08-22 Thread Christian Heimes
Changes by Christian Heimes : Removed file: http://bugs.python.org/file31419/prng.py ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue18623] Factor out the _SuppressCoreFiles context manager

2013-08-22 Thread Valerie Lambert
Valerie Lambert added the comment: I have included a patch that moves _SuppressCoreFiles into test.support and a test that checks whether resource.RLIMIT_CORE is being properly set and reset. It would be nice if there was a more explicit way to test the creation of core files, however. The pat

[issue18811] add ssl-based generator to random module

2013-08-22 Thread Christian Heimes
Christian Heimes added the comment: Improved benchmark script: Loops: 50 1 4 8 16 32 64 128 urandom (fd)0.091 0.185 0.306 0.544 1.060 1.989 3.876 urandom (fd, no buf)0.504 0.502 0.502 0.806 1.398 2.324 4.086 o

[issue18713] Enable surrogateescape on stdin and stdout when appropriate

2013-08-22 Thread Benjamin Peterson
Benjamin Peterson added the comment: I think it would be great to have a "Unicode/bytes" howto with information like this included. -- ___ Python tracker ___ ___

[issue18713] Enable surrogateescape on stdin and stdout when appropriate

2013-08-22 Thread Nick Coghlan
Nick Coghlan added the comment: On 23 Aug 2013 01:40, "R. David Murray" wrote: . (I double checked, and this does indeed work...doing the equivalent of ls >temp via python preserves the bytes with that PYTHONIOENCODING setting. I don't quite understand, however, why I get the � chars if I don'

[issue18571] Implementation of the PEP 446: non-inheritable file descriptors

2013-08-22 Thread STINNER Victor
STINNER Victor added the comment: I tested 17211acb65b1.diff on my x86_64 VMs: Linux: Linux-3.9.4-200.fc18.x86_64-x86_64-with-fedora-18-Spherical_Cow => 358 tests OK. OpenIndiana: Solaris-2.11-i86pc-i386-32bit-ELF => 3 tests failed: test_locale test_tcl test_uuid -- none of these failures are

[issue18571] Implementation of the PEP 446: non-inheritable file descriptors

2013-08-22 Thread STINNER Victor
Changes by STINNER Victor : Added file: http://bugs.python.org/file31427/17211acb65b1.diff ___ Python tracker ___ ___ Python-bugs-list mailing

[issue18713] Enable surrogateescape on stdin and stdout when appropriate

2013-08-22 Thread STINNER Victor
STINNER Victor added the comment: >>> ('\udcff' + 'qwerty').encode('utf-16le', 'surrogateescape') b'\xff\xdcq\x00w\x00e\x00r\x00t\x00y\x00' Oh, this is a bug in the UTF-16 encoder: it should not encode surrogate characters => see issue #12892 I read that it's possible to set a standard stream

[issue734176] Make Tkinter.py's nametowidget work with cloned menu widgets

2013-08-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: issue18686 have a script which demonstrates the proposed feature. However Guilherme's patch is a little wrong. Here is updated patch. Note that even this patch is not absolute correct, because Tk adds count if new name is not unique. I.e. if .#12345 already

[issue18686] Tkinter focus_get on menu results in KeyError

2013-08-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is a duplicate of issue734176. Thank you for your example Jeffrey. -- nosy: +serhiy.storchaka resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> Make Tkinter.py's nametowidget work with cloned menu widg

[issue16396] Importing ctypes.wintypes on Linux gives a traceback

2013-08-22 Thread Meador Inge
Meador Inge added the comment: Using 'ctypes.wintypes' on non-Windows systems is most likely a bad idea. Most of the types are defined in terms of the types for the target that the interpreter is built for. Comparing serializations thereof in a cross platform manner doesn't make sense for a

[issue18813] Speed up slice object processing

2013-08-22 Thread Stefan Behnel
Stefan Behnel added the comment: And in fact, callgrind shows an *increase* in the number of instructions executed for the "use locals" patch (898M with vs. 846M without that patch when running the fannkuch benchmark twice). That speaks against making that change, I guess. -- ___

[issue16396] Importing ctypes.wintypes on Linux gives a traceback

2013-08-22 Thread Jason R. Coombs
Jason R. Coombs added the comment: The first thing it helps is that it eliminates a ValueError on import. Without it, code must catch both ValueError and ImportError to run portably: import ctypes try: import ctypes.wintypes except ImportError, ValueError: # catch ImportError and ValueErro

[issue18763] subprocess: file descriptors should be closed after preexec_fn is called

2013-08-22 Thread Charles-François Natali
Charles-François Natali added the comment: > Using self.assertLessEqual() would provide better message on error. Done. > You don't want to fix Python 2.7 and 3.3? It is a bug in my opinion. Patch for 2.7 attached (without test though, because 2.7 lacks a fd_status.py helper, which would make t

[issue18813] Speed up slice object processing

2013-08-22 Thread Stefan Behnel
Stefan Behnel added the comment: Another patch, originally proposed in issue10227 by Kristján Valur Jónsson. It uses local variables instead of pointers in PySlice_GetIndicesEx(). I see no performance difference whatsoever (Linux/gcc 4.7), but also I can't see a reason not to do this. I think

[issue18811] add ssl-based generator to random module

2013-08-22 Thread STINNER Victor
STINNER Victor added the comment: Use time.perf_counter() for benchmarkks!!! It would be interesting to compare performances on other platforms: Windows, Solaris, Mac OS X, ... -- ___ Python tracker __

[issue18813] Speed up slice object processing

2013-08-22 Thread Stefan Behnel
Stefan Behnel added the comment: Sorry, broken patch. Here's a new one (same results). -- Added file: http://bugs.python.org/file31422/faster_PyEval_SliceIndex.patch ___ Python tracker _

[issue18813] Speed up slice object processing

2013-08-22 Thread Stefan Behnel
Stefan Behnel added the comment: This tiny patch adds a fast-path to _PyEval_SliceIndex() that speeds up the slicing-heavy "fannkuch" benchmark by 8% for me. -- keywords: +patch Added file: http://bugs.python.org/file31421/faster_PyEval_SliceIndex.patch

[issue18813] Speed up slice object processing

2013-08-22 Thread Stefan Behnel
New submission from Stefan Behnel: The get/set/delitem slicing protocol has replaced the old Py2.x get/set/delslice protocol in Py3.x. This change introduces a substantial overhead due to processing indices as Python objects rather than plain Py_ssize_t values. This overhead should be reduced

[issue18747] Re-seed OpenSSL's PRNG after fork

2013-08-22 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Aug 21, 2013, at 11:49 AM, Christian Heimes wrote: >I have taken care of Antoine's and Victor's reviews. The fix has landed in >Python 2.7, 3.3 and 3.4. What about 2.6, 3.1 and 3.2? After all it's a >security fix (although I don't consider its severity as hi

[issue16840] Tkinter doesn't support large integers

2013-08-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Patch updated. -- Added file: http://bugs.python.org/file31420/tkinter_bignum_2.patch ___ Python tracker ___ _

[issue18812] PyImport_Import redundant calls to find module

2013-08-22 Thread Rob Bairos
Changes by Rob Bairos : -- type: -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pytho

[issue18812] PyImport_Import redundant calls to find module

2013-08-22 Thread Rob Bairos
New submission from Rob Bairos: Why does PyImport_Import (import.c) call __import__ then immediately discard the result, and then look for the module again in the module dictionary? It will return the same value in both cases no? Ive included the relevant portion of the code below. Its break

[issue18811] add ssl-based generator to random module

2013-08-22 Thread Charles-François Natali
Charles-François Natali added the comment: > It doesn't look like OpenSSL's PRNG is much faster than /dev/urandom if > Python keeps a persistent fd: > > $ python3.3 prng.py > loops: 100 > bytes: 16 > /dev/urandom (fd)1.2181 > os.urandom() 3.2892 > RAND_pseudo_bytes

[issue18811] add ssl-based generator to random module

2013-08-22 Thread Christian Heimes
Christian Heimes added the comment: I'm -1 It doesn't look like OpenSSL's PRNG is much faster than /dev/urandom if Python keeps a persistent fd: $ python3.3 prng.py loops: 100 bytes: 16 /dev/urandom (fd)1.2181 os.urandom() 3.2892 RAND_pseudo_bytes1.2924 RAND_by

[issue18811] add ssl-based generator to random module

2013-08-22 Thread Charles-François Natali
New submission from Charles-François Natali: Now that the ssl module exposes RAND_bytes() (issue #12049), it might be interesting to implement a SSLRandom generator to the random module, to have a cryptographically strong generator without the os.urandom() overhead. Thoughts? -- messa

[issue17119] Integer overflow when passing large string or tuple to Tkinter

2013-08-22 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker ___ ___

[issue18808] Thread.join returns before PyThreadState is destroyed

2013-08-22 Thread Tamas K
Tamas K added the comment: Removing the last thread check sounds good, what we actually need is a Py_EndInterpreter that does not casually abort() on us, we don't really care about PyThreadStates that much. -- ___ Python tracker

[issue18797] Don't needlessly change refcounts of dummy objects for sets

2013-08-22 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue18808] Thread.join returns before PyThreadState is destroyed

2013-08-22 Thread Antoine Pitrou
Antoine Pitrou added the comment: (Of course, the latter problem can be solved by having a dedicated sentinel in the thread state that gets DECREF'efed only *after* the thread state is removed from the interpreter...) -- ___ Python tracker

[issue18808] Thread.join returns before PyThreadState is destroyed

2013-08-22 Thread Antoine Pitrou
Antoine Pitrou added the comment: (Actually, it would almost be possible to combine weakrefs and thread locals to ensure that join() only returns when the thread state is cleared. However, the thread state is cleared before it is untied from the interpreter, and there would still be a small wi

[issue18713] Enable surrogateescape on stdin and stdout when appropriate

2013-08-22 Thread R. David Murray
R. David Murray added the comment: If you pipe the ls (eg: ls >temp) the bytes are preserved. Since setting the escape handler via PYTHONIOENCODING sets it for both stdin in and stdout, it sounds like that solves the sysadmin use case. The sysadmin can just put that environment variable sett

[issue17803] Calling Tkinter.Tk() with a baseName keyword argument throws UnboundLocalError

2013-08-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Fixed in changesets fa82071bb7e1 and 0f17aed78168. -- nosy: +serhiy.storchaka resolution: -> duplicate stage: test needed -> committed/rejected status: open -> closed superseder: -> Security bug in tkinter allows for untrusted, arbitrary code execut

[issue18808] Thread.join returns before PyThreadState is destroyed

2013-08-22 Thread Antoine Pitrou
Antoine Pitrou added the comment: I *think* we could remove that limitation in Py_EndInterpreter(). After all, Py_Finalize() is able to join() non-daemon threads, so there's no reason for Py_EndInterpreter() to allow it too. We must keep the fatal error for daemon threads, though. As for ensu

[issue18747] Re-seed OpenSSL's PRNG after fork

2013-08-22 Thread Charles-François Natali
Charles-François Natali added the comment: >> PySSL_RAND_atfork_parent() still uses getpid(). This number is not >> very random in the *parent* process :-) > > That's fine and doesn't diminish the properties of the PRNG. In fact the > patch could use a hard coded value to perturb the PRNG. It's o

[issue18797] Don't needlessly change refcounts of dummy objects for sets

2013-08-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset ac6dab1819c4 by Raymond Hettinger in branch 'default': Issue 18797: Remove unneeded refcount adjustments for dummy objects. http://hg.python.org/cpython/rev/ac6dab1819c4 -- nosy: +python-dev ___ Python t

[issue18747] Re-seed OpenSSL's PRNG after fork

2013-08-22 Thread Antoine Pitrou
Antoine Pitrou added the comment: > IMO this patch has been rushed in and should be reverted for now. > It's still not async-signal safe, had typos, plus this problem noted > by Victor. That's not really a problem. You merely have to *perturb* the random state in the parent, so that the next chi

[issue12641] Remove -mno-cygwin from distutils

2013-08-22 Thread Éric Araujo
Changes by Éric Araujo : -- Removed message: http://bugs.python.org/msg195896 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue16809] Tk 8.6.0 introduces TypeError. (Tk 8.5.13 works)

2013-08-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you alejandro. Fixed. I'm afraid this is not all problems with 8.6 and so left this issue open. -- priority: high -> critical stage: needs patch -> commit review versions: -Python 3.2 ___ Python tracker

[issue12641] Remove -mno-cygwin from distutils

2013-08-22 Thread Éric Araujo
Changes by Éric Araujo : -- title: Interface -> Remove -mno-cygwin from distutils ___ Python tracker ___ ___ Python-bugs-list mailing

[issue12641] Interface

2013-08-22 Thread Éric Araujo
Changes by Éric Araujo : Removed file: http://bugs.python.org/file31417/test2.html ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue16809] Tk 8.6.0 introduces TypeError. (Tk 8.5.13 works)

2013-08-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset 516b0cd87a90 by Serhiy Storchaka in branch '3.3': Issue #16809: Fixed some tkinter incompabilities with Tcl/Tk 8.6. http://hg.python.org/cpython/rev/516b0cd87a90 New changeset 5b5ef012cd4e by Serhiy Storchaka in branch 'default': Issue #16809: Fixed

[issue18810] Stop doing stat calls in importlib.machinery.FileFinder to see if something is a file or folder

2013-08-22 Thread Brett Cannon
New submission from Brett Cannon: If the check was done based on simply the format what was being searched for (e.g. just assume it's a file if "module.py" exists in the directory) then a couple of stat calls per search could be saved. If that is deemed to dangerous due to backwards-compatibil

[issue18809] Expose mtime check in importlib.machinery.FileFinder

2013-08-22 Thread Brett Cannon
Changes by Brett Cannon : -- stage: -> test needed type: -> enhancement ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

[issue16809] Tk 8.6.0 introduces TypeError. (Tk 8.5.13 works)

2013-08-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset 6b841e1ee3b8 by Serhiy Storchaka in branch '3.3': Issue #16809: Tkinter's splitlist() and split() methods now accept Tcl_Obj http://hg.python.org/cpython/rev/6b841e1ee3b8 New changeset 85285e6e28f4 by Serhiy Storchaka in branch 'default': Issue #168

[issue18809] Expose mtime check in importlib.machinery.FileFinder

2013-08-22 Thread Brett Cannon
New submission from Brett Cannon: If you have enough control over your environment you really don't need to waste a stat call checking if the directory has been modified. That makes the idea of having the check of whether the directory has changed be exposed publicly a useful idea (code: http

[issue18713] Enable surrogateescape on stdin and stdout when appropriate

2013-08-22 Thread Nick Coghlan
Nick Coghlan added the comment: Note that the specific case I'm really interested is printing on systems that are properly configured to use UTF-8, but are getting bad metadata from an OS API. I'm OK with the idea of *only* changing it for UTF-8 rather than for arbitrary encodings, as well as

[issue12641] Interface

2013-08-22 Thread Travis
Travis added the comment: Interface -- nosy: +honorableinvasi title: Remove -mno-cygwin from distutils -> Interface Added file: http://bugs.python.org/file31417/test2.html ___ Python tracker ___

[issue18713] Enable surrogateescape on stdin and stdout when appropriate

2013-08-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: >>> ('\udcff' + 'qwerty').encode('utf-16le', 'surrogateescape') b'\xff\xdcq\x00w\x00e\x00r\x00t\x00y\x00' >>> ('\udcff' + 'qwerty').encode('utf-16le', >>> 'surrogateescape').decode('utf-16le', 'surrogateescape') '\udcff\udcdcqwerty' >>> ('\udcff' + 'qwerty').e

[issue18808] Thread.join returns before PyThreadState is destroyed

2013-08-22 Thread Tamas K
Tamas K added the comment: The bug was found in 2.6.5, but after a quick eyeballing, current HEAD has the same problem. -- ___ Python tracker ___ ___

[issue18747] Re-seed OpenSSL's PRNG after fork

2013-08-22 Thread Christian Heimes
Christian Heimes added the comment: Yet another good blog post about the issue: OpenSSL PRNG Is Not (Really) Fork-safe http://emboss.github.io/blog/2013/08/21/openssl-prng-is-not-really-fork-safe/ -- ___ Python tracker

[issue18808] Thread.join returns before PyThreadState is destroyed

2013-08-22 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +pitrou stage: -> test needed versions: +Python 3.4 -Python 2.6, Python 3.1, Python 3.2 ___ Python tracker ___ ___

[issue18800] Document Fraction's numerator and denominator properties

2013-08-22 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- keywords: +easy nosy: +mark.dickinson, rhettinger stage: -> needs patch versions: +Python 2.7, Python 3.4 ___ Python tracker ___ ___

[issue18747] Re-seed OpenSSL's PRNG after fork

2013-08-22 Thread Christian Heimes
Christian Heimes added the comment: Am 22.08.2013 15:20, schrieb STINNER Victor: > > STINNER Victor added the comment: > > PySSL_RAND_atfork_parent() still uses getpid(). This number is not > very random in the *parent* process :-) That's fine and doesn't diminish the properties of the PRNG. I

[issue18808] Thread.join returns before PyThreadState is destroyed

2013-08-22 Thread Tamas K
New submission from Tamas K: When a thread is started in CPython, t_bootstrap [Modules/threadmodule.c] creates a PyThreadState object and then calls Thread.__bootstrap_inner [Lib/threading.py] which calls Thread.run, protected with self.__block, a Condition. Thread.join uses the same __block t

[issue15806] Add context manager for the "try: ... except: pass" pattern

2013-08-22 Thread Yury V. Zaytsev
Yury V. Zaytsev added the comment: Actually, please disregard my idea. It's way to dangerous, especially in the case of multiple exceptions to ignore :-( -- ___ Python tracker _

[issue18540] imaplib.IMAP4() ends with "Name or service not known" on Fedora 18

2013-08-22 Thread Daniël van Eeden
Changes by Daniël van Eeden : -- nosy: +dveeden ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyt

[issue11245] Implementation of IMAP IDLE in imaplib?

2013-08-22 Thread Daniël van Eeden
Changes by Daniël van Eeden : -- nosy: +dveeden ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyt

[issue18800] Document Fraction's numerator and denominator properties

2013-08-22 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- nosy: +belopolsky ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://m

[issue18747] Re-seed OpenSSL's PRNG after fork

2013-08-22 Thread STINNER Victor
STINNER Victor added the comment: > IMO this patch has been rushed in and should be reverted for now. Agreed. -- ___ Python tracker ___ _

[issue18747] Re-seed OpenSSL's PRNG after fork

2013-08-22 Thread Charles-François Natali
Charles-François Natali added the comment: > STINNER Victor added the comment: > > PySSL_RAND_atfork_parent() still uses getpid(). This number is not > very random in the *parent* process :-) :-) IMO this patch has been rushed in and should be reverted for now. It's still not async-signal safe,

[issue18747] Re-seed OpenSSL's PRNG after fork

2013-08-22 Thread STINNER Victor
STINNER Victor added the comment: PySSL_RAND_atfork_parent() still uses getpid(). This number is not very random in the *parent* process :-) -- ___ Python tracker ___ ___

[issue18713] Enable surrogateescape on stdin and stdout when appropriate

2013-08-22 Thread STINNER Victor
STINNER Victor added the comment: > The surrogateescape error handler is dangerous with utf-16/32. It can produce > globally invalid output. I don't understand, can you give an example? surrogateescape generate invalid encoded string with any encoding. Example with UTF-8: >>> b"a\xffb".decode

[issue18747] Re-seed OpenSSL's PRNG after fork

2013-08-22 Thread Christian Heimes
Christian Heimes added the comment: Thanks, that's embarrassing. :( I'm going to install a spell checker ... -- ___ Python tracker ___ ___

[issue18747] Re-seed OpenSSL's PRNG after fork

2013-08-22 Thread Vajrasky Kok
Vajrasky Kok added the comment: Some typos on last commit "current time (miliseconds or seconds) and an uninitialized arry." should be "current time (miliseconds or seconds) and an uninitialized array." "instead of a child handler because fork() is suppose to be async-signal" should be

[issue18807] Allow venv to create copies, even when symlinks are supported

2013-08-22 Thread Andrea Corbellini
New submission from Andrea Corbellini: I'd really appreciate if `venv` could create environments without symlinks. Working on many Python projects, each one with different requirements, I prefer to keep everything I need in a single virtualenv directory, rather than two (one for the virtualenv

[issue18713] Enable surrogateescape on stdin and stdout when appropriate

2013-08-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The surrogateescape error handler is dangerous with utf-16/32. It can produce globally invalid output. -- ___ Python tracker ___

[issue18762] error in test_multiprocessing_forkserver

2013-08-22 Thread Richard Oudkerk
Richard Oudkerk added the comment: Hopefully this is fixed now. -- resolution: -> fixed stage: -> committed/rejected status: open -> closed type: -> behavior ___ Python tracker __

[issue18606] Add statistics module to standard library

2013-08-22 Thread Oscar Benjamin
Oscar Benjamin added the comment: On 22 August 2013 03:43, Steven D'Aprano wrote: > > If Oscar is willing, I'd like to discuss some of his ideas off-list, but that > may take some time. I am willing and it will take time. I've started reading the paper that Raymond Hettinger references for th

[issue15806] Add context manager for the "try: ... except: pass" pattern

2013-08-22 Thread Yury V. Zaytsev
Yury V. Zaytsev added the comment: Hi Raymond, This is a brilliant idea, but before it hits the streets, couldn't you possibly consider extending it with a kwarg to control the depth of the exception stack? The use case I have for that are snippets like this: with ignored(ValueError, Type

[issue18713] Enable surrogateescape on stdin and stdout when appropriate

2013-08-22 Thread STINNER Victor
STINNER Victor added the comment: > Is it a bug in your patch, or is it deliberate? It was not deliberate, and I think that it would be more consistent to use the same error handler (surrogateescape) when only the encoding is changed by the PYTHONIOENCODING environment variable. So surrogateesca

[issue18747] Re-seed OpenSSL's PRNG after fork

2013-08-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset 39c9dbed3aa1 by Christian Heimes in branch '3.3': Issue #18747: Use a parent atfork handler instead of a child atfork handler. http://hg.python.org/cpython/rev/39c9dbed3aa1 New changeset 25e05147d662 by Christian Heimes in branch 'default': Issue #1

[issue18762] error in test_multiprocessing_forkserver

2013-08-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset a94555d5070f by Richard Oudkerk in branch 'default': Issue #18762: Fix EBADF error when using forkserver. http://hg.python.org/cpython/rev/a94555d5070f -- ___ Python tracker

[issue15204] Deprecate the 'U' open mode

2013-08-22 Thread Vajrasky Kok
Vajrasky Kok added the comment: http://bugs.python.org/review/15204/diff/9032/Tools/iobench/iobench.py Line 10 in New: import io But io module is never used. -- nosy: +vajrasky ___ Python tracker

[issue18713] Enable surrogateescape on stdin and stdout when appropriate

2013-08-22 Thread Antoine Pitrou
Antoine Pitrou added the comment: Is it a bug in your patch, or is it deliberate? -- ___ Python tracker ___ ___ Python-bugs-list maili

[issue18713] Enable surrogateescape on stdin and stdout when appropriate

2013-08-22 Thread STINNER Victor
STINNER Victor added the comment: >> Serhiy Storchaka also noticed (in the review of my patch) than errors >> is "strict" when PYTHONIOENCODING=utf-8 is used. We should also use >> surrogateescape if only the encoding is changed. > I don't understand what you say. Could you rephrase? With my pat

[issue18713] Enable surrogateescape on stdin and stdout when appropriate

2013-08-22 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Serhiy Storchaka also noticed (in the review of my patch) than errors > is "strict" when PYTHONIOENCODING=utf-8 is used. We should also use > surrogateescape if only the encoding is changed. I don't understand what you say. Could you rephrase? -- ___

[issue18713] Enable surrogateescape on stdin and stdout when appropriate

2013-08-22 Thread Antoine Pitrou
Antoine Pitrou added the comment: > See my message msg195769: Python3 cannot be simply used as a pipe > because it wants to be kind by decoding binary data to Unicode, > whereas no everybody cares of Unicode :-) If somebody doesn't care about unicode, they can use sys.stdin.buffer. Problem solve

[issue18713] Enable surrogateescape on stdin and stdout when appropriate

2013-08-22 Thread STINNER Victor
STINNER Victor added the comment: Serhiy Storchaka added the comment: > Shouldn't be safer use surrogateescape for output and strict for input. Nick wrote "Think sysadmins running scripts on Linux, writing to the console or a pipe." See my message msg195769: Python3 cannot be simply used as a p

[issue16700] Document that bytes OS API can returns unusable results on Windows

2013-08-22 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- versions: -Python 3.2 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://

[issue18806] socketmodule: fix/improve setipaddr() numeric addresses handling

2013-08-22 Thread Charles-François Natali
Charles-François Natali added the comment: > So it might be better to just use inet_pton() instead. But then it won't set the scope ID if the user doesn't provide it... -- ___ Python tracker __

[issue18713] Enable surrogateescape on stdin and stdout when appropriate

2013-08-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Shouldn't be safer use surrogateescape for output and strict for input. -- ___ Python tracker ___

[issue18713] Enable surrogateescape on stdin and stdout when appropriate

2013-08-22 Thread STINNER Victor
STINNER Victor added the comment: > I'm only saying that this will increase a number of cases > when an exception will raised in unexpected place. The print() instruction is much more common than input(). IMO changing the error handle should fix more issues than adding regressions. Python funct

  1   2   >