[issue39953] Let's update ssl error codes

2020-03-12 Thread Dima Tisnek
New submission from Dima Tisnek : Let's consider ssl error `291` (https://bugs.python.org/issue39951): It was introduced into openssl 2 years ago: https://github.com/openssl/openssl/commit/358ffa05cd3a088822c7d06256bc87516d918798 The documentation states:

[issue39951] Ignore specific errors when closing ssl connections

2020-03-12 Thread Dima Tisnek
Dima Tisnek added the comment: Reproducer: """ Reproducer for BPO-39951 We send some data over ssl and close the connection. The server responds after our openssl considers the connection closed-ish and raises an error. """ import asyncio import ssl host = "nghttp2.org" port = 443

[issue39952] Using VS2019 to automatically build Python3 and it failed to build

2020-03-12 Thread Lin Gao
Change by Lin Gao : -- nosy: -Lin ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39952] Using VS2019 to automatically build Python3 and it failed to build

2020-03-12 Thread Lin Gao
New submission from Lin Gao : We (the MSVC ++ team) is trying to use VS2019 to replace VS2017 to automatically build Python3(branch 3.6)on Windows. First build failed with error MSB8036: The Windows SDK version 10.0.10586.0 was not found. So we modified the build command line to 'build -e -r

[issue39951] Ignore specific errors when closing ssl connections

2020-03-12 Thread Dima Tisnek
New submission from Dima Tisnek : When a connection wrapped in ssl is closed, sometimes the ssl library reports an error, which I believe should be ignored. The error code is `291` and the name of the error is either SSL_R_KRB5_S_INIT (KRB5_S_INIT) or

[issue39943] Meta: Clean up various issues in C internals

2020-03-12 Thread Andy Lester
Change by Andy Lester : -- pull_requests: +18322 pull_request: https://github.com/python/cpython/pull/18973 ___ Python tracker ___

[issue39920] os.stat() and os.lstat() fail with Windows device paths

2020-03-12 Thread Eryk Sun
Eryk Sun added the comment: The particular error reported here is due to pathlib, which is a duplicate of issue 33898. That said, since the OP is using 3.7, I've left this issue open in case someone wants to backport the win32_xstat_impl changes that enable stat() (and in particular setting

[issue39927] IDLE.app fails on macOS 10.15 if denied access to Documents

2020-03-12 Thread Terry J. Reedy
Terry J. Reedy added the comment: Right. I rechecked and Terminal starts in /Users/ and a user can easily switch to Documents or anything else. Dialogs open in the same directory. IDLE should stay wherever when started from terminal. That was agreed on #22121 (Checking 'sys.stdout is

[issue22121] Start IDLE from icon in a better place.

2020-03-12 Thread Terry J. Reedy
Terry J. Reedy added the comment: Recap and proposal When editing a named file, Open and Save start in the directory of that file. Running a file sets the initial working directory of the execution process, which affects imports in the code. We are here discussing the working directory

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

2020-03-12 Thread Dima Tisnek
Dima Tisnek added the comment: If someone can review https://github.com/python/cpython/pull/18772 then pretty-please review  -- ___ Python tracker ___

[issue39927] IDLE.app fails on macOS 10.15 if denied access to Documents

2020-03-12 Thread Ned Deily
Ned Deily added the comment: As Ronald notes, the chdir to the user’s Documents folder is *only* needed when launching via IDLE.app (for example by double-clicking an IDLE.app icon in the macOS Finder) because the user has no control over the launched app’s working directory in that case and

[issue35712] Make NotImplemented unusable in boolean context

2020-03-12 Thread Ethan Furman
Ethan Furman added the comment: Hmm. Okay, I'm happy with just raising a TypeError in NotImplemented.__bool__. -- ___ Python tracker ___

[issue39933] test_gdb fails on AMD64 FreeBSD Shared 3.x: ptrace: Operation not permitted

2020-03-12 Thread Kubilay Kocak
Kubilay Kocak added the comment: Testing with security.bsd.unprivileged_proc_debug=1 -- ___ Python tracker ___ ___

[issue22121] Start IDLE from icon in a better place.

