[issue42422] types.CodeType() has no bytecode verifier

2020-12-07 Thread STINNER Victor


STINNER Victor  added the comment:

> You may use https://bytecode.readthedocs.io/ which might help to write more 
> portable code, (...)

Ah, I didn't notice that at the beginning of the documentation, you can see 
that even a very simple loop has a different bytecode before and after Python 
3.8:

"Python 3.8 removed SETUP_LOOP"
https://bytecode.readthedocs.io/en/latest/usage.html#simple-loop

--

___
Python tracker 

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



[issue42422] types.CodeType() has no bytecode verifier

2020-12-07 Thread STINNER Victor


STINNER Victor  added the comment:

Compiled bytecode is not portable between Python versions. You may use 
https://bytecode.readthedocs.io/ which might help to write more portable code, 
but this project does not contain a bytecode verifier and I'm not sure that 
it's updated when the Python bytecode becomes backward incompatible. (I wrote 
the first version as a Proof-of-Concept of my PEP 511, but I no longer maintain 
it.)

--
title: Py_Decref on value crash the interpreter in Python/ceval.c:1104 -> 
types.CodeType() has no bytecode verifier

___
Python tracker 

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



[issue42422] Py_Decref on value crash the interpreter in Python/ceval.c:1104

2020-12-07 Thread STINNER Victor


STINNER Victor  added the comment:

About PR 23448: I don't see the value of adding a script just prove that 
CPython has no bytecode verifier.

If you consider that it's not well documented, it should be documented in the 
types.CodeType documentation:
https://docs.python.org/dev/library/types.html#types.CodeType

--
nosy: +vstinner

___
Python tracker 

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



[issue42422] Py_Decref on value crash the interpreter in Python/ceval.c:1104

2020-12-07 Thread Batuhan Taskaya


Batuhan Taskaya  added the comment:

> I would be happy to update and fix it instead if you think it's better that 
> way. Please let me know, it will be great to see my first submission being 
> treated.

Yes, please. That seems more appropriate

--

___
Python tracker 

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



[issue42595] 5 * str

2020-12-07 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Sorry, this isn't a bug.  It is tested and guaranteed behavior.

--
nosy: +rhettinger
resolution:  -> not a bug
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



[issue42595] 5 * str

2020-12-07 Thread NO_DANGER LacalBitcoins

New submission from NO_DANGER LacalBitcoins :

5 * 'abc' нет ошибки. Нелогично!

--
files: Screenshot_1.png
messages: 382709
nosy: denisustinovweb
priority: normal
severity: normal
status: open
title: 5 * str
type: crash
Added file: https://bugs.python.org/file49659/Screenshot_1.png

___
Python tracker 

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



[issue42422] Py_Decref on value crash the interpreter in Python/ceval.c:1104

2020-12-07 Thread Dennis Sweeney


Dennis Sweeney  added the comment:

Why not just fix bogus_code_obj.py?

Something like this (using the replace method) would make it more future-proof 
to similar changes in the code object constructor signature (and be more 
readable!):

import dis
POP_TOP = dis.opmap['POP_TOP']
wordcode = bytes([POP_TOP, 0] * 10)
f = lambda: None
f.__code__ = f.__code__.replace(co_code=wordcode)
f()

--

___
Python tracker 

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



[issue41889] enum: Mixin and int base class regression in 3.8.6

2020-12-07 Thread Ethan Furman


Change by Ethan Furman :


--
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



[issue42560] Improve Tkinter Documentation

2020-12-07 Thread Roundup Robot


Change by Roundup Robot :


--
keywords: +patch
nosy: +python-dev
nosy_count: 2.0 -> 3.0
pull_requests: +22557
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/23689

___
Python tracker 

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



[issue42572] Better path handling with argparse

2020-12-07 Thread paul j3


paul j3  added the comment:

What exactly do you do with a path argument?

Admittedly I'm not expert with os and os.path modules, but isn't a path just a 
string passed to a function such as cwd(), or joined to another create a 
filename.

I don't know what a 'path' type or action would do.

--

___
Python tracker 

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



[issue42564] "from .__init__ import ..." syntax imports a duplicate module

2020-12-07 Thread Gregory Szorc


Gregory Szorc  added the comment:

Who uses this syntax? 
https://github.com/search?l=Python=%22from+.__init__+import%22=Code says 
a lot of random code, surprisingly/sadly.

As for python-ideas, thanks for the suggestion: I may very well craft an email!

--

___
Python tracker 

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



[issue42247] unittest hides traceback frames in chained exceptions

2020-12-07 Thread Irit Katriel


Irit Katriel  added the comment:

I made a patch that replaces the limit hack by a filter on the traceback. We 
could stop here an just fix this, or we could create a more generic filter in 
the traceback module as suggested in issue31299.

--

___
Python tracker 

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



[issue25573] FrameSummary repr() does not support previously working uses of repr in traceback module

2020-12-07 Thread Irit Katriel


Change by Irit Katriel :


--
pull_requests:  -22554

___
Python tracker 

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



[issue42247] unittest hides traceback frames in chained exceptions

2020-12-07 Thread Irit Katriel


