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

2020-10-30 Thread Dong-hee Na


Change by Dong-hee Na :


--
nosy: +corona10

___
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 Tony Albers


Tony Albers  added the comment:

No no no, please don't.

Apart from FreeBSD, illumos distros are the only really hard-core UNIX OS'es 
still freely available, the features taken into account. 
SMF, dtrace and several hypervisor types makes illumos really stand out.

I understand that there are resources that need to be assigned to maintaining 
Python on illumos/SunOS, but please reach out to their communities, maybe 
someone can help.

--
nosy: +tbalbers

___
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 Marius Pana


Marius Pana  added the comment:

Please do not drop support for SunOS. 
We are happy to provide some hosting services on SmartOS/Illumos for building.

--
nosy: +mariuspana

___
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 Jasper Siepkes


Jasper Siepkes  added the comment:

I'm another Illumos user that has crawled from under a rock ;-) to request not 
to drop Illumos support.

--
nosy: +siepkes

___
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 Carsten Grzemba


Carsten Grzemba  added the comment:

Please continue support for Solaris/IllumOS! For build resources on the most 
recent Solaris platforms you can contact opencsw.org.

--
nosy: +cgrzemba

___
Python tracker 

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



[issue42202] Optimize function annotation

2020-10-30 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Are annotations now always known at compile time?

As for representation, it can also be a sequence of pairs (('x', 'int'), ('z', 
'float'), ('return', 'Hoge')) or a pair of sequences (('x', 'z', 'return'), 
('int', 'float', 'Hoge')). It would be better to save a dict directly in pyc 
files, but it needs changing the marshal protocol.

Also, it makes sense to make annotations attribute of the code object, so avoid 
the overhead at function creation time.

I have a dream to split the pyc file into several files or sections and save 
docstrings and annotations (and maybe line numbers) separately from the main 
code. They should be loaded by demand, when you read __doc__ or __annotation__. 
Most code does not use them at run time, so we can save memory and loading 
time. It can also help with internationalization.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue42202] Optimize function annotation

2020-10-30 Thread Dong-hee Na


Dong-hee Na  added the comment:

I like the 1st option which uses a tuple

--
nosy: +corona10 -serhiy.storchaka

___
Python tracker 

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



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

2020-10-30 Thread john ryan


New submission from john ryan :

