[issue42203] Unexpected behaviour NameError: name 'open' is not defined

2020-10-30 Thread Vinay Sajip


Vinay Sajip  added the comment:

> Should this be closed and pushed back to fixing logging?

It's not particularly a logging issue, though it can surface in logging because 
that's a mechanism to notify users about stuff. After all, most parts of the 
stdlib would expect open() to always be available. ISTM it's more a case of 
shutdown behaviour and user expectations relating to that. Users should be able 
to avoid any logging by calling logging.shutdown(), which can be done during a 
controlled process shutdown in user code.

--

___
Python tracker 

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



[issue40956] Use Argument Clinic in sqlite3

2020-10-30 Thread Dong-hee Na


Dong-hee Na  added the comment:

@erlendaasland

Thank you erlendaasland for working on GH-22484.
This time was a good time to review my AC knowledge ;)

--

___
Python tracker 

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



[issue40956] Use Argument Clinic in sqlite3

2020-10-30 Thread Dong-hee Na


Dong-hee Na  added the comment:


New changeset 7d210271579ae31f43b32f73c2aff5bc4fe0d27f by Erlend Egeberg 
Aasland in branch 'master':
bpo-40956: Convert _sqlite3 module level functions to Argument Clinic (GH-22484)
https://github.com/python/cpython/commit/7d210271579ae31f43b32f73c2aff5bc4fe0d27f


--

___
Python tracker 

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



[issue42198] Clean up docs for Union and GenericAlias

2020-10-30 Thread miss-islington


miss-islington  added the comment:


New changeset bcbf758476c1148993ddf4b54d3f6169b973ee1c by kj in branch 'master':
bpo-42198: Document __new__ for types.GenericAlias (GH-23039)
https://github.com/python/cpython/commit/bcbf758476c1148993ddf4b54d3f6169b973ee1c


--

___
Python tracker 

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



[issue42195] Inconsistent __args__ between typing.Callable and collections.abc.Callable

2020-10-30 Thread Dong-hee Na


Dong-hee Na  added the comment:

@gvanrossum

Sorry, Not this time. I just add myself to observe how to solve this issue.

Maybe Batuhan is the proper member to handle this issue.

Just question to this issue.
Since GenericAlias does not have a Py_TPFLAGS_BASETYPE flag, IMHO we have to 
add Py_TPFLAGS_BASETYPE to type declaration and this behavior does not occur 
any regression?

--

___
Python tracker 

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



[issue42186] unittest overrides more serious warnings filter added before unittest.main()

2020-10-30 Thread Nick Coghlan


Nick Coghlan  added the comment:

Closing the old one as partially fixed, and linking here as a superseder makes 
sense to me, so I went ahead and did that.

--

___
Python tracker 

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



[issue15626] unittest.main negates -bb option and programmatic warning configuration

2020-10-30 Thread Nick Coghlan


Nick Coghlan  added the comment:

Issue #42186 now covers the request to have a way to tell unittest to leave the 
warnings filter alone even if it's set programmatically rather than by 
modifying ``sys.warnoptions``.

(Changing version to 3.7 to indicate when the interaction with `-bb` was fixed, 
rather than the version it was reported against)

--
resolution:  -> fixed
stage:  -> resolved
status: open -> closed
versions: +Python 3.7 -Python 3.6

___
Python tracker 

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



[issue15626] unittest.main negates -bb option and programmatic warning configuration

2020-10-30 Thread Nick Coghlan


Change by Nick Coghlan :


--
superseder:  -> unittest overrides more serious warnings filter added before 
unittest.main()

___
Python tracker 

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



[issue42100] Add _PyType_GetModuleByDef

2020-10-30 Thread hai shi


Change by hai shi :


--
nosy: +shihai1991

___
Python tracker 

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



[issue42201] Priority queue realization issue

2020-10-30 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

The previous example, PrioritizedItem, shows how to address the issue.

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



[issue42216] Optimize dict.popitem() & insert use case.

2020-10-30 Thread Inada Naoki


Inada Naoki  added the comment:

> But `dict.popitem()` returns the last item in the insertion order. The item 
> must be the last item of collision chain too.

This assumption was wrong. Inserting new item may overwrite dummy entry. In 
this case, the last item in the middle of collision chain.

--
resolution:  -> rejected
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



[issue42160] unnecessary overhead in tempfile

2020-10-30 Thread Inada Naoki


Inada Naoki  added the comment:

@Deric-W Please create another PR to change from `choise` to `choises` if you 
want to optimize it.

--

___
Python tracker 

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



[issue42160] unnecessary overhead in tempfile

2020-10-30 Thread Inada Naoki


Inada Naoki  added the comment:


New changeset 43ca084c88d1e46a44199f347c72e26db84903c9 by Inada Naoki in branch 
'master':
Revert "bpo-42160: tempfile: Reduce overhead of pid check. (GH-22997)"
https://github.com/python/cpython/commit/43ca084c88d1e46a44199f347c72e26db84903c9


--

___
Python tracker 

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



[issue41835] Speed up dict vectorcall creation using keywords

2020-10-30 Thread Inada Naoki


Inada Naoki  added the comment:

unpack_sequence is very sensitive benchmark. Speed is dramatically changed by 
code alignment. PGO+LTO will reduce the noise, but we see noise always.

I believe there is no significant performance change in macro benchmarks when 
optimizing this part.

Not significant in macro benchmarks doesn't mean we must reject the 
optimization, because pyperformance doesn't cover whole application in the 
world.
But it means that we must be conservative about the optimization.

--

___
Python tracker 

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



[issue42160] unnecessary overhead in tempfile

2020-10-30 Thread Inada Naoki


Change by Inada Naoki :


--
pull_requests: +21974
stage: resolved -> patch review
pull_request: https://github.com/python/cpython/pull/23055

___
Python tracker 

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



[issue42160] unnecessary overhead in tempfile

2020-10-30 Thread Inada Naoki


Inada Naoki  added the comment:

Oh, _RandomNameSequence is not true singleton. Instance is used in tests 
actually.
Using `os.register_at_fork` was but idea. Let's reject it.

--

___
Python tracker 

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



[issue42195] Inconsistent __args__ between typing.Callable and collections.abc.Callable

2020-10-30 Thread Guido van Rossum


Guido van Rossum  added the comment:

@corona10 Do I hear that you'd like to work on this?

--

___
Python tracker 

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



[issue42160] unnecessary overhead in tempfile

2020-10-30 Thread STINNER Victor


STINNER Victor  added the comment:

The commit 8e409cebad42032bb7d0f2cadd8b1e36081d98af introduced a reference leak:
https://buildbot.python.org/all/#/builders/320/builds/71

$ make && ./python -m test test_tempfile -R 3:3
...
test_tempfile leaked [49, 49, 49] references, sum=147
test_tempfile leaked [28, 28, 28] memory blocks, sum=84
...

Single test reproducing the leak:

$ ./python -m test test_tempfile -R 3:3 -m 
test.test_tempfile.TestGetDefaultTempdir.test_no_files_left_behind
...
test_tempfile leaked [21, 21, 21] references, sum=63
test_tempfile leaked [12, 12, 12] memory blocks, sum=36
...

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



[issue42190] global declarations affect too much inside exec or compile

2020-10-30 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

> Maybe someone can bisect and find when this started happening?

As far as I understand, this has been the case since Python 2 at least:

$cat code.py
gdict = {}
ldict = {}
exec('''
x = 1
def f(): global x''', gdict, ldict)
print(('x' in gdict, 'x' in ldict))


gdict = {}
ldict = {}
exec('''
x = 1
def f(): pass''', gdict, ldict)
print(('x' in gdict, 'x' in ldict))


$ python2 code.py
(True, False)
(False, True)

$ python3.9 code.py
(True, False)
(False, True)

--

___
Python tracker 

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



[issue42190] global declarations affect too much inside exec or compile

2020-10-30 Thread Guido van Rossum


Guido van Rossum  added the comment:

Looks like a bug. Maybe someone can bisect and find when this started happening?

--

___
Python tracker 

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



[issue42216] Optimize dict.popitem() & insert use case.

2020-10-30 Thread Inada Naoki


Change by Inada Naoki :


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

___
Python tracker 

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



[issue42211] CRASH

2020-10-30 Thread STINNER Victor


STINNER Victor  added the comment:

This is a strange copy of my bpo-42208 issue...

--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Using logging or warnings during Python finalization does crash 
Python

___
Python tracker 

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



[issue26528] NameError for built in function open when re-raising stored exception from yielded function

2020-10-30 Thread STINNER Victor


STINNER Victor  added the comment:

Davide Rizzo:
> I've just stumbled on the same thing happening on some code that attempts to 
> use logging on __del__.
> (...)
> File ".../logging/__init__.py", line 1121, in _open
> NameError: name 'open' is not defined

This is bpo-26789 which is unrelated to this issue.

--

___
Python tracker 

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



[issue42214] Parser/pegen.c:68: _PyPegen_check_barry_as_flufl: Assertion `t->type == NOTEQUAL' failed

2020-10-30 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



[issue42214] Parser/pegen.c:68: _PyPegen_check_barry_as_flufl: Assertion `t->type == NOTEQUAL' failed

2020-10-30 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset ddcd57e3ea75ab0ad370bbaaa6b76338edbca395 by Pablo Galindo in 
branch '3.9':
[3.9] bpo-42214: Fix check for NOTEQUAL token in the PEG parser for the 
barry_as_flufl rule (GH-23048) (GH-23051)
https://github.com/python/cpython/commit/ddcd57e3ea75ab0ad370bbaaa6b76338edbca395


--

___
Python tracker 

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



[issue26789] logging: Trying to log during Python finalization with NameError: name 'open' is not defined

2020-10-30 Thread STINNER Victor


STINNER Victor  added the comment:

Attached PR 23053 fix the root issue of the infamous "NameError: name 'open' is 
not defined" error in the logging module.

--

___
Python tracker 

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



[issue42190] global declarations affect too much inside exec or compile

2020-10-30 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

exec with different global and local dicts is most like executing code in a 
class definition, where locals is different from globals.  But mimicking your 
exec with an actual class statement does not produce the same result.

>>> gdict = {}
>>> class C:
x = 1
def f(): global x

>>> gdict
{}
>>> C.x
1

# To continue, I reproduced the behavior in 3.10.
>>> ldict = {}
>>> exec('''
x = 1
def f(): global x''', gdict, ldict)
>>> 'x' in gdict
True

# And that putting x in gdict required the global declaration.
>>> gdict = {}
>>> exec('''
x = 1
def f(): pass''', gdict, ldict)

>>> 'x' in gdict
False
>>> 'x' in ldict
True

This seems like a bug to me too.  The change is in the bytecode, not the 
subsequent execution thereof.

>>> dis.dis('x = 1')
  1   0 LOAD_CONST   0 (1)
  2 STORE_NAME   0 (x)
  ...

# Ditto if add '\ndef f(): pass', but here is the test case.
>>> dis.dis('x = 1\ndef f(): global x')
  1   0 LOAD_CONST   0 (1)
  2 STORE_GLOBAL 0 (x)
  ...

# Same result for 'global x; x = 1', but 'x = 1; global x' raises
SyntaxError: name 'x' is assigned to before global declaration


The change is inconsequential when locals is globals, but not when not.

--
nosy: +gvanrossum, lys.nikolaou, pablogsal, terry.reedy
stage:  -> needs patch
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



[issue42216] Optimize dict.popitem() & insert use case.

2020-10-30 Thread Inada Naoki


New submission from Inada Naoki :

PyDict_DelItem stores DUMMY entry in the hash table. Without DUMMY, collision 
chain will be broken so proving will be not working.

But `dict.popitem()` returns the last item in the insertion order. The item 
must be the last item of collision chain too.
So `dict.popitem()` can use EMPTY entry instead of DUMMY, and reduce dict 
resizing.

