[issue39844] IDLE 3.8.2 on MacOS 10.15.3 Launches to Black Windows

2020-03-03 Thread Jacin Ferreira


Jacin Ferreira  added the comment:

Uploading another screen shot of preferences.

--
Added file: https://bugs.python.org/file48948/Screen Shot 2020-03-03 at 
11.51.36 PM.png

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39844] IDLE 3.8.2 on MacOS 10.15.3 Launches to Black Windows

2020-03-03 Thread Jacin Ferreira


New submission from Jacin Ferreira :

0) MacBook Pro 13" running MacOS 10.15.3 Catalina
1) Fresh install of Python 3.8.2 from python.org
2) Launch IDLE
3) Observe Python 3.8.2 Shell
4) Goto File Menu
5) Select Preferences
6) Observe Preferences

EXPECTED RESULTS
Windows should show text and are usable

ACTUAL RESULTS
Windows are all black and no text shows.  IDLE is unusable in this state.

--
assignee: terry.reedy
components: IDLE, macOS
files: Screen Shot 2020-03-03 at 11.51.21 PM.png
messages: 363334
nosy: Jacin Ferreira, ned.deily, ronaldoussoren, terry.reedy
priority: normal
severity: normal
status: open
title: IDLE 3.8.2 on MacOS 10.15.3 Launches to Black Windows
type: behavior
versions: Python 3.8
Added file: https://bugs.python.org/file48947/Screen Shot 2020-03-03 at 
11.51.21 PM.png

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2020-03-03 Thread Dima Tisnek


Dima Tisnek  added the comment:

https://github.com/python/cpython/pull/18772 posted

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2020-03-03 Thread Dima Tisnek


Change by Dima Tisnek :


--
keywords: +patch
pull_requests: +18130
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/18772

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39773] Export symbols for vectorcall

2020-03-03 Thread David Hewitt


David Hewitt  added the comment:

I had suspected that might be the case. We already use PyObject_Call but had 
been hoping to experiment with the Vectorcall optimizations.

Without the symbols I might resort to reproducing the implementation of these 
functions on the Rust side. Shouldn't be too much code duplication.

--
resolution:  -> rejected
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39389] gzip metadata fails to reflect compresslevel

2020-03-03 Thread Ned Deily


Change by Ned Deily :


--
resolution:  -> fixed
stage: backport needed -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39389] gzip metadata fails to reflect compresslevel

2020-03-03 Thread Ned Deily


Ned Deily  added the comment:


New changeset 12c45efe828a90a2f2f58a1f95c85d792a0d9c0a by Miss Islington (bot) 
in branch '3.7':
[3.7] bpo-39389: gzip: fix compression level metadata (GH-18077) (GH-18101)
https://github.com/python/cpython/commit/12c45efe828a90a2f2f58a1f95c85d792a0d9c0a


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39843] Merged fix for bpo-17560 missing from changelog

2020-03-03 Thread Ned Deily


Ned Deily  added the comment:

It looks like the NEWS item for this change was added to the 3.8.0a1 changes 
under bpo-35152 which was closed as a duplicate of bpo-17560.  We could change 
the changelog entry in Misc/NEWS.d/3.8.0a1.rst to point to bpo-17560.  Antoine?

bpo-35152: Allow sending more than 2 GB at once on a multiprocessing connection 
on non-Windows systems.

--
nosy: +ned.deily, pitrou

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2020-03-03 Thread Dima Tisnek

Dima Tisnek  added the comment:

I've traced it down to here: 
https://github.com/python/cpython/blob/be501ca2419a91546dea85ef4f36945545458589/Modules/_ssl.c#L791-L798

`err.c` (errno) == 0, no error, and `err.ssl` == 5, SSL_ERROR_SYSCALL, 
helpfully commented "look at error stack/return value/errno" in openssl/ssl.h 

I'm a bit suspicious about `s->errorhandler()` which is some old convention 
(git blame: 8 years ago), commented "checks errno, returns NULL, set a Python 
exception", but at this point, we know that errno is 0, so why call it?

I'm thinking to just change that to SSLEOFError, but I wonder if something else 
might break?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39820] Bracketed paste mode for REPL

2020-03-03 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Adding functions to builtins (2 of Marco's 8 #38747 ideas) should be separate 
from patching the repl code.  I agree that the latter should not be done 
piecemeal.  I previous wrote that we need a pydev REPL enhancement policy 
discussion *first* and explicitly asked Marco "please don't rush to immediately 
open 8 new issues."  

I do think that if there were an *approved* set of new features, several 
patches would be best, but that is moot at present.

IDLE already has this feature, and most of the other enhancements Marco wants. 
(msg363325) The key for this one is that tcl/tk does not trigger  events 
when inserting pasted code, so only a keyed newline triggers IDLE's user code 
processing.  But other IDLE features are much harder, and I suspect that this 
would also be in the Windows console.

In msg356327, Eric Sun, one of our best Windows experts, outlined the major 
difficulties of changing things on Windows' console.  He only said something 
half-way encouraging about autoindent but otherwise thought that a working 
stdlib Windows readline extension would be needed.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39843] Merged fix for bpo-17560 missing from changelog

2020-03-03 Thread Mikko Nylén

New submission from Mikko Nylén :

A fix for bpo-17560 (about passing very large objects between processes with 
multiprocessing) was merged in Nov 2018 in this PR: 
https://github.com/python/cpython/pull/10305

However, I see no mention of this in the changelog , even though the issue page 
reports the fix to be in version 3.8. Is the changelog just missing entry for 
this, or was the fix pulled back later and never made it's way into 3.8?

--
assignee: docs@python
components: Documentation
messages: 363327
nosy: Mikko Nylén, docs@python
priority: normal
severity: normal
status: open
title: Merged fix for bpo-17560 missing from changelog
type: enhancement
versions: Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38747] Slowly introduce a subset of Jupyter console (IPython) features into CPython command line interactive mode

