[issue26292] Raw I/O writelines() broken for non-blocking I/O

2016-07-04 Thread raylu
Changes by raylu : -- nosy: +raylu ___ Python tracker ___ ___ Python-bugs-list mailing list

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

2016-07-04 Thread Greg Stark
Greg Stark added the comment: Well I was able to minimize the actual cause: $ /usr/pkg/bin/python -c 1e300*1e300 [1] Floating point exception /usr/pkg/bin/python -c 1e300*1e300 I noticed that the constant folding arithmetic is protected by "PyFPE_START_PROTECT" macros so I wonder... should

[issue27419] Bugs in PyImport_ImportModuleLevelObject

2016-07-04 Thread Brett Cannon
Brett Cannon added the comment: The semantics for looking up __import__ is to only grab it from builtins and to ignore globals() and locals() (see issue #25500), so any fix/change should follow those semantics. -- ___ Python tracker

[issue27437] IDLE tests must be able to set user configuration values.

2016-07-04 Thread Terry J. Reedy
Terry J. Reedy added the comment: After moving the config cleanup part of the patch to #27452 and doing further experiments with methods inherited from configparser.ConfigParser, in all 3 versions, I decided that nothing new needs to be added to config.py. I will instead use the prototype

[issue27451] gzip.py: Please save more of the gzip header for later examination

2016-07-04 Thread ppperry
Changes by ppperry : -- versions: -Python 2.7, Python 3.5 ___ Python tracker ___ ___

[issue26826] Expose new copy_file_range() syscall in os module.

2016-07-04 Thread Marcos Dione
Marcos Dione added the comment: * Updated the patch to latest version. * PEP-8'ed the tests. * Dropped flags from the API but not the internal function. -- Added file: http://bugs.python.org/file43624/copy_file_range.diff ___ Python tracker

[issue27452] IDLE: Cleanup config code

2016-07-04 Thread Terry J. Reedy
New submission from Terry J. Reedy: The config module code can be improved even without changing behavior. While working on #27380, I noticed these two: IdleUserConfParser.RemoveFile is a simple one-liner called once. Put it inline. IdleConf.CreateConfigHandlers: A) As near as I can tell,

[issue27451] gzip.py: Please save more of the gzip header for later examination

2016-07-04 Thread Josh Triplett
New submission from Josh Triplett: GzipFile currently reads and discards various fields from the gzip header, such as the original filename and timestamp. Please consider reading all the fields of the gzip header into fields of the GzipFile instance, so that users of GzipFile can access

[issue27450] bz2: BZ2File should expose compression level as an attribute

2016-07-04 Thread Josh Triplett
New submission from Josh Triplett: (This exists in both Python 3 and Python 2.) When opening an existing .bz2 file with BZ2File, I'd like to have access to the compression level, so that I don't have to manually parse the file's header to get it. BZ2File could provide the compression level

[issue27419] Bugs in PyImport_ImportModuleLevelObject

2016-07-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a reproducer for the second bug. In Python 2.7 and Python 3.2 all works. In Python 3.3+: $ ./python import_bug_2.py Traceback (most recent call last): File "import_bug_2.py", line 6, in import os.path File "import_bug_2.py", line 4, in

[issue27448] Race condition in subprocess.Popen which causes a huge memory leak

2016-07-04 Thread Andrew
Andrew added the comment: pppery, I don't think I am breaking gc functionality with my code. The code line I gave just meant to give the basic idea of what was helping to workaround this. If you are actually interested in the code I use, it is below: def fix_subprocess_racecondition(): """

[issue27422] Deadlock when mixing threading and multiprocessing

2016-07-04 Thread Davin Potts
Changes by Davin Potts : -- stage: -> resolved status: open -> closed ___ Python tracker ___

[issue27422] Deadlock when mixing threading and multiprocessing

2016-07-04 Thread Davin Potts
Davin Potts added the comment: @r.david.murray: Oh man, I was not going to go as far as advocate dropping the GIL. :) At least not in situations like this where the exploitable parallelism is meant to be at the Python level and not inside the Fortran code (or that was my understanding of

[issue27448] Race condition in subprocess.Popen which causes a huge memory leak

2016-07-04 Thread ppperry
ppperry added the comment: What are you doing that creates so many circular references that the not collecting them causes a massive memory leak? Or are you using an alternative implementation of Python? In addition, your monkeypatching is incorrect. `subprocess.gc` is the same object as the

[issue26027] Support Path objects in the posix module

2016-07-04 Thread Brett Cannon
Brett Cannon added the comment: I have no issues inlining -- with a comment about the inlining -- if it buys us better error messages in this critical case. -- ___ Python tracker

[issue27186] add os.fspath()

2016-07-04 Thread Brett Cannon
Brett Cannon added the comment: I'm fine with merging the two files if you want to do it. Build rules will also need updating if they do get merged. -- ___ Python tracker

[issue27447] python -m doctest script_file_with_no_py_extension produces confusing NameErrors

2016-07-04 Thread towb
towb added the comment: Improving the documentation would also be nice, and easier. -m is mentioned in two places, first only as a shortcut for testmod, later with an explanation on name extensions and testfile. At least I didn't get that far. --

[issue27422] Deadlock when mixing threading and multiprocessing

2016-07-04 Thread R. David Murray
R. David Murray added the comment: To clarify the GIL issue (for davin, I guess? :): if the library you are using to interface with the FORTRAN code drops the GIL before calling the FORTRAN, then you *can* take advantage of multiple cores. It is only the python code (and some of the code

[issue26027] Support Path objects in the posix module

2016-07-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: At first glance issue27186-os_path_t.patch looks good. But with the patch applied the error message in case of incorrect argument type is always "expected str, bytes or os.PathLike object, not ...". Currently it is more detailed and specific: contains the

[issue18920] argparse version action should print to stdout, not stderr

2016-07-04 Thread Jakub Wilk
Changes by Jakub Wilk : -- nosy: +jwilk title: argparse module version action -> argparse version action should print to stdout, not stderr ___ Python tracker

[issue27448] Race condition in subprocess.Popen which causes a huge memory leak

2016-07-04 Thread R. David Murray
R. David Murray added the comment: I presume we don't re-enable gc in the child because if there's an exception it is exiting anyway. FYI subprocess32, which fixes some other race conditions, shouldn't have this problem, since it is a backport of subprocess from python3, which no longer

[issue27186] add os.fspath()

2016-07-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Maybe merge Include/osmodule.h and Modules/posixmodule.h? -- ___ Python tracker ___

[issue27422] Deadlock when mixing threading and multiprocessing

2016-07-04 Thread Martin Ritter
Martin Ritter added the comment: Dear Davin, Thanks for the input, I was perfectly aware that the "solution" I proposed is not realistic. But the feedback that multiprocessing is using threads internally is useful as I can quickly abandon the idea to do something like the check I proposed

[issue26974] Crash in Decimal.from_float

2016-07-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Ping. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue23591] Add IntFlags

2016-07-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Ping again. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue27447] python -m doctest script_file_with_no_py_extension produces confusing NameErrors