--
components: Interpreter Core
messages: 380022
nosy: methane
priority: normal
severity: normal
status: open
title: Optimize dict.popitem() & insert use case.
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



[issue26789] logging: Trying to log during Python finalization with NameError: name 'open' is not defined

2020-10-30 Thread STINNER Victor


STINNER Victor  added the comment:

Note: Attached error.py no longer works with a recent aiohttp version.

--

___
Python tracker 

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



[issue42208] Using logging or warnings during Python finalization does crash Python

2020-10-30 Thread STINNER Victor


STINNER Victor  added the comment:

I fixed all issues which prevented to fix bpo-26789, I close thie issue.

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



[issue42208] Using logging or warnings during Python finalization does crash Python

2020-10-30 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset b62bdf71ea0cd52041d49691d8ae3dc645bd48e1 by Victor Stinner in 
branch 'master':
bpo-42208: Add _locale._get_locale_encoding() (GH-23052)
https://github.com/python/cpython/commit/b62bdf71ea0cd52041d49691d8ae3dc645bd48e1


--

___
Python tracker 

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



[issue26789] logging: Trying to log during Python finalization with NameError: name 'open' is not defined

2020-10-30 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue42209] Incorrect line reported in syntax error

2020-10-30 Thread Eric V. Smith


Change by Eric V. Smith :


--
resolution:  -> out of date
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



[issue42215] urlparse with a Windows path returns the drive name as the scheme

2020-10-30 Thread Rangel Reale


New submission from Rangel Reale :

Passing a Windows path to urllib.parse.urlparse, without file://, makes it 
detect the drive as the scheme even it having '\' after the ':', which makes it 
completelly wrong for a url.

Probably this function shouldn't be used with non-uri paths, but it shouldn't 
return a result that is so wrong as this. I think at least it should return the 
same input string if the url doesn't start with ://.


Python 3.8.3 (tags/v3.8.3:6f8c832, May 13 2020, 22:37:02) [MSC v.1924 64 bit 
(AMD64)] on win32
from urllib.parse import urlparse
urlparse('M:\\prog\\tests\\python\\json-ref-dict\\tests/schemas/master.yaml')
Out[3]: ParseResult(scheme='m', netloc='', 
path='\\prog\\tests\\python\\json-ref-dict\\tests/schemas/master.yaml', 
params='', query='', fragment='')
str(urlparse('M:\\prog\\tests\\python\\json-ref-dict\\tests/schemas/master.yaml'))
Out[4]: "ParseResult(scheme='m', netloc='', 
path='progtestspythonjson-ref-dicttests/schemas/master.yaml',
 params='', query='', fragment='')"
urlparse('M:\prog\tests\python\json-ref-dict\\tests/schemas/master.yaml')
Out[5]: ParseResult(scheme='m', netloc='', 
path='\\prog\tests\\python\\json-ref-dict\\tests/schemas/master.yaml', 
params='', query='', fragment='')

--
components: Windows
messages: 380018
nosy: paul.moore, rangelspam, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: urlparse with a Windows path returns the drive name as the scheme
type: behavior
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



[issue42208] Using logging or warnings during Python finalization does crash Python

2020-10-30 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +21971
pull_request: https://github.com/python/cpython/pull/23052

___
Python tracker 

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



[issue41803] Robots.txt

2020-10-30 Thread Irit Katriel


Change by Irit Katriel :


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

___
Python tracker 

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



[issue14845] list() != []

2020-10-30 Thread Irit Katriel


Change by Irit Katriel :


--
resolution:  -> out of date
stage: needs patch -> resolved
status: pending -> closed

___
Python tracker 

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



[issue42208] Using logging or warnings during Python finalization does crash Python

2020-10-30 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 710e82630775774dceba5e8f24b1b10e6dfaf9b7 by Victor Stinner in 
branch 'master':
bpo-42208: Add _Py_GetLocaleEncoding() (GH-23050)
https://github.com/python/cpython/commit/710e82630775774dceba5e8f24b1b10e6dfaf9b7


--

___
Python tracker 

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



[issue42186] unittest overrides more serious warnings filter added before unittest.main()

2020-10-30 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Nick and/or Victor: should this be closed in favor of #15626? or should the 
latter be closed as mostly fixed, with this being left open as a followup?

--
nosy: +terry.reedy, vstinner
versions:  -Python 3.6, Python 3.7

___
Python tracker 

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



[issue42214] Parser/pegen.c:68: _PyPegen_check_barry_as_flufl: Assertion `t->type == NOTEQUAL' failed

2020-10-30 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
pull_requests: +21970
pull_request: https://github.com/python/cpython/pull/23051

___
Python tracker 

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



[issue42208] Using logging or warnings during Python finalization does crash Python

2020-10-30 Thread STINNER Victor


STINNER Victor  added the comment:

> This change renames collect() to gc_collect_main(). It broke test_gdb on 
> buildbots, whereas test_gdb passed on Travis CI on my PR 23038. Also, 
> test_gdb is skipped on the Ubuntu job of GitHub Action since gdb is not 
> installed. I created https://github.com/python/core-workflow/issues/383 to 
> add gdb to Ubuntu dependencies. My PR 23043 adds gdb dependency.

Fixed by:

commit 6e03c0ad156797cd6e9132e895d55dac0344d340 (upstream/master, master)
Author: Victor Stinner 
Date:   Fri Oct 30 22:52:30 2020 +0100

GitHub Action: Add gdb to posix dependencies (GH-23043)

Sort also dependencies and remove duplicates (liblzma-dev).

--

___
Python tracker 

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



[issue5996] abstract class instantiable when subclassing built-in types

2020-10-30 Thread Irit Katriel


Change by Irit Katriel :


--
versions: +Python 3.10, Python 3.9 -Python 2.7, Python 3.1, Python 3.2, Python 
3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7

___
Python tracker 

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



[issue42214] Parser/pegen.c:68: _PyPegen_check_barry_as_flufl: Assertion `t->type == NOTEQUAL' failed