2020-03-03 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

>  why a C extension apart and not a patch to `readline`?

Search "python ctypes vs c extension".  Multiple SO answers.  I believe speed 
and language competancy are big factors.  I don't think and stdlib modules use 
ctypes.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38747] Slowly introduce a subset of Jupyter console (IPython) features into CPython command line interactive mode

2020-03-03 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Not surprisingly, I agree with Steven that enhancing IDLE may be a better use 
of core developer time.  It and Tkinter (and turtle) are options for the 
Windows and macOS (and some non-PSF) installers and easily installed  on Linux. 
 IDLE has most of the requested features, and where it does not, I will 
consider well-specified enhancements.  

1. Pasting a compound statement with embedded blank lines.

>>> def f():
a = 1  # following line has no spaces or tabs

b=3
print(a, b)

>>> f()
1, 3

Pasting multiple statements, separated or not by blank lines, and pasting 
non-BMP unicode, are separate issues.

2. Auto-indent: after ':' (see example above) and for syntactic sequences.  
(Currently, the latter only works in editors because '>>> ' prompts and tab 
indents interfere.  There is a issue with PR that will allow this to be fixed.)

strings = ['a',
   'b',  # autoindent
  ]
ardvark = fribble(a,
  b,  # autoindent
 )

3. Code blocks are one history entry.  Yes, where 'code block' means one 
complete statement, possibly multiple lines, as submitted for execution.  The 
example in 1. can be recalled as submitted, with the blank line.

4. Save interactive session.  Yes.  I intend to add an option to only save 
code, without prompts or output, so the code can be pasted into an editor and 
edited and run.  Or maybe the code should be loaded directly into an editor.

5. Add history() builtin.  I believe that on linux this is redundant with 
existing enhanced history mechanisms, which include storing history across 
sessions in a 'standard' place.  I believe my idea for 4. covers must of the 
use cases.

6. Add a. pprint and b. getsource to builtins.  I think this would be rejected. 
 I seldom use either of those two functions, but constantly import other 
things. So I would want other things added.  Startup files are the mechanism 
for personally customizing one's shell.  Simple imports serve for ad hoc 
customizations. Note that getsource(name) needs to be passed to print() to be 
readable.

As for getting source: IDLE displays a popup signature for any function if one 
is available.  Given a traceback or grep output, one can open any source-based 
module in an editor at the line indicated.  Open Module lets one easily open 
any importable source based module with only the import name, not the full 
path.  For long source chunks, a separate window is really much better than 
printed in the shell.  A possible IDLE enhancement would be the ability to add 
an object name and to jump to its definition.

7. Syntax coloring.  Yes, with full customization.

8. Bracket matching for(), {}, and []. Yes, with a couple of options.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39702] PEP 614: Relaxing Grammar Restrictions On Decorators

2020-03-03 Thread Guido van Rossum


Guido van Rossum  added the comment:

Sounds good. If you feel like it you can submit a PR to the devguide, I'm sure 
Brett will merge it quickly...

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38380] Update SQLite to 3.31.1 in Windows and macOS installer builds

2020-03-03 Thread Benjamin Peterson


Benjamin Peterson  added the comment:

Traditionally, we've taken these dependency updates in 2.7, but there doesn't 
seem to be a compelling reason to take this one.

--
resolution:  -> fixed
stage: backport needed -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2020-03-03 Thread Dima Tisnek

Dima Tisnek  added the comment:

Rejoice: https://github.com/dimaqq/bpo-31122
Short, easy to reproduce :)
(I've tested on Mac: 3.7, 3.8, 3.9a from python.org, linked against OpenSSL 
1.1.1c/d)
Funnily enough, Python 2.7 raises an ssl.SSLEOFError instead 路‍♂️

--
versions: +Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37330] open(): remove 'U' mode, deprecated since Python 3.3

2020-03-03 Thread Andrew Bartlett


Andrew Bartlett  added the comment:

...Python 2.9 or at best 2.10. 

Of course I mean Python 3.9 or at best 3.10. 

Sorry for the confusion.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37330] open(): remove 'U' mode, deprecated since Python 3.3

2020-03-03 Thread Andrew Bartlett


Andrew Bartlett  added the comment:

I think we are speaking past each other. 

Yes, Python 2 is no longer being changed, which is awesome as we need for fear 
breakage of the older builds that use that for the build system.

The issue isn't the particular language feature, or that there is no way to 
further adapt code, but that a valid build script that operates correctly on 
Python 3.8 will no longer, without warning to us, operate on Python 2.9 or at 
best 2.10. 

Thankfully the only Samba versions with support for Python3 are still in 
maintenance, so course I've back-ported patches to the tip of each release 
branch to work around this change.  But again, that doesn't help when I need to 
build an arbitrary git revision in the future. 

(That warnings were available, if we knew were to look, is an entirely moot 
point at this stage).

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39702] PEP 614: Relaxing Grammar Restrictions On Decorators

2020-03-03 Thread Brandt Bucher


Brandt Bucher  added the comment:

Agreed. I'll have something up later, hopefully.

I'll add a tiny blurb to whatsnew, as well as adding the PEP to the "See also:" 
note in https://docs.python.org/3.9/reference/compound_stmts.html and updating 
the mini-grammar there. I don't think it needs much else.

Hmmm. It looks like the page of the docs that I've linked above wasn't ever 
updated for the walrus. We should probably add updating this part of the docs 
to https://devguide.python.org/grammar/...

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2020-03-03 Thread Dima Tisnek


Dima Tisnek  added the comment:

I volunteer to test the theory that the connection is closed mid-flight.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39842] partial_format()

2020-03-03 Thread Marco Sulla


New submission from Marco Sulla :

In `string` module, there's a very little known class `Template`. It implements 
a very simple template, but it has an interesting method: `safe_substitute()`.

`safe_substitute()` permits you to not fill the entire Template at one time. On 
the contrary, it substitute the placeholders that are passed, and leave the 
others untouched.

