[issue27438] Refactor simple iterators implementation

2016-07-02 Thread Raymond Hettinger
Raymond Hettinger added the comment: Though this gives us a nicely reduced line count, I'm disinclined to do this for several reasons: The benefit is too small to warrant this kind of atypical macro/include magic (with "magic" being the pattern of making a series of #defines followed by an #i

[issue27438] Refactor simple iterators implementation

2016-07-02 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- nosy: +tim.peters ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue27051] Create PIP gui

2016-07-02 Thread Upendra Kumar
Upendra Kumar added the comment: For using threading with Tkinter there are two options : either to use threading or asyncio ( coroutines ). Because asyncio is easier as compared to threading, therefore I would like to use it. But, coroutines are available only in Python >=3.5. Therefore shoul

[issue27439] product function patch

2016-07-02 Thread Utkan Gezer
New submission from Utkan Gezer: An issue of enhancement by the introduction of a built-in product() function for the multiplication operation, functions similar to how sum does for the addition operation. This issue is a reincarnation of Issue 1093 for Python 2.6, now for 3.6. Ref: http://bu

[issue27439] product function patch

2016-07-02 Thread Emanuel Barry
Emanuel Barry added the comment: What is the use case, and why is a regular for loop not enough? The bar for adding new builtin functions is high, and I don't think this meets it. -- nosy: +ebarry ___ Python tracker

[issue27439] product function patch

2016-07-02 Thread Utkan Gezer
Utkan Gezer added the comment: The use case is similar to the use case of sum() function, which is analogous to the sigma notation in mathematics, and is analogous to the use case of the pi notation in mathematics. Regular loop should be equally enough to achieve the function of sum(), yet the

[issue27439] product function patch

2016-07-02 Thread Steven D'Aprano
Steven D'Aprano added the comment: On Sat, Jul 02, 2016 at 11:40:48AM +, Utkan Gezer wrote: > > New submission from Utkan Gezer: > > An issue of enhancement by the introduction of a built-in product() > function for the multiplication operation, functions similar to how > sum does for the

[issue27439] Add a product() function to the standard library

2016-07-02 Thread Emanuel Barry
Emanuel Barry added the comment: With the existence of multiple sum() functions (and potentially multiple product() functions), would it be worth it to group these all into one module? It also doesn't help that there is an itertools.product function that has yet another purpose. I maintain my

[issue27440] Trigonometric bug

2016-07-02 Thread Shubham Singh
New submission from Shubham Singh: The value of sine and tangent, using math module is showing wrong.Screenshot is attached. -- components: Extension Modules, Windows files: Sin.jpg messages: 269711 nosy: ShubhamSingh.er, paul.moore, steve.dower, tim.golden, zach.ware priority: normal s

[issue26137] [idea] use the Microsoft Antimalware Scan Interface

2016-07-02 Thread Alexander Riccio
Alexander Riccio added the comment: It's not just Stuxnet, as at least one other Advanced Persistent Threat uses that tactic. An APT (likely Russian intelligence) recently used encoded PowerShell to break into the Democratic National Committe: https://www.crowdstrike.com/blog/bears-midst-intru

[issue26137] [idea] use the Microsoft Antimalware Scan Interface

2016-07-02 Thread Alexander Riccio
Alexander Riccio added the comment: We might want to use some kind of Group Policy setting, for the same reason that many Windows security configuration options are there, and that DoD STIGs for Windows https://www.stigviewer.com/stig/windows_8_8.1/ are almost totally about configuring Group P

[issue15873] datetime: add ability to parse RFC 3339 dates and times

2016-07-02 Thread Mathieu Dupuy
Mathieu Dupuy added the comment: Hi. I'm back, and willing to move forward on this issue. With the new code layout, the compiled regexes now lay in datetime classes as class attributes. Will it be possible to import date, time and datetime from datetime.py in _datetime.c without a problem ?

[issue27441] redundant assignments to ob_size of new ints that _PyLong_New returned