My test environment runs Ubuntu 18.04 in a virtualbox hosted on Windows 8.1 and 
Python executes within a venv running Python 3.9.0 (Python 3.9.0 (default, Oct 
26 2020, 09:02:51) 
[GCC 7.5.0] on linux

Running a test with unittest.IsolatedAsyncioTestCase my code hung so I hit 
ctrl-C twice to stop it and got the below traceback.

The really odd behaviour is that open is reported as not defined.

The behaviour is repeatable in my test, but I do not know how to produce a 
simple test case. I do not know what the issue is with my code.


 ^C^CTraceback (most recent call last):
  File "/home/john/.pyenv/versions/3.9.0/lib/python3.9/unittest/async_case.py", 
line 158, in run
return super().run(result)
  File "/home/john/.pyenv/versions/3.9.0/lib/python3.9/unittest/case.py", line 
593, in run
self._callTestMethod(testMethod)
  File "/home/john/.pyenv/versions/3.9.0/lib/python3.9/unittest/async_case.py", 
line 65, in _callTestMethod
self._callMaybeAsync(method)
  File "/home/john/.pyenv/versions/3.9.0/lib/python3.9/unittest/async_case.py", 
line 88, in _callMaybeAsync
return self._asyncioTestLoop.run_until_complete(fut)
  File "/home/john/.pyenv/versions/3.9.0/lib/python3.9/asyncio/base_events.py", 
line 629, in run_until_complete
self.run_forever()
  File "/home/john/.pyenv/versions/3.9.0/lib/python3.9/asyncio/base_events.py", 
line 596, in run_forever
self._run_once()
  File "/home/john/.pyenv/versions/3.9.0/lib/python3.9/asyncio/base_events.py", 
line 1854, in _run_once
event_list = self._selector.select(timeout)
  File "/home/john/.pyenv/versions/3.9.0/lib/python3.9/selectors.py", line 469, 
in select
fd_event_list = self._selector.poll(timeout, max_ev)
KeyboardInterrupt

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/john/.pyenv/versions/3.9.0/lib/python3.9/runpy.py", line 197, in 
_run_module_as_main
return _run_code(code, main_globals, None,
  File "/home/john/.pyenv/versions/3.9.0/lib/python3.9/runpy.py", line 87, in 
_run_code
exec(code, run_globals)
  File "/home/john/.pyenv/versions/3.9.0/lib/python3.9/unittest/__main__.py", 
line 18, in 
main(module=None)
  File "/home/john/.pyenv/versions/3.9.0/lib/python3.9/unittest/main.py", line 
101, in __init__
self.runTests()
  File "/home/john/.pyenv/versions/3.9.0/lib/python3.9/unittest/main.py", line 
271, in runTests
self.result = testRunner.run(self.test)
  File "/home/john/.pyenv/versions/3.9.0/lib/python3.9/unittest/runner.py", 
line 176, in run
test(result)
  File "/home/john/.pyenv/versions/3.9.0/lib/python3.9/unittest/suite.py", line 
84, in __call__
return self.run(*args, **kwds)
  File "/home/john/.pyenv/versions/3.9.0/lib/python3.9/unittest/suite.py", line 
122, in run
test(result)
  File "/home/john/.pyenv/versions/3.9.0/lib/python3.9/unittest/suite.py", line 
84, in __call__
return self.run(*args, **kwds)
  File "/home/john/.pyenv/versions/3.9.0/lib/python3.9/unittest/suite.py", line 
122, in run
test(result)
  File "/home/john/.pyenv/versions/3.9.0/lib/python3.9/unittest/suite.py", line 
84, in __call__
return self.run(*args, **kwds)
  File "/home/john/.pyenv/versions/3.9.0/lib/python3.9/unittest/suite.py", line 
122, in run
test(result)
  File "/home/john/.pyenv/versions/3.9.0/lib/python3.9/unittest/case.py", line 
653, in __call__
return self.run(*args, **kwds)
  File "/home/john/.pyenv/versions/3.9.0/lib/python3.9/unittest/async_case.py", 
line 160, in run
self._tearDownAsyncioLoop()
  File "/home/john/.pyenv/versions/3.9.0/lib/python3.9/unittest/async_case.py", 
line 126, in _tearDownAsyncioLoop
loop.run_until_complete(self._asyncioCallsQueue.join())
  File "/home/john/.pyenv/versions/3.9.0/lib/python3.9/asyncio/base_events.py", 
line 629, in run_until_complete
self.run_forever()
  File "/home/john/.pyenv/versions/3.9.0/lib/python3.9/asyncio/base_events.py", 
line 596, in run_forever
self._run_once()
  File "/home/john/.pyenv/versions/3.9.0/lib/python3.9/asyncio/base_events.py", 
line 1854, in _run_once
event_list = self._selector.select(timeout)
  File "/home/john/.pyenv/versions/3.9.0/lib/python3.9/selectors.py", line 469, 
in select
fd_event_list = self._selector.poll(timeout, max_ev)
KeyboardInterrupt
Exception ignored in: >
Traceback (most recent call last):
  File "/home/john/.pyenv/versions/3.9.0/lib/python3.9/asyncio/base_events.py", 
line 1771, in call_exception_handler
  File "/home/john/.pyenv/versions/3.9.0/lib/python3.9/logging/__init__.py", 
line 1463, in error
  File "/home/john/.pyenv/versions/3.9.0/lib/python3.9/logging/__init__.py", 
line 1577, in _log
  File "/home/john/.pyenv/versions/3.9.0/lib/python3.9/logging/__init__.py", 
line 1587, in handle
  File "/home/john/.pyenv/versions/3.9.0/lib/python3.9/logging/__init__.py", 
line 1649, in callHandlers
  File "/home/john/.pyenv/versions/3.9.0/lib/python3.9/loggin

[issue42202] Optimize function annotation

2020-10-30 Thread Dong-hee Na


Dong-hee Na  added the comment:

@serhiy race condition sorry ;)

--

___
Python tracker 

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



[issue42202] Optimize function annotation

2020-10-30 Thread Dong-hee Na


Change by Dong-hee Na :


--
nosy: +serhiy.storchaka

___
Python tracker 

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



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

2020-10-30 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

It can happen if the code is executed very late at the shutdown stage. The 
builtin module is restored to its initial state (open is imported from io) to 
get rid of reference cycles.

--
nosy: +serhiy.storchaka, vinay.sajip

___
Python tracker 

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



[issue42204] "import setuptools" Results in "ModuleNotFoundError: No module named '_distutils_hack'"

2020-10-30 Thread Steven Yan


Change by Steven Yan :


--
components: Distutils
files: pic.png
nosy: dstufft, eric.araujo, sy
priority: normal
severity: normal
status: open
title: "import setuptools" Results in "ModuleNotFoundError: No module named 
'_distutils_hack'"
type: behavior
versions: Python 3.9
Added file: https://bugs.python.org/file49550/pic.png

___
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 Paolo Marcheschi


Paolo Marcheschi  added the comment:

Please continue support for Solaris/IllumOS!
This is very important for us.

--
nosy: +marcheschi

___
Python tracker 

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



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

2020-10-30 Thread john ryan


john ryan  added the comment:

Thanks. That is understandable. I reported it in case it was helpful.

--

___
Python tracker 

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



[issue42204] "import setuptools" Results in "ModuleNotFoundError: No module named '_distutils_hack'"

2020-10-30 Thread Steven Yan


Change by Steven Yan :


Added file: https://bugs.python.org/file49551/pic.png

___
Python tracker 

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



[issue42204] "import setuptools" Results in "ModuleNotFoundError: No module named '_distutils_hack'"

2020-10-30 Thread Steven Yan


Change by Steven Yan :


Removed file: https://bugs.python.org/file49550/pic.png

___
Python tracker 

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



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

2020-10-30 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

See:

#26789 #39513

Serhiy, is a test case still needed? Should this be closed and pushed back to 
fixing logging?

--
nosy: +steven.daprano

___
Python tracker 

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



[issue42202] Optimize function annotation

2020-10-30 Thread Inada Naoki


Inada Naoki  added the comment:

> Are annotations now always known at compile time?

Yes, because `from __future__ import annotations` is enabled by default from 
Python 3.10.

> As for representation, it can also be a sequence of pairs (('x', 'int'), 
> ('z', 'float'), ('return', 'Hoge')) or a pair of sequences (('x', 'z', 
> 'return'), ('int', 'float', 'Hoge')). It would be better to save a dict 
> directly in pyc files, but it needs changing the marshal protocol.

Yes, but it is bit larger than my single tuple idea in most cases.
Since most annotations are not used by runtime, we don't need to create a dict 
until `func.__annotation__` is read.

> Also, it makes sense to make annotations attribute of the code object, so 
> avoid the overhead at function creation time.

I am not sure this is the best option because there are many code object 
without annotation.

> I have a dream to split the pyc file into several files or sections and save 
> docstrings and annotations (and maybe line numbers) separately from the main 
> code. They should be loaded by demand, when you read __doc__ or 
> __annotation__. Most code does not use them at run time, so we can save 
> memory and loading time. It can also help with internationalization.

I have same dream.

--

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


abarbu  added the comment:

Please don't drop Solaris support, we still use it to this day.

--
nosy: +abarbu

___
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 Predrag Zečević

Predrag Zečević  added the comment:

Please, keep support!

--
nosy: +predrag.zecevic.1961
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



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

2020-10-30 Thread Martin Gfeller

Martin Gfeller  added the comment:

Thank you, Steve, for your rapid response and explanation!

I would like to have my installation fully isolated in case somebody (running 
the machine) fiddles with the installation in the standard location. I used to 
do that without problems with the 2.7 .msi installer, but now I’ve finally 
almost finished converting to 3.8 (I know I’m late) and that approach doesn’t 
work any longer.

I tried to reverse engineer it a bit by looking at the log files and zapping 
the registry entry HKLM\Software\Python\PythonCore\3.8 (for an all-users 
install), with no success. Modify or repair would randomly install some stuff 
in the target dir and other stuff into a previous installation. The Windows 
Installer technology seems to be rather implicit than explicit. How does it 
detect the previous installation’s location?

Although it’s not a bug and an /isolated mode doesn’t seem to be feasible, 
perhaps it could check and warn that /targetdir is being ignored. The doc could 
mention that it’s intended only for a single installation per version per 
machine.  

And thank you again for your contributions to make Python on Windows such a joy 
– highly appreciated! 
Martin

--

___
Python tracker 

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



[issue42205] Add image/webp to list of non-standard mimetypes

2020-10-30 Thread waicalibre


New submission from waicalibre :

WebP is an open-source image format that isn't included in Python's mimetypes. 
It hasn't been added because it has no IANA registration: 
https://bugs.python.org/issue38902

In mimetypes.py there is a list of common but non-standard media types that 
only match if strict=0 flag is given to the API methods. If WebP isn't going to 
be added to the big standard list, it could be added to the non-standard list.

--
components: Library (Lib)
messages: 379940
nosy: waicalibre
priority: normal
severity: normal
status: open
title: Add image/webp to list of non-standard mimetypes

___
Python tracker 

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



[issue42205] Add image/webp to list of non-standard mimetypes

2020-10-30 Thread waicalibre


Change by waicalibre :


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

___
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


Change by Raymond Hettinger :


--
assignee: docs@python -> rhettinger
nosy: +rhettinger

___
Python tracker 

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



[issue42206] Pegen: Raise errors occurred by the AST validator

2020-10-30 Thread Batuhan Taskaya


New submission from Batuhan Taskaya :

When working on the AST validator, it is unclear that which of the changes 
caused parser to fail on valid input. I propose to propagate the error and 
raise it.

Current:
$ ./python t.py
python: Parser/pegen.c:1146: _PyPegen_run_parser: Assertion 
`PyAST_Validate(res)' failed.

Proposed:
$ ./python t.py
ValueError: Test AST error raised by the Python/ast.c

--
components: Interpreter Core
messages: 379941
nosy: BTaskaya, gvanrossum, lys.nikolaou, pablogsal
priority: normal
severity: normal
status: open
title: Pegen: Raise errors occurred by the AST validator

___
Python tracker 

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



[issue42206] Pegen: Raise errors occurred by the AST validator

2020-10-30 Thread Batuhan Taskaya


Change by Batuhan Taskaya :


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

___
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 Jorge Schrauwen


Jorge Schrauwen  added the comment:

I'm an illumos user too, mostly SmartOS and some OmniOS.

I'm a heavy user of salt and thus phyton too, slowly prepping to get my stuff 
moved from 2.7 to 3.8 atm.

As mentioned above parts of the illumos build also use python and are moving to 
wads 3.9.

As mentioned I rarely use pip at all to install packages, nearly everything I 
need is available via IPS or pkgsrc depending on the distro.

--
nosy: +jorge.schrauwen

___
Python tracker 

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



[issue42206] Pegen: Raise errors occurred by the AST validator

2020-10-30 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

> This will slow down the parser massively. The reason we went' with the assert 
> is so we only do the check in debug mode. We could propagate if you want, but 
> it needs to be surrounded by debug preprocessor checks.

Oh, I just checked and it currently is surrounded. Nevermind

--

___
Python tracker 

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



[issue42206] Pegen: Raise errors occurred by the AST validator

2020-10-30 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

This will slow down the parser massively. The reason we went' with the assert 
is so we only do the check in debug mode. We could propagate if you want, but 
it needs to be surrounded by debug preprocessor checks.

--

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


shakir_juolay  added the comment:

I have installed Zoom without Admin rights in the default folder 
D:\Users\sjuolay\AppData\Roaming\Zoom\bin. I am assuming it's only me since the 
application is not installed in Program Files.

Regarding CMD trying to run Python

D:\Users\sjuolay>where.exe python
D:\Users\sjuolay\AppData\Local\Microsoft\WindowsApps\python.exe

D:\Users\sjuolay>echo %PATH%
C:\Program Files\Teradata\Client\16.20\bin;C:\Program Files 
(x86)\Teradata\Client\16.20\bin;C:\app\product\11.2.0\client_1\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;D:\Users\sjuolay\AppData\Local\Microsoft\WindowsApps;

Looks like I have it because of 
https://devblogs.microsoft.com/python/python-in-the-windows-10-may-2019-update/

Hope this is not interfering with what I am trying to do.

--

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


Change by shakir_juolay :


Added file: https://bugs.python.org/file49552/Capture.JPG

___
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 Olaf Bohlen


Olaf Bohlen  added the comment:

Also, let me join in here. 
OpenIndiana hipster and all other illumos distributions will suffer if you drop 
the "Solaris" support. Just to get an idea which packages in a nearly default 
install depend on python:
pkg uninstall: Unable to remove 'runtime/python-35@3.5.9-2020.0.1.1' due to the 
following packages that depend on it:

  communication/im/pidgin@2.13.0-2020.0.1.4
  desktop/compiz/ccsm@0.8.16-2020.0.1.0
  desktop/time-slider@0.2.101-2020.0.1.116
  desktop/xdg/menu-editor/mozo@1.24.0-2020.0.1.0
  developer/build/onbld@0.5.11-2020.0.1.20038
  developer/clang-80@8.0.1-2020.0.1.0
  developer/ui-designer/glade@3.22.2-2020.0.1.0
  developer/versioning/mercurial-35@5.3.2-2020.0.1.0
  diagnostic/ddu@1.3.1-2020.0.1.40
  gnome/config/gconf@2.32.4-2020.0.1.8
  install/distribution-constructor@0.5.11-2020.0.1.1052
  metapackages/build-essential@1.0-2020.0.1.21
  package/pkg@0.5.11-2020.0.1.5543
  package/pkg/system-repository@0.5.11-2020.0.1.5543
  print/cups/system-config-printer@2.30.0-2020.0.1.3
  print/filter/hplip@3.19.12-2020.0.1.0
  release/os-welcome@1.0-2020.0.1.23
  service/gnome/desktop-cache@0.2.2-2020.0.1.7
  service/network/samba@4.12.5-2020.0.1.0
  system/file-system/zfs@0.5.11-2020.0.1.20038
  system/input-method/imf-startup@0.5.11-2020.0.1.3
  system/install@0.5.11-2020.0.1.1052
  system/network/avahi@0.7-2020.0.1.3
  system/network/avahi/gui@0.7-2020.0.1.3
  system/zones/brand/ipkg@0.5.11-2020.0.1.5543
  text/texinfo@6.7-2020.0.1.1
  web/server/apache-24/module/apache-wsgi-35@4.5.22-2020.0.1.5

Actually the package manager itself, installer, ZFS helpers, cups, the illumos 
build-system and and and all depend on python.

--
nosy: +olafbohlen

___
Python tracker 

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



[issue42202] Optimize function annotation

2020-10-30 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

> Yes, but it is bit larger than my single tuple idea in most cases.

Yes, but the code for creating a dict can be simpler. In any case we will 
better see what format is better when try to write a code.

> I am not sure this is the best option because there are many code object 
> without annotation.

In this case it can be None or NULL.

I like your idea. It is easy to implement it now. Later we can make annotations 
an attribute of the code object.

--

___
Python tracker 

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



[issue41618] [C API] How many slots of static types should be exposed in PyType_GetSlot()

2020-10-30 Thread hai shi


hai shi  added the comment:

> IMO, a slot should be exposed if there is some reason for exposing it.

Can we write those info to docs? In case some developer want to exposing slot 
in future.

> Which other slots are we missing?

nb_inserved in PyNumberMethods should be removed?

--

___
Python tracker 

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



[issue42206] Pegen: Raise errors occurred by the AST validator

2020-10-30 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 3af4b585527743e455145d294049c46b7c823ed9 by Batuhan Taskaya in 
branch 'master':
bpo-42206: Propagate and raise errors from PyAST_Validate in the parser 
(GH-23035)
https://github.com/python/cpython/commit/3af4b585527743e455145d294049c46b7c823ed9


--

___
Python tracker 

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



[issue39715] Implement __repr__ methods for AST classes

2020-10-30 Thread STINNER Victor


STINNER Victor  added the comment:

I'm not sure that it's a good idea to make repr(_ast.AST) longer. I suggest to 
reject this feature request. As Serhiy wrote, ast.dump() can already be used.

--
nosy: +vstinner

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

I think this is a multi-level problem, and it perhaps should be solved on 
different levels separately.

As for logging, it can be used at shutdown by user code, it may help to 
understand the problem with the user code, and it may work most of time. But if 
it happen too late, it fails, and the printed traceback does not help but 
confuses user. The logging module should try the best to help the user. It 
should be ready to handle such situation. It is not failure of the end user 
that this error happens, and they cannot do anything in any way, so it is 
better to suppress the confusion traceback (maybe emit a warning?).

--

___
Python tracker 

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



[issue39715] Implement __repr__ methods for AST classes

2020-10-30 Thread Batuhan Taskaya


Batuhan Taskaya  added the comment:

> I suggest to reject this feature request

+1

--

___
Python tracker 

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



[issue42206] Pegen: Raise errors occurred by the AST validator

2020-10-30 Thread Batuhan Taskaya


Change by Batuhan Taskaya :


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



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

2020-10-30 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Yes, solving any of issue26789 or issue39513 will likely solve also this issue. 
But this issue is the one which relates to asyncio tests, so there may be some 
flaw in tests which should be fixed too. Solving issue26789 or issue39513 will 
eliminate symptoms, so it would be harder to fix the bug in test is there is 
one.

--

___
Python tracker 

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



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

2020-10-30 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

This is a duplicate of below

https://bugs.python.org/issue26789
https://bugs.python.org/issue39513

--
nosy: +xtreak

___
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 Juraj Lutter


Juraj Lutter  added the comment:

We, in danubecloud (https://github.com/erigones/esdc-ce) are relying on Python, 
too. Keep up the good work, folks :-)

--
nosy: +otis

___
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 Mike La Spina

Mike La Spina  added the comment:

I suspect the download stats are not a full indication of usage on “SunOS” 
based on download stats. The bits are preinstalled. I do use it frequently via 
Illumos. Please support the platform.

Regards,
Mike

--
nosy: +michael.laspina

___
Python tracker 

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



[issue26175] Fully implement IOBase abstract on SpooledTemporaryFile

2020-10-30 Thread Antti Haapala


Antti Haapala  added the comment:

Another test case:

import tempfile
import io
import json


with tempfile.SpooledTemporaryFile(max_size=2**20) as f:
tf = io.TextIOWrapper(f, encoding='utf-8')
json.dump({}, fp=tf)

I was writing json to a file-like object that I need to read in as binary (to 
upload to S3). Originally the code used BytesIO and I thought it would be wise 
to actually spool this to disk as I was operating with possible limited RAM... 
except that of course it didn't work.

--
nosy: +ztane

___
Python tracker 

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



[issue26175] Fully implement IOBase abstract on SpooledTemporaryFile

2020-10-30 Thread Antti Haapala


Antti Haapala  added the comment:

... to further clarify, it is disappointing that either BytesIO or 
TemporaryFile would work alone, but the one that merges these two doesn't.

--

___
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 Jan Poctavek


Jan Poctavek  added the comment:

I'm speaking officially for Danube Cloud, an advanced project which is 
open-source virtualization platform similar to Proxmox, XCP-NG, oVirt, Joyent 
Triton, etc. Our base platform is SmartOS and we have everything written in 
Python.

If you drop support for "Solaris", it will hurt our project a lot. Python has 
become heart of many projects and it should not limit itself to support just 
the mainstream platforms and OSes.

Thank you for everything you've done so far and I hope we can continue together.

Jan Poctavek

Danube Cloud
https://github.com/erigones/esdc-ce

--
nosy: +yanchii

___
Python tracker 

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



[issue39715] Implement __repr__ methods for AST classes

2020-10-30 Thread STINNER Victor


STINNER Victor  added the comment:

I reject the feature request.

While repr() on AST nodes could be enhanced for some specific nodes, you have 
to know that the code is mostly implemented in C which make enhancements 
non-trivial. Moreover, this code (Python/Python-ast.c) is generated by a script 
(Parser/asdl_c.py) which makes it even worse to enhance.

I suggest you to develop tooling outside of the stdlib to format an AST tree or 
a list of AST nodes, something like pprint and reprlib modules. It would 
benefit to more Python versions and will give you way more freedom on how to 
format these nodes.

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

___
Python tracker 

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



[issue42173] Drop Solaris support

2020-10-30 Thread STINNER Victor

STINNER Victor  added the comment:

It seems like two Python core developers (Ronald Oussoren and Jesús Cea Avión) 
are volunteer to maintain the Solaris support. Moreover, it seems like some 
people would like to provide a Solaris server to run a buildbot server. In this 
case, I would be fine to keep the Solaris code.

But it's not enough, please call for help:
https://mail.python.org/archives/list/python-...@python.org/message/NYWF4DUPFYZSKUUZ3ZHOSBQCWAF4IIQO/

--

___
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 Gaige Paulsen


Gaige Paulsen  added the comment:

Let me add my voice to those who ask to keep Solaris support in Python going 
forward. We use SmartOS which is an Illumos and thus Solaris derivative.

We use Ansible extensively to automate our SmartOS deployments. We have a 
couple hundred VMs and 2 part-time volunteers on staff. We are extremely 
reliant on Ansible, and thus Python.

I have multiple blogs and a couple of django-based web sites that are running 
on SmartOS and we run a wide variety of tools that use Python as part of their 
mix.

--
nosy: +gaige

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

> But it's not enough, please call for help:

Please *read* my call for help

--

___
Python tracker 

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



[issue41839] Solaris: Fix error checking in sched_get_priority_ functions

2020-10-30 Thread STINNER Victor


Change by STINNER Victor :


--
title: Fix error checking in sched_get_priority_ functions -> Solaris: Fix 
error checking in sched_get_priority_ functions

___
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


Change by Dong-hee Na :


--
priority: normal -> release blocker

___
Python tracker 

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



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

2020-10-30 Thread STINNER Victor


STINNER Victor  added the comment:

I mark this issue as a duplicate of bpo-26789.

--
nosy: +vstinner
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> asyncio: Please do not log during shutdown

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

I mark this issue as a duplicate of bpo-26789.

--
nosy: +vstinner
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> asyncio: Please do not log during shutdown

___
Python tracker 

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



[issue41626] port shebang of tools from python2 to python3

2020-10-30 Thread hai shi

hai shi  added the comment:

Sorry for my delay~

>I think some of these work with any Python, but some need the locally built 
>interpreter to give correct results.
>It could avoid confusion and mistakes to remove the shebangs and executable 
>bits from the scripts that need a local Python, and make dure their 
>documentation mentions `./python path/to/tool`.

I update Objects/typeslots.py in #PR21913 recently and using f-format in this 
script(it means that just local python or python3 can run). So I will accept 
your suggestion from this file after this PR merged:)

>(Oh and by the way, Tools/scripts/fixps.py is a tool to replace 
>`/usr/local/bin/python` shebangs with `/usr/bin/env python`…  You can judge if 
>that is useful and/or correct.)

Thanks, I will take a look.

> So if things are changed (let’s get a couple opinions here), maybe this needs 
> separate PRs for 1/2/3, and make sure to get reviews to ensure we don’t break 
> IDLE / Mac installers / pegen / etc.

Agree. To corner case, a single sepereate PR is good.

--

___
Python tracker 

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



[issue41626] port shebang of tools from python2 to python3

2020-10-30 Thread hai shi


hai shi  added the comment:

typo error: PR21913->PR21931

--

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

I marked bpo-39513 and bpo-42203 as duplicates of this issue.

I changed the title to reflect that the root issue is that logging during 
Python finalization can fail with NameError: name 'open' is not defined.

--
components: +Library (Lib) -asyncio
nosy: +vstinner
title: asyncio: Please do not log during shutdown -> logging: Trying to log 
during Python finalization with NameError: name 'open' is not defined
versions: +Python 3.10 -Python 3.5

___
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 Vedran Čačić

Vedran Čačić  added the comment:

> In the OP, the error is caused by `open` being unavailable, which is a 
> builtin. According to what Serhiy says, this error would be after step 6

I think you read the post above incorrectly. The phase 3 is the one where open 
is removed, since it's not a "native" builtin, but imported from io.

--
nosy: +veky

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

@pablogsal

Since this is the developer guide of 3.10.
I would like to suggest as release bloker, if you don't agree you can change it 
;)

--
nosy: +pablogsal

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

I hacked logging.FileHandler to keep a reference to the builtin open() 
function. I got new problems.

In my test, I got a 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.

--

___
Python tracker 

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



[issue42207] Python 3.9 testing fails when building with clang and optimizations are enabled

2020-10-30 Thread serge-sans-paille


New submission from serge-sans-paille :

How to reproduce:

```
git clone https://github.com/python/cpython && cd cpython
mkdir -p _build/optimized
cd _build/optimized
../../configure --enable-optimizations CC=clang
make
cd ..
./optimized/python -m test.regrtest -wW --slowest -j0 --timeout=1800 2>&1 | 
grep "error: Could not read profile code.profclangd"
```

This bug no longer happens on master branch because it's related to 
test_peg_generator.

--
components: Build
messages: 379972
nosy: serge-sans-paille
priority: normal
severity: normal
status: open
title: Python 3.9 testing fails when building with clang and optimizations are 
enabled
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



[issue42207] Python 3.9 testing fails when building with clang and optimizations are enabled

2020-10-30 Thread serge-sans-paille


Change by serge-sans-paille :


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

___
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 Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

> I would like to suggest as release bloker, if you don't agree you can change 
> it ;)

This is indeed a release blocker, but likely for the beta/release candidate 
phases.

--

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


Added file: https://bugs.python.org/file49554/crash.py

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

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

I created bpo-42208 "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



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

2020-10-30 Thread STINNER Victor


New submission from STINNER Victor :

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.

--
components: Interpreter Core
files: logging.patch
keywords: patch
messages: 379974
nosy: vstinner
priority: normal
severity: normal
status: open
title: Using logging or warnings during Python finalization does crash Python
versions: Python 3.10
Added file: https://bugs.python.org/file49553/logging.patch

___
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 Dong-hee Na


Change by Dong-hee Na :


--
nosy: +corona10

___
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



[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



[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


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



[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



[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



[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



[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



[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



[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



[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



[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



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



[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



[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



[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



[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



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


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



[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



[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



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



[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



[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



[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


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


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



[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



[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


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



  1   2   >