Change by Irit Katriel :


--
pull_requests: +22556
pull_request: https://github.com/python/cpython/pull/23688

___
Python tracker 

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



[issue42247] unittest hides traceback frames in chained exceptions

2020-12-07 Thread Irit Katriel


Change by Irit Katriel :


--
pull_requests: +22555
pull_request: https://github.com/python/cpython/pull/23687

___
Python tracker 

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



[issue42247] unittest hides traceback frames in chained exceptions

2020-12-07 Thread Irit Katriel


Change by Irit Katriel :


--
pull_requests:  -22552

___
Python tracker 

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



[issue42247] unittest hides traceback frames in chained exceptions

2020-12-07 Thread Irit Katriel


Change by Irit Katriel :


--
pull_requests: +22552
pull_request: https://github.com/python/cpython/pull/23687

___
Python tracker 

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



[issue42247] unittest hides traceback frames in chained exceptions

2020-12-07 Thread Irit Katriel


Change by Irit Katriel :


--
pull_requests:  -22552

___
Python tracker 

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



[issue42247] unittest hides traceback frames in chained exceptions

2020-12-07 Thread Irit Katriel


Change by Irit Katriel :


--
versions: +Python 3.10 -Python 3.8

___
Python tracker 

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



[issue25573] FrameSummary repr() does not support previously working uses of repr in traceback module

2020-12-07 Thread Irit Katriel


Change by Irit Katriel :


--
pull_requests:  -22553

___
Python tracker 

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



[issue25573] FrameSummary repr() does not support previously working uses of repr in traceback module

2020-12-07 Thread Irit Katriel


Change by Irit Katriel :


--
pull_requests: +22554
pull_request: https://github.com/python/cpython/pull/23688

___
Python tracker 

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



[issue25573] FrameSummary repr() does not support previously working uses of repr in traceback module

2020-12-07 Thread Irit Katriel


Change by Irit Katriel :


--
pull_requests: +22553
pull_request: https://github.com/python/cpython/pull/23687

___
Python tracker 

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



[issue42247] unittest hides traceback frames in chained exceptions

2020-12-07 Thread Irit Katriel


Change by Irit Katriel :


--
keywords: +patch
nosy: +iritkatriel
nosy_count: 1.0 -> 2.0
pull_requests: +22552
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/23687

___
Python tracker 

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



[issue25573] FrameSummary repr() does not support previously working uses of repr in traceback module

2020-12-07 Thread Irit Katriel


Change by Irit Katriel :


--
pull_requests:  -22551

___
Python tracker 

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



[issue42572] Better path handling with argparse

2020-12-07 Thread Austin Scola


Austin Scola  added the comment:

Awesome, thank you for the guidance Eric. I'll start a thread on the 
python-ideas mailing list, gauge the level of support, and go from there.

--

___
Python tracker 

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



[issue25573] FrameSummary repr() does not support previously working uses of repr in traceback module

2020-12-07 Thread Irit Katriel


Change by Irit Katriel :


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

___
Python tracker 

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



[issue41818] Lib/pty.py major revision

2020-12-07 Thread Soumendra Ganguly


Change by Soumendra Ganguly :


--
pull_requests: +22550
pull_request: https://github.com/python/cpython/pull/23686

___
Python tracker 

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



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

2020-12-07 Thread STINNER Victor


STINNER Victor  added the comment:

Objects/memoryview.c uses memcpy() on _Bool which leads to undefined behavior 
with GCC 11: see bpo-42587.

--

___
Python tracker 

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



[issue42059] TypedDict(...) as function does not respect "total" when setting __required_keys__ and __optional_keys__

2020-12-07 Thread Guido van Rossum


Guido van Rossum  added the comment:

Looking for another reviewer.

--

___
Python tracker 

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



[issue42587] test_buffer fails on Python built with GCC 11

2020-12-07 Thread STINNER Victor


STINNER Victor  added the comment:

> FAIL: test_memoryview_cast (test.test_buffer.TestBufferProtocol)

On AArch64, GCC 11 miscompiles unpack_cmp() of Objects/memoryview.c for the '?' 
case:

/* boolean */
case '?': CMP_SINGLE(p, q, _Bool); return equal;

I reported the bug to GCC upstream: 
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98190

--

___
Python tracker 

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



[issue41889] enum: Mixin and int base class regression in 3.8.6

2020-12-07 Thread Ethan Furman


Ethan Furman  added the comment:


New changeset be52ca45d9eb9c3e8941e46ddc67a210f0f4c6fa by Miss Islington (bot) 
in branch '3.9':
bpo-41889: [Enum] fix multiple-inheritance regression (GH-22487) (GH-23673)
https://github.com/python/cpython/commit/be52ca45d9eb9c3e8941e46ddc67a210f0f4c6fa


--

___
Python tracker 

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



[issue41889] enum: Mixin and int base class regression in 3.8.6

2020-12-07 Thread Ethan Furman


Ethan Furman  added the comment:


New changeset 699e5e448919283578afe445069ab93b34bf8eae by Miss Islington (bot) 
in branch '3.8':
bpo-41889: [Enum] fix multiple-inheritance regression (GH-22487) (GH-23672)
https://github.com/python/cpython/commit/699e5e448919283578afe445069ab93b34bf8eae