I think it could be useful to have a similar method for the format 
minilanguage. I propose a partial_format() method.

=== WHY I think this is useful? ===

This way, you can create subtemplates from a main template. You could want to 
use the template for creating a bunch of strings, all of them with the same 
value for some placeholders, but different values for other ones. This way you 
have *not* to reuse the same main template and substitute every time the 
placeholders that does not change.

`partial_format()` should act as `safe_substitute()`: if some placeholder 
misses a value, no error will be raised. On the contrary, the placeholder is 
leaved untouched.

Some example:

>>> "{} {}".partial_format(1)
'1 {}'


>>> "{x} {a}".partial_format(a="elephants")
'{x} elephants'

>>> "{:-f} and {:-f} nights".partial_format(1000)
'1000 and {:-f} nights'

--
components: Interpreter Core
messages: 363317
nosy: Marco Sulla
priority: normal
severity: normal
status: open
title: partial_format()
type: enhancement
versions: Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39820] Bracketed paste mode for REPL

2020-03-03 Thread Eric V. Smith


Eric V. Smith  added the comment:

Reasonable people can disagree. If someone else thinks this can be done 
piecemeal, then I'm not stopping anyone. I just think that's a mistake and will 
lead to much frustration.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39820] Bracketed paste mode for REPL

2020-03-03 Thread Marco Sulla


Marco Sulla  added the comment:

Excuse me, but my original "holistic" proposal was rejected and it was 
suggested to me to propose only relevant changes, and one for issue. Now you 
say exactly the contrary. I feel a bit confused.

PS: yes, I can, and I use, IPython. But IMHO IPython does too much things and 
its design is not very pythonic. Bracketed paste mode is a good feature, and I 
think REPL will be much more useful if it implements it.

On the contrary, if you don't think IPython is good, pythonic and essential, I 
suppose there's no problem to substitute REPL with IPython in CPython core 
itself.

--
nosy: +eryksun, steven.daprano, terry.reedy

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39831] Reference leak in PyErr_WarnEx()

2020-03-03 Thread Ned Deily


Ned Deily  added the comment:

Is the 3.7.x backport (PR 18765) ready to merge?

--
nosy: +ned.deily

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37953] Fix ForwardRef equality checks

2020-03-03 Thread Ned Deily


Change by Ned Deily :


--
versions: +Python 3.7, Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37953] Fix ForwardRef equality checks

2020-03-03 Thread Ned Deily


Ned Deily  added the comment:


New changeset 3eff46fc7d2e3c80c4dedba4177782f1fc8ad89b by Ryan Rowe in branch 
'3.7':
bpo-37953: Fix ForwardRef hash and equality checks (GH-15400) (GH-18751)
https://github.com/python/cpython/commit/3eff46fc7d2e3c80c4dedba4177782f1fc8ad89b


--
nosy: +ned.deily

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39702] PEP 614: Relaxing Grammar Restrictions On Decorators

2020-03-03 Thread Guido van Rossum


Guido van Rossum  added the comment:

I'm guessing there's some doc update that needs to happen now the code has 
landed.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39702] PEP 614: Relaxing Grammar Restrictions On Decorators

2020-03-03 Thread Guido van Rossum


Guido van Rossum  added the comment:


New changeset be501ca2419a91546dea85ef4f36945545458589 by Brandt Bucher in 
branch 'master':
bpo-39702: Relax grammar restrictions on decorators (PEP 614) (GH-18570)
https://github.com/python/cpython/commit/be501ca2419a91546dea85ef4f36945545458589


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39689] test_struct failure on s390x Fedora Clang buildbot

2020-03-03 Thread STINNER Victor


STINNER Victor  added the comment:

Using memcpy() to write a value different than 0 or 1 into a _Bool is clearly 
an undefined behavior. Example with clang UBSan.

bool.c:
---
#include 
#include 

int main()
{
char ch = 42;
_Bool x;
memcpy(, , 1);
return x == true;
}
---

$ clang -fsanitize=bool bool.c -o bool
$ ./bool
bool.c:9:12: runtime error: load of value 42, which is not a valid value for 
type '_Bool'

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39841] "as" variable in except block deletes local variables with same name

2020-03-03 Thread Alan Robertson


Alan Robertson  added the comment:

Thanks for your kind explanation. I may even vaguely remember seeing this 
sometime in the past. Thanks much for your time!

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39674] Keep deprecated features in Python 3.9 to ease migration from Python 2.7, but remove in Python 3.10

2020-03-03 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 116fd4af7370706d0d99ac7c70541ef965672d4e by Victor Stinner in 
branch 'master':
bpo-39674: Suggest to test with DeprecationWarning (GH-18552)
https://github.com/python/cpython/commit/116fd4af7370706d0d99ac7c70541ef965672d4e


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39840] FileNotFoundError et al show b-prefix on filepaths if passed as bytes

2020-03-03 Thread Eric V. Smith


Eric V. Smith  added the comment:

That behavior is consistent with other exceptions. It's a helpful piece of 
information if you were to see it in a traceback, without any other context. So 
this is by design.

--
nosy: +eric.smith
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed
type:  -> behavior

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39020] [AIX] module _curses fails to build since ESCDELAY has been added

2020-03-03 Thread Michael Felt


Michael Felt  added the comment:

This issue was resolved by issue39802. Marking as fixed, and closed.

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39689] test_struct failure on s390x Fedora Clang buildbot

2020-03-03 Thread Ammar Askar


Ammar Askar  added the comment:

Nothing too interesting, here's the stack trace:

/src/cpython3/Modules/_struct.c:487:28: runtime error: load of value 32, which 
is not a valid value for type '_Bool'
#0 0x7f50371a7670 in nu_bool cpython3/Modules/_struct.c:487:28
#1 0x7f503719ea3d in s_unpack_internal cpython3/Modules/_struct.c:1512:21
#2 0x7f5037199f7e in unpack cpython3/Modules/clinic/_struct.c.h:259:20
#3 0xb8b8bc in cfunction_vectorcall_FASTCALL 
cpython3/Objects/methodobject.c:366:24
#4 0x4fe113 in _PyObject_VectorcallTstate 
cpython3/./Include/cpython/abstract.h:111:21
#5 0x4fe51f in object_vacall cpython3/Objects/call.c:789:14
#6 0x4fe7d8 in PyObject_CallFunctionObjArgs cpython3/Objects/call.c:896:14
#7 0x4d394e in fuzz_struct_unpack 
cpython3/Modules/_xxtestfuzz/fuzzer.c:121:26
#8 0x4d394e in _run_fuzz cpython3/Modules/_xxtestfuzz/fuzzer.c:398:14
#9 0x4d394e in LLVMFuzzerTestOneInput 
cpython3/Modules/_xxtestfuzz/fuzzer.c:453:11

--
nosy: +ammar2

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39639] Remove Suite node from AST

2020-03-03 Thread STINNER Victor


STINNER Victor  added the comment:

Jeff Allen: thanks for the useful feedback on how it's used in Jython!

--
nosy: +vstinner

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39841] "as" variable in except block deletes local variables with same name

2020-03-03 Thread Eric V. Smith


Eric V. Smith  added the comment:

Yes, this is a known issue.

See https://docs.python.org/3/reference/compound_stmts.html#the-try-statement, 
in particular the sentence "When an exception has been assigned using as 
target, it is cleared at the end of the except clause" and the following text.

Basically, at the end of the exception block python does a "del err" in order 
to prevent a long-lived reference cycle including the exception.

--
nosy: +eric.smith
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed
type:  -> behavior

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39841] "as" variable in except block deletes local variables with same name

2020-03-03 Thread Rémi Lapeyre

Rémi Lapeyre  added the comment:

Hi Alan, this is documented at 
https://docs.python.org/3/reference/compound_stmts.html#the-try-statement:


> When an exception has been assigned using as target, it is cleared at the end 
> of the except clause. This is as if
>
> except E as N:
>foo
>
> was translated to
>
> except E as N:
>try:
>foo
>finally:
>del N
>

This is because the exception keeps a reference to the code frame that would 
make a cycle with the locals which would not be destroyed until the next 
garbage collection.

I think you will need to use a different name in the except clause.

--
nosy: +remi.lapeyre

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39820] Bracketed paste mode for REPL

2020-03-03 Thread Eric V. Smith


Eric V. Smith  added the comment:

I suggest closing this issue. If the REPL is going to be improved, it won't be 
done one-feature-at-a-time on the bug tracker. It will need to have a holistic 
design that takes into account desired features and the architecture of the 
systems that it needs to interface with. Windows and Linux may require very 
different approaches. For such a design, the bug tracker is a poor choice of 
venue for the discussion. I suggest starting on python-ideas and maybe 
python-dev until a design and set of features is decided on, and only at that 
point open issue(s) on the bug tracker.

That said, I'm not sure it's worth complicating CPython itself with such 
changes, when IPython exists. But that can be decided on python-ideas and then 
on python-dev.

--
nosy: +eric.smith

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39841] "as" variable in except block deletes local variables with same name

2020-03-03 Thread Alan Robertson


New submission from Alan Robertson :

When an exception "as" variable occurs, it deletes local variables with the 
same name. This is certainly surprising, and doesn't appear to be a documented 
behavior (but maybe I don't know where to look). The word "bug" comes to mind.  
The following few lines of code illustrate it nicely:

def testme():
err = Exception("nothing worked")
try:
raise ValueError("no value")
except ValueError as err:
pass
print(err)

testme()

--
components: Interpreter Core
files: foo.py
messages: 363300
nosy: alanr
priority: normal
severity: normal
status: open
title: "as" variable in except block deletes local variables with same name
versions: Python 3.7
Added file: https://bugs.python.org/file48946/foo.py

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39689] test_struct failure on s390x Fedora Clang buildbot

2020-03-03 Thread Petr Viktorin


Petr Viktorin  added the comment:

Viewing the oss-fuzz bug requires login. Is there any interesting public info 
in it?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39682] pathlib.Path objects can be used as context managers

2020-03-03 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

Note you could simply remove the "closed" flag and the context manager live. 
That way, you don't have to deprecate anything.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33433] ipaddress is_private misleading for IPv4 mapped IPv6 addresses

2020-03-03 Thread Pete Wicken


Change by Pete Wicken :


--
nosy: +Wicken

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39840] FileNotFoundError et al show b-prefix on filepaths if passed as bytes

2020-03-03 Thread Augie Fackler


New submission from Augie Fackler :

I'm not really sure if this is a bug per se, so please feel encouraged to close 
as WAI if you like, but:

>>> open(b'foo', 'rb')
Traceback (most recent call last):
  File "", line 1, in 
FileNotFoundError: [Errno 2] No such file or directory: b'foo'

Seems a little weird to me (and it shows up in the UI layer of hg), because the 
path-as-bytes seems like it shouldn't show up in the human-readable version of 
the exception (I think I would have expected the fsdecode() of the bytes, for 
consistency?)

But that's up to you. If the presentation format of this feels right to Python 
that's no big deal.

--
messages: 363297
nosy: durin42
priority: normal
severity: normal
status: open
title: FileNotFoundError et al show b-prefix on filepaths if passed as bytes
versions: Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39697] Failed to build with --with-cxx-main=g++-9.2.0

2020-03-03 Thread Marco Sulla


Marco Sulla  added the comment:

I agree with Pablo Galindo Salgado: https://bugs.python.org/issue35912#msg334942

The "quick and dirty" solution is to change MAINCC to CC, for _testembed.c AND 
python.c (g++ fails with both).

After that, _testembed.c and python.c should be changed so they can be compiled 
with a c++ compiler, and a system test should be added.

