[issue33141] descriptor __set_name__ feature broken for dataclass descriptor fields

2018-03-25 Thread Raymond Hettinger
Change by Raymond Hettinger : -- assignee: -> eric.smith ___ Python tracker ___

[issue33141] descriptor __set_name__ feature broken for dataclass descriptor fields

2018-03-25 Thread Rick Teachey
New submission from Rick Teachey : Summary: The descriptor `__set_name__` functionality (introduced in Python 3.6) does not seem to be working correctly for `dataclass.Field` objects with a default pointing to a descriptor. I have attached a file demonstrating the trouble.

[issue23952] cgi: Document the 'maxlen' member of the cgi module

2018-03-25 Thread Cheryl Sabella
Change by Cheryl Sabella : -- assignee: -> docs@python components: +Documentation nosy: +docs@python stage: -> needs patch title: Document the 'maxlen' member of the cgi module -> cgi: Document the 'maxlen' member of the cgi module versions: +Python 3.7, Python 3.8

[issue17994] Change necessary in platform.py to support IronPython

2018-03-25 Thread Cheryl Sabella
Change by Cheryl Sabella : -- resolution: -> duplicate stage: test needed -> resolved status: open -> closed superseder: -> platform._sys_version does not parse correctly IronPython 2.x version ___ Python tracker

[issue33140] shutil.chown on Windows

2018-03-25 Thread Eryk Sun
Eryk Sun added the comment: Oops, the SID for BUILTIN\Administrators is S-1-5-32-544. I left out the authority ID (5). -- ___ Python tracker

[issue33140] shutil.chown on Windows

2018-03-25 Thread Eryk Sun
New submission from Eryk Sun : shutil.chown is defined in Windows even though it's only written for Unix and only documented as available in Unix. Defining it should be skipped on Windows. Possibly in 3.8 shutil.chown could be implemented on Windows by calling a new

[issue33139] Bdb doesn't find instruction in linecache after pdb.set_trace() following os.chdir("/tmp")

2018-03-25 Thread Peter Rounce
New submission from Peter Rounce : In my view there is a fault in python3 pdb in that if you use pdb.set_trace() after using os.chdir() to change the cwd to a directory that does not contain the source code being executed, then there is no instruction output on next or

[issue33042] New 3.7 startup sequence crashes PyInstaller

2018-03-25 Thread Hartmut Goebel
Hartmut Goebel added the comment: I can confirm that c6d94c37f4fd863c73fbfbcc918fd23b458b5301 makes the PyInstaller test-case, which war the origin of this bug-report, pass. Thanks for fixing! -- ___ Python tracker

[issue30416] constant folding opens compiler to quadratic time hashing

2018-03-25 Thread Gregory P. Smith
Change by Gregory P. Smith : -- assignee: -> benjamin.peterson ___ Python tracker ___ ___

[issue33138] Improve standard error for uncopyable types

2018-03-25 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +5978 stage: -> patch review ___ Python tracker ___

[issue33042] New 3.7 startup sequence crashes PyInstaller

2018-03-25 Thread STINNER Victor
STINNER Victor added the comment: Would it be possible to not officially allow calling PySys_AddWarnOption() before Py_Initialize()? Fix the bug, but don't promote doing that. I just suggest to revert: Doc/c-api/init.rst: + * :c:func:`PySys_AddWarnOption` + *

[issue33053] Avoid adding an empty directory to sys.path when running a module with `-m`