--

___
Python tracker 

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



[issue42574] Travis can't build the 3.8 branch right now

2020-12-07 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
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



[issue42574] Travis can't build the 3.8 branch right now

2020-12-07 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset b6d6f5367da1f2e3f749c358ae8563c56a0cc395 by Pablo Galindo in 
branch '3.8':
bpo-42574: Use format() instead of f-string in Tools/clinic/clinic.py to allow 
using older Python versions (GH-23685)
https://github.com/python/cpython/commit/b6d6f5367da1f2e3f749c358ae8563c56a0cc395


--

___
Python tracker 

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



[issue39825] EXT_SUFFIX inconsistent between sysconfig and distutils.sysconfig (Windows)

2020-12-07 Thread mattip


mattip  added the comment:

I moved the new test to a separate test function and added `skipIf` for freebsd 
and AIX.

--

___
Python tracker 

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



[issue40406] MagicMock __aenter__ should be AsyncMock(return_value=MagicMock())

2020-12-07 Thread Blue


Change by Blue :


--
nosy: +simon.d.beal

___
Python tracker 

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



[issue42572] Better path handling with argparse

2020-12-07 Thread Eric V. Smith


Eric V. Smith  added the comment:

Hi, Austin.

If it's something that can be implemented in a library (which this suggestion 
qualifies as), then we typically want to see it on PyPI and to gain some 
traction there. I only suggested argparse-types because it also has some 
argparse add-ons. But you could certainly make a new package on PyPI.

But even then I'm not sure this would make it into the stdlib. For add-on 
functionality we're usually happy to leave things on PyPI. On the other hand, 
paths are somewhat more fundamental than some of the things in argparse-types. 
You might want to bring it up on the python-ideas mailing list and see how much 
support you get there.

--

___
Python tracker 

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



[issue42422] Py_Decref on value crash the interpreter in Python/ceval.c:1104

2020-12-07 Thread Sofian Brabez


Sofian Brabez  added the comment:

Any ETA? I would appreciate to see my contribution being merged.

Batuhan, the current code is not doing what it's supposed to do in 
bogus_code_obj.py (i.e. no crash after 3.8 and above in master and branches). 
This still make the issue valid I guess.

```
$ ./python -V
Python 3.8.6+
$ ./python -V
Python 3.10.0a2+
$ ./python Lib/test/crashers/bogus_code_obj.py 
Traceback (most recent call last):
  File "/usr/home/sbz/github/cpython/Lib/test/crashers/bogus_code_obj.py", line 
17, in 
co = types.CodeType(0, 0, 0, 0, 0, b'\x04\x71\x00\x00',
TypeError: code expected at least 14 arguments, got 13
```

I would be happy to update and fix it instead if you think it's better that 
way. Please let me know, it will be great to see my first submission being 
treated.

--

___
Python tracker 

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



[issue3770] test_multiprocessing fails on systems with HAVE_SEM_OPEN=0

2020-12-07 Thread pmp-p


Change by pmp-p :


--
nosy: +pmpp

___
Python tracker 

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



[issue31299] Add "ignore_modules" option to TracebackException.format()

2020-12-07 Thread Irit Katriel


Change by Irit Katriel :


--
versions: +Python 3.10 -Python 3.7

___
Python tracker 

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



[issue31299] Add "ignore_modules" option to TracebackException.format()

2020-12-07 Thread Irit Katriel


Irit Katriel  added the comment:

In issue42247 the unit test framework uses limit as a hack to remove its own 
frame, and then the traceback module applies the limit to the chained exception 
as well.

If the filter suggested here existed, unit test could use that instead of limit.

--
nosy: +iritkatriel

___
Python tracker 

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



[issue42587] test_buffer fails on Python built with GCC 11

2020-12-07 Thread STINNER Victor


STINNER Victor  added the comment:

> FAIL: test_memoryview_cast (test.test_buffer.TestBufferProtocol)

It might be related to _Bool. See also bpo-39689.

--

___
Python tracker 

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



[issue42572] Better path handling with argparse

2020-12-07 Thread Austin Scola


Austin Scola  added the comment:

Hey Eric,

Thanks for the response. I'm unfamiliar with the process of adding features to 
the language. Would you mind explaining to me what some of the qualifications 
are for getting something added to the stdlib? And also what role packages on 
PyPI play in that process?

I am also willing (and interested) in helping out in implementing this, but I 
don't want to step on anyone's toes so if the offer for help is rejected I will 
not be upset.

Thanks!

--

___
Python tracker 

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



[issue42594] Provide a way to skip magic-number search in ZipFile(mode='a')

2020-12-07 Thread Bart Robinson


New submission from Bart Robinson :

When a ZipFile object is created with mode='a', the existing file contents are 
checked for the magic number b"PK\005\006" near the end of the file.  If a 
non-zipfile just happens to contain this magic number, it can confuse the 
library into assuming the file is a zipfile when it is not.  It would be great 
if ZipFile.__init__() provided a way to skip the magic-number check and force a 
new central directory to be appended to the file.