Anyway, I found the original patch:
https://bugs.python.org/file6816/cxx-main.patch

In the original patch, the README contained detailed information. I think these 
informations could be restored, maybe in ./configure --help

Anyway, I have a question. In README, it's stated:

There are platforms that do not require you to build Python
with a C++ compiler in order to use C++ extension modules.
E.g., x86 Linux with ELF shared binaries and GCC 3.x, 4.x is such
a platform.

All x86 platforms? Also x86-64? And what does it means "Linux with ELF"? It 
means that Linux has shared libraries or that Python is compiled with 
--enable-shared? And what it means gcc 3 and 4? It means gcc 3+?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2020-03-03 Thread Shevis Johnson


Change by Shevis Johnson :


--
nosy: +shevis

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39820] Bracketed paste mode for REPL

2020-03-03 Thread Marco Sulla


Marco Sulla  added the comment:

Please read the message of Terry J. Reed: 
https://bugs.python.org/issue38747#msg356345 

I quote the relevant part below

> Skipping the rest of your post, I will just restate why I closed this
> issue.
> 
> 1. It introduces too many features not directly related.  The existing
> unix-only completions uses two modules.  I suspect some of the other
> features would also need new modules.  (But Marco, please don't rush 
> to immediately open 8 new issues.)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39689] test_struct failure on s390x Fedora Clang buildbot

2020-03-03 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

fwiw oss-fuzz also finds this on struct (via ubsan)

https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=20949

struct.unpack('?', ' ')

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35712] Make NotImplemented unusable in boolean context

2020-03-03 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35712] Make NotImplemented unusable in boolean context

2020-03-03 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 469325c30e147680543b2f5118b83fd95055a499 by MojoVampire in branch 
'master':
bpo-35712: Make using NotImplemented in a boolean context issue a deprecation 
warning (GH-13195)
https://github.com/python/cpython/commit/469325c30e147680543b2f5118b83fd95055a499


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39837] Remove Azure Pipelines from GitHub PRs

2020-03-03 Thread Steve Dower


Steve Dower  added the comment:

> Who is allowed to do that?

Brett did it the first time. I'm having too much trouble with GitHub right now 
to find the current admins.

--
nosy: +brett.cannon

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39837] Remove Azure Pipelines from GitHub PRs

2020-03-03 Thread STINNER Victor


STINNER Victor  added the comment:

> PR 18769 should *not* be merged.

Ok, I closed it.

> First, it needs to be changed to a non-required check.

Who is allowed to do that?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39839] Non-working error handler when creating a task with assigning a variable

2020-03-03 Thread Rustam Shakh


Rustam Shakh  added the comment:

# This line doesn`t work
task = loop.create_task(test())

# This line works
loop.create_task(test())

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39837] Remove Azure Pipelines from GitHub PRs

2020-03-03 Thread Steve Dower


Steve Dower  added the comment:

Deleting the files is not the right first step.

First, it needs to be changed to a non-required check.

Then, I can use the web UI to disable it starting.

*Then*, we can remove *some* of the files in the directory. Others are used for 
the official release, and have to stay.

PR 18769 should *not* be merged.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1294959] Problems with /usr/lib64 builds.

2020-03-03 Thread STINNER Victor

STINNER Victor  added the comment:

> Why "sys.python_libdir"?  Isn't that too public? A lot of similar 
> path-related info is in sysconfig; why shouldn't it be there?

I replied in a previous comment:

"Matthias Klose asked to not add another sys attribute, but Jan Matějek 
explained that the option value is needed to import the sysconfig module. 
Moreover, the option value is needed in the site module and we are trying to 
avoid "import sysconfig" in site since it would slowdown Python startup time."


> How does "sys.python_libdir" work on other platforms?

On Windows, the variable is equal to "lib". It's equal to "lib" on all 
platforms, except if you use configure to override its value.

Does it reply to your question?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39839] Non-working error handler when creating a task with assigning a variable

2020-03-03 Thread Рустам Шах

New submission from Рустам Шах :

#This example does not work due to assigning the task to a variable

import asyncio
import logging


def handle_exception(loop, context):
msg = context.get("exception", context["message"])
logging.error("Caught exception: %s", msg)

async def test():
await asyncio.sleep(1)
raise Exception("Crash.")

def main():
loop = asyncio.get_event_loop()
loop.set_exception_handler(handle_exception)
# if removed "task = " - exception handler will work.
task = loop.create_task(test())
try:
loop.run_forever()
finally:
loop.close()


if __name__ == "__main__":
main()

--
components: asyncio
messages: 363287
nosy: asvetlov, yselivanov, Рустам Шах
priority: normal
severity: normal
status: open
title: Non-working error handler when creating a task with assigning a variable
versions: Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39838] Possible unnecessary redifinition of _POSIX_C_SOURCE

2020-03-03 Thread Joannah Nanjekye


New submission from Joannah Nanjekye :

Please note the compile warning:

./pyconfig.h:1590: warning: "_POSIX_C_SOURCE" redefined
 #define _POSIX_C_SOURCE 200809L
 
In file included from /usr/include/x86_64-linux-gnu/bits/libc-header-start.h:33,
 from /usr/include/string.h:26,
 from /workspace/cpython/Modules/expat/xmltok.c:34:
/usr/include/features.h:295: note: this is the location of the previous 
definition
 # define _POSIX_C_SOURCE 199506L

There must be a way of avoiding this warning.

--
components: Interpreter Core
messages: 363286
nosy: nanjekyejoannah
priority: normal
severity: normal
status: open
title: Possible unnecessary redifinition of _POSIX_C_SOURCE
type: compile error
versions: Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39682] pathlib.Path objects can be used as context managers

2020-03-03 Thread Brett Cannon


Brett Cannon  added the comment:

> Can I ask what sort of backwards-compatibility guarantees Python provides for 
> these cases?