2018-03-25 Thread Nick Coghlan
Nick Coghlan added the comment: New changeset ee3784594b33c72c3fdca6a71892d22f14045ab6 by Nick Coghlan in branch '3.7': bpo-33053: -m now adds *starting* directory to sys.path (GH-6231) (#6236)

[issue33053] Avoid adding an empty directory to sys.path when running a module with `-m`

2018-03-25 Thread Nick Coghlan
Nick Coghlan added the comment: New changeset d5d9e02dd3c6df06a8dd9ce75ee9b52976420a8b by Nick Coghlan in branch 'master': bpo-33053: -m now adds *starting* directory to sys.path (GH-6231) https://github.com/python/cpython/commit/d5d9e02dd3c6df06a8dd9ce75ee9b52976420a8b

[issue25782] CPython hangs on error __context__ set to the error itself

2018-03-25 Thread Gregory P. Smith
Gregory P. Smith added the comment: I believe the original issue is fixed, the original problem and the one Jack followed up with no longer work in modern Python 3. But there is discussion about possibly doing something better, if anyone is interested in doing that I suggest

[issue33042] New 3.7 startup sequence crashes PyInstaller

2018-03-25 Thread Nick Coghlan
Nick Coghlan added the comment: New changeset bc77eff8b96be4f035e665ab35c1d06e22f46491 by Nick Coghlan in branch 'master': bpo-33042: Fix pre-initialization sys module configuration (GH-6157) https://github.com/python/cpython/commit/bc77eff8b96be4f035e665ab35c1d06e22f46491

[issue32270] subprocess closes redirected fds even if they are in pass_fds

2018-03-25 Thread Gregory P. Smith
Change by Gregory P. Smith : -- keywords: +patch pull_requests: +5977 stage: -> patch review ___ Python tracker ___

[issue32270] subprocess closes redirected fds even if they are in pass_fds

2018-03-25 Thread Alexey Izbyshev
Alexey Izbyshev added the comment: Actually I've started to work on this with #32844, but got no feedback. This issue may of course be fixed independently, but the problems with descriptor ownership for fds <= 2 will remain unless all ownership problems are fixed at once.

[issue6671] webbrowser doesn't respect xfce default browser

2018-03-25 Thread Cheryl Sabella
Cheryl Sabella added the comment: Should this patch be converted to a PR? -- nosy: +csabella versions: +Python 3.7, Python 3.8 -Python 3.4, Python 3.5 ___ Python tracker

[issue32270] subprocess closes redirected fds even if they are in pass_fds

2018-03-25 Thread Gregory P. Smith
Gregory P. Smith added the comment: This bug stems from: https://github.com/python/cpython/blob/master/Modules/_posixsubprocess.c#L454 When stdout=fd is passed, that results in c2pwrite=fd. The stdin/stdout/stderr pipe fds are closed when > 2 without checking to see if

[issue33126] Some C buffer protocol APIs not documented

2018-03-25 Thread Stefan Krah
Stefan Krah added the comment: And if view->len > len in PyBuffer_FromContiguous(), then view will contain uninitialized bytes, which is bad. -- ___ Python tracker

[issue33126] Some C buffer protocol APIs not documented

2018-03-25 Thread Stefan Krah
Stefan Krah added the comment: Yes, the signatures are weird. In PyBuffer_FromContiguous(), "len" is the size of "buf" in bytes. If "buf" contains 6 floats, but "view" only has space for 4, then only 4 are copied into "view". To avoid that sort of thing, I changed

[issue33079] subprocess: document the interaction between subprocess.Popen and os.set_inheritable

2018-03-25 Thread Gregory P. Smith
Gregory P. Smith added the comment: I clarified the docs to mention that the inheritable flag is heeded when close_fds=False in https://github.com/python/cpython/pull/6240/files -- resolution: -> fixed stage: patch review -> resolved status: open -> closed

[issue33079] subprocess: document the interaction between subprocess.Popen and os.set_inheritable

2018-03-25 Thread Gregory P. Smith
Gregory P. Smith added the comment: I assumed simon meant "close_fds=False" when he wrote open_fds = True. Regardless, supplying any pass_fds forces close_fds=True behavior. File descriptors listed in pass_fds are explicitly set inheritable from within the child process

[issue33079] subprocess: document the interaction between subprocess.Popen and os.set_inheritable

2018-03-25 Thread Gregory P. Smith
Change by Gregory P. Smith : -- keywords: +patch pull_requests: +5976 stage: -> patch review ___ Python tracker ___

[issue24356] venv documentation incorrect / misleading

2018-03-25 Thread Cheryl Sabella
Change by Cheryl Sabella : -- keywords: +easy stage: -> needs patch type: -> enhancement versions: +Python 3.7, Python 3.8 -Python 3.3 ___ Python tracker

[issue31869] commentary on ssl.PROTOCOL_TLS

2018-03-25 Thread Cheryl Sabella
Change by Cheryl Sabella : -- nosy: +christian.heimes ___ Python tracker ___ ___

[issue31869] commentary on ssl.PROTOCOL_TLS

2018-03-25 Thread Cheryl Sabella
Cheryl Sabella added the comment: This was changed for 3.7 and 3.6 in PR1355, but there's no corresponding bpo number for that. Should the relevant changes be backported to 2.7? -- nosy: +csabella ___ Python tracker

[issue15088] PyGen_NeedsFinalizing is public, but undocumented

2018-03-25 Thread Cheryl Sabella
Cheryl Sabella added the comment: What should be done for the PyGen_NeedsFinalizing API? Does it need to be documented or should it be removed since it's no longer used in the code base? Thanks! -- nosy: +csabella versions: +Python 3.7, Python 3.8 -Python 3.2,

[issue33023] Unable to copy ssl.SSLContext

2018-03-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See issue33138. -- ___ Python tracker ___

[issue33138] Improve standard error for uncopyable types

2018-03-25 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : Currently most extension types are not pickleable and copyable. The default error messages is "can't pickle XXX objects". This is confusing in case of copying because not all know that copying falls back to the pickle protocol

[issue33129] Add kwarg-only option to dataclass

2018-03-25 Thread Alan Du
Change by Alan Du : -- keywords: +patch pull_requests: +5975 stage: -> patch review ___ Python tracker ___

[issue23388] datetime.strftime('%s') does not take timezone into account

2018-03-25 Thread Cheryl Sabella
Change by Cheryl Sabella : -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> add cross-platform support for %s strftime-format code ___ Python tracker

[issue33023] Unable to copy ssl.SSLContext

2018-03-25 Thread Christian Heimes
Christian Heimes added the comment: That's the only reason for PR 6099. The change makes it more obvious that SSL objects can't be serialized or copied. -- ___ Python tracker

[issue33079] subprocess: document the interaction between subprocess.Popen and os.set_inheritable

2018-03-25 Thread Martin Panter
Martin Panter added the comment: There is no “open_fds” parameter as far as I know. I presume you meant heritable descriptors are still closed with close_fds=True (not open_fds=False). Are you sure about the second part? In my experiments on Linux, unless I use

[issue33053] Avoid adding an empty directory to sys.path when running a module with `-m`

2018-03-25 Thread Nick Coghlan
Nick Coghlan added the comment: Marking as fixed, since this is now the version likely to go out in 3.7.0b3 - if we find further problems with it (beyond the potential enhancement discussed above to make local directory usage opt-in), then those can go in a new issue.

[issue33053] Avoid adding an empty directory to sys.path when running a module with `-m`

2018-03-25 Thread Nick Coghlan
Nick Coghlan added the comment: New changeset a9e5d0e9ef27b14e34631d415e727a07d0f63bef by Nick Coghlan in branch 'master': bpo-33053: Remove test_cmd_line_script debugging print (GH-6237) https://github.com/python/cpython/commit/a9e5d0e9ef27b14e34631d415e727a07d0f63bef

[issue31823] Opaque default value for close_fds argument in Popen.__init__

2018-03-25 Thread Martin Panter
Martin Panter added the comment: The close_fds= in that signature seems fine to me. If you read the documentation, it says the default mode depends on the platform, and on other parameters. However I think the signature at

[issue33053] Avoid adding an empty directory to sys.path when running a module with `-m`

2018-03-25 Thread Nick Coghlan
Nick Coghlan added the comment: 3.7 CI finished before I logged off for the night, so this is good to go for 3.7.0b3 now :) -- priority: release blocker -> normal ___ Python tracker