2020-03-12 Thread Terry J. Reedy
Terry J. Reedy added the comment: #39927 is about changing the Mac-specific chdir hidden away in Mac/IDLE/IDLE.app/Contents/Resources/idlemain.py, line 8 A generic solution should supercede that. -- ___ Python tracker

[issue33337] Provide a supported Concrete Syntax Tree implementation in the standard library

2020-03-12 Thread Guido van Rossum
Guido van Rossum added the comment: If people are looking for a concrete CST that works now, maybe LibCST will work? https://github.com/Instagram/LibCST -- ___ Python tracker

[issue24119] Carry comments with the AST

2020-03-12 Thread Guido van Rossum
Guido van Rossum added the comment: I propose to close this issue, since (as of Python 3.8) we now have ast.parse(source, type_comments=True). -- ___ Python tracker ___

[issue39950] Add pathlib.Path.hardlink_to()

2020-03-12 Thread Barney Gale
Change by Barney Gale : -- keywords: +patch pull_requests: +18321 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18909 ___ Python tracker ___

[issue39950] Add pathlib.Path.hardlink_to()

2020-03-12 Thread Barney Gale
New submission from Barney Gale : Per bpo-39291, the argument order for `pathlib.Path.link_to()` is inconsistent with `symlink_to()` and its own documentation. This ticket covers adding a new `hardlink_to()` method with the correct argument order, and deprecating `link_to()`. Discussion on

[issue28775] Option to set startup directory in IDLE

2020-03-12 Thread Terry J. Reedy
Terry J. Reedy added the comment: The rule for whether to switch to the configured directory might be if sys.stdout is None: chdir... On windows, this is true when starting in the console with pyw(pythonw) -m idlelib But there is no need to include the (Windows-only) 'w'. It is meant to

[issue39291] "pathlib.Path.link_to()" and "pathlib.Path.symlink_to()" have reversed usage

2020-03-12 Thread Joannah Nanjekye
Joannah Nanjekye added the comment: Am hesitant on re-opening this. I think it sounds more meaningful to open a new issue for the new suggestion that requires deprecating this current behavior and introducing the new intended functionality. Best, Joannah On Thu, Mar 12, 2020 at 8:40 PM

[issue39291] "pathlib.Path.link_to()" and "pathlib.Path.symlink_to()" have reversed usage

2020-03-12 Thread Barney Gale
Barney Gale added the comment: Per discussion on the mailing list, I'd like to request that this bug be re-opened. https://mail.python.org/archives/list/python-...@python.org/thread/7QPLYW36ZK6QTW4SV4FI6C343KYWCPAT/ -- nosy: +barneygale ___

[issue39924] pathlib handles missing `os.link`, `os.symlink` and `os.readlink` inconsistently

2020-03-12 Thread Barney Gale
Barney Gale added the comment: Good points! Do you know of an example of a community library that uses `_Accessor.link`? Thanks -- ___ Python tracker ___

[issue39947] Make the PyThreadState structure opaque (move it to the internal C API)

2020-03-12 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +18320 pull_request: https://github.com/python/cpython/pull/18972 ___ Python tracker ___

[issue39947] Make the PyThreadState structure opaque (move it to the internal C API)

2020-03-12 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +18319 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18971 ___ Python tracker ___

[issue38500] PEP 523: Add private _PyInterpreterState_SetEvalFrameFunc() function to the C API (Python 3.8 regression)

2020-03-12 Thread STINNER Victor
STINNER Victor added the comment: New changeset 0b72b23fb0c130279f65f3bcd23521acf4a98c88 by Victor Stinner in branch 'master': bpo-38500: Add _PyInterpreterState_SetEvalFrameFunc() (GH-17340) https://github.com/python/cpython/commit/0b72b23fb0c130279f65f3bcd23521acf4a98c88 --

[issue39936] Python fails to build _asyncio on module on AIX

2020-03-12 Thread STINNER Victor
STINNER Victor added the comment: New changeset c846ef004d79ee8e9645d3e5e8b3b0cb97b5013f by Victor Stinner in branch 'master': bpo-39936: _aix_support uses _bootsubprocess (GH-18970) https://github.com/python/cpython/commit/c846ef004d79ee8e9645d3e5e8b3b0cb97b5013f --