A deprecation warning for two releases (i.e. two years). Then it can be 
removed. So if people want to move forward with removing this then a 
DeprecationWarning would need to be raised in all places where _closed is set 
with a message stating the functionality is deprecated in 3.9 and slated for 
removal in 3.11 (along with appropriate doc updates, both for the module and 
What's New).

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39689] test_struct failure on s390x Fedora Clang buildbot

2020-03-03 Thread STINNER Victor


STINNER Victor  added the comment:

Charalampos Stratakis also reported this issue to python-dev:
"Unpacking native bools in the struct module: Is Python relying on undefined 
behavior?"
https://mail.python.org/archives/list/python-...@python.org/thread/O742VLCYX2AE3RWQK5RBQ3BGUOHESLF5/

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39831] Reference leak in PyErr_WarnEx()

2020-03-03 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

> It is not so easy for 3.7.

Apologies Serhiy, I thought it was more straightforward and just wanted to stop 
the mail storm that the refleak buildbots were causing :(

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39837] Remove Azure Pipelines from GitHub PRs

2020-03-03 Thread Brett Cannon


Change by Brett Cannon :


--
nosy: +steve.dower

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39831] Reference leak in PyErr_WarnEx()

2020-03-03 Thread miss-islington


miss-islington  added the comment:


New changeset 57fb29219f09ee705065e39ad488334a9c7e3d71 by Miss Islington (bot) 
in branch '3.8':
bpo-39831: Remove outdated comment. (GH-18764)
https://github.com/python/cpython/commit/57fb29219f09ee705065e39ad488334a9c7e3d71


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39831] Reference leak in PyErr_WarnEx()

2020-03-03 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset ae75a294352e9b9487f5dc8e88f068e7e6974dc2 by Serhiy Storchaka in 
branch 'master':
bpo-39831: Remove outdated comment. (GH-18764)
https://github.com/python/cpython/commit/ae75a294352e9b9487f5dc8e88f068e7e6974dc2


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39831] Reference leak in PyErr_WarnEx()

2020-03-03 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 2.0 -> 3.0
pull_requests: +18129
pull_request: https://github.com/python/cpython/pull/18770

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26460] datetime.strptime without a year fails on Feb 29

2020-03-03 Thread Nick Moore


Nick Moore  added the comment:

It's kind of funny that there's already consideration of this in 
_strptime._strptime(), which returns a tuple used by 
datetime.datetime.strptime() to construct the new datetime.
Search for `leap_year_fix`.

I think the concern though is if we changed the default year that might 
possibly break someone's existing code: thus my suggestion to allow the 
programmer to explicitly change the default.

However, I can also see that if their code is parsing dates in this way it is 
already wrong, and that if we're causing users pain now when they upgrade 
Python we're at least saving them pain at 2024-02-29 00:00:01.

Taking that approach, perhaps parsing dates with no year should just throw an 
exception, forcing the programmer to do it right the first time.  In this case 
though, I'd rather have a "year" kwarg to prevent the programmer having to do 
horrible string hacks like my code currently does.

I'm not sure: is it useful for me to produce a PR so we have something specific 
to consider?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39837] Remove Azure Pipelines from GitHub PRs

2020-03-03 Thread STINNER Victor


Change by STINNER Victor :


--
keywords: +patch
pull_requests: +18128
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/18769

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39837] Remove Azure Pipelines from GitHub PRs

2020-03-03 Thread STINNER Victor


New submission from STINNER Victor :

The Azure Pipelines jobs have been reimplemented as GitHub actions which are 
better integrated with GitHub:

* Docs / Docs (pull_request)
* Tests / Windows (x64) (pull_request)
* Tests / macOS (pull_request)
* Tests / Ubuntu (pull_request)
* etc.

Azure Pipelines runs the same jobs, but it looks slower. It is voting and so 
prevents to merge a PR until it completes.

I propose to simply remove the job.

I already proposed it on python-dev:
https://mail.python.org/archives/list/python-...@python.org/message/NC2ZS4WSF5AYGUUMBB7I4YIQ4YJXWBA5/

In this thread:
https://mail.python.org/archives/list/python-...@python.org/thread/2NSPJUEWULTLLALR3HY3H2PRYAUT474C/#NC2ZS4WSF5AYGUUMBB7I4YIQ4YJXWBA5

--
components: Tests
messages: 363279
nosy: vstinner
priority: normal
severity: normal
status: open
title: Remove Azure Pipelines from GitHub PRs
versions: Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35293] make doctest (Sphinx) emits a lot of warnings

2020-03-03 Thread STINNER Victor


STINNER Victor  added the comment:

> Relevant docutils upstream issue : 
> https://sourceforge.net/p/docutils/bugs/373/ . Also the SyntaxWarning was 
> changed to DeprecationWarning with msg349335.

SyntaxWarning warnings have been fixed in docutils 0.16.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39674] Keep deprecated features in Python 3.9 to ease migration from Python 2.7, but remove in Python 3.10

2020-03-03 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 91fe4142642286b65c166f7b6e27de16f42b1286 by Victor Stinner in 
branch 'master':
bpo-39674: Update collections ABC deprecation doc (GH-18747)
https://github.com/python/cpython/commit/91fe4142642286b65c166f7b6e27de16f42b1286


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39546] argparse: allow_abbrev=False is ignored for alternative prefix characters

2020-03-03 Thread Petr Viktorin


Change by Petr Viktorin :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39674] Keep deprecated features in Python 3.9 to ease migration from Python 2.7, but remove in Python 3.10

2020-03-03 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 2aa694dd55202eb6d062fdf49c07cf95f8520f2d by Victor Stinner in 
branch '3.8':
bpo-39674: Update collections ABC deprecation doc (GH-18748)
https://github.com/python/cpython/commit/2aa694dd55202eb6d062fdf49c07cf95f8520f2d


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39689] test_struct failure on s390x Fedora Clang buildbot

2020-03-03 Thread Petr Viktorin


Petr Viktorin  added the comment:

IMO:

- The "native" format should use native _Bool, and we should only test 
unpacking 0 and 1
- The "standard" format should use portable char semantics: continue to treat 
any non-zero value as true
- The docs should grow a warning that for the native format of '?', 
representation of true/false depends on the platform/compiler.

But what is "format"? The docs talk about size, alignment and byte order; bool 
representation is a slightly different concept. I'm not sure if it should 
follow Byte order or Size/Alignment: I think that the latter would be better 
(so only "@" uses the native _Bool semantics, but "=" uses portable char 
semantics), but it might be be harder to implement.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39776] PyContextVar_Get(): crash due to race condition in updating tstate->id

2020-03-03 Thread Stefan Krah


Stefan Krah  added the comment:

Thanks Ned, closing then.


Evgeny, please reopen if you see it again (I ran the tests for about
20 min, way above the usual reproduction time of 1 min).

Thanks for the very instructive test case!

--
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39530] Documentation about comparisons between numeric types is misleading

2020-03-03 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 4.0 -> 5.0
pull_requests: +18127
pull_request: https://github.com/python/cpython/pull/18737

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39389] gzip metadata fails to reflect compresslevel

2020-03-03 Thread Ned Deily


Ned Deily  added the comment:

"either"

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39389] gzip metadata fails to reflect compresslevel

2020-03-03 Thread Ned Deily


Ned Deily  added the comment:

Ping. The 3.7.x backport (PR 18101) for this issue is still open and neither 
needs to be fixed or closed.

--
nosy: +ned.deily
resolution: fixed -> 
stage: resolved -> backport needed
status: closed -> open

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39773] Export symbols for vectorcall

2020-03-03 Thread Petr Viktorin


Petr Viktorin  added the comment:

Yes. Can you use PyObject_Call instead (or one of the non-Vectorcall variants 
listed in https://docs.python.org/3.9/c-api/call.html#object-calling-api )

Vectorcall is mainly a speed optimization over PyObject_Call. We want to allow 
the C compiler to inline PyObject_Vectorcall whenever it is used.
That can be done with static functions or macros, which does unfortunately mean 
that the symbol is not exported.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39776] PyContextVar_Get(): crash due to race condition in updating tstate->id

2020-03-03 Thread Ned Deily


Ned Deily  added the comment:

Thanks for the heads-up and the fix, Stefan. The fix for 3.7.x was merged 
before the 3.7.7rc1 cutoff (by a few hours!) and the next 3.8.x release cutoff 
is planned for April and 3.9.0a5 is later in March, so, if you are not planning 
to merge any other changes for this issue, we can set the issue status to 
"closed" now.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38826] Regular Expression Denial of Service in urllib.request.AbstractBasicAuthHandler

2020-03-03 Thread Matthew Barnett


Matthew Barnett  added the comment:

A smaller change to the regex would be to replace the "(?:.*,)*" with 
"(?:[^,]*,)*".

I'd also suggest using a raw string instead:

rx = re.compile(r'''(?:[^,]*,)*[ \t]*([^ \t]+)[ \t]+realm=(["']?)([^"']*)\2''', 
re.I)

--
nosy: +mrabarnett

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38870] Expose ast.unparse in the ast module

2020-03-03 Thread Batuhan Taskaya


Change by Batuhan Taskaya :


--
pull_requests: +18126
pull_request: https://github.com/python/cpython/pull/18768

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39776] PyContextVar_Get(): crash due to race condition in updating tstate->id

2020-03-03 Thread Stefan Krah


Change by Stefan Krah :


--
resolution:  -> fixed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39776] PyContextVar_Get(): crash due to race condition in updating tstate->id

2020-03-03 Thread Stefan Krah


Change by Stefan Krah :


--
stage: patch review -> resolved

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39794] Add --without-decimal-contextvar option to use just threads in decimal

2020-03-03 Thread Stefan Krah


Stefan Krah  added the comment:

#39776 is fixed, but _pydecimal was also affected, see msg363266.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39776] PyContextVar_Get(): crash due to race condition in updating tstate->id

2020-03-03 Thread Stefan Krah


Stefan Krah  added the comment:

Setting to release blocker, but please move to deferred again
if a release is almost finished.

--
nosy: +lukasz.langa, ned.deily
priority: deferred blocker -> release blocker

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39776] PyContextVar_Get(): crash due to race condition in updating tstate->id

2020-03-03 Thread Stefan Krah


Stefan Krah  added the comment:

Also _pydecimal was affected. This is a modified version of Evgeny's
test case:

from _pydecimal import *
from time import sleep
from random import randint
import sys


sys.setswitchinterval(0.001)


def usleep(x):
sleep(x/100.0)

class Test:

def __init__(self, threadno):
self.threadno = threadno

def GetCallback(self):
usleep(randint(0, 9));
setcontext(Context(Emax=self.threadno))
usleep(randint(0, 9))
c = getcontext()
try:
if c.Emax != self.threadno:
raise RuntimeError("GetCallback: another thread changed this 
thread's context")
except AttributeError:
raise RuntimeError("GetCallback: type(c)==%s and c.Emax 
disappeared" % type(c))
usleep(randint(0, 9))
return self.Callback

def Callback(self):
c = getcontext()
try:
c.Emax = self.threadno
except AttributeError:
raise RuntimeError("Callback: type(c)==%s and c.Emax disappeared" % 
type(c))

def DoTest(threadno):
return Test(threadno).GetCallback()



It produces one of the exceptions or a segfault. You may have
to build in release mode to get the race.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37330] open(): remove 'U' mode, deprecated since Python 3.3

2020-03-03 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +18125
pull_request: https://github.com/python/cpython/pull/18767

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39674] Keep deprecated features in Python 3.9 to ease migration from Python 2.7, but remove in Python 3.10

2020-03-03 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +18124
pull_request: https://github.com/python/cpython/pull/18767

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39836] Implement PyObject_GetMemoryView

2020-03-03 Thread STINNER Victor