This could take the form of an additional named argument like 
ZipFile.__init__(force_append=True), or an additional character in the mode 
string, like 'a+'.  Either of these options should be backward-compatible with 
existing code.

Currently, my company has code that uses monkey-patching to work around the 
lack of this feature in the standard library.  We use mode='a' to append 
metadata to files in existing formats that can contain arbitrary binary data 
and so occasionally include the magic number.

--
components: Library (Lib)
messages: 382691
nosy: Bart Robinson
priority: normal
severity: normal
status: open
title: Provide a way to skip magic-number search in ZipFile(mode='a')
type: enhancement
versions: Python 3.10

___
Python tracker 

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



[issue33066] raise an exception from multiple positions break the traceback frames

2020-12-07 Thread Irit Katriel


Irit Katriel  added the comment:

When an exception has a __traceback__ and you raise it, the current frame is 
added to that traceback. What do you expect the behavior to be when you raise 
the same exception instance twice, from two different locations?

--
nosy: +iritkatriel

___
Python tracker 

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



[issue42593] Consistency in unicode string multiplication with an integer

2020-12-07 Thread syl-nktaylor


syl-nktaylor  added the comment:

The build did seem to run, despite memset using fillchar without the explicit 
casting, so I assumed it did an implicit casting, but the original casting can 
be kept of course. With this build, my sample tests for 1-byte, 2-byte and 
4-byte chars also ran ok, so again, I assumed memset did the casting.

As for the benchmarks, I haven't run them, but yes, it's likely the best way to 
find out the performance considerations I was asking about.

--
resolution:  -> not a bug
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



[issue39825] EXT_SUFFIX inconsistent between sysconfig and distutils.sysconfig (Windows)

2020-12-07 Thread mattip


mattip  added the comment:

I submitted PR 23684 to try to skip tests to fix this. I don't understand why 
this wasn't caught before merge, and where AIX and FREEBSD are setting 
EXT_SUFFIX improperly.

--
message_count: 9.0 -> 10.0
pull_requests: +22549
stage: resolved -> patch review
pull_request: https://github.com/python/cpython/pull/23684

___
Python tracker 

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



[issue42590] Something like Rust's std::sync::Mutex – combining a mutex primitive and a piece of data it's protecting

2020-12-07 Thread STINNER Victor


Change by STINNER Victor :


--
nosy:  -vstinner

___
Python tracker 

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



[issue42593] Consistency in unicode string multiplication with an integer

2020-12-07 Thread STINNER Victor


STINNER Victor  added the comment:

+Py_UCS4 fill_char = PyUnicode_READ(char_size, PyUnicode_DATA(str), 0);
+memset(to, fill_char, len);

The second parameter of memset() is a byte (8-bit "octet"). You cannot pass 
Py_UCS4 to memset(), it doesn't work.

--

___
Python tracker 

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



[issue41462] os.set_blocking() raises OSError on VxWorks RTOS

2020-12-07 Thread STINNER Victor


Change by STINNER Victor :


--
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



[issue39825] EXT_SUFFIX inconsistent between sysconfig and distutils.sysconfig (Windows)

2020-12-07 Thread STINNER Victor


STINNER Victor  added the comment:

It also broke POWER6 AIX 3.8:
https://buildbot.python.org/all/#builders/138/builds/125

Traceback (most recent call last):
  File 
"/home/buildbot/buildarea/3.8.aixtools-aix-power6/build/Lib/test/test_sysconfig.py",
 line 366, in test_EXT_SUFFIX_in_vars
self.assertEqual(vars['EXT_SUFFIX'], _imp.extension_suffixes()[0])
AssertionError: '.so' != '.cpython-38d.so'
- .so
+ .cpython-38d.so

--

___
Python tracker 

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



[issue39825] EXT_SUFFIX inconsistent between sysconfig and distutils.sysconfig (Windows)

2020-12-07 Thread STINNER Victor


STINNER Victor  added the comment:

This change broke the AMD64 FreeBSD Shared 3.x buildbot:
https://buildbot.python.org/all/#/builders/483/builds/513

FAIL: test_EXT_SUFFIX_in_vars (test.test_sysconfig.TestSysConfig)
--
Traceback (most recent call last):
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/test/test_sysconfig.py",
 line 368, in test_EXT_SUFFIX_in_vars
self.assertEqual(vars['EXT_SUFFIX'], _imp.extension_suffixes()[0])
AssertionError: '.so' != '.cpython-310d.so'
- .so
+ .cpython-310d.so

--
nosy: +vstinner
resolution: fixed -> 
status: closed -> open

___
Python tracker 

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



[issue42564] "from .__init__ import ..." syntax imports a duplicate module

2020-12-07 Thread Brett Cannon


Brett Cannon  added the comment:

You could propose your backwards-incompatible proposals on python-ideas, Greg, 
and see if you get any uptake.

--

___
Python tracker 

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



[issue26131] Raise ImportWarning when loader.load_module() is used

2020-12-07 Thread Brett Cannon


Change by Brett Cannon :


--
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



[issue41462] os.set_blocking() raises OSError on VxWorks RTOS