[issue39949] truncating match in regular expression match objects repr

2020-03-12 Thread Eric V. Smith
Eric V. Smith added the comment: I think the missing closing quote is supposed to be your visual clue that it's truncated. Although I'll grant you that it's pretty subtle. -- nosy: +eric.smith versions: +Python 3.9 ___ Python tracker

[issue39949] truncating match in regular expression match objects repr

2020-03-12 Thread Seth Troisi
New submission from Seth Troisi : Following on https://bugs.python.org/issue17087 Today I was mystified by why a regex wasn't working. >>> import re >>> re.match(r'.{10}', 'A'*49+'B') <_sre.SRE_Match object; span=(0, 10), match='AA'> >>> re.match(r'.{49}', 'A'*49+'B')

[issue39948] Python 3.8 unconditionally uses functions not available on OS X 10.4 and 10.5

2020-03-12 Thread dgelessus
New submission from dgelessus : In particular, the implementation of posix._fcopyfile uses (available since OS X 10.5), and the implementation of threading.get_native_id uses pthread_threadid_np (available since OS X 10.6). This breaks builds for OS X 10.5 and older. I'm aware that the

[issue39862] Why are the union relationships not implemented by default for ≤ and ≥?

2020-03-12 Thread Géry
Géry added the comment: Note that other relationships are always valid _and already implemented by default in the interpreter (through the `NotImplemented` return value protocol)_: = is the [converse](https://en.wikipedia.org/wiki/Binary_relation#Converse) of itself, ≠ is the converse of

[issue39927] IDLE.app fails on macOS 10.15 if denied access to Documents

2020-03-12 Thread Ronald Oussoren
Ronald Oussoren added the comment: Note that IDLE.app sets the current working directory to ~/Documents to have a sane working directory (and hence sane behavior in file dialogs), by default app bundles on macOS are launched with the root directory as the current working directory. For

[issue39936] Python fails to build _asyncio on module on AIX

2020-03-12 Thread STINNER Victor
STINNER Victor added the comment: I converted attached _aix_support.py into PR 18970 (with minor changes). -- ___ Python tracker ___

[issue39936] Python fails to build _asyncio on module on AIX

2020-03-12 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +18318 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18970 ___ Python tracker ___

[issue38500] PEP 523: Add private _PyInterpreterState_SetEvalFrameFunc() function to the C API (Python 3.8 regression)

2020-03-12 Thread STINNER Victor
STINNER Victor added the comment: Mark: Would you mind to open a separated issue for your following idea? > I propose a new method on code objects `withCallAtLine(callable: Callable[], > line:int)` which returns a new code object with calls to the given callable > at the given line. > A

[issue38500] PEP 523: Add private _PyInterpreterState_SetEvalFrameFunc() function to the C API (Python 3.8 regression)

2020-03-12 Thread STINNER Victor
STINNER Victor added the comment: I took Mark's concerns in account and I updated my PR to only add *private* functions to the C API, not *public* functions. -- ___ Python tracker

[issue38500] PEP 523: Add private _PyInterpreterState_SetEvalFrameFunc() function to the C API (Python 3.8 regression)

2020-03-12 Thread STINNER Victor
Change by STINNER Victor : -- title: PEP 523: Add PyInterpreterState_SetEvalFrameFunc() to the public C API (Python 3.8 regression) -> PEP 523: Add private _PyInterpreterState_SetEvalFrameFunc() function to the C API (Python 3.8 regression) ___

[issue39689] struct and memoryview tests rely on undefined behavior (as revealed by clang 9)

2020-03-12 Thread Stefan Krah
Change by Stefan Krah : -- pull_requests: +18317 pull_request: https://github.com/python/cpython/pull/18969 ___ Python tracker ___

[issue24119] Carry comments with the AST

2020-03-12 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- nosy: +BTaskaya ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39936] Python fails to build _asyncio on module on AIX

2020-03-12 Thread Michael Felt
Michael Felt added the comment: The good news! Your patch, better rewrite, of _aix_platform.py is working! Many thanks! -- ___ Python tracker ___

[issue39562] Asynchronous comprehensions don't work in asyncio REPL

2020-03-12 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- keywords: +patch pull_requests: +18316 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18968 ___ Python tracker ___

