[issue35975] Put back the ability to parse files where async/await aren't keywords

2019-02-26 Thread Michael Sullivan
Change by Michael Sullivan : -- nosy: +msullivan ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue36128] ResourceReader for FileLoader inconsistently handles path separators

2019-02-26 Thread Gregory Szorc
New submission from Gregory Szorc : The implementation of the ResourceReader API for the FileLoader class in importlib/_bootstrap_external.py is inconsistent with regards to handling of path separators. Specifically, "is_resource()" returns False if "resource" has a path separator. But "open

[issue33944] Deprecate and remove pth files

2019-02-26 Thread Ivan Pozdeev
Ivan Pozdeev added the comment: On 26.02.2019 23:37, Barry A. Warsaw wrote: > My opposition would lessen if there were clear ways to debug, and preferably > also prevent, pth interpretation. Easy. Insert a chunk into site.py that would call pdb.set_trace() if an envvar (e.g. `PYSITEDEBUG')

[issue36046] support dropping privileges when running subprocesses

2019-02-26 Thread Alexey Izbyshev
Alexey Izbyshev added the comment: > 1) This is intentional, this is for dropping privileges before running some > (possibly untrusted) command, we do not want to leave a path for the > subprocess to gain root back. If there is a subprocess that needs root for > some operations, it would pre

[issue36129] io documentation unclear about flush() and close() semantics for wrapped streams

2019-02-26 Thread Gregory Szorc
New submission from Gregory Szorc : As part of implementing io.RawIOBase/io.BufferedIOBase compatible stream types for python-zstandard, I became confused about the expected behavior of flush() and close() when a stream is wrapping another stream. The documentation doesn't lay out explicitly

[issue33944] Deprecate and remove pth files

2019-02-26 Thread Steve Dower
Steve Dower added the comment: Barry is a steering council member now, so by definition he's 1/5th of the loudest possible minority ;) I am totally okay with adding more diagnostics here. Frankly, if "-v" doesn't currently log info about .pth files (or other things that the site module does

[issue36030] add internal API function to create tuple without items array initialization

2019-02-26 Thread STINNER Victor
STINNER Victor added the comment: > Victor/vstinner: Isn't PR 12032 reintroducing the issue fixed in #29234? No according to manual tests: https://github.com/python/cpython/pull/12032#issuecomment-467110233 Usage of the stack memory doesn't change with PR 12032. FYI I also tested manually si

[issue36030] add internal API function to create tuple without items array initialization

2019-02-26 Thread STINNER Victor
STINNER Victor added the comment: > if LTO is enabled, the same stack bloat issues are possible Please test, I'm not interested to spend too much time on that topic. To be clear, _Py_NO_INLINE was a hack and a micro-optimization. It doesn't solve a real bug. Python has very weak promises on

[issue36127] Argument Clinic: inline parsing code for functions with keyword parameters

2019-02-26 Thread STINNER Victor
STINNER Victor added the comment: > How much bigger does the core interpreter + built-in extension modules get > when you make this change? How much more memory is used by real world > programs? Well, any optimization is a matter of trade-off between memory and CPU. Last years, CPU are not

[issue36046] support dropping privileges when running subprocesses

2019-02-26 Thread Patrick McLean
Patrick McLean added the comment: > Thanks for your explanation. In case of a privileged process, the behavior of > setreuid/setregid/setgroups does seem well-defined. But setuid/setgid change > all ids (real, effective, saved) too in this case. Do you prefer > setreuid/setregid because they

[issue33944] Deprecate and remove pth files

2019-02-26 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Feb 26, 2019, at 12:52, Ionel Cristian Mărieș wrote: > > Something bad was installed with sudo but suddenly sudo is not acceptable for > debugging? This seems crazy. Your sudo may not be my sudo. :) Let’s say I update my Ubuntu desktop and a new versio

[issue33944] Deprecate and remove pth files

2019-02-26 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Feb 26, 2019, at 13:23, Ivan Pozdeev wrote: > > Easy. Insert a chunk into site.py that would call pdb.set_trace() if an > envvar (e.g. `PYSITEDEBUG') or a command line switch is set. > > Actually, why can't whoever has this problem add such a chunk thems

[issue36128] ResourceReader for FileLoader inconsistently handles path separators

2019-02-26 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Feb 26, 2019, at 13:05, Gregory Szorc wrote: > > I would think the two would agree about whether a path with separators is a > resource or not. The documentation at > https://docs.python.org/3.7/library/importlib.html#importlib.abc.ResourceReader > impl

[issue36129] io documentation unclear about flush() and close() semantics for wrapped streams

2019-02-26 Thread Josh Rosenberg
Josh Rosenberg added the comment: The general rule of thumb is to have the API behave as if no wrapping is occurring. The outermost layer should still adhere to the documented API requirements, so both flush and close should cascade (flush says it flushes the "buffers" plural; all user mode

[issue33944] Deprecate and remove pth files

2019-02-26 Thread Ionel Cristian Mărieș
Ionel Cristian Mărieș added the comment: On Wed, Feb 27, 2019 at 1:31 AM Barry A. Warsaw wrote: > Your sudo may not be my sudo. :) Let’s say I update my Ubuntu desktop and a new version of package with a pth breaks. > Maybe I didn’t even know I was doing that, via automated updates, or managem

[issue33944] Deprecate and remove pth files

2019-02-26 Thread Ionel Cristian Mărieș
Ionel Cristian Mărieș added the comment: On Wed, Feb 27, 2019 at 1:41 AM Barry A. Warsaw wrote: > Basically yes, I’ve done this. But think of the poor user who doesn’t have that expertise or ability to hack on an installed Python’s site.py file. When their application breaks because some faul

[issue25872] multithreading traceback KeyError when modifying file

2019-02-26 Thread Christopher Unkel
Change by Christopher Unkel : -- keywords: +patch pull_requests: +12085 stage: -> patch review ___ Python tracker ___ ___ Python-bu

[issue33608] [subinterpreters] Add a cross-interpreter-safe mechanism to indicate that an object may be destroyed.

2019-02-26 Thread Eric Snow
Change by Eric Snow : -- pull_requests: +12086 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue36125] Cannot cross-compile to more featureful but same tune