2016-07-02 Thread Oren Milman
New submission from Oren Milman: current state In six different functions, the following happens: 1. Function x calls _PyLong_New, with var y as the size argument. * Among others, _PyLong_New sets the ob_size of the new int to y (the size argument it receive

[issue27441] redundant assignments to ob_size of new ints that _PyLong_New returned

2016-07-02 Thread Oren Milman
Changes by Oren Milman : Added file: http://bugs.python.org/file43609/patchedCPythonTestOutput_ver1.txt ___ Python tracker ___ ___ Python-bugs

[issue27441] redundant assignments to ob_size of new ints that _PyLong_New returned

2016-07-02 Thread Oren Milman
Changes by Oren Milman : -- keywords: +patch Added file: http://bugs.python.org/file43608/issue27441_ver1.diff ___ Python tracker ___

[issue27442] expose Android API level in sys.implementation

2016-07-02 Thread Xavier de Gaye
New submission from Xavier de Gaye: Expose the Android API level that python was built against, in sys.implementation as _android_api. Purposes: * Identify the platform as Android. * Allow detecting a mismatch with the runtime sdk version returned by platform.android_ver() (issue 26855)

[issue27442] expose Android API level in sys.implementation

2016-07-02 Thread Xavier de Gaye
Xavier de Gaye added the comment: Patch added. -- keywords: +patch stage: -> patch review Added file: http://bugs.python.org/file43610/android_api.patch ___ Python tracker ___ _

[issue26865] Meta-issue: support of the android platform

2016-07-02 Thread Xavier de Gaye
Xavier de Gaye added the comment: issue #27442: expose Android API level in sys.implementation -- dependencies: +expose Android API level in sys.implementation ___ Python tracker ___

[issue27141] Fix collections.UserList shallow copy

2016-07-02 Thread Pascal Chambon
Changes by Pascal Chambon : -- nosy: +pakal ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python

[issue27442] expose Android API level in sys.implementation

2016-07-02 Thread Chi Hsuan Yen
Chi Hsuan Yen added the comment: I don't think sys.implementation is a good place to contain the information of the underlying platform. By Doc/sys.rst: An object containing information about the implementation of the currently running Python interpreter. -- nosy: +Chi Hsuan Yen

[issue27442] expose Android API level in sys.implementation

2016-07-02 Thread Chi Hsuan Yen
Chi Hsuan Yen added the comment: Sorry, it's Doc/library/sys.rst -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue27442] expose Android API level in sys.implementation

2016-07-02 Thread Xavier de Gaye
Xavier de Gaye added the comment: > I don't think sys.implementation is a good place to contain the information > of the underlying platform. Quite the opposite, the ndk API level gives an information about the implementation of the currently running Python interpreter saying that this Python

[issue15873] datetime: add ability to parse RFC 3339 dates and times

2016-07-02 Thread Anders Hovmöller
Anders Hovmöller added the comment: > > By the way, I just discovered, that the way we treat microseconds differs > from the strptime one : we are smarter read every digits and smartly round to > six, strptime doesn't go that far and just *truncate* to this. Should go that > way, for consiste

[issue27366] PEP487: Simpler customization of class creation

2016-07-02 Thread Martin Teichmann
Martin Teichmann added the comment: This is a C implementation of PEP 487, directly in the Python core -- Added file: http://bugs.python.org/file43611/pep487a.patch ___ Python tracker __

[issue27442] expose Android API level in sys.implementation

2016-07-02 Thread Chi Hsuan Yen
Chi Hsuan Yen added the comment: OK I see the rationale. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: htt

[issue27440] Trigonometric bug

2016-07-02 Thread R. David Murray
R. David Murray added the comment: I would imagine that this is a consequence of platform-dependent floating point math. Not to mention working with an irrational number. See also issue 8309. -- nosy: +mark.dickinson, r.david.murray type: resource usage -> behavior __

[issue27442] expose Android API level in sys.implementation

2016-07-02 Thread STINNER Victor
STINNER Victor added the comment: I woupd prefer to have a public attribute. -- ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue27422] Deadlock when mixing threading and multiprocessing

2016-07-02 Thread Davin Potts
Davin Potts added the comment: It would be nice to find an appropriate place to document the solid general guidance Raymond provided; though merely mentioning it somewhere in the docs will not translate into it being noticed. Not sure where to put it just yet... Martin: Is there a specific s

[issue27440] Trigonometric bug

2016-07-02 Thread Tim Peters
Tim Peters added the comment: Python's floats are emphatically not doing symbolic arithmetic - they use the platform's binary floating point facilities, which can only represent a subset of rationals exactly. All other values are approximated. In particular, this shows the exact value of the

[issue27443] __length_hint__() of bytearray iterator can return negative integer

2016-07-02 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: >>> ba = bytearray(b'ab') >>> it = iter(ba) >>> next(it) 97 >>> ba.clear() >>> list(it) Traceback (most recent call last): File "", line 1, in ValueError: __length_hint__() should return >= 0 Proposed patch fixes this issue. -- components: Interp