[issue36144] Dictionary union. (PEP 584)

2020-03-12 Thread Brandt Bucher
Change by Brandt Bucher : -- pull_requests: +18315 pull_request: https://github.com/python/cpython/pull/18967 ___ Python tracker ___

[issue39689] struct and memoryview tests rely on undefined behavior (as revealed by clang 9)

2020-03-12 Thread Stefan Krah
Stefan Krah added the comment: memoryview only supports the native format, so I've disabled the (wrong) test that casts arrays with arbitrary values to _Bool. So memoryview is done. IMO the problem in _struct is that it swaps the x->unpack function for the native one, which does not seem

[issue39689] struct and memoryview tests rely on undefined behavior (as revealed by clang 9)

2020-03-12 Thread Stefan Krah
Stefan Krah added the comment: New changeset f8ce3e2dae277baa2ef92e8a3e935953dc6c3f39 by Miss Islington (bot) in branch '3.8': bpo-39689: Do not test undefined casts to _Bool (GH-18964) (#18966) https://github.com/python/cpython/commit/f8ce3e2dae277baa2ef92e8a3e935953dc6c3f39 --

[issue39689] struct and memoryview tests rely on undefined behavior (as revealed by clang 9)

2020-03-12 Thread Stefan Krah
Stefan Krah added the comment: New changeset 636eecc16229432ec8e26e6da287c52f3ca3 by Miss Islington (bot) in branch '3.7': bpo-39689: Do not test undefined casts to _Bool (GH-18964) (#18965) https://github.com/python/cpython/commit/636eecc16229432ec8e26e6da287c52f3ca3 --

[issue39924] pathlib handles missing `os.link`, `os.symlink` and `os.readlink` inconsistently

2020-03-12 Thread Manjusaka
Manjusaka added the comment: Fine, I get your means -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39924] pathlib handles missing `os.link`, `os.symlink` and `os.readlink` inconsistently

2020-03-12 Thread Manjusaka
Manjusaka added the comment: But when will os.readlink() be unavailable? -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue39924] pathlib handles missing `os.link`, `os.symlink` and `os.readlink` inconsistently

2020-03-12 Thread Manjusaka
Manjusaka added the comment: I don't think rename 'link_to' to 'link' directly is a good idea. Because there are many third-party libs have used this name. Unless we can keep two names in this version, and remind people the 'link_to' function will be deprecated totally in a future version.

[issue39689] struct and memoryview tests rely on undefined behavior (as revealed by clang 9)

2020-03-12 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 9.0 -> 10.0 pull_requests: +18313 pull_request: https://github.com/python/cpython/pull/18965 ___ Python tracker

[issue39689] struct and memoryview tests rely on undefined behavior (as revealed by clang 9)

2020-03-12 Thread Stefan Krah
Stefan Krah added the comment: New changeset 1ae9cde4b2323235b5f9ff4bc76e4175a2257172 by Stefan Krah in branch 'master': bpo-39689: Do not test undefined casts to _Bool (GH-18964) https://github.com/python/cpython/commit/1ae9cde4b2323235b5f9ff4bc76e4175a2257172 --

[issue39689] struct and memoryview tests rely on undefined behavior (as revealed by clang 9)

2020-03-12 Thread miss-islington
Change by miss-islington : -- pull_requests: +18314 pull_request: https://github.com/python/cpython/pull/18966 ___ Python tracker ___

[issue39936] Python fails to build _asyncio on module on AIX