2020-10-30 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 06f8c3328dcd81c84d1ee2b3a57b5381dcb38482 by Pablo Galindo in 
branch 'master':
bpo-42214: Fix check for NOTEQUAL token in the PEG parser for the 
barry_as_flufl rule (GH-23048)
https://github.com/python/cpython/commit/06f8c3328dcd81c84d1ee2b3a57b5381dcb38482


--

___
Python tracker 

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



[issue21078] multiprocessing.managers.BaseManager.__init__'s "serializer" argument is not documented

2020-10-30 Thread Irit Katriel


Change by Irit Katriel :


--
components: +Library (Lib)
type:  -> behavior
versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.7, Python 3.1, Python 
3.2, Python 3.3, Python 3.4, Python 3.5

___
Python tracker 

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



[issue42177] Improving KeyError exception

2020-10-30 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Printing an exception is defined as printing the exception message, which 
currently is e.args[0].  We will not change that as it would break code 
worldwide.  To print more, the class name can be used directly or as a key into 
a dict of replacements or replacement functions.

Questions and vague ideas should be directed to python-list.  Fleshed out ideas 
can go to python-ideas.

>>> {}['d']
Traceback (most recent call last):
  File "", line 1, in 
{}['d']
KeyError: 'd'

>>> try:
{}['d']
except Exception as e:
print(e)

'd'

>>> try:
{}['d']
except Exception as e:
print(e.args)

('d',)

>>> try:
{}['d']
except Exception as e:
print(f'{e.__class__.__name__}: {e}')  # Reproduce standard report.

KeyError: 'd'

--
nosy: +terry.reedy
resolution:  -> rejected
stage:  -> resolved
status: open -> closed
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



[issue1509060] Interrupt/kill threads w/exception

2020-10-30 Thread Irit Katriel


Change by Irit Katriel :


--
stage: test needed -> needs patch
versions: +Python 3.10, Python 3.9 -Python 3.2

___
Python tracker 

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



[issue10936] Simple CSS fix for left margin at docs.python.org

2020-10-30 Thread Irit Katriel


Change by Irit Katriel :


--
versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.7, Python 3.2, Python 
3.3, Python 3.4

___
Python tracker 

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



[issue42192] Python Windows .exe Installer ignores /TargetDir if there is an existing installation

2020-10-30 Thread Steve Dower


Steve Dower  added the comment:

So for a manually managed install, your best bet is to just copy the install 
directory somewhere else (and then maybe remove the original? Up to you). That 
will break the MSI tracking that lets us do reliable upgrades and repairs, but 
shouldn't break Python itself.

If you're planning to include it in another application, you may want to look 
at the embeddable distro, which is reduced in size/scope for this purpose (it 
generally also requires a regular install for build/pip installs).

Basic levels of fiddling can also be avoided by using virtual environments. 
Nothing much we can do will protect against really dedicated (or malicious) 
fiddling, but using the MSI installs we have means that a repair should quickly 
fix it up.

--

___
Python tracker 

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



[issue42184] pdb exits unexpectedly when calling args

2020-10-30 Thread Irit Katriel


Irit Katriel  added the comment:

This is true in 3.10 as well. The same happens if __repr__ raises an exception. 
do_args command doesn't handle exceptions from repr.

See also issue37022.

--
components: +Library (Lib)
nosy: +iritkatriel
versions: +Python 3.10, Python 3.8, Python 3.9 -Python 3.6

___
Python tracker 

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



[issue42162] The license page for Python 3.0.1 is messed up

2020-10-30 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

The docs pages interpret x.y as x.y.latest.  So the 3.0 doc is for the 3.0.1 
release, the last for 3.0.
https://docs.python.org/release/3.0.1/license.html
https://docs.python.org/release/3.0/license.html is fine.

What's messed up is the license history table at the top due to a merge 
conflict artifact that should have been deleted.  I am not sure whether there 
are also '\n's missing.  The actual 3.0(.0 now) page, 