2020-12-07 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 06afac6c5740bb81d2b7ab9639d2b08cccf77d33 by pxinwr in branch 
'master':
bpo-41462: Add os.set_blocking() support for VxWorks RTOS (GH-21713)
https://github.com/python/cpython/commit/06afac6c5740bb81d2b7ab9639d2b08cccf77d33


--
nosy: +vstinner

___
Python tracker 

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



[issue42593] Consistency in unicode string multiplication with an integer

2020-12-07 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

BTW, CPython does not use UTF-8 and UTF-16 encoding in internal representation 
of strings. It uses Latin1, UCS2 and UCS4 (UTF-32).

What benchmarks show? Is your code always faster and how much? If it is slower 
for some data, for what data and how much?

--
nosy: +serhiy.storchaka
type: behavior -> performance

___
Python tracker 

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



[issue42593] Consistency in unicode string multiplication with an integer

2020-12-07 Thread syl-nktaylor


New submission from syl-nktaylor :

In 
https://github.com/python/cpython/blob/master/Objects/unicodeobject.c#L12930, 
unicode_repeat does string multiplication with an integer in 3 different ways:
1) one memset call, for utf-8 when string size is 1
2) linear 'for' loops, for utf-16 and utf-32 when string size is 1
3) logarithmic 'while' loop with memcpy calls, for utf-8/utf-16/utf-32 when 
string size > 1 

Is there a performance or correctness reason for which we can't also use the 
3rd way for the second case? I realise depending on architecture, the second 
case could benefit from vectorization, but the memcpy calls will also be 
hardware optimised.

An example of using just the 1st and 3rd methods:

--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -12954,31 +12954,16 @@ unicode_repeat(PyObject *str, Py_ssize_t len)
 assert(PyUnicode_KIND(u) == PyUnicode_KIND(str));