2020-03-12 Thread Michael Felt
Michael Felt added the comment: re: Michael: this issue is about bootstraping Python. If you want to test a patch or test something else, you must restart from a clean copy of the source code. Either use "make distclean", "git clean -fdx", or recreate the source directory (git clone,

[issue39689] struct and memoryview tests rely on undefined behavior (as revealed by clang 9)

2020-03-12 Thread Stefan Krah
Change by Stefan Krah : -- pull_requests: +18312 pull_request: https://github.com/python/cpython/pull/18964 ___ Python tracker ___

[issue38500] PEP 523: Add PyInterpreterState_SetEvalFrameFunc() to the public C API (Python 3.8 regression)

2020-03-12 Thread STINNER Victor
STINNER Victor added the comment: Mark: > PEP 523 is quite vague, but the rationale indicates that exposing > `eval_frame` is for "a method-level JIT". PEP 523 did not suggest adding an > API. I disagree, the PEP is quite explicit: "Third-party code may then set their own frame evaluation

[issue38500] PEP 523: Add PyInterpreterState_SetEvalFrameFunc() to the public C API (Python 3.8 regression)

2020-03-12 Thread STINNER Victor
STINNER Victor added the comment: Mark Shannon: `PyThreadState` is an internal opaque data structure, which means we are free to change it. I guess that you mean PyInterpreterState which was moved to the internal C API in Python 3.8. It was part of public C API in Python 3.7. See commit

[issue39947] Make the PyThreadState structure opaque (move it to the internal C API)

2020-03-12 Thread STINNER Victor
Change by STINNER Victor : -- nosy: +Mark.Shannon, eric.snow title: Move PyThreadState structure to the internal C API -> Make the PyThreadState structure opaque (move it to the internal C API) ___ Python tracker

[issue39947] Move PyThreadState structure to the internal C API

2020-03-12 Thread STINNER Victor
New submission from STINNER Victor : Python 3.8 moved PyInterpreterState to the internal C API (commit be3b295838547bba267eb08434b418ef0df87ee0 of bpo-35886)... which caused bpo-38500 issue. In Python 3.9, I provided Py_EnterRecursiveCall() and Py_LeaveRecursiveCall() as regular functions

[issue31727] FTP_TLS errors when use certain subcommands

2020-03-12 Thread Jonathan Castro
Jonathan Castro added the comment: I had the same problem but when i was trying to upload the files using FTPS with explicit TLS 1.2 over an AWS Lambda function. Each time that i was trying upload a file, there was an lambda timeout on the storbinary called, and the function ended whit error

[issue38500] PEP 523: Add PyInterpreterState_SetEvalFrameFunc() to the public C API (Python 3.8 regression)

2020-03-12 Thread STINNER Victor
STINNER Victor added the comment: Somehow related, I just created bpo-39946: "Is it time to remove _PyThreadState_GetFrame() hook?". -- ___ Python tracker ___

[issue39946] Is it time to remove _PyThreadState_GetFrame() hook?

2020-03-12 Thread STINNER Victor
New submission from STINNER Victor : Python has an internal function to get the frame of the PyThreadState: /* hook for PyEval_GetFrame(), requested for Psyco */ #define _PyThreadState_GetFrame _PyRuntime.gilstate.getframe It is used by the public function PyEval_GetFrame() for example. The

[issue39946] Is it time to remove _PyThreadState_GetFrame() hook?

2020-03-12 Thread STINNER Victor
Change by STINNER Victor : -- nosy: +Mark.Shannon, brett.cannon ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue38500] PEP 523: Add PyInterpreterState_SetEvalFrameFunc() to the public C API (Python 3.8 regression)

2020-03-12 Thread STINNER Victor
STINNER Victor added the comment: For me, the *short term* goal is to find a way to limit the number of broken C extension module while we modify the C API to make it more opaque. We cannot reach all goals at once (opaque C API, subinterpreter, more optimizations, etc). We have to move step

[issue39930] Embedded installer for Python 3.7.7 missing vcruntime140.dll

2020-03-12 Thread Steve Dower
Change by Steve Dower : -- pull_requests: +18311 pull_request: https://github.com/python/cpython/pull/18962 ___ Python tracker ___

[issue39930] Embedded installer for Python 3.7.7 missing vcruntime140.dll

2020-03-12 Thread miss-islington
miss-islington added the comment: New changeset 35ae5d916c6c2e9f211666a3a97965be3d2977ae by Miss Islington (bot) in branch '3.8': bpo-39930: Fix MSBuild detection for Build Tools (GH-18938) https://github.com/python/cpython/commit/35ae5d916c6c2e9f211666a3a97965be3d2977ae --

[issue39939] Add str methods to remove prefixes or suffixes

2020-03-12 Thread Dennis Sweeney
Dennis Sweeney added the comment: Yes: >>> x = "A"*10**6 >>> x.cutprefix("B") is x True >>> x.cutprefix("") is x True >>> y = b"A"*10**6 >>> y.cutprefix(b"B") is y True >>> y.cutprefix(b"") is y True >>> z = bytearray(b"A")*10**6 >>>