Change by STINNER Victor :


--
nosy: +skrah

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39836] Implement PyObject_GetMemoryView

2020-03-03 Thread Joannah Nanjekye


New submission from Joannah Nanjekye :

We have a memory-view object represented with the following structure:

typedef struct {
PyObject_VAR_HEAD
_PyManagedBufferObject *mbuf; /* managed buffer */
Py_hash_t hash;   /* hash value for read-only views */
int flags;/* state flags */
Py_ssize_t exports;   /* number of buffer re-exports */
Py_buffer view;   /* private copy of the exporter's view */
PyObject *weakreflist;
Py_ssize_t ob_array[1];   /* shape, strides, suboffsets */
} PyMemoryViewObject;

It would be good to have the implementation for PyObject_GetMemoryView which 
returns a memory-view object as was originally intended in PEP 3118 i.e :

PyObject *PyObject_GetMemoryView(PyObject *obj)

--
components: C API
messages: 363265
nosy: nanjekyejoannah
priority: normal
severity: normal
status: open
title: Implement PyObject_GetMemoryView
type: enhancement
versions: Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39835] Implement PyObject_CopyToObject

2020-03-03 Thread Joannah Nanjekye


New submission from Joannah Nanjekye :

I suggest implementing a C-API for copying data into a buffer exported by an 
obj. i.e 


int PyObject_CopyToObject(PyObject *obj, void *buf, Py_ssize_t len,
  char fortran)

as was intended in PEP 3118. The documentation there says this functionality 
should:

"Copy len bytes of data pointed to by the contiguous chunk of memory pointed to 
by buf into the buffer exported by obj. Return 0 on success and return -1 and 
raise an error on failure. If the object does not have a writable buffer, then 
an error is raised. If fortran is 'F', then if the object is multi-dimensional, 
then the data will be copied into the array in Fortran-style (first dimension 
varies the fastest). If fortran is 'C', then the data will be copied into the 
array in C-style (last dimension varies the fastest). If fortran is 'A', then 
it does not matter and the copy will be made in whatever way is more efficient."

--
components: C API
messages: 363264
nosy: nanjekyejoannah
priority: normal
severity: normal
status: open
title: Implement PyObject_CopyToObject
type: enhancement
versions: Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39776] PyContextVar_Get(): crash due to race condition in updating tstate->id

2020-03-03 Thread Stefan Krah


Change by Stefan Krah :


Added file: https://bugs.python.org/file48945/pydecimal_cases.zip

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39674] Keep deprecated features in Python 3.9 to ease migration from Python 2.7, but remove in Python 3.10

2020-03-03 Thread STINNER Victor


STINNER Victor  added the comment:

Another candidate is to revert the ignored "U" mode in open(): commit 
e471e72977c83664f13d041c78549140c86c92de of bpo-37330.

Removing "U" mode of open() broke 11 packages in Fedora:

* aubio
* openvswitch
* python-SALib
* python-altgraph
* python-apsw
* python-magic-wormhole-mailbox-server
* python-munch
* python-parameterized
* python-pylibmc
* python-sphinx-testing
* veusz

Keeping "U" mode in Python 3.9 is also a formal request from Andrew Bartlett of 
the Samba project: https://bugs.python.org/issue37330#msg362362

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38960] DTrace FreeBSD build fix

2020-03-03 Thread Petr Viktorin


Petr Viktorin  added the comment:

The fix introduced a regression, see bpo-39761

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38960] DTrace FreeBSD build fix

2020-03-03 Thread Petr Viktorin


Change by Petr Viktorin :


--
pull_requests: +18123
pull_request: https://github.com/python/cpython/pull/18766

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2020-03-03 Thread Petr Viktorin


Change by Petr Viktorin :


--
pull_requests: +18122
pull_request: https://github.com/python/cpython/pull/18766

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39682] pathlib.Path objects can be used as context managers

2020-03-03 Thread Barney Gale


Barney Gale  added the comment:

Also, thank you Antoine for your explanation :-)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39682] pathlib.Path objects can be used as context managers

2020-03-03 Thread Barney Gale


Barney Gale  added the comment:

Can I ask what sort of backwards-compatibility guarantees Python provides for 
these cases? In the case of using a Path object as a context manager, I think 
we can say:

- It's easy to do - there's no need to call any underscore-prefixed methods for 
example
- It's undocumented
- It's pretty hard to determine existing usage statically - grepping for `with 
p:` is years of work.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39704] Disable code coverage

2020-03-03 Thread STINNER Victor


STINNER Victor  added the comment:

Ernest updated the organization configuration to:
---
comment: off
coverage:
  status:
changes: off
project: off
patch: off
---

which gives:

{
"comment": false, 
"coverage": {
"status": {
"changes": false, 
"patch": false, 
"project": false
}
}
}

Codecov should no longer add comments to pull requests. I close the issue. 
Reopen it if Codecov adds *new* comments to pull requests.

Thanks Ernest!

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39820] Bracketed paste mode for REPL

2020-03-03 Thread Mark Dickinson


Mark Dickinson  added the comment:

See also the discussion in #38747 (also opened by Marco), which was closed as 
rejected. This issue is close to a duplicate of that one.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26460] datetime.strptime without a year fails on Feb 29

2020-03-03 Thread Gerard C Weatherby


Gerard C Weatherby  added the comment:

Yes, code that has been working for my organization the past two years just 
broke this weekend.

Meaning depends on context. The straightforward solution is that if no year is 
specified, the return value should default to the current year.

--
nosy: +gera...@alum.mit.edu

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39467] Allow to deprecate CLI arguments in argparse

2020-03-03 Thread hervé

hervé  added the comment:

hello,

First thanks everyone to took time to discute about this proposal.

This topic is now opened since ~1 months so I don't think we will more feedback 
about this, then I will address all your comments in my changes soon to match 
an implementation more consensually based.

--
nosy: +4383

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



  1   2   >