[issue27438] Refactor simple iterators implementation

2016-07-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for your detailed explanation Raymond. In any case, the work on this patch helped to find a bug in bytearray iterator (issue27443). -- resolution: -> rejected stage: patch review -> resolved status: open -> closed

[issue26765] Factor out common bytes and bytearray implementation

2016-07-02 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ _

[issue26800] Don't accept bytearray as filenames part 2

2016-07-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Ping. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue27439] Add a product() function to the standard library

2016-07-02 Thread Raymond Hettinger
Raymond Hettinger added the comment: Actually, Guido already vetoed the idea: http://bugs.python.org/issue1093 -- nosy: +rhettinger resolution: -> rejected status: open -> closed ___ Python tracker ___

[issue27081] Cannot capture sys.stderr output from an uncaught exception in a multiprocessing Process using a multiprocessing Queue

2016-07-02 Thread Davin Potts
Davin Potts added the comment: I took the example snippet and cleaned things up a bit, adding some crude timestamping and commentary. (Attached) In the example, when the Process finally dies, a lot of information has been put onto the Queue but it hasn't necessarily had enough time to be sync

[issue27422] Deadlock when mixing threading and multiprocessing

2016-07-02 Thread Raymond Hettinger
Raymond Hettinger added the comment: FWIW, this isn't even a Python specific behavior. It is just how threads, locks, and processes work (or in this case don't work). The code is doing what it is told to do which happens to not be what you want (i.e. a user bug rather than a Python bug). I

[issue26903] ProcessPoolExecutor(max_workers=64) crashes on Windows

2016-07-02 Thread Davin Potts
Changes by Davin Potts : -- nosy: +davin ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.or

[issue27443] __length_hint__() of bytearray iterator can return negative integer

2016-07-02 Thread Raymond Hettinger
Raymond Hettinger added the comment: This patch looks correct. Nice catch. -- ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue27081] Cannot capture sys.stderr output from an uncaught exception in a multiprocessing Process using a multiprocessing Queue

2016-07-02 Thread ppperry
ppperry added the comment: I believe that regardless of the number of prints to sys.stderr that happen before the recursion error, all of them will get sent to the parent. The problem is that the queue is flushed before the uncaught error is sent to stderr, not after. --

[issue27081] Cannot capture sys.stderr output from an uncaught exception in a multiprocessing Process using a multiprocessing Queue

2016-07-02 Thread Emanuel Barry
Emanuel Barry added the comment: Worth of note: #26823 will actually change printing to stderr for recursion errors (if/when it gets merged that is; I don't know what's holding it up). It might be interesting to see if you can still witness this issue with the patch applied. -- nosy:

[issue27444] Python doesn't build due to test_float.py broken on non-IEEE machines

2016-07-02 Thread Greg Stark
New submission from Greg Stark: The file Test/test_float.py has a decorator for tests that must be skipped on non-IEEE machines. However just eyeballing it it seems there are a few tests that test behaviour around Inf and NaN that are lacking this decorator. Alternately it's possible this is a

[issue27081] Cannot capture sys.stderr output from an uncaught exception in a multiprocessing Process using a multiprocessing Queue

2016-07-02 Thread ppperry
ppperry added the comment: This issue isn't specific to recursion errors. It only occurs when the error message is long enough, so #26823 would fix the RecursionError case, but it would still happen when someone calls a function with a billion-character-long name that raises an error, for exam

[issue27445] Charset instance not passed to set_payload()

2016-07-02 Thread Claude Paroz
New submission from Claude Paroz: In issue #16324, I contributed an improvement so as MIMEText __init__ accept Charset instances, not only encoding strings. The use case is from Django where we customize the Charset.body_encoding before passing it to the MIMEText initialization. Unfortunately

[issue27445] Charset instance not passed to set_payload()

2016-07-02 Thread Claude Paroz
Changes by Claude Paroz : -- keywords: +patch Added file: http://bugs.python.org/file43614/issue27445.diff ___ Python tracker ___ ___

[issue27444] Python doesn't build due to test_float.py broken on non-IEEE machines

2016-07-02 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- nosy: +mark.dickinson, tim.peters ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue26624] Windows hangs in call to CRT setlocale()

2016-07-02 Thread Terry J. Reedy
Terry J. Reedy added the comment: I have recent gotten WARN: ucrtbased contains known issues. Please update Visual Studio or the Windows SDK. See: http://bugs.python.org/issue26624 F:\Python\dev\36\PCbuild\python.vcxproj(91,5): warning MSB3073: The command ""F:\Python\dev\36\PCBuild\win32\p