[issue39689] struct and memoryview tests rely on undefined behavior (as revealed by clang 9)

2020-03-12 Thread Stefan Krah
Stefan Krah added the comment: The memcpy() is NOT a hack and performs exactly the same operation as casting the pointer and then dereferencing, only in a manner that avoids unaligned accesses. On platforms like x86 the memcpy() is optimized to a simple assignment. Casting the pointer and

[issue39689] struct and memoryview tests rely on undefined behavior (as revealed by clang 9)

2020-03-12 Thread Petr Viktorin
Petr Viktorin added the comment: > The docs for native mode (we now always assume C99): > > "The '?' conversion code corresponds to the _Bool type defined by C99." But, nowhere is it suggested that conversion is "do memcpy and then interpret the bit pattern". That is pretty weird way to

[issue39689] struct and memoryview tests rely on undefined behavior (as revealed by clang 9)

2020-03-12 Thread Stefan Krah
Stefan Krah added the comment: The docs for native mode (we now always assume C99): "The '?' conversion code corresponds to the _Bool type defined by C99." The memoryview tests that fail are essentially auto-generated and not prescriptive. They just happened to work without UBSan: >>> x =

[issue1294959] Add sys.platlibdir to use /usr/lib64 on Fedora and SuSE

2020-03-12 Thread miss-islington
miss-islington added the comment: New changeset 3c29675d8736cb1860f342d872ae41e342c6d383 by Raúl Cumplido in branch 'master': bpo-1294959: Fix typo for new attribute platlibdir. (GH-18960) https://github.com/python/cpython/commit/3c29675d8736cb1860f342d872ae41e342c6d383 --

[issue1294959] Add sys.platlibdir to use /usr/lib64 on Fedora and SuSE

2020-03-12 Thread Roundup Robot
Change by Roundup Robot : -- nosy: +python-dev nosy_count: 24.0 -> 25.0 pull_requests: +18310 pull_request: https://github.com/python/cpython/pull/18960 ___ Python tracker

[issue39847] EnterNonRecursiveMutex on win32 can hang for 49.7 days: use GetTickCount64() rather than GetTickCount()

2020-03-12 Thread STINNER Victor
STINNER Victor added the comment: Thanks, it's now fixed in 3.7, 3.8 and master branches. Python 3.5 and 3.6 don't get bugfixes anymore: https://devguide.python.org/#status-of-python-branches -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions:

[issue39847] EnterNonRecursiveMutex on win32 can hang for 49.7 days: use GetTickCount64() rather than GetTickCount()

2020-03-12 Thread miss-islington
miss-islington added the comment: New changeset feaf0c37891dfe8f0f3e643c3711af3af23bf805 by bobince in branch '3.7': [3.7] bpo-39847: EnterNonRecursiveMutex() uses GetTickCount64() (GH-18780) (GH-18959) https://github.com/python/cpython/commit/feaf0c37891dfe8f0f3e643c3711af3af23bf805

[issue39847] EnterNonRecursiveMutex on win32 can hang for 49.7 days: use GetTickCount64() rather than GetTickCount()

2020-03-12 Thread And Clover
Change by And Clover : -- pull_requests: +18309 pull_request: https://github.com/python/cpython/pull/18959 ___ Python tracker ___

[issue39277] _PyTime_FromDouble() fails to detect an integer overflow when converting a C double to a C int64_t

