[issue22401] argparse: 'resolve' conflict handler damages the actions of the parent parser
Changes by paul j3 ajipa...@gmail.com: Added file: http://bugs.python.org/file36656/sample3.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22401 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22401] argparse: 'resolve' conflict handler damages the actions of the parent parser
Changes by paul j3 ajipa...@gmail.com: Removed file: http://bugs.python.org/file36648/sample3.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22401 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22366] urllib.request.urlopen shoudl take a context (SSLContext) argument
Roundup Robot added the comment: New changeset c0b0dda16009 by Senthil Kumaran in branch 'default': Issue #22366: urllib.request.urlopen will accept a context object (SSLContext) https://hg.python.org/cpython/rev/c0b0dda16009 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22366 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22366] urllib.request.urlopen shoudl take a context (SSLContext) argument
Senthil Kumaran added the comment: Committed this in 3.5. (Since this is adding an new argument, it should not be backported to 3.4). Thank you! -- resolution: - fixed stage: - resolved status: open - closed versions: -Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22366 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22440] Setting SSLContext object's check_hostname manually might accidentally skip hostname verification
New submission from Senthil Kumaran: While working on issue22366, I found a tricky bit of code in: https://hg.python.org/cpython/file/ca0aa0d89273/Lib/http/client.py#l1295 https://hg.python.org/cpython/rev/1a945fb875bf/ The statement is if not self._context.check_hostname and self._check_hostname: The context object's check_hostname (created by ssl._create_stdlib_context() - note private ) is False by default and the statement holds good and acts only on self._check_hostname But if the context is constructed manually and the context object's check_hostname is set to True (with correct intentions), that statement will lead to skipping of matching hostname! Is my analysis right here? -- messages: 227082 nosy: alex, christian.heimes, dstufft, orsenthil, pitrou priority: normal severity: normal status: open title: Setting SSLContext object's check_hostname manually might accidentally skip hostname verification versions: Python 3.4, Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22440 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22434] Use named constants internally in the re module
Serhiy Storchaka added the comment: Here is a patch using enums. I still think enums are superfluous here. Advanced the Enum class features (pickling, access by name, type checking) are not needed - these constants don't leaked in outer word. I don't see where there would be a circular dependency; the enum module doesn't import the re module. Right now there is no circular dependency. But the enum module imports collections which imports a lot of other modules, some of which import other modules. In future some of indirectly imported module can import the re module. There is one thing that might be less convenient: defining an enum doesn't automatically make the values globals. But wouldn't the code be better if the values weren't globals? I afraid this will make the code of parser and compiler less readable and slower. In any case the sre_constants module itself is a namespace. -- Added file: http://bugs.python.org/file36657/re_opcode_enums.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22434 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22364] Unify error messages of re and regex
Serhiy Storchaka added the comment: The regex module is potential candidate for replacement of the re module. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22364 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22427] TemporaryDirectory attempts to clean up twice
Serhiy Storchaka added the comment: Fixed a bug in the test and partially addressed Victor's and Yury's comments. Antoine, could your pleas answer following question? Is it safe to remove the self._finalizer is not None check in cleanup()? I.e. is it possible that self._finalizer becomes None at garbage collection? -- Added file: http://bugs.python.org/file36658/tempfile_exit_on_shutdown3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22427 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22278] urljoin duplicate slashes
Senthil Kumaran added the comment: Except for the minor comments made by Antoine in the review, the patch looks good to go. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22278 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22410] Locale dependent regexps on different locales
Serhiy Storchaka added the comment: Moved the import to the top level as Antoine suggested. -- Added file: http://bugs.python.org/file36659/re_locale_caching3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22410 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22410] Locale dependent regexps on different locales
Changes by Serhiy Storchaka storch...@gmail.com: Removed file: http://bugs.python.org/file36653/re_locale_caching2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22410 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22427] TemporaryDirectory attempts to clean up twice
Antoine Pitrou added the comment: self._finalizer can be None if an exception was raised during __init__(). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22427 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22427] TemporaryDirectory attempts to clean up twice
Serhiy Storchaka added the comment: But in this case cleanup() can't be called. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22427 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22441] Not all attributes of the console for a subprocess with creationflags=0 are inherited
New submission from Sworddragon: The application apt-get on Linux does scale its output dependent of the size of the terminal but I have noticed that there are differences if I'm calling apt-get directly or with a subprocess without shell and creationflags set (so that creationflags should be 0). From the documentation subprocess.CREATE_NEW_CONSOLE is not set so that apt-get does inherit the console and normally I would assume that this counts also for all attributes. In the attachments is a testcase for this issue. Also here are 2 screenshots to compare the results: Direct call: http://picload.org/image/crlrapg/normal.png Subprocess: http://picload.org/image/crlrapd/subprocess.png -- components: Library (Lib) files: test.py messages: 227090 nosy: Sworddragon priority: normal severity: normal status: open title: Not all attributes of the console for a subprocess with creationflags=0 are inherited type: behavior versions: Python 3.4 Added file: http://bugs.python.org/file36660/test.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22441 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22366] urllib.request.urlopen shoudl take a context (SSLContext) argument
Larry Hastings added the comment: Alex said he needed this in order to implement PEP 476, and I thought PEP 476 was going in to 3.4 (hopefully for 3.4.2, which I'm tagging in like 24 hours). -- nosy: +larry ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22366 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22366] urllib.request.urlopen shoudl take a context (SSLContext) argument
Nick Coghlan added the comment: Larry, it's probably easiest to cover the backport under issue 22417 with the rest of the proposed PEP 476 changes. -- nosy: +ncoghlan ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22366 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22417] PEP 476: verify HTTPS certificates by default
Nick Coghlan added the comment: Currently marking as a deferred blocker, as Alex wasn't sure he'd be able to get PEP 476 fully updated in time for 3.4.2rc1, and was willing to accept waiting for 2.7.9 and 3.4.3 rather than delaying 3.4.2 any further. However, that was before Senthil accepted the patch in 22366 for 3.5, which means we're at feature complete for the proposed changes. There's still the issue 22366 backport patch, PEP update, docs updates and What's New updates to go, so assigning to Alex to decide if he wants to work with Larry to get this ready to go for 3.4.2 (noting that the PEP still needs the final tick of approval from Guido after being updated to reflect the proposed implementation). Otherwise we can get it ready for 2.7.9 with the other SSL changes, and it will appear in the 3.4.3 maintenance release, rather than 3.4.2. (Note that I'm busy most of this weekend, so +1 from me in advance if you decide to go ahead with getting it into 3.4.2) -- assignee: - alex dependencies: +urllib.request.urlopen shoudl take a context (SSLContext) argument nosy: +benjamin.peterson priority: high - deferred blocker versions: +Python 2.7, Python 3.4, Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22417 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22440] Setting SSLContext object's check_hostname manually might accidentally skip hostname verification
Alex Gaynor added the comment: If check_hostname is set on the context then do_handshake() will already perform the hostname check: https://hg.python.org/cpython/file/default/Lib/ssl.py#l787 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22440 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22442] subprocess.check_call hangs on large PIPEd data.
New submission from juj: On Windows, write a.py: import subprocess def ccall(cmdline, stdout, stderr): proc = subprocess.Popen(['python', 'b.py'], stdout=subprocess.PIPE, stderr=subprocess.PIPE) proc.communicate() if proc.returncode != 0: raise subprocess.CalledProcessError(proc.returncode, cmdline) return 0 # To fix subprocess.check_call, uncomment the following, which is functionally equivalent: # subprocess.check_call = ccall subprocess.check_call(['python', 'b.py'], stdout=subprocess.PIPE, stderr=subprocess.PIPE) print 'Finished!' Then write b.py: import sys str = 'aaa' for i in range(0,16): str = str + str for i in range(0,2): print sys.stderr, str for i in range(0,2): print str Finally, run 'python a.py'. The application will hang. Uncomment the specicied line to fix the execution. This is a documented failure on the python subprocess page, but why not just fix it up directly in python itself? One can think that modifying stdout or stderr is not the intent for subprocess.check_call, but python certainly should not hang because of that. -- components: Library (Lib) messages: 227095 nosy: juj priority: normal severity: normal status: open title: subprocess.check_call hangs on large PIPEd data. versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22442 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22442] subprocess.check_call hangs on large PIPEd data.
Changes by STINNER Victor victor.stin...@gmail.com: -- components: +Windows nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22442 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22443] read(1) blocks on unflushed output
New submission from Sworddragon: On reading the output of an application (for example apt-get download firefox) that dynamically changes a line (possibly with the terminal control character \r) I have noticed that read(1) does not read the output until it has finished with a newline. This happens even with disabled buffering. In the attachments is a testcase for this problem. Also here are 2 screenshots to compare the results: Direct call: http://picload.org/image/crldgri/normal.png Subprocess: http://picload.org/image/crldgrw/subprocess.png -- components: Library (Lib) files: test.py messages: 227097 nosy: Sworddragon priority: normal severity: normal status: open title: read(1) blocks on unflushed output type: behavior versions: Python 3.4 Added file: http://bugs.python.org/file36661/test.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22443 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22443] read(1) blocks on unflushed output
STINNER Victor added the comment: On reading the output of an application (for example apt-get download firefox) that dynamically changes a line (possibly with the terminal control character \r) I have noticed that read(1) does not read the output until it has finished with a newline. The buffering of stdout and/or stderr of your application probably changes if the application runs in a terminal (TTY) or if the output is redirected to a pipe (not a TTY). Set the setvbuf() function. You can try my hack to disable buffering using LD_PRELOAD: https://bitbucket.org/haypo/misc/src/4d133ea3e46550808305b093557ee51d2de2ac9f/misc/nobuffer.c?at=default -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22443 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22442] subprocess.check_call hangs on large PIPEd data.
juj added the comment: The same observation applies to subprocess.call() as well. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22442 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22443] read(1) blocks on unflushed output
Changes by Sworddragon sworddrag...@aol.com: Removed file: http://bugs.python.org/file36661/test.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22443 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22427] TemporaryDirectory attempts to clean up twice
Antoine Pitrou added the comment: Ah... you are right. It seems the None test has been superfluous all the time. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22427 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22443] read(1) blocks on unflushed output
Sworddragon added the comment: Edit: Updated testcase as I forgot to flush the output (in case somebody hints to it). -- Added file: http://bugs.python.org/file36662/test.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22443 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22366] urllib.request.urlopen shoudl take a context (SSLContext) argument
Senthil Kumaran added the comment: My worry is not about the timing. I can add it immediately, but are we convinced on having a new argument (API Change) for 3.4.2 ? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22366 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22443] read(1) blocks on unflushed output
Sworddragon added the comment: The buffering of stdout and/or stderr of your application probably changes if the application runs in a terminal (TTY) or if the output is redirected to a pipe (not a TTY). Set the setvbuf() function. This means in the worst case there is currently no official way to get this output before it writes a newline? You can try my hack to disable buffering using LD_PRELOAD: https://bitbucket.org/haypo/misc/src/4d133ea3e46550808305b093557ee51d2de2ac9f/misc/nobuffer.c?at=default I will try later if I can successfully compile Python with this hack. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22443 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22443] read(1) blocks on unflushed output
STINNER Victor added the comment: This means in the worst case there is currently no official way to get this output before it writes a newline? The behaviour of stdout/stderr is defined in the C library, see setvbuf() manual for more information. I don't know a generic way to change the default buffering without modifying the application (or the LD_PRELOAD hack). I will try later if I can successfully compile Python with this hack. You don't need to compile Python. Just compile nobuffer.c to libnobuffer.so. See the documentation in nobuffer.c. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22443 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22443] read(1) blocks on unflushed output
Sworddragon added the comment: You don't need to compile Python. Just compile nobuffer.c to libnobuffer.so. See the documentation in nobuffer.c. Strictly following the documentation does not work: sworddragon@ubuntu:~/tmp$ gcc -shared -o nobuffer.so interceptor.c gcc: error: interceptor.c: No such file or directory gcc: fatal error: no input files compilation terminated. Trying to fix this results in this error: sworddragon@ubuntu:~/tmp$ gcc -shared -o nobuffer.so nobuffer.c /usr/bin/ld: /tmp/ccgArKHv.o: relocation R_X86_64_PC32 against undefined symbol `stdout@@GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: final link failed: Bad value collect2: error: ld returned 1 exit status -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22443 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22439] subprocess.PIPE.stdin.flush() causes to hang while subprocess.PIPE.stdin.close() not
Sworddragon added the comment: Why must stdin of the subprocess be closed so that a read() on stdout can return? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22439 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22366] urllib.request.urlopen shoudl take a context (SSLContext) argument
Roundup Robot added the comment: New changeset 9c3249b358d0 by Alex Gaynor in branch 'default': PEP476: Updated based on proposed API from Nick. Also note that #22366 has been landed. https://hg.python.org/peps/rev/9c3249b358d0 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22366 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22444] Floor divide should return int
New submission from Alexander Belopolsky: PEP 3141 defines floor division as floor(x/y) and specifies that floor() should return int type. Builtin float type has been made part of the PEP 3141 numerical tower, but floor division of two floats still results in a float. See also: * #1656 - Make math.{floor,ceil}(float) return ints per PEP 3141 * #1623 - Implement PEP-3141 for Decimal * https://mail.python.org/pipermail/python-ideas/2014-September/029392.html -- components: Interpreter Core messages: 227107 nosy: belopolsky priority: normal severity: normal stage: needs patch status: open title: Floor divide should return int type: behavior versions: Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22444 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7434] general pprint rewrite
Changes by Edward O edoubray...@gmail.com: -- nosy: +eddygeek ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7434 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22439] subprocess.PIPE.stdin.flush() causes to hang while subprocess.PIPE.stdin.close() not
R. David Murray added the comment: Because stdout isn't closed until the process completes, which happens when stdin is closed. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22439 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22439] subprocess.PIPE.stdin.flush() causes to hang while subprocess.PIPE.stdin.close() not
Sworddragon added the comment: But this happens also on read(1). I'm even getting no partly output. 1. I'm calling diff in a way where it expects input to compare. 2. I'm writing and flushing to diff's stdin. 3. diff seems to not get this content until I close its stdin. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22439 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22439] subprocess.PIPE.stdin.flush() causes to hang while subprocess.PIPE.stdin.close() not
R. David Murray added the comment: Try it at the command line. Diff doesn't produce any output in your example until stdin is closed. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22439 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22444] Floor divide should return int
Changes by Stefan Krah stefan-use...@bytereef.org: -- nosy: +skrah ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22444 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22422] IDLE closes all when in dropdown menu
Terry J. Reedy added the comment: I cannot reproduce with Idle 3.4.1 on Win 7. Attempt 1: open Idle from icon (opens shell), edit file, make trivial change, return to shell, and type 'sys.'. When box appears, close shell, editor left untouched. Attempt 2: edit another file, type 'sys.', wait for box, and close editor 2. Do you want to save before closing' message box appears. Click no, editor 2 closes, editor 1 is left untouched. Closing behavior has been patched in the last year or so. I suspect you are using an older and obsolete Idle. I also suspect everything closes because of an internal error now fixed. Start Idle from a console (command prompt) window with 'python -m idlelib' and I suspect you will see a traceback. Please either close this or provide a detailed scenario, including OS, using 2.7.8 or 3.4.1, that someone can reporduce. -- nosy: +terry.reedy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22422 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22433] Argparse considers unknown optional arguments with spaces as a known positional argument
Changes by Terry J. Reedy tjre...@udel.edu: -- nosy: +bethard ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22433 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22439] subprocess.PIPE.stdin.flush() causes to hang while subprocess.PIPE.stdin.close() not
Sworddragon added the comment: Ah, now I see it. Thanks for your hint. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22439 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22434] Use named constants internally in the re module
Changes by Terry J. Reedy tjre...@udel.edu: -- nosy: +terry.reedy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22434 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22445] Memoryviews require more strict contiguous checks then necessary
New submission from Sebastian Berg: In NumPy we decided some time ago that if you have a multi dimensional buffer, shaped for example 1x10, then this buffer should be considered both C- and F-contiguous. Currently, some buffers which can be used validly in a contiguous fashion are rejected. CPython does not support this currently possibly creating smaller nuisance if/once we change it fully in NumPy, see for example https://github.com/numpy/numpy/issues/5085 I have attached a patch which should (sorry I did not test this at all yet) relax the checks as much as possible. I think this is right, but we did some subtle breaks in user code (mostly cython code) when we first tried changing it, and while numpy arrays may be more prominently C/F-contiguous, compatibility issues with libraries checking for contiguity explicitly and then requesting a strided buffer are very possible. If someone could give me a hint about adding tests, that would be great. Also I would like to add a small note to the PEP in any case regarding this subtlety, in the hope that more code will take care about such subtleties. -- components: Library (Lib) files: relaxed-strides-checking.patch keywords: patch messages: 227113 nosy: seberg priority: normal severity: normal status: open title: Memoryviews require more strict contiguous checks then necessary type: enhancement Added file: http://bugs.python.org/file36663/relaxed-strides-checking.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22445 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22445] Memoryviews require more strict contiguous checks then necessary
Stefan Krah added the comment: There is another oddity: #12845. Does NumPy have a formal definition of array contiguity somewhere? -- nosy: +skrah ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22445 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22445] Memoryviews require more strict contiguous checks then necessary
Stefan Krah added the comment: BTW, if you have NumPy installed and run test_buffer in Python3.3+, numpy.ndarray has many tests against memoryview and _testbuffer.ndarray (the latter is our exegesis of PEP-3118). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22445 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22445] Memoryviews require more strict contiguous checks then necessary
Sebastian Berg added the comment: #12845 should be closed, seems like a bug in some old version. The definition now is simply that the array is contiguous if you can legally access it in a contiguous fashion. Which means first stride is itemsize, second is itemsize*shape[0] for Fortran, inverted for C-order. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22445 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22446] Shortening code in abc.py
New submission from Ram Rachum: Can't this code: class Sequence(Sized, Iterable, Container): # ... def __contains__(self, value): for v in self: if v == value: return True return False Be shortened into this: class Sequence(Sized, Iterable, Container): # ... def __contains__(self, value): return any(item == value for value in self) Which can even fit on one line with a lambda: class Sequence(Sized, Iterable, Container): # ... __contains__ = lambda self: any(item == value for value in self) -- components: Library (Lib) messages: 227117 nosy: cool-RR priority: normal severity: normal status: open title: Shortening code in abc.py versions: Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22446 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22445] Memoryviews require more strict contiguous checks then necessary
Sebastian Berg added the comment: To be clear, the important part here, is that to me all elements *can* be accessed using that scheme. It is not correct to assume that `stride[-1]` or `stride[0]` is actually equal to `itemsize`. In other words, you have to be able to pass the pointer to the start of a c-contiguous array into some C-library that knows nothing about strides without any further thinking. The 0-strides badly violate that. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22445 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22364] Unify error messages of re and regex
Mark Lawrence added the comment: The key word is potential. I do not believe that any changes should be made to the re module until such time as there is a fully approved PEP for the regex module and that work has actually started on getting it into the stdlib. Surely backward compatibility also comes into this? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22364 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22446] Shortening code in abc.py
Serhiy Storchaka added the comment: This is slower. import timeit class A(list): ... def __contains__(self, value): ... for v in self: ... if v == value: ... return True ... return False ... timeit.timeit('500 in x', setup='from __main__ import A; x = A(range(1000))', number=1) 1.122261971357 class B(list): ... def __contains__(self, value): ... return any(v == value for v in self) ... timeit.timeit('500 in x', setup='from __main__ import B; x = B(range(1000))', number=1) 2.0595210286 -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22446 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22446] Shortening code in abc.py
Ram Rachum added the comment: Oh. I wonder why `any` is slow like that, you'd figure it's be optimized. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22446 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22447] logging.config.fileConfig attempts to write to file even when none configured
New submission from Ed Sesek: See the attached config file. logging.config.fileConfig() is attempting to write to the file specified in the file_handler section even though that handler is not configured for use in this config. If its going to write to the file, it should only do so if the file is configured to be used. In the case where it cannot write to the file it throws an exception with a blank message. -- components: Library (Lib) files: pixcli_template.ini messages: 227122 nosy: esesek priority: normal severity: normal status: open title: logging.config.fileConfig attempts to write to file even when none configured type: behavior versions: Python 2.7 Added file: http://bugs.python.org/file36664/pixcli_template.ini ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22447 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12845] PEP-3118: C-contiguity with zero strides
Stefan Krah added the comment: This was a bug in NumPy that has been fixed. -- resolution: - not a bug stage: - resolved status: open - closed versions: +Python 3.5 -Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12845 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22446] Shortening code in abc.py
Serhiy Storchaka added the comment: Because in first case there is one iterator, iter(self), and in second case there are two iterators: iter(self) and iter((v == value for v in self)). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22446 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22446] Shortening code in abc.py
Ram Rachum added the comment: Thanks for the clarification. Oh well, sad to see the more verbose code win, but I guess that's life. I tried on PyPy but the difference was even more pronounced, 0.008922450399566156 for the long version and 0.042124665810088044 for the short version. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22446 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22435] socketserver.TCPSocket leaks socket to garbage collector if server_bind() fails
Charles-François Natali added the comment: Patch attached. The test wouldn't result in FD exhaustion on CPython because of the reference counting, but should still trigger RessourceWarning. -- keywords: +patch nosy: +haypo, pitrou stage: - patch review Added file: http://bugs.python.org/file36665/socketserver_bind_leak.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22435 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22446] Shortening code in abc.py
Changes by Benjamin Peterson benja...@python.org: -- resolution: - rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22446 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22438] eventlet broke by python 2.7.x
Benjamin Peterson added the comment: Definitely a case of eventlet playing with fire (private apis). -- resolution: - not a bug status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22438 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22445] Memoryviews require more strict contiguous checks then necessary
Stefan Krah added the comment: Thanks, #12845 is indeed fixed in NumPy. Why does NumPy consider an array with a stride that will almost certainly lead to undefined behavior (unless you compile with -fwrapv) as valid? In CPython we try to eliminate these kinds of issues (though they may still be present). import numpy as np import io x = np.arange(10) y = np.array([x]) print(y.strides) (9223372036854775807, 8) y.flags C_CONTIGUOUS : True F_CONTIGUOUS : True OWNDATA : True WRITEABLE : True ALIGNED : True UPDATEIFCOPY : False -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22445 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22445] Memoryviews require more strict contiguous checks then necessary
Sebastian Berg added the comment: Well, the 9223372036854775807 is certainly no good for production code and we would never have it in a release version, it is just there currently to expose if there are more problems. However I don't care what happens on overflow (as long as it is not an error). Note that the stride here is on a dimension with shape 1. The only valid index is thus always 0 and 0*9223372036854775807=0, so the stride value does not actually matter when calculating offsets into the array. You could simply set it to 80 to get something that would be considered C-contiguous or to 8 to get something that is considered F-contiguous. But both is the case in a way, so just cleaning up the strides does not actually get you all the way. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22445 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22447] logging.config.fileConfig attempts to write to file even when none configured
Changes by Berker Peksag berker.pek...@gmail.com: -- nosy: +vinay.sajip ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22447 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22364] Improve some re error messages using regex for hints
Terry J. Reedy added the comment: Steven and Mark are correct that a tracker patch cannot change a 3rd party module. On the other hand, we are free to improve error messages in new versions. And we are free to borrow ideas from 3rd part modules. I changed the title accordingly. (Back compatibility comes into play in not making message enhancements in bugfix releases even though message details are not part of the documented API. People who write code that depends on those details, and doctexts need not so depend, should expect to revise for new versions. I expect that some of our re tests would need to be changed.) Re and regex are a bit special in that regex is the only re replacement (that I know of) and is (almost) a drop-in replacement. So some people *are*, on their own, replacing re with regex by installing regex (easy with pip) and adding 'import regex as re' at the top of their code. Serhiy suggested either picking the best or writing a new one, I think a new one combining both would be best in many of the cases. As a user, I like name missing terminal '' for #2 (is there an adjective for a name in this context?) and for #4, group name missing terminal ''. (Note that we usually quote literals, as in #8.) For #12, I would like a parallel construction set expression missing terminal ']' if that is possible. But the currently vague re message unexpected end of regular expression might be raised as a point where the specific information is lost and only the general version is correct. As for #14, either UNICODE and LOCALE *are* compatible (for re) or this is buggy. import re re.compile(r'\w', re.UNICODE | re.LOCALE) re.compile('\\w', re.LOCALE|re.UNICODE) -- title: Unify error messages of re and regex - Improve some re error messages using regex for hints ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22364 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22445] Memoryviews require more strict contiguous checks then necessary
Changes by Alexander Belopolsky alexander.belopol...@gmail.com: -- nosy: +belopolsky ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22445 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22443] read(1) blocks on unflushed output
STINNER Victor added the comment: Ah yes, try gcc -shared nobuffer.c -o libnobuffer.so -fPIC. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22443 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22385] Define a binary output formatting mini-language for *.hex()
Changes by Alexander Belopolsky alexander.belopol...@gmail.com: -- nosy: +belopolsky ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22385 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22364] Unify error messages of re and regex
Steven D'Aprano added the comment: On Fri, Sep 19, 2014 at 08:41:57PM +, Mark Lawrence wrote: I do not believe that any changes should be made to the re module until such time as there is a fully approved PEP [] Why is this so controversial? We're not talking about functional changes to the re module, we're talking about improving error messages. Firstly, the actual wording of error messages are not part of the API and are subject to change without notice. Secondly, nobody is talking about keeping the two modules syncronised on an on-going basis. This is just to improve the re error messages using regex as inspiration. -- title: Improve some re error messages using regex for hints - Unify error messages of re and regex ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22364 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22443] read(1) blocks on unflushed output
Sworddragon added the comment: I was able to compile the library but after executing LD_PRELOAD=./libnobuffer.so ./test.py I'm seeing no difference. The unflushed output is still not being read with read(1). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22443 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22443] read(1) blocks on unflushed output
eryksun added the comment: stdbuf is the typical way to apply the LD_PRELOAD trick: https://www.gnu.org/software/coreutils/manual/html_node/stdbuf-invocation.html There's also the unbuffer expect script: http://expect.sourceforge.net/example/unbuffer.man.html -- nosy: +eryksun ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22443 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22443] read(1) blocks on unflushed output
Sworddragon added the comment: stdbuf -o 0 ./test.py and unbuffer ./test.py doesn't change the result too. Or is something wrong with my testcase? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22443 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22448] call_at/call_later with Timer cancellation can result in (practically) unbounded memory usage.
New submission from Joshua Moore-Oliva: The core issue stems from the implementation of Timer cancellation. (which features like asyncio.wait_for build upon). BaseEventLoop stores scheduled events in an array backed heapq named _scheduled. Once an event has been scheduled with call_at, cancelling the event only marks the event as cancelled, it does not remove it from the array backed heap. It is only removed once the cancelled event is at the next scheduled event for the loop. In a system where many events are run (and then cancelled) that may have long timeout periods, and there always exists at least one event that is scheduled for an earlier time, memory use is practically unbounded. The attached program wait_for.py demonstrates a trivial example where memory use is practically unbounded for an hour of time. This is the case even though the program only ever has two uncancelled events and two coroutines at any given time in its execution. This could be fixed in a variety of ways: a) Timer cancellation could result in the object being removed from the heap like in the sched module. This would be at least O(N) where N is the number of scheduled events. b) Timer cancellation could trigger a callback that tracks the number of cancelled events in the _scheduled list. Once this number exceeds a threshold ( 50% ? ), the list could be cleared of all cancelled events and then be re-heapified. c) A balanced tree structure could be used to implement the scheduled events O(log N) time complexity (current module is O(log N) for heappop anyways). Given python's lack of a balanced tree structure in the standard library, I assume option c) is a non-starter. I would prefer option b) over option a) as when there are a lot of scheduled events in the system (upwards of 50,000 - 100,000 in some of my use cases) the amortized complexity for cancelling an event trends towards O(1) (N/2 cancellations are handled by a single O(N) event) at the cost of slightly more, but bounded relative to the amount of events, memory. I would be willing to take a shot at implementing this patch with the most agreeable option. Please let me know if that would be appreciated, or if someone else would rather tackle this issue. (First time bug report for python, not sure of the politics/protocols involved). Disclaimer that I by no means an asyncio expert, my understanding of the code base is based on my reading of it debugging this memory leak. -- components: asyncio files: wait_for.py messages: 227136 nosy: chatgris, gvanrossum, haypo, yselivanov priority: normal severity: normal status: open title: call_at/call_later with Timer cancellation can result in (practically) unbounded memory usage. type: resource usage versions: Python 3.4 Added file: http://bugs.python.org/file3/wait_for.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22448 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22441] Not all attributes of the console for a subprocess with creationflags=0 are inherited
Changes by Sworddragon sworddrag...@aol.com: Removed file: http://bugs.python.org/file36660/test.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22441 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22441] Not all attributes of the console for a subprocess with creationflags=0 are inherited
Changes by Sworddragon sworddrag...@aol.com: Added file: http://bugs.python.org/file36667/test.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22441 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22441] Not all attributes of the console for a subprocess with creationflags=0 are inherited
Sworddragon added the comment: Edit: Updated testcase as it contained an unneeded argument from an older testcase (in case it confuses somebody). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22441 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22442] subprocess.check_call hangs on large PIPEd data.
Akira Li added the comment: This is a documented failure on the python subprocess page, but why not just fix it up directly in python itself? If you want to discard the output; you could use: check_call(args, stdin=DEVNULL, stdout=DEVNULL, stderr=STDOUT) check_call() passes its parameters to Popen() as is. The only parameter it knows about is args that is used to raise an exception. Do you want check_call() to inspect the parameters and to do something about stdout=PIPE, stderr=PIPE? Where something could be: - nothing -- the current behavior: everything works until the child process produces enough output to fill any of OS pipe buffers as documented - call proc.communicate() -- store (unlimited) output in memory instead of just hanging: everything works slowly until the system runs out of memory - replace with DEVNULL -- do what I mean behavior: inconsistent with the direct Popen() call - raise ValueError with informative error message (about DEVNULL option) after issueing a DeprecationWarning for a release: it fixes this particular misuse of check_call(). Are there other common wrong in every case check_call() parameters? -- nosy: +akira ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22442 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22448] call_at/call_later with Timer cancellation can result in (practically) unbounded memory usage.
Guido van Rossum added the comment: Hi Joshua, This is indeed a problem -- I just never expected that you would be having that many events and and canceling the majority. I am sorry you had to debug this. :-( This was anticipated by the author of pyftpdlib (Giampaolo Roloda'), who proposed an elegant solution: keep track of the number of cancelled events, and when the number gets too high (according to some measure) the heapq is simply rebuilt by filtering out cancelled events. I think this is similar to your proposal (b). I would love it if you could implement this! Just make sure to add some tests and follow the PEP 8 style guide. You can contribute upstream to the Tulip project first. https://code.google.com/p/tulip/ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22448 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22420] Use print(file=sys.stderr) instead of sys.stderr.write() in IDLE
Roundup Robot added the comment: New changeset 90a2a12fa34d by Terry Jan Reedy in branch '2.7': Issue #22420: Avoid 'write to None' crashes by using print instead. https://hg.python.org/cpython/rev/90a2a12fa34d New changeset 42b03d5b1cbb by Terry Jan Reedy in branch '3.4': Issue #22420: Avoid 'write to None' crashes by using print instead. https://hg.python.org/cpython/rev/42b03d5b1cbb New changeset ab050bd7e51c by Terry Jan Reedy in branch 'default': Issue #22420: Merge with 3.4 https://hg.python.org/cpython/rev/ab050bd7e51c -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22420 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22420] Use print(file=sys.stderr) instead of sys.stderr.write() in IDLE
Changes by Terry J. Reedy tjre...@udel.edu: -- resolution: - fixed stage: patch review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22420 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22377] %Z in strptime doesn't match EST and others
Akira Li added the comment: I don't think we are going to support a timezone list like that without PEP 431. PEP 431 won't fix this issue. See below. You should attach your patch to a new issue. When I said this should the doc issue, that is because only a doc fix is acceptable for 3.4. Adding more timezones to recognize would be an enhancement, given the complexity of the proposed solution. The docs are correct (they imply that %Z should accept EST). It is the implementation that is deficient. The patch introduces a new parameter therefore I agree: it should be applied only in 3.5+ On the other hand, if timezone names are ambiguous, I'm not sure there *is* a fix other than using the defacto standard names and offsets used by the email library. Actually, isn't there a written standard that addresses this issue? I seem to remember reading a discussion of the problem somewhere... Multi-timezone programming email._parseaddr._timezones with CST=-600 is like US-ASCII (the standard). Code that uses local timezone is bilingual (locale-based): CST=-600 in Chicago but it is CST=+800 in China and it may be something else in other parts of the world. The *timezones* parameter in my patch allows to specify the encoding different from the current locale. Code that uses the tz database is multilingual (Unicode): knowing the encoding (zoneinfo name and the time) it is possible to decode almost all encoded characters (to find out whether the timezone abbreviation is valid with a given time and to find the correct UTC offset). If you don't know the encoding then the support for Unicode (the presence of the tz database (PEP 431)) along won't allow you to decode a byte sequence (time string). You need an encoding (timezone name, time) to interpret the input correctly. Given that the list is used to accept a string as a timezone abbreviation, I don't think it should depend on PEP 431 e.g., old date strings/people may use WST even if the new pytz timezones do not use it. The initial list could be seeded from using pytz as in my patch and then expanded as necessary by hand (there is no official entity that tracks timezone abbreviations). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22377 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22443] read(1) blocks on unflushed output
Akira Li added the comment: Related: http://stackoverflow.com/questions/25923901/last-unbuffered-line-cant-be-read Make sure you follow the links in the comments. -- nosy: +akira ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22443 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15661] OS X installer packages should be signed for OS X 10.8 Gatekeeper feature
Roundup Robot added the comment: New changeset 569a889e3b6c by Ned Deily in branch '3.4': Issue #15661: Update OS X installer welcome and readme files for 3.4.2. https://hg.python.org/cpython/rev/569a889e3b6c -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15661 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22444] Floor divide should return int
Changes by Case Van Horsen cas...@gmail.com: -- nosy: +casevh ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22444 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12916] Add inspect.splitdoc
Berker Peksag added the comment: I left a couple of comments on Rietveld. -- stage: commit review - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12916 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22406] uu-codec trailing garbage workaround is Python 2 code
Changes by Berker Peksag berker.pek...@gmail.com: -- stage: needs patch - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22406 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22247] More incomplete module.__all__ lists
Roundup Robot added the comment: New changeset eb9eac80c17a by Berker Peksag in branch '3.4': Issue #22247: Add NNTPError to nntplib.__all__. https://hg.python.org/cpython/rev/eb9eac80c17a New changeset e21b0bbc06ea by Berker Peksag in branch 'default': Issue #22247: Add NNTPError to nntplib.__all__. https://hg.python.org/cpython/rev/e21b0bbc06ea -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22247 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com