2019-02-26 Thread Ned Deily
Ned Deily added the comment: Thanks for the report. Unfortunately, as far as I know, we don't claim anywhere to support cross-compiling in general. As you've probably noticed, the Python Makefile-based build system (for non-Windows platforms) is by no means a conventional GNU autotools one.

[issue28441] Change sys.executable to include executable suffix

2019-02-26 Thread miss-islington
Change by miss-islington : -- pull_requests: +12087 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue36130] Pdb(skip=[...]) + module without __name__ => TypeError

2019-02-26 Thread Anthony Sottile
New submission from Anthony Sottile : Here's the simplest example I could come up with -- hit this while debugging pytest (which uses attrs which uses similar code to this to make classes) import pdb; pdb.Pdb(skip=['django.*']).set_trace() eval(compile("1", "", "exec"), {}) print('ok!') When

[issue36130] Pdb(skip=[...]) + module without __name__ => TypeError

2019-02-26 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +xdegaye, xtreak ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36131] test.test_urllib2net.TimeoutTest ftp related tests fail due to ftp://www.pythontest.net/ being unavailable

2019-02-26 Thread Karthikeyan Singaravelan
New submission from Karthikeyan Singaravelan : I am seeing this error on Windows and Mac CI builds where FTP related tests in test.test_urllib2net.TimeoutTest are failing. It's reproducible locally too where the tests are skipped on Mac and Ubuntu. Not sure if it's random since several PRs in

[issue36131] test.test_urllib2net.TimeoutTest ftp related tests fail due to ftp://www.pythontest.net/ being unavailable

2019-02-26 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Several buildbots are failing due to this problem. Some examples: https://buildbot.python.org/all/#builders/33/builds/520 https://buildbot.python.org/all/#builders/72/builds/503 https://buildbot.python.org/all/#builders/78/builds/419 -- __

[issue36131] test.test_urllib2net.TimeoutTest ftp related tests fail due to ftp://www.pythontest.net/ being unavailable

2019-02-26 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- priority: normal -> high versions: +Python 2.7, Python 3.6, Python 3.7 ___ Python tracker ___ _

[issue36130] Pdb(skip=[...]) + module without __name__ => TypeError

2019-02-26 Thread Anthony Sottile
Change by Anthony Sottile : -- keywords: +patch pull_requests: +12088 stage: -> patch review ___ Python tracker ___ ___ Python-bugs

[issue36131] test.test_urllib2net.TimeoutTest ftp related tests fail due to ftp://www.pythontest.net/ being unavailable

2019-02-26 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: These tests were skipped in Travis with issue35411 -- ___ Python tracker ___ ___ Python

[issue31122] SSLContext.wrap_socket() throws OSError with errno == 0

2019-02-26 Thread Safihre
Safihre added the comment: In the CherryPy project it is also observed on Windows with Python 3,7.2. In CherryPy it's triggered by Checker plugin, which connects to the app listening to the socket port in TLS mode via plain HTTP during startup (from the same process). It has been around for a

[issue35892] Fix awkwardness of statistics.mode() for multimodal datasets

2019-02-26 Thread Raymond Hettinger
Raymond Hettinger added the comment: > Are you happy guaranteeing that it will always be the first > mode encountered? Yes. All of the other implementations I looked at make some guarantee about which mode is returned. Maple, Matlab, and Excel all return the first encountered.¹ That is c

[issue36030] add internal API function to create tuple without items array initialization

2019-02-26 Thread Sergey Fedoseev
Sergey Fedoseev added the comment: > Can you please convert msg336142 into a perf script? > And then run again these benchmarks on PR 12052. ++-+--+ | Benchmark | ref | untracked| ++===

<    1   2