-if (PyUnicode_GET_LENGTH(str) == 1) {
-int kind = PyUnicode_KIND(str);
-Py_UCS4 fill_char = PyUnicode_READ(kind, PyUnicode_DATA(str), 0);
-if (kind == PyUnicode_1BYTE_KIND) {
-void *to = PyUnicode_DATA(u);
-memset(to, (unsigned char)fill_char, len);
-}
-else if (kind == PyUnicode_2BYTE_KIND) {
-Py_UCS2 *ucs2 = PyUnicode_2BYTE_DATA(u);
-for (n = 0; n < len; ++n)
-ucs2[n] = fill_char;
-} else {
-Py_UCS4 *ucs4 = PyUnicode_4BYTE_DATA(u);
-assert(kind == PyUnicode_4BYTE_KIND);
-for (n = 0; n < len; ++n)
-ucs4[n] = fill_char;
-}
-}
-else {
+Py_ssize_t char_size = PyUnicode_KIND(str);
+char *to = (char *) PyUnicode_DATA(u);
+if (PyUnicode_GET_LENGTH(str) == 1 && char_size == PyUnicode_1BYTE_KIND) {
+Py_UCS4 fill_char = PyUnicode_READ(char_size, PyUnicode_DATA(str), 0);
+memset(to, fill_char, len);
+} else {
 /* number of characters copied this far */
 Py_ssize_t done = PyUnicode_GET_LENGTH(str);
-Py_ssize_t char_size = PyUnicode_KIND(str);
-char *to = (char *) PyUnicode_DATA(u);
 memcpy(to, PyUnicode_DATA(str),
   PyUnicode_GET_LENGTH(str) * char_size);
 while (done < nchars) {...

--
components: Unicode
messages: 382681
nosy: ezio.melotti, syl-nktaylor, vstinner
priority: normal
severity: normal
status: open
title: Consistency in unicode string multiplication with an integer
type: behavior
versions: Python 3.10

___
Python tracker 

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



[issue42574] Travis can't build the 3.8 branch right now

2020-12-07 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
pull_requests: +22548
pull_request: https://github.com/python/cpython/pull/23685

___
Python tracker 

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



[issue42574] Travis can't build the 3.8 branch right now

2020-12-07 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

I would suggest to use some other string formatting for that one line. The 
reason is that technically (although very unlikely) downstream consumers could 
be relying on some old PYTHON_FOR_REGEN in the Makefile for 3.8 and I would not 
like to change that in a patch release.

--

___
Python tracker 

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



[issue42536] Iterating on a zip keeps objects alive longer than expected (test_itertools leaks sometimes references)

2020-12-07 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
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



[issue42536] Iterating on a zip keeps objects alive longer than expected (test_itertools leaks sometimes references)

2020-12-07 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 7c797982383ebfd9cca39c480dcf6132979dd06f by Brandt Bucher in 
branch '3.8':
bpo-42536: GC track recycled tuples (GH-23623) (GH-23652)
https://github.com/python/cpython/commit/7c797982383ebfd9cca39c480dcf6132979dd06f


--

___
Python tracker 

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



[issue42536] Iterating on a zip keeps objects alive longer than expected (test_itertools leaks sometimes references)

2020-12-07 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 60463e8e4f79e5b5e96dc43fb83ded373b489e33 by Brandt Bucher in 
branch '3.9':
bpo-42536: GC track recycled tuples (GH-23623) (GH-23651)
https://github.com/python/cpython/commit/60463e8e4f79e5b5e96dc43fb83ded373b489e33


--

___
Python tracker 

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



[issue42579] Solution from gh#python/cpython#13236 unnecessarily binds building of documentation to the latest version of Sphinx

2020-12-07 Thread Pablo Galindo Salgado

Pablo Galindo Salgado  added the comment:


New changeset b63a620014b67a6e63d10783149c41baaf59def8 by Matěj Cepl in branch 
'master':
bpo-42579: Make workaround for various versions of Sphinx more robust (GH-23662)
https://github.com/python/cpython/commit/b63a620014b67a6e63d10783149c41baaf59def8


--

___
Python tracker 

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



[issue42579] Solution from gh#python/cpython#13236 unnecessarily binds building of documentation to the latest version of Sphinx

2020-12-07 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
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



[issue42592] TypedDict: total=False but still key required

2020-12-07 Thread Brandt Bucher


Brandt Bucher  added the comment:

It looks like this is a duplicate of issue 42059. We should just use their 
existing PR instead (PR 22736).

--
resolution:  -> duplicate
stage: test needed -> resolved
status: open -> closed
superseder:  -> TypedDict(...) as function does not respect "total" when 
setting __required_keys__ and __optional_keys__

___
Python tracker 

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



[issue42592] TypedDict: total=False but still key required

2020-12-07 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Some notes on needed TypedDict doc fixes.

https://docs.python.org/3/library/typing.html#typing.TypedDict

"class typing.TypedDict(dict)"

The actual signature from inspect.signature is "(typename, fields=None, /, *, 
total=True, **kwargs)".  I presume fields not None and kwargs != {} are 
mutually exclusive.  AFAIK, the kwargs version of the call alternative is not 
in PEP 589.

"The type info for introspection can be accessed via Point2D.__annotations__ 
and Point2D.__total__."

'__total__' is not indexed.  __required_keys__ and __optional_keys__ are 
neither documented (including not in the PEP, which does not get revised) nor 
indexed.

--
nosy: +terry.reedy
stage:  -> test needed
versions: +Python 3.10

___
Python tracker 

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



[issue42585] Segmentation fault on Linux with multiprocess queue

2020-12-07 Thread Alexey Izbyshev


Change by Alexey Izbyshev :


--
components: +Library (Lib)
nosy: +davin, pitrou
versions:  -Python 3.6

___
Python tracker 

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



[issue42592] TypedDict: total=False but still key required

2020-12-07 Thread Brandt Bucher


Change by Brandt Bucher :


--
assignee:  -> brandtbucher

___
Python tracker 

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



[issue42574] Travis can't build the 3.8 branch right now

2020-12-07 Thread Ammar Askar


Ammar Askar  added the comment:

Oh whoops, got sniped by Brandt while investigating :)

--

___
Python tracker 

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



[issue39625] Traceback needs more details

2020-12-07 Thread Irit Katriel


Change by Irit Katriel :


--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> stack tracebacks should give the relevant class name

___
Python tracker 

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



[issue42574] Travis can't build the 3.8 branch right now

2020-12-07 Thread Ammar Askar


Ammar Askar  added the comment:

>From a quick glance at 
>https://github.com/python/cpython/pulls?page=2=base%3A3.8+-label%3Atype-documentation

It looks like travis on 3.8 last passed at 
https://github.com/python/cpython/pull/23364 around 19 days ago

The culprit commit is likely 
https://github.com/python/cpython/commit/66dd5338a1ca98921c8e6c51228541ef8ed8076a
 from 19 days ago since it added the first bit of f-string syntax to clinic.py, 
it was committed directly without a PR which is likely why this wasn't caught.

--
nosy: +ammar2

___
Python tracker 

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



[issue42574] Travis can't build the 3.8 branch right now

2020-12-07 Thread Brandt Bucher


Brandt Bucher  added the comment:

So I suppose we can either:

- set PYTHON_FOR_REGEN to something 3.6+ on these backport branches
- use some other string formatting for that one line

I sort of prefer the second, since I *think* this is the only thing keeping 
older Pythons from working here.

--

___
Python tracker 

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



[issue42574] Travis can't build the 3.8 branch right now

2020-12-07 Thread Brandt Bucher


Brandt Bucher  added the comment:

It has been failing for some time. It's just not a required check, so it's easy 
to miss on a backport branch.

I think the addition of an f-string in PR 23371 a few weeks ago is what started 
making this fail (since the system python can't run clinic anymore). It looks 
like it has been failing ever since.

--

___
Python tracker 

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



[issue42574] Travis can't build the 3.8 branch right now

2020-12-07 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

I am a bit confusedwhy is this failing now?

--

___
Python tracker 

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



[issue42592] TypedDict: total=False but still key required

2020-12-07 Thread Paul Bryan


Paul Bryan  added the comment:

Your patch LGTM, Brandt.

--

___
Python tracker 

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



[issue40600] Add option to disallow > 1 instance of an extension module

2020-12-07 Thread hai shi


hai shi  added the comment:

> MAYBE we need add a module flag in `PyModuleDef`.
I created a demo in PR 23683.

--

___
Python tracker 

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



[issue42592] TypedDict: total=False but still key required

2020-12-07 Thread Brandt Bucher


Brandt Bucher  added the comment:

I can fix this, Paul, unless you want to take it. Probably deserves a 
regression test or two as well.

--

___
Python tracker 

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



[issue42592] TypedDict: total=False but still key required

2020-12-07 Thread Brandt Bucher


Brandt Bucher  added the comment:

It looks like the issue is that _TypedDictMeta only respects "total" as a 
keyword argument to __new__, but the TypedDict function passes it along by 
setting __total__ in the generated namespace instead.

This fixes it:

diff --git a/Lib/typing.py b/Lib/typing.py
index 46c54c4..bb0696b 100644
--- a/Lib/typing.py
+++ b/Lib/typing.py
@@ -2050,7 +2050,7 @@ class body be required.
 except (AttributeError, ValueError):
 pass
 
-return _TypedDictMeta(typename, (), ns)
+return _TypedDictMeta(typename, (), ns, total=total)
 
 _TypedDict = type.__new__(_TypedDictMeta, 'TypedDict', (), {})
 TypedDict.__mro_entries__ = lambda bases: (_TypedDict,)

--
nosy: +brandtbucher

___
Python tracker 

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



[issue40600] Add option to disallow > 1 instance of an extension module

2020-12-07 Thread hai shi


Change by hai shi :


--
keywords: +patch
pull_requests: +22547
stage: test needed -> patch review
pull_request: https://github.com/python/cpython/pull/23683

___
Python tracker 

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



[issue40600] Add option to disallow > 1 instance of an extension module

2020-12-07 Thread hai shi


hai shi  added the comment:

>On the other side, defining a Py_mod_exec_once that supports execution > >for 
>just once can be a way.
>Although the usage is little, it will be fine because the use case will >exist.

IMHO, `Py_mod_exec_once` is more like a slot control flag. MAYBE we need add a 
module flag in `PyModuleDef`.

--
versions: +Python 3.10 -Python 3.9

___
Python tracker 

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



[issue39825] EXT_SUFFIX inconsistent between sysconfig and distutils.sysconfig (Windows)

2020-12-07 Thread miss-islington


miss-islington  added the comment:


New changeset e9a6dcdefabb6c19074566f4ee0e02daaf57be18 by Miss Islington (bot) 
in branch '3.9':
bpo-39825: Fixes sysconfig.get_config_var('EXT_SUFFIX') on Windows to match 
distutils (GH-22088)
https://github.com/python/cpython/commit/e9a6dcdefabb6c19074566f4ee0e02daaf57be18


--

___
Python tracker 

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



[issue39825] EXT_SUFFIX inconsistent between sysconfig and distutils.sysconfig (Windows)

2020-12-07 Thread miss-islington


miss-islington  added the comment:


New changeset ca52aa3ddd949ce2d259b4263344339b56db00b7 by Miss Islington (bot) 
in branch '3.8':
bpo-39825: Fixes sysconfig.get_config_var('EXT_SUFFIX') on Windows to match 
distutils (GH-22088)
https://github.com/python/cpython/commit/ca52aa3ddd949ce2d259b4263344339b56db00b7


--

___
Python tracker 

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



[issue42592] TypedDict: total=False but still key required

2020-12-07 Thread Paul Bryan


New submission from Paul Bryan :

I believe "a" below should be an optional key, not a required one.

Python 3.9.0 (default, Oct  7 2020, 23:09:01) 
[GCC 10.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import typing
>>> TD = typing.TypedDict("TD", {"a": str}, total=False)
>>> TD.__total__
False
>>> TD.__required_keys__
frozenset({'a'})
>>> TD.__optional_keys__
frozenset()
>>>

--
components: Library (Lib)
messages: 382662
nosy: gvanrossum, pbryan
priority: normal
severity: normal
status: open
title: TypedDict: total=False but still key required
type: behavior
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



[issue39825] EXT_SUFFIX inconsistent between sysconfig and distutils.sysconfig (Windows)

2020-12-07 Thread miss-islington


Change by miss-islington :


--
pull_requests: +22546
pull_request: https://github.com/python/cpython/pull/23682

___
Python tracker 

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



[issue39825] EXT_SUFFIX inconsistent between sysconfig and distutils.sysconfig (Windows)

2020-12-07 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 10.0 -> 11.0
pull_requests: +22545
pull_request: https://github.com/python/cpython/pull/23681

___
Python tracker 

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



[issue39825] EXT_SUFFIX inconsistent between sysconfig and distutils.sysconfig (Windows)

2020-12-07 Thread Steve Dower


Steve Dower  added the comment:

Thanks!

--
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



[issue39825] EXT_SUFFIX inconsistent between sysconfig and distutils.sysconfig (Windows)

2020-12-07 Thread Steve Dower


Steve Dower  added the comment:


New changeset c0afb7fa0ebd1c0e95c0760bbe75a99a8dd12ea6 by Matti Picus in branch 
'master':
bpo-39825: Fixes sysconfig.get_config_var('EXT_SUFFIX') on Windows to match 
distutils (GH-22088)
https://github.com/python/cpython/commit/c0afb7fa0ebd1c0e95c0760bbe75a99a8dd12ea6


--

___
Python tracker 

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



[issue42574] Travis can't build the 3.8 branch right now

2020-12-07 Thread Brandt Bucher


Brandt Bucher  added the comment:

Pablo, maybe you can shed some light on this. It looks like the PEG parser PR 
explicitly sets PYTHON_FOR_REGEN=python3.8 using pyenv in .travis.yml for the 
master (and now 3.9) branches. The change was made in the we-like-parsers repo 
here:

https://github.com/we-like-parsers/cpython/pull/88

Should we be doing this in the other branches as well?

--
nosy: +pablogsal

___
Python tracker 

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



[issue42569] Callers of _Py_fopen/_Py_wfopen may be broken after addition of audit hooks

2020-12-07 Thread Steve Dower


Steve Dower  added the comment:

Good point, we can make it set errno as well. Any generic error is fine (I 
don't know them off the top of my head), because it will chain up to the one 
set by the hook.

--

___
Python tracker 

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



[issue23915] [doc] traceback set with BaseException.with_traceback() pushed back on raise

2020-12-07 Thread Irit Katriel


Irit Katriel  added the comment:

The new PR has an alternative suggestion for a change, where I tried to 
incorporate both Travis's and David's points: (1) there are better alternatives 
now for exception chaining (2) the current frame gets pushed on the traceback 
when the exception is raised.

--
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



[issue42573] Installation of Python 3.9 failing with message "User cancelled installation"

2020-12-07 Thread Steve Dower


Steve Dower  added the comment:

Can you try disabling any security/anti-malware software you have running? 
That's normally the only thing (besides a user) that will cause this error.

--

___
Python tracker 

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



[issue23915] [doc] traceback set with BaseException.with_traceback() pushed back on raise

2020-12-07 Thread Irit Katriel


Change by Irit Katriel :


--
nosy: +iritkatriel
nosy_count: 5.0 -> 6.0
pull_requests: +22544
stage: resolved -> patch review
pull_request: https://github.com/python/cpython/pull/23680

___
Python tracker 

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



[issue42586] unittest.mock.Mock spec can't be array/ndarray in Python 3.9

2020-12-07 Thread Valeriu Predoi


Valeriu Predoi  added the comment:

Changed status to pending, will close once we've had 3.9.1 in our env and 
tested proper, but should be OK, cheers!

--
status: pending -> open

___
Python tracker 

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



[issue42586] unittest.mock.Mock spec can't be array/ndarray in Python 3.9

2020-12-07 Thread Valeriu Predoi


Change by Valeriu Predoi :


--
status: open -> pending

___
Python tracker 

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



[issue42588] Improvements to graphlib.TopologicalSorter.static_order() documentation

2020-12-07 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +pablogsal, rhettinger, tim.peters

___
Python tracker 

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



[issue42586] unittest.mock.Mock spec can't be array/ndarray in Python 3.9

2020-12-07 Thread Valeriu Predoi


Valeriu Predoi  added the comment:

Excellent, just gonna let my team know about this and we'll hold off on 3.9.0 
then - good stuff, mate!

--

___
Python tracker 

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



[issue42586] unittest.mock.Mock spec can't be array/ndarray in Python 3.9

2020-12-07 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

3.9.1 is in RC1 as per https://www.python.org/dev/peps/pep-0596/#lifespan . It 
will be available as part of 3.9.1 or 3.9.2 . I am not sure about anaconda 
packaging schedule though.

--

___
Python tracker 

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



[issue42586] unittest.mock.Mock spec can't be array/ndarray in Python 3.9

2020-12-07 Thread Valeriu Predoi


Valeriu Predoi  added the comment:

Great, cheers mate, I read through the PR's (and sorry to have pestered you 
over at the mock backport GitHub too haha) - this looks it will fix the issue 
nicely. Do you know when will the release be available for us using Python from 
Anaconda etc.? Feel free to close this, and thanks for the assistance! Cheers, V

--

___
Python tracker 

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



[issue42591] Method Py_FrozenMain missing in libpython3.9

2020-12-07 Thread Christian Bachmaier


Change by Christian Bachmaier :


--
components: +Library (Lib) -C API

___
Python tracker 

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



[issue42591] Method Py_FrozenMain missing in libpython3.9

2020-12-07 Thread Christian Bachmaier


New submission from Christian Bachmaier :

In Python 3.9.0 and 3.9.1rc1 (Packages from Ubuntu Devel Branch or Fedora) the 
Method
int Py_FrozenMain(int, char**)
is missing in libpython3.9.so

Thus, when trying the provided freeze example via
freeze.py hello.py & make
one gets the linker error
/usr/bin/ld: frozen.o: in function `main': frozen/frozen.c:681: undefined 
reference to `Py_FrozenMain' .

In previous Python 3.8.x the bug does not show.

Thanks,
Chris

--
components: C API
messages: 382651
nosy: chba
priority: normal
severity: normal
status: open
title: Method Py_FrozenMain missing in libpython3.9
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



  1   2   >