2020-03-12 Thread STINNER Victor
STINNER Victor added the comment: Oh, clang on FreeBSD spotted a similar bug in float.__trunc__()! static PyObject * float___trunc___impl(PyObject *self) /*[clinic end generated code: output=dd3e289dd4c6b538 input=591b9ba0d650fdff]*/ { double x = PyFloat_AsDouble(self); double

[issue39939] Add str methods to remove prefixes or suffixes

2020-03-12 Thread Steven D'Aprano
Steven D'Aprano added the comment: To be clear, are you only making a copy of the unchanged object if it is a mutable bytearray, not str or bytes? -- nosy: +steven.daprano ___ Python tracker

[issue26660] tempfile.TemporaryDirectory() cleanup exception if nonwriteable or non-searchable files or directories created

2020-03-12 Thread Vidar Fauske
Vidar Fauske added the comment: Seems as if this was resolved by the linked PR in 3.8, or am I missing something? -- nosy: +vidartf ___ Python tracker ___

[issue39577] venv --prompt argument is ignored

2020-03-12 Thread Vinay Sajip
Vinay Sajip added the comment: > My question at this stage is, where is this "Prompt" variable set? If you mean the VIRTUAL_ENV variable, it's set in one of the activation scripts for the venv. In any case, this doesn't look it it's a problem with venv code, more to do with your local

[issue38500] PEP 523: Add PyInterpreterState_SetEvalFrameFunc() to the public C API (Python 3.8 regression)

2020-03-12 Thread STINNER Victor
STINNER Victor added the comment: > Why not do so by reverting the change that caused it? Making PyInterpreterState structure private was motivated by the subinterpreters work but also by the work on cleaning the C API. Over time, PyInterpreterState became more and more complex because many

[issue39938] RotatingFileHandler does not support any mode other than 'a'.

2020-03-12 Thread Vinay Sajip
Vinay Sajip added the comment: > supplying a mode to append bytes is not supported That is correct, log files supported by standard library handlers are text files using some supported encoding. If you need to store arbitrary bytes directly in a log file, feel free to write your own

[issue33012] Invalid function cast warnings with gcc 8 for METH_NOARGS

2020-03-12 Thread STINNER Victor
STINNER Victor added the comment: FYI I modified SystemError("bad call flags") error message to include the method name in bpo-39884. -- ___ Python tracker ___

[issue39884] "SystemError: bad call flags" exceptions added as part of BPO-33012 are difficult to debug

2020-03-12 Thread STINNER Victor
STINNER Victor added the comment: > While the issues definitely need to be resolved in the C extensions, where to > start is not completely clear. I had to put `printfs` in PyCFunction_NewEx > and PyDescr_NewMethod to track down the issues, e.g., (...) I agree, I had the same issue :-) I

[issue39884] "SystemError: bad call flags" exceptions added as part of BPO-33012 are difficult to debug

2020-03-12 Thread STINNER Victor
STINNER Victor added the comment: New changeset 6a12676b1910d52c85561bdf4f1e20aa13fc8f46 by Victor Stinner in branch '3.7': bpo-39884: Add method name in "bad call flags" error (GH-18944) (GH-18957) https://github.com/python/cpython/commit/6a12676b1910d52c85561bdf4f1e20aa13fc8f46

[issue39884] "SystemError: bad call flags" exceptions added as part of BPO-33012 are difficult to debug

2020-03-12 Thread STINNER Victor
STINNER Victor added the comment: New changeset 03ac090c5f8d5b281e56c5f5431c1754fd4efe5c by Victor Stinner in branch '3.8': bpo-39884: Add method name in "bad call flags" error (GH-18944) (GH-18956) https://github.com/python/cpython/commit/03ac090c5f8d5b281e56c5f5431c1754fd4efe5c

[issue38893] broken container/selinux integration

2020-03-12 Thread Christian Heimes
Christian Heimes added the comment: No, CPython's stdlib doesn't use libselinux. I talked to an engineer from Red Hat's SELinux team today. SELinux returns EACCES for policy violations like in this case. The _copyxattr() helper function ignores EPERM but not EACCES. You are seeing a

[issue39761] Python 3.9.0a4 fails to build when configured with --with-dtrace

2020-03-12 Thread Petr Viktorin
Change by Petr Viktorin : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue39920] os.lstat() does not work with Window Dos devices

2020-03-12 Thread Eryk Sun
Eryk Sun added the comment: > This is an os.lstat() limitation, nothing to do with pathlib. In 3.8+, stat() and lstat() work with a broader rang of device paths, at least for st_mode checks. For example: >>> s = os.stat('//./PhysicalDrive0') >>> stat.S_ISBLK(s.st_mode) True The

[issue38500] PEP 523: Add PyInterpreterState_SetEvalFrameFunc() to the public C API (Python 3.8 regression)