All 3.x branches no longer getting security fixes have been 'locked' (I am not 
sure of the term.)  This just happened with 3.5, so 3.6.  Ditto for 2.x before 
2.7.  (2.7 is not locked either because Benjamin has just done it yet or 
because he want to let people extract it.

Fixing this would require one of the python/cpython owners to temporarily 
unlock the branch.  I am closing this because I doubt any would think this 
important enough, but anyone is welcome to post on pydev list asking.

The real problem, which we would like to fix but cannot, is web searches 
returning obsolete links.

--
nosy: +terry.reedy
resolution:  -> out of date
stage:  -> resolved
status: open -> closed
title: The license page for Python 3.0 is messed up -> The license page for 
Python 3.0.1 is messed up

___
Python tracker 

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



[issue42208] Using logging or warnings during Python finalization does crash Python

2020-10-30 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +21969
pull_request: https://github.com/python/cpython/pull/23050

___
Python tracker 

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



[issue42196] Python Windows Installation Error 0x800705aa

2020-10-30 Thread Steve Dower


Steve Dower  added the comment:

That python.exe stub being there may be the reason it doesn't appear to do 
anything. If you aren't fully up to date on preview builds (which is likely), 
then running it with any arguments will silently exit.

If you run it just as "python.exe" then it will pop open the Microsoft Store to 
the Python installation there. However, if you're hitting "insufficient 
resource" errors already then this may also fail.

First I'd make sure you've installed all updates and rebooted your machine. If 
there's a problem at that point, it's likely to be the cause of other issues.

If it all seems fine, installing from the Microsoft Store might be an option 
that works for you. (Installing that will also replace the stubs you found, or 
you can just disable them through the UI you posted. Rest assured, they aren't 
impacting the installer downloaded from python.org.)

--

___
Python tracker 

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



[issue42173] Drop Solaris support

2020-10-30 Thread STINNER Victor


STINNER Victor  added the comment:

Jakub: Would you mind to build the master branch of Python, run the test suite 
and post the tests results? In short:

git clone https://github.com/python/cpython.git
cd cpython
./configure
./python -m test -j0 -r

If possible, try to install dependencies (readline, lzma, etc.).

If there are failures, please copy them into a file, and attach the file to 
this issue.

It is to have an idea if it would be worth it to add a Python buildbot running 
on Solaris. If there are too many failures, it would be better to fix first 
most failures before considering to add a buildbot.

--

___
Python tracker 

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



[issue42210] float.hex discards sign from -nan

2020-10-30 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Having fromhex() support signed NaNs was reasonable because it is a valid 
possible input; however, the case isn't as clear-cut for output. Since 
applications are allowed to ignore the sign bit, no application should rely on 
seeing a particular sign for a NaN.  

Also, existing applications may already have NaNs where the sign bit is set.  
If we change the output, we could break their published examples and doctests.  
So, this proposal may cause more harm than good.

--
nosy: +mark.dickinson, rhettinger

___
Python tracker 

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



[issue42210] float.hex discards sign from -nan

2020-10-30 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
nosy: +tim.peters

___
Python tracker 

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



[issue42173] Drop Solaris support

2020-10-30 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Dear Solaris Python fans (about 20 so far here): Here is the situation.  There 
are 1000s of open issues on this tracker and at least 100s of open cpython PRs, 
and only 20-30 core developers, mostly volunteers, actively (depending on 
definition) merging PRs and maybe another 10 triagers helping to manage issues.

You all can help on issues by checking whether reported bugs still exist with 
current Python (3.8+) on current 'Solaris' (which includes what?).  Searching 
open issues for 'Solaris' in 'All text' just returned 114 hits.  About half 
were last touched over two years ago, and sometimes the last touch was 
inconsequential (a version or nosy change).  I suspect many of the 114 are 
obsolete.  For example, the last comment, five years ago, on #1471934, says the 
problem was fixed in Solaris 11.2.  Does this mean the issue should be closed?

The bottleneck for merging PRs is reviewing PRs.  We coredevs cannot do enough 
reviews ourselves.  But any competent user can  help.  Reviewing has two 
components.  First, does the patch fix the problem?  Testing this requires a 
Github account and a local clone and ability to build a test binary.  See 
devguide.python.org for more.  Second, does the patch meet our standards of 
code quality.  Solaris-specific patches likely change the C part of cpython, so 
C competence and understanding of PEP 7 is needed here.

--
nosy: +terry.reedy

___
Python tracker 

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



[issue42208] Using logging or warnings during Python finalization does crash Python

2020-10-30 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 09c6120be8c70366495b027ae3daa213609de3ed by Miss Skeleton (bot) 
in branch '3.9':
 bpo-42208: GitHub Action: Add gdb to posix dependencies (GH-23043) (GH-23047)
https://github.com/python/cpython/commit/09c6120be8c70366495b027ae3daa213609de3ed


--

___
Python tracker 

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



[issue42208] Using logging or warnings during Python finalization does crash Python

2020-10-30 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



[issue42208] Using logging or warnings during Python finalization does crash Python

2020-10-30 Thread miss-islington


Change by miss-islington :


--
pull_requests: +21968
pull_request: https://github.com/python/cpython/pull/23049

___
Python tracker 

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



[issue42214] Parser/pegen.c:68: _PyPegen_check_barry_as_flufl: Assertion `t->type == NOTEQUAL' failed

2020-10-30 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


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

___
Python tracker 

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



[issue42214] Parser/pegen.c:68: _PyPegen_check_barry_as_flufl: Assertion `t->type == NOTEQUAL' failed

2020-10-30 Thread STINNER Victor


STINNER Victor  added the comment:

In release mode, there is no assertion error:

$ python3.10 pgen_bug.py 
  File "/home/vstinner/python/master/pgen_bug.py", line 6
try
   ^
SyntaxError: invalid syntax

--

___
Python tracker 

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



[issue42214] Parser/pegen.c:68: _PyPegen_check_barry_as_flufl: Assertion `t->type == NOTEQUAL' failed

2020-10-30 Thread STINNER Victor


Change by STINNER Victor :


--
nosy: +BTaskaya

___
Python tracker 

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



[issue42214] Parser/pegen.c:68: _PyPegen_check_barry_as_flufl: Assertion `t->type == NOTEQUAL' failed

2020-10-30 Thread STINNER Victor


New submission from STINNER Victor :

When Python is built in debug mode, it fails with an assertion error on the 
following code:
---
def func1():
if a != b:
raise ValueError

def func2():
try
return 1
finally:
pass
---

Try attached pgen_bug.py:

$ ./python pgen_bug.py 
python: Parser/pegen.c:68: _PyPegen_check_barry_as_flufl: Assertion `t->type == 
NOTEQUAL' failed.
Abandon (core dumped)

--
components: Interpreter Core
files: pgen_bug.py
messages: 380002
nosy: gvanrossum, lys.nikolaou, pablogsal, vstinner
priority: normal
severity: normal
status: open
title: Parser/pegen.c:68: _PyPegen_check_barry_as_flufl: Assertion `t->type == 
NOTEQUAL' failed
versions: Python 3.10
Added file: https://bugs.python.org/file49555/pgen_bug.py

___
Python tracker 

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



[issue42214] Parser/pegen.c:68: _PyPegen_check_barry_as_flufl: Assertion `t->type == NOTEQUAL' failed

2020-10-30 Thread STINNER Victor


STINNER Victor  added the comment:

Barry: what did you do?

--
nosy: +barry

___
Python tracker 

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



[issue42208] Using logging or warnings during Python finalization does crash Python

2020-10-30 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset eba5bf2f5672bf4861c626937597b85ac0c242b9 by Victor Stinner in 
branch 'master':
bpo-42208: Call GC collect earlier in PyInterpreterState_Clear() (GH-23044)
https://github.com/python/cpython/commit/eba5bf2f5672bf4861c626937597b85ac0c242b9


--

___
Python tracker 

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



[issue41835] Speed up dict vectorcall creation using keywords

2020-10-30 Thread Marco Sulla


Marco Sulla  added the comment:

Well, following your example, since split dicts seems to be no more supported, 
I decided to be more drastic. If you see the last push in PR 22346, I do not 
check anymore but always resize, so the dict is always combined. This seems to 
be especially good for the "unpack_sequence" bench, even if I do not know what 
it is:

| chaos   | 132 ms   | 136 ms | 1.03x slower | 
Significant (t=-18.09) |
| crypto_pyaes| 136 ms   | 141 ms | 1.03x slower | 
Significant (t=-11.60) |
| float   | 133 ms   | 137 ms | 1.03x slower | 
Significant (t=-16.94) |
| go  | 276 ms   | 282 ms | 1.02x slower | 
Significant (t=-11.58) |
| logging_format  | 12.3 us  | 12.6 us| 1.02x slower | 
Significant (t=-9.75)  |
| logging_silent  | 194 ns   | 203 ns | 1.05x slower | 
Significant (t=-9.00)  |
| logging_simple  | 11.3 us  | 11.6 us| 1.02x slower | 
Significant (t=-12.56) |
| mako| 16.5 ms  | 17.4 ms| 1.05x slower | 
Significant (t=-17.34) |
| meteor_contest  | 116 ms   | 120 ms | 1.04x slower | 
Significant (t=-25.59) |
| nbody   | 158 ms   | 166 ms | 1.05x slower | 
Significant (t=-12.73) |
| nqueens | 107 ms   | 111 ms | 1.03x slower | 
Significant (t=-11.39) |
| pickle_pure_python  | 631 us   | 619 us | 1.02x faster | 
Significant (t=6.28)   |
| regex_compile   | 206 ms   | 214 ms | 1.04x slower | 
Significant (t=-24.24) |
| regex_v8| 28.4 ms  | 26.7 ms| 1.06x faster | 
Significant (t=10.92)  |
| richards| 87.8 ms  | 90.3 ms| 1.03x slower | 
Significant (t=-10.91) |
| scimark_lu  | 165 ms   | 162 ms | 1.02x faster | 
Significant (t=4.55)   |
| scimark_sor | 210 ms   | 215 ms | 1.02x slower | 
Significant (t=-10.14) |
| scimark_sparse_mat_mult | 6.45 ms  | 6.64 ms| 1.03x slower | 
Significant (t=-6.66)  |
| spectral_norm   | 158 ms   | 171 ms | 1.08x slower | 
Significant (t=-29.11) |
| sympy_expand| 599 ms   | 619 ms | 1.03x slower | 
Significant (t=-21.93) |
| sympy_str   | 376 ms   | 389 ms | 1.04x slower | 
Significant (t=-23.80) |
| sympy_sum   | 233 ms   | 239 ms | 1.02x slower | 
Significant (t=-14.70) |
| telco   | 7.40 ms  | 7.61 ms| 1.03x slower | 
Significant (t=-10.08) |
| unpack_sequence | 70.0 ns  | 56.1 ns| 1.25x faster | 
Significant (t=10.62)  |
| xml_etree_generate  | 108 ms   | 106 ms | 1.02x faster | 
Significant (t=5.52)   |
| xml_etree_iterparse | 133 ms   | 130 ms | 1.02x faster | 
Significant (t=11.33)  |
| xml_etree_parse | 208 ms   | 204 ms | 1.02x faster | 
Significant (t=9.19)   |

--

___
Python tracker 

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



[issue42213] Get rid of cyclic GC hack in sqlite3.Connection and sqlite3.Cache

2020-10-30 Thread Erlend Egeberg Aasland


Change by Erlend Egeberg Aasland :


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

___
Python tracker 

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



[issue36876] [subinterpreters] Global C variables are a problem

2020-10-30 Thread Eric Snow


Eric Snow  added the comment:


New changeset 4fe72090deb7fb7bc09bfa56c92f6b3b0967d395 by Eric Snow in branch 
'master':
bpo-36876: Small adjustments to the C-analyzer tool. (GH-23045)
https://github.com/python/cpython/commit/4fe72090deb7fb7bc09bfa56c92f6b3b0967d395


--

___
Python tracker 

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



[issue42213] Get rid of cyclic GC hack in sqlite3.Connection and sqlite3.Cache

2020-10-30 Thread Erlend Egeberg Aasland


New submission from Erlend Egeberg Aasland :

Get rid of the `pysqlite_Cache->decref_factory` hack by implementing proper 
support for cyclic garbage collection.

--
components: Library (Lib)
messages: 379998
nosy: berker.peksag, erlendaasland
priority: normal
severity: normal
status: open
title: Get rid of cyclic GC hack in sqlite3.Connection and sqlite3.Cache
type: resource usage
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



[issue36876] [subinterpreters] Global C variables are a problem

2020-10-30 Thread Eric Snow


Change by Eric Snow :


--
pull_requests: +21964
pull_request: https://github.com/python/cpython/pull/23045

___
Python tracker 

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



[issue42208] Using logging or warnings during Python finalization does crash Python

2020-10-30 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +21963
pull_request: https://github.com/python/cpython/pull/23044

___
Python tracker 

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



[issue42208] Using logging or warnings during Python finalization does crash Python

2020-10-30 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +21962
pull_request: https://github.com/python/cpython/pull/23043

___
Python tracker 

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



[issue42208] Using logging or warnings during Python finalization does crash Python

2020-10-30 Thread STINNER Victor


STINNER Victor  added the comment:

> bpo-42208: Pass tstate to _PyGC_CollectNoFail() (GH-23038)
> https://github.com/python/cpython/commit/8b3414818f5289eac530bf38bcfbd7b2b851805c

This change renames collect() to gc_collect_main(). It broke test_gdb on 
buildbots, whereas test_gdb passed on Travis CI on my PR 23038. Also, test_gdb 
is skipped on the Ubuntu job of GitHub Action since gdb is not installed. I 
created https://github.com/python/core-workflow/issues/383 to add gdb to Ubuntu 
dependencies. My PR 23043 adds gdb dependency.

--

___
Python tracker 

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



[issue42208] Using logging or warnings during Python finalization does crash Python

2020-10-30 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset b9ee4af4c643a323779fd7076e80b29d611f2709 by Victor Stinner in 
branch 'master':
bpo-42208: Fix test_gdb for gc_collect_main() name (GH-23041)
https://github.com/python/cpython/commit/b9ee4af4c643a323779fd7076e80b29d611f2709


--

___
Python tracker 

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



[issue42160] unnecessary overhead in tempfile

2020-10-30 Thread Eric Wolf


Eric Wolf  added the comment:

Thanks

--

___
Python tracker 

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



[issue42173] Drop Solaris support

2020-10-30 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Discussions are happening in this thread, including the requirements for 
supported platforms going forward:

https://mail.python.org/archives/list/python-...@python.org/thread/VDD7NMEDFXMOP4S74GEYJUHJRJPK2UR3/

--

___
Python tracker 

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



[issue42173] Drop Solaris support

2020-10-30 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

I think the PR needs to be withdrawn.  Users have spoken.  There is zero need 
to cut them off.

--
nosy: +rhettinger

___
Python tracker 

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



[issue42173] Drop Solaris support

2020-10-30 Thread Jakub Kulik


Jakub Kulik  added the comment:

Hi, here I am passing on several notes from the Oracle Solaris team:

- Oracle continues to develop and advance Oracle Solaris technology, and have 
committed to doing so for years to come. We release a new update (so called 
SRU) every month 
(https://blogs.oracle.com/solaris/oracle-solaris%3a-update-to-the-continuous-delivery-model).
- Python is essential for Oracle Solaris and actively worked on. In fact, we 
recently finished migration to Python 3.7 and integrated Python 3.9, which will 
be released to customers soon.
- Internally, we are performing daily testing for each Python version from 3.7+ 
and reporting any issues that are found* (fortunately, there are not many of 
them because Python works very well!).
- Python 3 is running for more than a year now on any machine running Oracle 
Solaris 11.4.
- Looking at six download statistics is very misleading because we are 
packaging Python and its modules in Solaris packages. This package is essential 
(meaning that every Oracle Solaris machine will have it installed). Also, we 
are caching archives internally, so unless customers download a newer version 
into a virtual environment, you won't see more than a few downloads from Oracle 
Solaris (which are then distributed onto thousands of machines running Oracle 
Solaris).
- We are looking at how to provide build bots running on Oracle Solaris.
- We are trying to be part of the Python community and also put back Solaris 
specific fixes (we provide patches for many of those issues reported).
- It is certainly much better (hopefully for everyone) to resolve any specific 
Solaris issues and help with the maintenance within the Python community than 
do this just internally as part of Oracle Solaris development.

*) everything reported by me are Solaris related issues

Jakub

--
nosy: +kulikjak -sugondesenuts007

___
Python tracker 

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



[issue42173] Drop Solaris support

2020-10-30 Thread cyrus torros


cyrus torros  added the comment:

Why?? I use python on solaris in my every day toolchain and at work. 

There is no harm in keeping it supported, it's not hard. 

Please do not drop support.

--
nosy: +sugondesenuts007

___
Python tracker 

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



[issue42209] Incorrect line reported in syntax error

2020-10-30 Thread gKuhn


gKuhn  added the comment:

Ah, that makes sense, thank you for the info.

The line number is probably the most important piece of information here 
anyway. 

It sounds like the syntax error string is already planned and as such this is 
probably a duplicate. 

Please close if this is the case. 

Cheers

--

___
Python tracker 

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



[issue42212] Check if generated files are up-to-date in Github Actions

2020-10-30 Thread Filipe Laíns

Change by Filipe Laíns :


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

___
Python tracker 

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



[issue42212] Check if generated files are up-to-date in Github Actions

2020-10-30 Thread Filipe Laíns

New submission from Filipe Laíns :

https://github.com/python/core-workflow/issues/380

--

___
Python tracker 

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



[issue42212] Check if generated files are up-to-date in Github Actions

2020-10-30 Thread Filipe Laíns

Change by Filipe Laíns :


--
nosy: FFY00, vstinner
priority: normal
severity: normal
status: open
title: Check if generated files are up-to-date in Github Actions

___
Python tracker 

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



[issue42211] CRASH

2020-10-30 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

Please attach crash.py and logging.patch files

--
nosy: +vstinner, xtreak

___
Python tracker 

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



[issue42208] Using logging or warnings during Python finalization does crash Python

2020-10-30 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset dff1ad509051f7e07e77d1e3ec83314d53fb1118 by Victor Stinner in 
branch 'master':
bpo-42208: Move _PyImport_Cleanup() to pylifecycle.c (GH-23040)
https://github.com/python/cpython/commit/dff1ad509051f7e07e77d1e3ec83314d53fb1118


--

___
Python tracker 

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



[issue26789] logging: Trying to log during Python finalization with NameError: name 'open' is not defined

2020-10-30 Thread STINNER Victor


STINNER Victor  added the comment:

> Issue26789. asyncio creates reference loops which caused to executing code 
> late at shutdown, and that code uses logging which always fail.

Well, I suggest to attempt fixing logging.

The reference cycle in asyncio.Task.set_exception() is *by design*. It's really 
trick to fix it. Since the creation of asyncio, nobody managed to find a 
solution to fix it. Once I propose to create an asyncio task forcing a GC 
collection every minute, but it was never implemented.

If you have a clever idea to fix Task.set_exception() design, please open a 
separated issue.

--

___
Python tracker 

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



[issue39513] NameError: name 'open' is not defined

2020-10-30 Thread STINNER Victor


STINNER Victor  added the comment:

> Issue26789 is about asyncio, but this issue about logging.

I chose to reassign Issue26789 to the logging module.

--

___
Python tracker 

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



[issue42211] CRASH

2020-10-30 Thread Soham Badame


New submission from Soham Badame :

If you apply attached logging.patch, Python crash using attached crash.py:

$ echo|./python -i crash.py
>>>
>>> 
python: Python/_warnings.c:872: setup_context: Assertion `globals != NULL' 
failed.
Abandon (core dumped)


Attached logging.patch is a fix for bpo-26789: logging.FileHandler keeps a 
reference to the builtin open() function.

Attached crash.py does crash because of an unclosed file. It happens after 
PyInterpreterState_Clear(), in finalize_interp_clear():

/* Last explicit GC collection */
_PyGC_CollectNoFail();

setup_context() of Python/_warings.c does crash because tstate->interp->sysdict 
is NULL at this point.

Moreover, _io.TextIOWrapper.__init__() fails to import the locale module (to 
call locale.getpreferredencoding(), since the encoding is None) and picks the 
"ascii" encoding.

Moreover, even if I work around all these issues, _warnings.showwarnings() logs 
"lost sys.stderr" into stderr because, again, tstate->interp->sysdict is NULL 
at this point (and so sys.stderr no longer exists).

It looks like a bug in finalize_interp_clear() which triggers a garbage 
collection, whereas Python is no longer usable.

--

The logging module does automatically close files at exit using:

   atexit.register(shutdown)

But crash.py, a new file is opened by a logging handler after 
logging.shutdown() is called. Maybe another problem is that the logging module 
does not clear logger handlers, or prevent handlers to log more message, after 
shutdown() is called.

--
messages: 379984
nosy: badamesoham8
priority: normal
severity: normal
status: open
title: CRASH
type: crash
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



[issue39513] NameError: name 'open' is not defined

2020-10-30 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Issue26789 is about asyncio, but this issue about logging.

--

___
Python tracker 

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



[issue42208] Using logging or warnings during Python finalization does crash Python

2020-10-30 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +21960
pull_request: https://github.com/python/cpython/pull/23041

___
Python tracker 

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



[issue42042] sphinx3 renders diffrently docs.python.org for 3.10

2020-10-30 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



[issue26789] logging: Trying to log during Python finalization with NameError: name 'open' is not defined

2020-10-30 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

I am not sure that its all the same issue. There may be several different 
issues:

* Issue39513. Logging fails with confusing traceback when called late at 
shutdown. I think that if logging cannot work at this stage it should either do 
nothing or emit a warning.

* Issue26789. asyncio creates reference loops which caused to executing code 
late at shutdown, and that code uses logging which always fail. It would be 
better to avoid creating reference loops, and if it is impossible, break the 
earlier.

* Issue42203. And there may be different issue in asyncio tests. Tests should 
clean up after them and do not leave the code be executed later. It may be the 
same as issue26789, but tests can make additional efforts to clean up.

--

___
Python tracker 

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



[issue42208] Using logging or warnings during Python finalization does crash Python

2020-10-30 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +21959
pull_request: https://github.com/python/cpython/pull/23040

___
Python tracker 

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



[issue42198] Clean up docs for Union and GenericAlias

2020-10-30 Thread Ken Jin


Change by Ken Jin :


--
pull_requests: +21958
pull_request: https://github.com/python/cpython/pull/23039

___
Python tracker 

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



[issue42209] Incorrect line reported in syntax error

2020-10-30 Thread Eric V. Smith


Eric V. Smith  added the comment:

The line number has been fixed in python 3.9:

  File "...\foo.py", line 5
(**kwargs)
 ^
SyntaxError: f-string: invalid syntax

The error message should improve when we move parsing of f-strings into the 
parser. I doubt we'd put in the effort to do anything before then.

--
nosy: +eric.smith

___
Python tracker 

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



[issue42210] float.hex discards sign from -nan

2020-10-30 Thread Sree


New submission from Sree :

float.hex(float.fromhex("-nan")) returns 'nan'.

PyOS_double_to_string seems to check only if it is a NaN, but ignores the sign 
(unlike its handling of inf a few lines below):



Issue 5981 (https://bugs.python.org/issue5981) added the ability for fromhex to 
recognize -nan, but hex should probably have been updated at the same time.

Encountered when testing float implementations.

--
components: Interpreter Core
messages: 379979
nosy: sree314
priority: normal
severity: normal
status: open
title: float.hex discards sign from -nan
type: behavior
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



[issue42208] Using logging or warnings during Python finalization does crash Python

2020-10-30 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 8b3414818f5289eac530bf38bcfbd7b2b851805c by Victor Stinner in 
branch 'master':
bpo-42208: Pass tstate to _PyGC_CollectNoFail() (GH-23038)
https://github.com/python/cpython/commit/8b3414818f5289eac530bf38bcfbd7b2b851805c


--

___
Python tracker 

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



[issue42209] Incorrect line reported in syntax error

2020-10-30 Thread gKuhn


New submission from gKuhn :

Attempting to parse the following python code results in a fairly unhelpful 
syntax error along with an incorrect line number being reported:

#a dodgy f-string

def dodgy(**kwargs):
print(f"{**kwargs}")

The result:

  File "", line 1
(**kwargs)
 ^
SyntaxError: invalid syntax


$ python -VV
Python 3.8.5 (tags/v3.8.5:580fbb0, Jul 20 2020, 15:43:08) [MSC v.1926 32 bit 
(Intel)]

--
messages: 379977
nosy: gkuhn
priority: normal
severity: normal
status: open
title: Incorrect line reported in syntax error
type: behavior
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



[issue42208] Using logging or warnings during Python finalization does crash Python

2020-10-30 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +21957
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/23038

___
Python tracker 

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



[issue42042] sphinx3 renders diffrently docs.python.org for 3.10

2020-10-30 Thread Dong-hee Na


Dong-hee Na  added the comment:

> but likely for the beta/release candidate phases.

I think so too

--

___
Python tracker 

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



  1   2   >