[issue26624] Windows hangs in call to CRT setlocale()

2016-07-02 Thread Terry J. Reedy
Terry J. Reedy added the comment: After the 'update', the compiler ran and re-linked all the targets. The warning about the old .dll remains. Perhaps I should remove and re-install? The crash also remain. I'll backdate the repository to mid-June when I successfully compiled and ran and see

[issue26765] Factor out common bytes and bytearray implementation

2016-07-02 Thread Terry J. Reedy
Terry J. Reedy added the comment: Serhiy, compiling 3.6 on Windows after this patch lets it start, but causes it to crash both importing tkinter and running patchcheck. Compiling 3.6 after your previous patch for #27007 and the test suite runs without error. -- nosy: +terry.reedy ___

[issue26624] Windows hangs in call to CRT setlocale()

2016-07-02 Thread Terry J. Reedy
Terry J. Reedy added the comment: The problem was the last patch, for #26765. In spite of the faulty .dll, the test suite ran OK. -- ___ Python tracker ___

[issue27405] Ability to trace Tcl commands executed by Tkinter

2016-07-02 Thread Terry J. Reedy
Terry J. Reedy added the comment: After re-compiling, import tkinter crashed 3.6. Reversion did not help. After trying to update VS2015 (not successfully), and doing a binary search, it was your patch for #26765. -- ___ Python tracker

[issue27444] Python doesn't build due to test_float.py broken on non-IEEE machines

2016-07-02 Thread R. David Murray
R. David Murray added the comment: It looks like you are in the compiling step, so the decorators have nothing to do with it. This does appear to be a platform issue in the interpreter core, and you'll have to track it down since we don't have access to your platform (at least, I don't think

[issue26765] Factor out common bytes and bytearray implementation

2016-07-02 Thread Terry J. Reedy
Terry J. Reedy added the comment: Checking, I see that 3 of 4 Windows buildbots ran with this patch, so there must be something significantly different about my VS install with respect to this particular patch. #26624 might or might not have something to do with it (see my posts today). I ca

[issue27442] expose Android API level in sys.implementation

2016-07-02 Thread Ned Deily
Ned Deily added the comment: Typically, for other sorts of build configuration data, we have relied on extracting that from the ./configure-produced Makefile and making it available via sysconfig.get_config_var(). I think we should be cautious about bloating sys.implementation with platform-s

[issue27363] Complex numbers with negative zero parts do not roundtrip properly

2016-07-02 Thread ppperry
Changes by ppperry : -- title: Complex numbers with negative zero imaginary parts do not roundtrip properly -> Complex numbers with negative zero parts do not roundtrip properly ___ Python tracker

[issue27440] Trigonometric bug

2016-07-02 Thread Steven D'Aprano
Steven D'Aprano added the comment: I know this issue is closed, but for future reference, ShubhamSingh.er, if you submit any further bug reports, please don't submit screen shots unless necessary. Just copy and paste the text from your terminal into the issue tracker. A screen shot is more wor

[issue27081] Cannot capture sys.stderr output from an uncaught exception in a multiprocessing Process using a multiprocessing Queue

2016-07-02 Thread Davin Potts
Davin Potts added the comment: The spawned process (you appear to have run on Windows, so I'm assuming spawn but that's not so significant) has triggered an unhandled exception. If the triggering and subsequent sending of the traceback to stderr is synchronous and completes before Python actu

[issue27400] Datetime NoneType after calling Py_Finalize and Py_Initialize

2016-07-02 Thread Nick Coghlan
Nick Coghlan added the comment: Thanks for the report Denny. Looking at https://hg.python.org/cpython/file/30099abdb3a4/Modules/datetimemodule.c#l3929, there's a problematic caching of the "_strptime" module that is almost certainly the cause of the problem - it will attempt to call _strptime

[issue23908] Check path arguments of os functions for null character

2016-07-02 Thread koobs
koobs added the comment: == ERROR: test_path_with_null_unicode (test.test_posix.PosixTester) -- Traceback (most recent call last): File "/usr/home/buildbot/py

[issue23908] Check path arguments of os functions for null character

2016-07-02 Thread koobs
koobs added the comment: koobs-freebsd{9,10,current) failing after 30099abdb3a46d0e306a4cf995b95fa8cfb8b78a merge to 2.7 -- nosy: +koobs resolution: fixed -> status: closed -> open ___ Python tracker