2020-03-12 Thread Mark Shannon
Mark Shannon added the comment: I'm not suggesting immediate removal of PEP 532. I am requesting that you don't add a new function to the C API that will prevent implementation of many meaningful optimizations to CPython. PEP 532 does not add any API functions. I understand that you want to

[issue39689] struct and memoryview tests rely on undefined behavior (as revealed by clang 9)

2020-03-12 Thread Petr Viktorin
Petr Viktorin added the comment: > So I vote for not handling incorrectly packed values and removing "and any non-zero value will be True when unpacking" from the docs, which does not seem to make any sense for _Bool. I disagree. I don't think struct module's job is to be faithful to _Bool

[issue39945] Wrong example result in docs

2020-03-12 Thread Tomas Hak
Tomas Hak added the comment: I agree, it is duplicate. -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___

[issue34305] inspect.getsourcefile and inspect.getcomments do not work with decorated functions

2020-03-12 Thread Eric Wieser
Eric Wieser added the comment: Nothing holding it up from my end, just waiting on someone to review it. Perhaps this ping will help with that. -- nosy: +Eric Wieser ___ Python tracker

[issue39945] Wrong example result in docs

2020-03-12 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: This seems to be a duplicate of issue28297 and issue34677. -- nosy: +xtreak ___ Python tracker ___

[issue38744] python 3.8 hang in multiprocessing.Pool() locking on FreeBSD / Linux

2020-03-12 Thread Arkadiusz Miskiewicz Arkadiusz Miskiewicz
Arkadiusz MiskiewiczArkadiusz Miskiewicz added the comment: That test program hangs even on Linux (kernel 4.9.184, glibc 2.30): $ python3 a.py Process ForkPoolWorker-13: Process ForkPoolWorker-12: Process ForkPoolWorker-16: Process ForkPoolWorker-15: Process

[issue39945] Wrong example result in docs

2020-03-12 Thread Tomas Hak
New submission from Tomas Hak : Step to reproduce: Open page: https://docs.python.org/3/library/sched.html Location: Documentation : sched — Event scheduler Description: In the text is definition of priority: "Events scheduled for the same time will be executed in the order of their

[issue38643] Assertion failures when calling PyNumber_ToBase() with an invalid base

2020-03-12 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue38643] Assertion failures when calling PyNumber_ToBase() with an invalid base

2020-03-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 6f4e7fcfca6923d0422b20fc8702240bd4e56ebd by Serhiy Storchaka in branch '3.7': [3.7] bpo-38643: Raise SystemError instead of crashing when PyNumber_ToBase is called with invalid base. (GH-18863). (GH-18955)

[issue39944] UserString.join should return UserString

2020-03-12 Thread Dennis Sweeney
Change by Dennis Sweeney : -- resolution: -> wont fix stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue39944] UserString.join should return UserString

2020-03-12 Thread Raymond Hettinger
Raymond Hettinger added the comment: This API is very old and doesn't seem to have a caused any issues in practice. Changing the API now is more likely to break existing code than to help anyone in the future. -- ___ Python tracker

[issue39884] "SystemError: bad call flags" exceptions added as part of BPO-33012 are difficult to debug

2020-03-12 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +18308 pull_request: https://github.com/python/cpython/pull/18957 ___ Python tracker ___

[issue39884] "SystemError: bad call flags" exceptions added as part of BPO-33012 are difficult to debug

2020-03-12 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +18307 pull_request: https://github.com/python/cpython/pull/18956 ___ Python tracker ___

[issue39884] "SystemError: bad call flags" exceptions added as part of BPO-33012 are difficult to debug

2020-03-12 Thread STINNER Victor
STINNER Victor added the comment: New changeset c7d2d69d95b263ee5f83511bc6fbe53acdc24ea3 by Victor Stinner in branch 'master': bpo-39884: Add method name in "bad call flags" error (GH-18944) https://github.com/python/cpython/commit/c7d2d69d95b263ee5f83511bc6fbe53acdc24ea3 --

[issue38643] Assertion failures when calling PyNumber_ToBase() with an invalid base

2020-03-12 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +18306 pull_request: https://github.com/python/cpython/pull/18955 ___ Python tracker ___

  1   2   >