2016-07-04 Thread R. David Murray
R. David Murray added the comment: This is not a bug, it is a feature. python -m doctest can be used to run tests from files that are *not* python files. I wouldn't call tracebacks with name errors as a silent failure :) As you say, there is no easy way to use doctest to run doctests in a

[issue19527] Test failures with COUNT_ALLOCS

2016-07-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: All tests now are passed in 3.6 on Linux. Making them passing in 3.5 requires too much changes that are not needed in 3.6. I don't think we need to pollute tests with these temporary workarounds. -- resolution: -> fixed stage: patch review ->

[issue23034] Dynamically control debugging output

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

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

2016-07-04 Thread Stefan Krah
Stefan Krah added the comment: It looks like the peephole optimizer chokes on some constant folding. Probably: INF = float("inf") NAN = float("nan") -INF -NAN You could try some combinations in the REPL. -- nosy: +skrah ___ Python tracker

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

2016-07-04 Thread Greg Stark
Greg Stark added the comment: I certainly understand the limitations of volunteer projects. I know you have limited resources and can't test on every platform. That's actually exactly why I'm testing on this platform and why I reported the bug. If there's any additional information I can

[issue27422] Deadlock when mixing threading and multiprocessing

2016-07-04 Thread Davin Potts
Davin Potts added the comment: While I believe I understand the motivation behind the suggestion to detect when the code is doing something potentially dangerous, I'll point out a few things: * any time you ask for a layer of convenience, you must choose something to sacrifice to get it

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

2016-07-04 Thread Mark Dickinson
Changes by Mark Dickinson : -- nosy: +mark.dickinson ___ Python tracker ___ ___

[issue12806] argparse: Hybrid help text formatter

2016-07-04 Thread Jakub Wilk
Changes by Jakub Wilk : -- nosy: +jwilk ___ Python tracker ___ ___ Python-bugs-list mailing

[issue27449] pip install --upgrade pip (Windows)

2016-07-04 Thread Zachary Ware
Zachary Ware added the comment: As the traceback suggests, you don't have permission to write there. You'll need to run that as an administrator, but note that you'll run into a different issue using the 'pip' command to upgrade itself; use 'py -3.5 -m pip install -U pip' instead. Also, pip

[issue27422] Deadlock when mixing threading and multiprocessing

2016-07-04 Thread Martin Ritter
Martin Ritter added the comment: I agree that this is error prone and can not be fixed reliably on the python side. However, python makes it very easy to mix these two, a user might not even notice it if a function he calls uses fork and thus just use a ThreadPoolExecutor() because it's the

[issue27449] pip install --upgrade pip (Windows)

2016-07-04 Thread frank-e
New submission from frank-e: `python -m pip install --upgrade pip` on Windows 7 with Python 3.5.2 installed for all users, PermissionError: [WinError 5] Access denied: 'c:\\program files\\python35\\lib\\site-packages\\p ip-8.1.1.dist-info\\description.rst' -- components: Windows

[issue27448] Race condition in subprocess.Popen which causes a huge memory leak

2016-07-04 Thread Andrew
New submission from Andrew: We had problem where at some point python start consuming RAM. Until it ends. The reason was race condition in subprocess.Popen. Which triggered gc.disable() and never gc.enable(). The workaround we use is: subprocess.gc.isenabled = lambda: True The scenario for

[issue24959] unittest swallows part of stack trace when raising AssertionError in a TestCase

2016-07-04 Thread Aaron Sokoloski
Aaron Sokoloski added the comment: I've run into this bug too. Took a while to track down the cause :) -- nosy: +Aaron Sokoloski ___ Python tracker ___

[issue27447] python -m doctest file_with_no_py_extension # silently fails

2016-07-04 Thread towb
New submission from towb: Command line tools usually use the shebang and don't have a .py extension. This breaks the `python -m doctest` shortcut for testmod(). Getting it to work is probably ugly, but there should be a useful message. Currently it's just a NameError for every function, which

[issue27410] DLL hijacking vulnerability in Python 3.5.2 installer

2016-07-04 Thread Mark Hammond
Mark Hammond added the comment: While I agree the risk is fairly low and it will require effort to actually do, it still sounds worth fixing at some point. A user might be tricked into downloading a DLL - eg, Firefox will happily save it without any scary UI - it's just a file. Later they run