[issue33053] Avoid adding an empty directory to sys.path when running a module with `-m`

2018-03-25 Thread Nick Coghlan
Change by Nick Coghlan : -- pull_requests: +5974 ___ Python tracker ___ ___

[issue33053] Avoid adding an empty directory to sys.path when running a module with `-m`

2018-03-25 Thread Nick Coghlan
Nick Coghlan added the comment: Initial fix has been merged to master, CI runs pending for the backport to 3.7 and a follow-up master branch PR to remove a debugging print I noticed when resolving a test_import conflict in the backport. I won't get to merging those until

[issue33053] Avoid adding an empty directory to sys.path when running a module with `-m`

2018-03-25 Thread Nick Coghlan
Change by Nick Coghlan : -- pull_requests: +5973 ___ Python tracker ___ ___

[issue32270] subprocess closes redirected fds even if they are in pass_fds

2018-03-25 Thread Martin Panter
Change by Martin Panter : -- nosy: +martin.panter ___ Python tracker ___ ___

[issue24565] the f_lineno getter is broken

2018-03-25 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +5972 stage: -> patch review ___ Python tracker ___

[issue24565] the f_lineno getter is broken

2018-03-25 Thread Xavier de Gaye
Xavier de Gaye added the comment: Added PR 6233. One of the GitHub bots failed to link this issue with PR 6233. Maybe this is related to the fact that connections to bpo are currently failing intermitently with the message: An error occurred during a connection to

[issue24565] the f_lineno getter is broken

2018-03-25 Thread Xavier de Gaye
Xavier de Gaye added the comment: A trace function may also be set in extension modules by PyEval_SetTrace() and it may not use f->f_trace. This is another reason why f->f_trace cannot be used in PyFrame_GetLineNumber() to know when f->f_lineno is valid. --

[issue33137] line traces may be missed on backward jumps when instrumented with dtrace

2018-03-25 Thread Xavier de Gaye
New submission from Xavier de Gaye : In _PyEval_EvalFrameDefault(), the call to maybe_dtrace_line() sets frame->f_lasti to instr_prev and for that reason, in the ensuing call to maybe_call_line_trace(), the call_trace() function with PyTrace_LINE is not called as it should

[issue33042] New 3.7 startup sequence crashes PyInstaller

2018-03-25 Thread Nick Coghlan
Nick Coghlan added the comment: While I've merged an initial fix for this (so it should be working again in 3.7.0b3), I'm not going to close the issue until folks have had a chance to review and comment on the linked list based approach I've taken. -- versions:

[issue33136] Harden ssl module against CVE-2018-8970

2018-03-25 Thread Christian Heimes
Christian Heimes added the comment: New changeset 2dd885eaa0d427e84892673c83d697bca5427c8b by Christian Heimes (Miss Islington (bot)) in branch '3.7': [3.7] bpo-33136: Harden ssl module against CVE-2018-8970 (GH-6229) (GH-6230)

[issue33042] New 3.7 startup sequence crashes PyInstaller

2018-03-25 Thread miss-islington
miss-islington added the comment: New changeset c6d94c37f4fd863c73fbfbcc918fd23b458b5301 by Miss Islington (bot) in branch '3.7': bpo-33042: Fix pre-initialization sys module configuration (GH-6157)

[issue33053] Avoid adding an empty directory to sys.path when running a module with `-m`

2018-03-25 Thread Nick Coghlan
Nick Coghlan added the comment: It turned out some tests in CPython's own test suite were implicitly relying on the old behaviour where the current working directory automatically ended up on sys.path (see the changes to test_bdb and test_doctest in the updated PR).

[issue33053] Avoid adding an empty directory to sys.path when running a module with `-m`

2018-03-25 Thread Nick Coghlan
Nick Coghlan added the comment: PR posted with the change to use an absolute path for the starting working directory in the "-m" case. That PR also includes a change to improve the fidelity of the test suite: back when I first wrote test_cmd_line_script, I was mainly

[issue33042] New 3.7 startup sequence crashes PyInstaller

2018-03-25 Thread miss-islington
Change by miss-islington : -- pull_requests: +5971 ___ Python tracker ___

[issue33053] Avoid adding an empty directory to sys.path when running a module with `-m`

2018-03-25 Thread Nick Coghlan
Change by Nick Coghlan : -- keywords: +patch pull_requests: +5970 stage: needs patch -> patch review ___ Python tracker ___

[issue33136] Harden ssl module against CVE-2018-8970

2018-03-25 Thread miss-islington
Change by miss-islington : -- pull_requests: +5969 ___ Python tracker ___

[issue33136] Harden ssl module against CVE-2018-8970

2018-03-25 Thread Christian Heimes
Christian Heimes added the comment: New changeset d02ac25ab0879f1a6de6937573bf00a16b7bd22e by Christian Heimes in branch 'master': bpo-33136: Harden ssl module against CVE-2018-8970 (GH-6229) https://github.com/python/cpython/commit/d02ac25ab0879f1a6de6937573bf00a16b7bd22e

[issue33136] Harden ssl module against CVE-2018-8970

2018-03-25 Thread Christian Heimes
Change by Christian Heimes : -- keywords: +patch pull_requests: +5968 stage: needs patch -> patch review ___ Python tracker ___

[issue33133] Don't return implicit optional types by get_type_hints

2018-03-25 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: OK, let us then keep this issue as a remainder that we need to update the runtime behaviour when the static one changes. -- ___ Python tracker

[issue33136] Harden ssl module against CVE-2018-8970

2018-03-25 Thread Christian Heimes
New submission from Christian Heimes : Since 3.7, the ssl module uses X509_VERIFY_PARAM_set1_host() to put the burden of hostname matching on OpenSSL. More specific, it calls X509_VERIFY_PARAM_set1_host(param, server_hostname, 0). The namelen=0 parameter means that OpenSSL

[issue33127] Python 2.7.14 won't build ssl module with Libressl 2.7.0

2018-03-25 Thread Christian Heimes
Christian Heimes added the comment: It's unrelated. PyCA Cryptography doesn't support LibreSSL 2.7 yet, see https://github.com/pyca/cryptography/pull/4168 -- ___ Python tracker

[issue33053] Avoid adding an empty directory to sys.path when running a module with `-m`

2018-03-25 Thread Nick Coghlan
Change by Nick Coghlan : -- assignee: -> ncoghlan ___ Python tracker ___ ___

[issue33096] ttk.Treeview.insert() does not allow to insert item with "False" iid

2018-03-25 Thread Garvit Khatri
Change by Garvit Khatri : -- keywords: +patch pull_requests: +5967 stage: needs patch -> patch review ___ Python tracker ___

[issue33135] Define field prefixes for the various config structs

2018-03-25 Thread Nick Coghlan
New submission from Nick Coghlan : While working on https://bugs.python.org/issue33042, I found it hard to keep track of which kind of config struct a particular piece of code was referencing. As a particularly relevant example, we currently have 3 different "warnoptions"

[issue33114] random.sample() behavior is unexpected/unclear from docs

2018-03-25 Thread Tim Peters
Tim Peters added the comment: There's nothing in the docs I can see that implies `sample(x, n)` is a prefix of what `sample(x, n+1)` would have returned had the latter been called instead. If so, then - as always - it's "at your own risk" when you rely on behaviors that