[issue40071] test__xxsubinterpreters leaked [1, 1, 1] references: test_ids_global()

2020-03-26 Thread Paulo Henrique Silva


Change by Paulo Henrique Silva :


--
pull_requests: +18532
pull_request: https://github.com/python/cpython/pull/19172

___
Python tracker 

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



[issue40071] test__xxsubinterpreters leaked [1, 1, 1] references: test_ids_global()

2020-03-26 Thread Paulo Henrique Silva


Paulo Henrique Silva  added the comment:

The module still uses static state. Fixed the leak and will convert it to use 
per-module state in a separate issue.

--

___
Python tracker 

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



[issue40069] Clear .lst files for AIX

2020-03-26 Thread Michael Felt


Michael Felt  added the comment:

the XLC compiler has an option to create "listing" files. The content depends 
on the arguments passed to the xlc compilers.

>From memory (as I always need to look them up) these include -qinfo and 
>-qsource (plus arguments)

FYI: besides showing info such as macro substitution these are also the files 
that would include the generate assembly/machine instructions.

.lst files are not created by default (by Python configure and make). If they 
are there, there are a user generated file. As .lst files are created in the 
cwd (current working directory) I keep myself 'clean' by building out of tree.

--

___
Python tracker 

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



[issue39502] test_zipfile fails on AIX due to time.localtime

2020-03-26 Thread Michael Felt

Michael Felt  added the comment:

My apologies for the late reply -

Here is 3.6.10:

Python 3.6.10 (default, Mar 24 2020, 14:12:31) [C] on aix5
Type "help", "copyright", "credits" or "license" for more information.
>>> import time
>>> time.gmtime(4386268800)
time.struct_time(tm_year=2108, tm_mon=12, tm_mday=30, tm_hour=0,
tm_min=0, tm_sec=0, tm_wday=6, tm_yday=365, tm_isdst=0)

And, a patched 3.9:

root@x064:[/data/prj/python/python-3.9]./python
Python 3.9.0a4+ (default, Mar 13 2020, 08:03:36) [C] on aix
Type "help", "copyright", "credits" or "license" for more information.
>>> import time
>>> time.gmtime(4386268800)
Traceback (most recent call last):
  File "", line 1, in 
OverflowError: timestamp out of range for platform time_t

So, it should be working - but is not after the patches. I'll work on an
update asap.

On 07/02/2020 18:57, STINNER Victor wrote:
> STINNER Victor  added the comment:
>
> Does time.gmtime() accept year after 2038 on 64-bit AIX? Example on Linux:
>
 time.gmtime(4386268800)
> time.struct_time(tm_year=2108, tm_mon=12, tm_mday=30, tm_hour=0, tm_min=0, 
> tm_sec=0, tm_wday=6, tm_yday=365, tm_isdst=0)
>
> --
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue38410] Possible fatal errors due to _PyEval_SetAsyncGen{Finalizer, Firstiter}()

2020-03-26 Thread Zackery Spytz


Zackery Spytz  added the comment:

I had pinged Steve Dower on the PR, but I didn't realize they weren't notified. 
The merge conflicts have been fixed.

--

___
Python tracker 

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



[issue40073] AIX: python3 points to "air"

2020-03-26 Thread Michael Felt


New submission from Michael Felt :

This is a regression in v3.6.10 and v3.7.6

`make install` creates a symbolic link `python3` that points to the executable 
python3.X

In versions v3.6.10 and v3.7.6 the executable is created as python3.Xm while 
the symbolic link still points to python3.X

Note: v3.8.2 and v3.9 (master) do not appear to be affected)

--
components: Build
messages: 365058
nosy: Michael.Felt
priority: normal
severity: normal
status: open
title: AIX: python3 points to "air"
type: behavior
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



[issue40069] Clear .lst files for AIX

2020-03-26 Thread Batuhan Taskaya


Batuhan Taskaya  added the comment:

> .lst files are not created by default (by Python configure and make).

They are an artifact when I configure with xlc (CC=xlc ./configure && make 
-j24), and as far as I know we already have some compiler-specific clear 
conditions.

--

___
Python tracker 

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



[issue40073] AIX: python3 points to "air"

2020-03-26 Thread Michael Felt


Michael Felt  added the comment:

I tried looking at the blurbs to get an idea of what might have been the change 
- but nothing to indicate a change to the install process in any of "next" NEWS 
blurbs that are currently in branch 3.7

NEWS.d/next/Build/README.rst
NEWS.d/next/C API/2020-03-08-22-56-22.bpo-38643.k2ixx6.rst
NEWS.d/next/C API/2020-03-12-00-27-26.bpo-39884.CGOJBO.rst
NEWS.d/next/C API/README.rst
NEWS.d/next/Core and Builtins/2018-09-23-16-32-58.bpo-22490.8e0YDf.rst
NEWS.d/next/Core and Builtins/2020-02-02-00-12-07.bpo-39520.uicBq6.rst
NEWS.d/next/Core and Builtins/2020-03-06-06-12-37.bpo-39871.dCAj_2.rst
NEWS.d/next/Core and Builtins/2020-03-06-21-04-39.bpo-38894.nfcGKv.rst
NEWS.d/next/Core and Builtins/2020-03-23-18-08-34.bpo-20526.NHNZIv.rst
NEWS.d/next/Core and Builtins/README.rst
NEWS.d/next/Documentation/2020-02-18-14-28-31.bpo-39677.vNHqoX.rst
NEWS.d/next/Documentation/README.rst
NEWS.d/next/IDLE/2020-03-06-01-55-14.bpo-39852.QjA1qF.rst
NEWS.d/next/IDLE/2020-03-08-14-27-36.bpo-39885.29ERiR.rst
NEWS.d/next/IDLE/2020-03-09-02-45-12.bpo-27115.8hSHMo.rst
NEWS.d/next/IDLE/README.rst
NEWS.d/next/Library/2020-03-05-00-57-49.bpo-39828.yWq9NJ.rst
NEWS.d/next/Library/2020-03-09-01-45-06.bpo-39850.eaJNIE.rst
NEWS.d/next/Library/2020-03-23-17-52-00.bpo-40014.Ya70VG.rst
NEWS.d/next/Library/2020-03-09-18-56-27.bpo-39916.BHHyp3.rst
NEWS.d/next/Library/2020-03-10-15-32-31.bpo-38662.o1DMXj.rst
NEWS.d/next/Library/2020-03-11-23-08-25.bpo-39652.gbasrk.rst
NEWS.d/next/Library/2020-03-19-19-40-27.bpo-40016.JWtxqJ.rst
NEWS.d/next/Library/README.rst
NEWS.d/next/Security/2020-03-14-14-57-44.bpo-38576.OowwQn.rst
NEWS.d/next/Security/README.rst
NEWS.d/next/Tests/2020-03-18-16-04-33.bpo-27807.9gKjET.rst
NEWS.d/next/Tests/README.rst
NEWS.d/next/Tools-Demos/2020-03-07-18-01-30.bpo-39889.l1czT6.rst
NEWS.d/next/Tools-Demos/2020-03-09-13-28-13.bpo-36184.BMPJ0D.rst
NEWS.d/next/Tools-Demos/README.rst
NEWS.d/next/Windows/2020-03-04-17-05-11.bpo-39847.C3N2m3.rst
NEWS.d/next/Windows/2020-03-11-10-15-56.bpo-39930.LGHw1j.rst
NEWS.d/next/Windows/README.rst
NEWS.d/next/macOS/README.rst

--

___
Python tracker 

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



[issue40073] AIX: python3 points to "air"

2020-03-26 Thread Batuhan Taskaya


Change by Batuhan Taskaya :


--
nosy: +BTaskaya

___
Python tracker 

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



[issue40074] pickle module dump and load: add support for string file names

2020-03-26 Thread Diego Palacios


New submission from Diego Palacios :

The pickle functions dump and load are often used in the following lines:

```python
import pickle

fname = '/path/to/file.pickle'

with open(fname, 'rb') as f:
object = pickle.load(f)
```

The load function should also accept a file name (string) as input and 
automatically open and load the object. The same should happen for the dump 
function. This would allow a simple use of the functions:

```python
object = pickle.load(fname)
```

This is what many users need when reading and storing and object from/to a file.

--
components: Library (Lib)
messages: 365061
nosy: Diego Palacios
priority: normal
severity: normal
status: open
title: pickle module dump and load: add support for string file names
type: enhancement
versions: Python 3.9

___
Python tracker 

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



[issue38410] Possible fatal errors due to _PyEval_SetAsyncGen{Finalizer, Firstiter}()

2020-03-26 Thread Steve Dower


Steve Dower  added the comment:

Sorry for missing the pings! My GitHub notifications are a bit of a black hole. 
I'll merge it now.

--

___
Python tracker 

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



[issue38410] Possible fatal errors due to _PyEval_SetAsyncGen{Finalizer, Firstiter}()

2020-03-26 Thread Steve Dower


Steve Dower  added the comment:


New changeset 79ceccd1ec6ef7e487da2916f32c6f0d1477bd3d by Zackery Spytz in 
branch 'master':
bpo-38410: Properly handle PySys_Audit() failures (GH-16657)
https://github.com/python/cpython/commit/79ceccd1ec6ef7e487da2916f32c6f0d1477bd3d


--

___
Python tracker 

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



[issue38410] Possible fatal errors due to _PyEval_SetAsyncGen{Finalizer, Firstiter}()

2020-03-26 Thread Steve Dower


Change by Steve Dower :


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



[issue40075] _tkinter PythonCmd fails to acquire GIL

2020-03-26 Thread Thomas Holder


New submission from Thomas Holder :

The attached demo application runs a Tkinter GUI and a PyQt GUI in the same 
thread. PyQt owns the main loop and keeps updating the Tkinter instance by 
calling `update()`.

On Windows, when binding a "" event, resizing the Tk window will 
lead to a crash:

```
Fatal Python error: PyEval_RestoreThread: NULL tstate

Current thread 0x1f1c (most recent call first):
  File "qt_tk_demo.py", line 50 in 
```

This crash happens in `_tkinter.c` in `PythonCmd` inside the `ENTER_PYTHON` 
macro.

The issue can be fixed by using `PyGILState_Ensure` and `PyGILState_Release` 
instead of the `ENTER_PYTHON` macro inside the `PythonCmd` function.

--
components: Tkinter, Windows
files: qt_tk_demo.py
messages: 365064
nosy: Thomas Holder, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: _tkinter PythonCmd fails to acquire GIL
type: crash
Added file: https://bugs.python.org/file49002/qt_tk_demo.py

___
Python tracker 

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



[issue40074] pickle module dump and load: add support for string file names

2020-03-26 Thread Eric V. Smith


Eric V. Smith  added the comment:

I think it's a bad design to overload a function based on the type of am 
argument. I realize the stdlib does this in a number of places, for older 
functions. I don't think we'd add such a function today.

I might not object to a new pickle API to do this, but I think the best 
approach is to have your own wrapper function.

--
nosy: +eric.smith

___
Python tracker 

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



[issue40071] test__xxsubinterpreters leaked [1, 1, 1] references: test_ids_global()

2020-03-26 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset b09ae3ff43111a336c0b706ea32fa07f88c992d9 by Paulo Henrique Silva 
in branch 'master':
bpo-40071: Fix refleak in _functools module (GH19172)
https://github.com/python/cpython/commit/b09ae3ff43111a336c0b706ea32fa07f88c992d9


--

___
Python tracker 

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



[issue40071] test__xxsubinterpreters leaked [1, 1, 1] references: test_ids_global()

2020-03-26 Thread STINNER Victor


STINNER Victor  added the comment:

> (...) will convert it to use per-module state in a separate issue.

Great!

--

___
Python tracker 

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



[issue40069] Clear .lst files for AIX

2020-03-26 Thread STINNER Victor

STINNER Victor  added the comment:


New changeset 1b6b0e78fef2549cc9b447cbededb638f7388e02 by Batuhan Taşkaya in 
branch 'master':
bpo-40069: Clear out .lst files on make clean (GH-19169)
https://github.com/python/cpython/commit/1b6b0e78fef2549cc9b447cbededb638f7388e02


--

___
Python tracker 

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



[issue40069] Clear .lst files for AIX

2020-03-26 Thread STINNER Victor


STINNER Victor  added the comment:

Ok. I merged your PR.

I don't think that it's worth it to backport to 3.7 and 3.8. "git clean -fdx" 
can be used for stable branches to remove *all* files not tracked by Git (not 
only .lst files).

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



[issue40073] AIX: python3 points to "air"

2020-03-26 Thread Michael Felt


Change by Michael Felt :


--
versions: +Python 3.5

___
Python tracker 

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



[issue40073] AIX: python3 points to "air"

2020-03-26 Thread Michael Felt


Michael Felt  added the comment:

I see that it is also incorrect for v3.5.9

What is surprising - is that the logic is okay for python-config -> 
python-config3.X -> python-config-3.Xm

root@x065:[/data/prj/python/python3-3.5.9/X32]ls -l opt/bin
total 8728
lrwxrwxrwx   1 root system8 Mar 26 13:14 2to3 -> 2to3-3.5
-rwxr-xr-x   1 bin  bin  95 Mar 26 10:47 2to3-3.5
-rwxr-xr-x   1 bin  bin 236 Mar 26 10:47 easy_install-3.5
lrwxrwxrwx   1 root system7 Mar 26 13:14 idle3 -> idle3.5
-rwxr-xr-x   1 bin  bin  93 Mar 26 10:47 idle3.5
-rwxr-xr-x   1 bin  bin 208 Mar 26 10:47 pip3
-rwxr-xr-x   1 bin  bin 208 Mar 26 10:47 pip3.5
lrwxrwxrwx   1 root system8 Mar 26 13:14 pydoc3 -> pydoc3.5
-rwxr-xr-x   1 bin  bin  78 Mar 26 10:47 pydoc3.5
lrwxrwxrwx   1 root system9 Mar 26 13:14 python3 -> python3.5
lrwxrwxrwx   1 root system   16 Mar 26 13:14 python3-config -> 
python3.5-config
lrwxrwxrwx   1 root system   17 Mar 26 13:14 python3.5-config -> 
python3.5m-config
-rwxr-xr-x   1 bin  bin 4429283 Mar 26 10:45 python3.5m
-rwxr-xr-x   1 bin  bin3005 Mar 26 10:47 python3.5m-config
lrwxrwxrwx   1 root system   10 Mar 26 13:14 pyvenv -> pyvenv-3.5
-rwxr-xr-x   1 bin  bin 230 Mar 26 10:47 pyvenv-3.5

--

___
Python tracker 

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



[issue36054] On Linux, os.count() should read cgroup cpu.shares and cpu.cfs (CPU count inside docker container)

2020-03-26 Thread Manjusaka


Manjusaka  added the comment:

Hello guys, I some ideas about this issue

First, maybe we should add a new API named cpu_usable_count(). I think it's 
more meaningful than the os.sched_getaffinity(0)

Second, more and more people use docker to run their app today. So people need 
an official way to get the environment info, not just cpu, but the memory,  the 
network traffic limit. Because the docker is based on the CGroup in Linux, 
maybe we can add a cgroup lib as an official supported lib.

but I'm not sure about this idea, because there are some problem.

1. the CGroup is only supported on Linux. I'm not sure that adding a 
platform-specific lib is a good idea

2. Many languages are not adding cgroup official yet. Maybe there are some 
languages are optimized for the cgroup (such as Java in JVM)

--
nosy: +giampaolo.rodola

___
Python tracker 

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



[issue38250] enum.Flag should be more set-like

2020-03-26 Thread Manjusaka


Manjusaka  added the comment:

1. not sure I gett the Point

2. not sure

3. absolutely yes

--
nosy: +Manjusaka

___
Python tracker 

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



[issue18987] distutils.utils.get_platform() for 32-bit Python on a 64-bit machine

2020-03-26 Thread Michael Felt


Michael Felt  added the comment:

Back again - I understood a lot less then, maybe more now..

iirc, get_platform() asin sysconfig.get_platform() and 
distutils.util.get_platform() are suppposed to return a suitable PEP425 tag 
that identifies the ABI of the running interpreter - eg.g, 32-bit even though 
operating on 64-bot OS and hardware.

As far as AIX goes, for years this was not the case. More recently (for Python 
3.9) the logic has been added so that the bitness of the interpreter can be 
identified.

i.e., on AIX `get_platform()` now returns:
'aix-5307-0747-64' - where the 64 (or 32) identifies the bitness of the 
interpreter.

So, my question now - are the PEP425 tags returned by other platforms adequate? 
If yes, then I see little reason to not close this issue as resolved 
(elsewhere).

--

___
Python tracker 

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



[issue40065] py39: remove deprecation note for xml.etree.cElementTree

2020-03-26 Thread Manjusaka


Manjusaka  added the comment:

I will clean this

This issue looks like the same with https://bugs.python.org/issue40064

--
nosy: +Manjusaka

___
Python tracker 

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



[issue36054] On Linux, os.count() should read cgroup cpu.shares and cpu.cfs (CPU count inside docker container)

2020-03-26 Thread STINNER Victor


STINNER Victor  added the comment:

> Hello guys,

Please try to find a more inclusive way to say hello: https://heyguys.cc/ ;-)

--

___
Python tracker 

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



[issue40065] py39: remove deprecation note for xml.etree.cElementTree

2020-03-26 Thread Fred Drake


Fred Drake  added the comment:

Same core problem (module removed with insufficient document update), but a 
different action is needed for 3.8 and 3.9.

When I started testing an application with 3.9 and found one of the 
dependencies broken because it was relying directly on xml.etree.cElementTree, 
I had to dig into the history to determine that it was removed intentionally.  
Updated documentation would have helped.

I did file an issue on the dependency as well:
https://github.com/boto/botocore/issues/2002

--

___
Python tracker 

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



[issue40076] isoformat function drops microseconds part if its value is 000000

2020-03-26 Thread Alexander Bolshakov


New submission from Alexander Bolshakov :

isoformat function does not conform to the ISO 8601 and drops microseconds part 
if its value is 00.

The issue can be reproduced using the following code snippet:

for i in range(1,1000):
 timestamp=datetime.datetime.utcnow().isoformat()
 if len(timestamp)!=26:
 print(timestamp)

--
components: Library (Lib)
messages: 365077
nosy: Alexander Bolshakov
priority: normal
severity: normal
status: open
title: isoformat function drops microseconds part if its value is 00
type: behavior
versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9

___
Python tracker 

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



[issue40065] py39: remove deprecation note for xml.etree.cElementTree

2020-03-26 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Thank you for catching this Fred. I am surprised that some code uses 
xml.etree.cElementTree without falling back to xml.etree.ElementTree. In Python 
3 you can just use xml.etree.ElementTree, in Python 2 you have to fallback to 
the Python implementation because the C implementation was optional.

--

___
Python tracker 

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



[issue40065] py39: remove deprecation note for xml.etree.cElementTree

2020-03-26 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

The common idiom is

try:
import xml.etree.cElementTree as ET
except ImportError:
import xml.etree.ElementTree as ET

--

___
Python tracker 

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



[issue39879] Update language reference to specify that dict is insertion-ordered.

2020-03-26 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 6.0 -> 7.0
pull_requests: +18533
pull_request: https://github.com/python/cpython/pull/19173

___
Python tracker 

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



[issue39879] Update language reference to specify that dict is insertion-ordered.

2020-03-26 Thread Zachary Ware


Zachary Ware  added the comment:


New changeset 59c644eaa72b0cc48302f59d66852c4ea8332eba by Lahfa Samy in branch 
'master':
bpo-39879: Update datamodel docs to include dict ordering (GH-19006)
https://github.com/python/cpython/commit/59c644eaa72b0cc48302f59d66852c4ea8332eba


--

___
Python tracker 

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



[issue39879] Update language reference to specify that dict is insertion-ordered.

2020-03-26 Thread miss-islington


Change by miss-islington :


--
pull_requests: +18534
pull_request: https://github.com/python/cpython/pull/19174

___
Python tracker 

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



[issue39879] Update language reference to specify that dict is insertion-ordered.

2020-03-26 Thread miss-islington


miss-islington  added the comment:


New changeset ea0eeb8d3a0544334f8836c98a761b2e3df2bd94 by Miss Islington (bot) 
in branch '3.7':
bpo-39879: Update datamodel docs to include dict ordering (GH-19006)
https://github.com/python/cpython/commit/ea0eeb8d3a0544334f8836c98a761b2e3df2bd94


--

___
Python tracker 

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



[issue39879] Update language reference to specify that dict is insertion-ordered.

2020-03-26 Thread miss-islington


miss-islington  added the comment:


New changeset 96686c761d0587080effc113367431a0d396eb45 by Miss Islington (bot) 
in branch '3.8':
bpo-39879: Update datamodel docs to include dict ordering (GH-19006)
https://github.com/python/cpython/commit/96686c761d0587080effc113367431a0d396eb45


--

___
Python tracker 

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



[issue39879] Update language reference to specify that dict is insertion-ordered.

2020-03-26 Thread Zachary Ware


Zachary Ware  added the comment:

Thanks for the patch!

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



[issue40065] py39: remove deprecation note for xml.etree.cElementTree

2020-03-26 Thread Fred Drake


Fred Drake  added the comment:

The Python 2.7 documentation was not clear that xml.etree.cElementTree was 
optional, so users who didn't dive into the implementation or build process 
could easily not have known unless someone with a more limited installation 
used their code.

--

___
Python tracker 

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



[issue39879] Update language reference to specify that dict is insertion-ordered.

2020-03-26 Thread STINNER Victor


STINNER Victor  added the comment:

What's New in Python 3.7 says:

> the insertion-order preservation nature of dict objects has been declared to 
> be an official part of the Python language spec.

Reference: 
https://mail.python.org/pipermail/python-dev/2017-December/151283.html

I just wanted to add a reference for this change. I wanted to check if it is ok 
to modify the doc: yes, it is :-)

--
nosy: +vstinner

___
Python tracker 

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



[issue1812] doctest _load_testfile function -- newline handling seems incorrect

2020-03-26 Thread Zachary Ware


Zachary Ware  added the comment:


New changeset e0b8101492f6c61dee831425b4d3dae39a953599 by Peter Donis in branch 
'master':
bpo-1812: Fix newline conversion when doctest.testfile loads from a package 
whose loader has a get_data method (GH-17385)
https://github.com/python/cpython/commit/e0b8101492f6c61dee831425b4d3dae39a953599


--

___
Python tracker 

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



[issue1812] doctest _load_testfile function -- newline handling seems incorrect

2020-03-26 Thread miss-islington


Change by miss-islington :


--
pull_requests: +18536
pull_request: https://github.com/python/cpython/pull/19176

___
Python tracker 

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



[issue1812] doctest _load_testfile function -- newline handling seems incorrect

2020-03-26 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



[issue40076] isoformat function drops microseconds part if its value is 000000

2020-03-26 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +belopolsky, p-ganssle

___
Python tracker 

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



[issue40077] Convert static types to PyType_FromSpec()

2020-03-26 Thread Dong-hee Na


New submission from Dong-hee Na :

Some of modules is not using PyType_FromSpec.
We need to convert them.

This changes can bring
- allow to destroy types at exit!
- allow subinterpreters to have their own "isolated" typ

--
messages: 365087
nosy: corona10, vstinner
priority: normal
severity: normal
status: open
title: Convert static types to PyType_FromSpec()

___
Python tracker 

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



[issue40077] Convert static types to PyType_FromSpec()

2020-03-26 Thread STINNER Victor


STINNER Victor  added the comment:

> We need to convert them.

Let me elaborate. Static types have multiple issues:

* Their lifetime is not well defined.
* It is not obvious when they are ready to be used.
* They are not destroyed at exit.
* They are incompatible with subinterpreters: each interpreter should have its 
own copy of a type, rather than static types are shared by all interpreters 
which cause problems with reference counting (require GIL or atomic operation).
* They are causing issues with stable ABI (limited C API): PEP 384.

--

___
Python tracker 

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



[issue40077] Convert static types to PyType_FromSpec()

2020-03-26 Thread Dong-hee Na


Change by Dong-hee Na :


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

___
Python tracker 

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



[issue40076] isoformat function drops microseconds part if its value is 000000

2020-03-26 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

Does timespec fulfill this use case to always return microseconds?

https://docs.python.org/3/library/datetime.html#datetime.datetime.isoformat

Return a string representing the date and time in ISO 8601 format:
-MM-DDTHH:MM:SS.ff, if microsecond is not 0
-MM-DDTHH:MM:SS, if microsecond is 0

The optional argument timespec specifies the number of additional components of 
the time to include (the default is 'auto'). It can be one of the following:

'auto': Same as 'seconds' if microsecond is 0, same as 'microseconds' 
otherwise.
'hours': Include the hour in the two-digit HH format.
'minutes': Include hour and minute in HH:MM format.
'seconds': Include hour, minute, and second in HH:MM:SS format.
'milliseconds': Include full time, but truncate fractional second part to 
milliseconds. HH:MM:SS.sss format.
'microseconds': Include full time in HH:MM:SS.ff format.



./python
Python 3.9.0a4+ (heads/master:6723e933c4, Mar 21 2020, 06:54:01) 
[GCC 7.5.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import datetime
>>> datetime.datetime(1, 1, 1).isoformat(timespec='auto')
'0001-01-01T00:00:00'
>>> datetime.datetime(1, 1, 1).isoformat(timespec='microseconds')
'0001-01-01T00:00:00.00'

--
nosy: +xtreak

___
Python tracker 

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



[issue40075] _tkinter PythonCmd fails to acquire GIL

2020-03-26 Thread Thomas Holder


Change by Thomas Holder :


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

___
Python tracker 

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



[issue1812] doctest _load_testfile function -- newline handling seems incorrect

2020-03-26 Thread miss-islington


miss-islington  added the comment:


New changeset b05fbe9f374bc660af3c589a1146b2026606d442 by Miss Islington (bot) 
in branch '3.8':
bpo-1812: Fix newline conversion when doctest.testfile loads from a package 
whose loader has a get_data method (GH-17385)
https://github.com/python/cpython/commit/b05fbe9f374bc660af3c589a1146b2026606d442


--

___
Python tracker 

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



[issue1812] doctest _load_testfile function -- newline handling seems incorrect

2020-03-26 Thread miss-islington


miss-islington  added the comment:


New changeset 9387678f8a580726aca5f836b2c50456f236ecbb by Miss Islington (bot) 
in branch '3.7':
bpo-1812: Fix newline conversion when doctest.testfile loads from a package 
whose loader has a get_data method (GH-17385)
https://github.com/python/cpython/commit/9387678f8a580726aca5f836b2c50456f236ecbb


--

___
Python tracker 

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



[issue1812] doctest _load_testfile function -- newline handling seems incorrect

2020-03-26 Thread Zachary Ware

Zachary Ware  added the comment:

12 years later, we finally landed your fix :).  Thanks for the patch, and for 
bearing with us (and me in particular for the past couple months).

As mentioned in the PR, there is probably opportunity to clean up the cleanup 
code in the new test a bit, and as Éric and Ammar mentioned here and in review, 
it could be interesting to use TextIOWrapper instead (though we'd probably only 
make that change in 3.9).  If you're interesting in doing a follow-up PR, it 
can either be attached to this issue (in spite of it being closed) or a new 
issue opened.

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.7, Python 3.8

___
Python tracker 

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



[issue40049] tarfile cannot extract from stdin

2020-03-26 Thread Manjusaka


Manjusaka  added the comment:

Hello
 
I can't reproduce this issue on my Laptop from 3.8.1 to 3.9.0a4

I think maybe it depends on the file you use

would you mind to upload the file with the problem?

--
nosy: +Manjusaka

___
Python tracker 

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



[issue40043] RegExp Conditional Construct (?(id/name)yes-pattern|no-pattern) Problem

2020-03-26 Thread Matthew Barnett


Matthew Barnett  added the comment:

That's what searching does!

Does the pattern match here? If not, advance by one character and try again. 
Repeat until a match is found or you've reached the end.

--

___
Python tracker 

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



[issue40052] Incorrect pointer alignment in _PyVectorcall_Function() of cpython/abstract.h

2020-03-26 Thread Matej Cepl


Change by Matej Cepl :


--
nosy: +mcepl
nosy_count: 3.0 -> 4.0
pull_requests: +18539
pull_request: https://github.com/python/cpython/pull/19179

___
Python tracker 

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



[issue40078] asyncio subprocesses allow pids to be reaped, different behavior than regular subprocesses

2020-03-26 Thread Justin Lebar


New submission from Justin Lebar :

>From https://bugs.python.org/issue1187312 about regular subprocesses:

> So as long as the application keeps a reference to the
> subprocess object, it can wait for it; auto-reaping only
> starts when the last reference was dropped [in Popen.__del__].

asyncio subprocesses seem to behave differently.  When we notice the process 
has exited in BaseSubprocessTransport._process_exited, we call _try_finish(), 
which -- if all pipes are closed -- calls _call_connection_lost and sets 
self._proc to None.

At this point, my understanding is that once self._proc is GC'ed, we'll run 
Popen.__del__ and may reap the pid.

I would expect asyncio subprocesses to behave the same way as regular Popen 
objects wrt pid reaping.

--
components: asyncio
messages: 365095
nosy: Justin.Lebar, asvetlov, yselivanov
priority: normal
severity: normal
status: open
title: asyncio subprocesses allow pids to be reaped, different behavior than 
regular subprocesses

___
Python tracker 

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



[issue1187312] subprocess: optional auto-reaping fixing os.wait() lossage

2020-03-26 Thread Justin Lebar


Justin Lebar  added the comment:

15 years later, it seems asyncio subprocesses may have the same issue.  :)

https://bugs.python.org/issue40078

--
nosy: +Justin.Lebar

___
Python tracker 

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



[issue40078] asyncio subprocesses allow pids to be reaped, different behavior than regular subprocesses

2020-03-26 Thread Justin Lebar


Change by Justin Lebar :


--
versions: +Python 3.7, Python 3.8

___
Python tracker 

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



[issue40078] asyncio subprocesses allow pids to be reaped, different behavior than regular subprocesses

2020-03-26 Thread Justin Lebar


Change by Justin Lebar :


--
type:  -> behavior
versions: +Python 3.9

___
Python tracker 

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



[issue33608] Add a cross-interpreter-safe mechanism to indicate that an object may be destroyed.

2020-03-26 Thread Paulo Henrique Silva


Change by Paulo Henrique Silva :


--
nosy: +phsilva

___
Python tracker 

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



[issue19698] Implement _imp.exec_builtin and exec_dynamic

2020-03-26 Thread Brett Cannon


Brett Cannon  added the comment:


New changeset 8dad09a2242194a4101374b91ce87bb47a487cf7 by Miss Islington (bot) 
in branch '3.8':
bpo-19698: Document when importlib.machinery.FrozenImporter gained spec-related 
methods (GH-19158) (#19164)
https://github.com/python/cpython/commit/8dad09a2242194a4101374b91ce87bb47a487cf7


--

___
Python tracker 

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



[issue19698] Implement _imp.exec_builtin and exec_dynamic

2020-03-26 Thread Brett Cannon


Brett Cannon  added the comment:


New changeset 2929bfb973da249ed4f056c88a69bcc48e5a4843 by Miss Islington (bot) 
in branch '3.7':
bpo-19698: Document when importlib.machinery.FrozenImporter gained spec-related 
methods (GH-19158) (GH-19165)
https://github.com/python/cpython/commit/2929bfb973da249ed4f056c88a69bcc48e5a4843


--

___
Python tracker 

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



[issue38644] Pass explicitly tstate to function calls

2020-03-26 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +18540
pull_request: https://github.com/python/cpython/pull/19180

___
Python tracker 

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



[issue40053] Document the behavior that no interplotation is applied when no *args are passed in for logging statements

2020-03-26 Thread Nan Hua


Nan Hua  added the comment:

Note that this issue has already been mostly addressed by 
https://github.com/python/cpython/pull/19132. I think we can close this issue 
now. Thanks Eric, Gregory and Vinay!

--
stage: needs patch -> 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



[issue40053] Document the behavior that no interplotation is applied when no *args are passed in for logging statements

2020-03-26 Thread Eric V. Smith


Eric V. Smith  added the comment:

Thanks for the bug report! I'll mark it "fixed". If there's more to do, let us 
know.

--
resolution:  -> fixed

___
Python tracker 

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



[issue39982] FreeBSD: SCTP tests of test_socket fails on AMD64 FreeBSD Shared 3.x

2020-03-26 Thread STINNER Victor


STINNER Victor  added the comment:

Ok, we got the confirmation that it's a regression in the FreeBSD kernel in 
FreeBSD CURRENT. The following commit reverts a change which introduced the 
race condition:
https://svnweb.freebsd.org/base?view=revision&revision=359302

I suggest to wait until this change lands on FreeBSD CURRENT buildbots (not 
workaround the bug in Python, since CURRENT is not released yet).

--

___
Python tracker 

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



[issue40049] tarfile cannot extract from stdin

2020-03-26 Thread Danijel


Danijel  added the comment:

Hi,

well, it says entity too large. I've attached a smaller one, that throws a 
similar but slightly different error. (Note: only on the _second_ extraction, 
it looks like problems with symlinks)

You can find larger ones here:

https://data.rbfh.de/issue40049/

The typescript*.txt are showing a shell session with two different python 
versions. (3.4.2 and 3.8.2)

--
Added file: https://bugs.python.org/file49003/test.tar

___
Python tracker 

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



[issue25024] Allow passing "delete=False" to TemporaryDirectory

2020-03-26 Thread Mauro S. M. Rodrigues


Mauro S. M. Rodrigues  added the comment:

So per Serhiy comment can I assume the patch is not necessary? If so I believe 
the issue should be closed as well.

--

___
Python tracker 

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



[issue38644] Pass explicitly tstate to function calls

2020-03-26 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 08faf0016e1ee590c78f64ddb244767c7801866a by Victor Stinner in 
branch 'master':
bpo-38644: Add _PySys_Audit() which takes tstate (GH-19180)
https://github.com/python/cpython/commit/08faf0016e1ee590c78f64ddb244767c7801866a


--

___
Python tracker 

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



[issue25024] Allow passing "delete=False" to TemporaryDirectory

2020-03-26 Thread Anthony Sottile


Anthony Sottile  added the comment:

Serhiy's comment provides workarounds but are still (imo) inferior to 
supporting this.

I would really like for this api to match that of NamedTemporaryFile which has 
the same `delete=...` option

--

___
Python tracker 

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



[issue25024] Allow passing "delete=False" to TemporaryDirectory

2020-03-26 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Could you please explain the difference between hypothetical 
TemporaryDirectory(delete=False) and simple mkdtemp()?

--

___
Python tracker 

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



[issue38644] Pass explicitly tstate to function calls

2020-03-26 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +18541
pull_request: https://github.com/python/cpython/pull/19182

___
Python tracker 

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



[issue38644] Pass explicitly tstate to function calls

2020-03-26 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +18542
pull_request: https://github.com/python/cpython/pull/19183

___
Python tracker 

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



[issue25024] Allow passing "delete=False" to TemporaryDirectory

2020-03-26 Thread Anthony Sottile


Anthony Sottile  added the comment:

the differences are api compatibility with context manager protocol and 
equivalence with NamedTemporaryFile

NamedTemporaryFile(delete=False) is just `mkstemp` afaict and the api is there

--

___
Python tracker 

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



[issue25024] Allow passing "delete=False" to TemporaryDirectory

2020-03-26 Thread Anthony Sottile


Anthony Sottile  added the comment:

you are right though, the effect is the same as just using mkdtemp

--

___
Python tracker 

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



[issue38644] Pass explicitly tstate to function calls

2020-03-26 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +18543
pull_request: https://github.com/python/cpython/pull/19184

___
Python tracker 

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



[issue25024] Allow passing "delete=False" to TemporaryDirectory

2020-03-26 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Well, then I think there is nothing to do this.

Compatibility with context manager protocol is not a goal if it does nothing on 
exit. In any case you can easy to make it in three lines:

@contextmanager
def mymkdtemp():
yield mkdtemp()

NamedTemporaryFile is more complex than mkstemp(). It creates a file object and 
closes a file descriptor even if leave the file on the filesystem.

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



[issue40012] Avoid Python 2 documentation to appear in Web search results

2020-03-26 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Sorry, the 'previous issue' is a vague memory which I cannot find.  For some 
reason, searching this tracker for 'Google' return 1500+ hits.

--

___
Python tracker 

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



[issue40076] isoformat function drops microseconds part if its value is 000000

2020-03-26 Thread SilentGhost


Change by SilentGhost :


--
nosy: +SilentGhost

___
Python tracker 

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



[issue40076] isoformat function drops microseconds part if its value is 000000

2020-03-26 Thread Alexander Bolshakov


Change by Alexander Bolshakov :


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



[issue40076] isoformat function drops microseconds part if its value is 000000

2020-03-26 Thread Paul Ganssle


Paul Ganssle  added the comment:

> isoformat function does not conform to the ISO 8601 and drops microseconds 
> part if its value is 00.

I'm not sure why you think that this does not conform to ISO 8601 - ISO 8601 is 
a sprawling beast of a spec and allows some crazy formats. Some examples of 
perfectly valid ISO 8601 strings:

--03-26
2020-W13-4T03
2020-03-26T03.5
2020-03-26T03,5
2020-03-26T03:30:40.334


There are *hundreds* of valid formats encompassed by ISO 8601.

Anyway, that's an aside. The behavior of .isoformat() is pretty clearly 
documented. These are the first three line of the documentation:

Return a string representing the date and time in ISO 8601 format:

  - -MM-DDTHH:MM:SS.ff, if microsecond is not 0
  - -MM-DDTHH:MM:SS, if microsecond is 0

I believe Karthikeyan has adequately explained how to get the behavior you 
want, so I am going to go ahead and close this as working as intended.

--

___
Python tracker 

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



[issue38644] Pass explicitly tstate to function calls

2020-03-26 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 728189884e0e128c4ffc57b785b04584d57a90c0 by Victor Stinner in 
branch 'master':
bpo-38644: Pass tstate explicitly in signalmodule.c (GH-19184)
https://github.com/python/cpython/commit/728189884e0e128c4ffc57b785b04584d57a90c0


--

___
Python tracker 

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



[issue38644] Pass explicitly tstate to function calls

2020-03-26 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 71a3522ef85df06a3acc718107360e37e4116a15 by Victor Stinner in 
branch 'master':
bpo-38644: Make tstate more explicit inside pystate.c (GH-19182)
https://github.com/python/cpython/commit/71a3522ef85df06a3acc718107360e37e4116a15


--

___
Python tracker 

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



[issue40079] NULL pointer deref on error path in _ssl debughelpers.c

2020-03-26 Thread Alexander Riccio


New submission from Alexander Riccio :

At line 138 in debughelpers.c, ssl_obj, which was set to NULL on line 122, is 
dereferenced. 

I think the original intent was to actually bubble the error up through the ssl 
object.



Full function:

static void
_PySSL_keylog_callback(const SSL *ssl, const char *line)
{
PyGILState_STATE threadstate;
PySSLSocket *ssl_obj = NULL;  /* ssl._SSLSocket, borrowed ref */
int res, e;
static PyThread_type_lock *lock = NULL;

threadstate = PyGILState_Ensure();

/* Allocate a static lock to synchronize writes to keylog file.
 * The lock is neither released on exit nor on fork(). The lock is
 * also shared between all SSLContexts although contexts may write to
 * their own files. IMHO that's good enough for a non-performance
 * critical debug helper.
 */
if (lock == NULL) {
lock = PyThread_allocate_lock();
if (lock == NULL) {
PyErr_SetString(PyExc_MemoryError, "Unable to allocate lock");
PyErr_Fetch(&ssl_obj->exc_type, &ssl_obj->exc_value,
&ssl_obj->exc_tb);
return;
}
}

ssl_obj = (PySSLSocket *)SSL_get_app_data(ssl);
assert(PySSLSocket_Check(ssl_obj));
if (ssl_obj->ctx->keylog_bio == NULL) {
return;
}

PySSL_BEGIN_ALLOW_THREADS
PyThread_acquire_lock(lock, 1);
res = BIO_printf(ssl_obj->ctx->keylog_bio, "%s\n", line);
e = errno;
(void)BIO_flush(ssl_obj->ctx->keylog_bio);
PyThread_release_lock(lock);
PySSL_END_ALLOW_THREADS

if (res == -1) {
errno = e;
PyErr_SetFromErrnoWithFilenameObject(PyExc_OSError,
 ssl_obj->ctx->keylog_filename);
PyErr_Fetch(&ssl_obj->exc_type, &ssl_obj->exc_value, &ssl_obj->exc_tb);
}
PyGILState_Release(threadstate);
}

--
assignee: christian.heimes
components: SSL
messages: 365114
nosy: Alexander Riccio, christian.heimes
priority: normal
severity: normal
status: open
title: NULL pointer deref on error path in _ssl debughelpers.c
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



[issue40074] pickle module dump and load: add support for string file names

2020-03-26 Thread Diego Palacios


Diego Palacios  added the comment:

In this case two new functions should be added to the pickle function. I think 
they would be very useful and many users would make use of them.

--

___
Python tracker 

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



[issue40077] Convert static types to PyType_FromSpec()

2020-03-26 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Wouldn't having more static types slow down startup time?

--
nosy: +pablogsal

___
Python tracker 

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



[issue40077] Convert static types to PyType_FromSpec()

2020-03-26 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Wouldn't having less static types slow down startup time?

--

___
Python tracker 

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



[issue40077] Convert static types to PyType_FromSpec()

2020-03-26 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
Removed message: https://bugs.python.org/msg365116

___
Python tracker 

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



[issue40080] Stripping annotations out as a new optimization mode

2020-03-26 Thread Batuhan Taskaya


New submission from Batuhan Taskaya :

Just like docstrings, annotations do nothing at runtime for the majority of the 
time. We can just strip out them and gain as much as the docstring optimization 
in bytecode size on a fully annotated repo.

For comparing these two optimizations, I calculated the bytecode weight 
(marshal dumped size of) of each optimization (with a similar implementation to 
the compiler but not exact) over a project which both rich in docstrings and 
annotations. 

Project: https://github.com/Instagram/LibCST

 $ python simple_tester.py LibCST 
Total bytes: 1820086
Total bytes after 629 docstrings (total length of 180333) removed: 1643315
Total bytes after 8859 type annotations removed: 1641594

(I've submitted the script I used to calculate these results.)

--
components: Interpreter Core
files: simple_tester.py
messages: 365118
nosy: BTaskaya
priority: normal
severity: normal
status: open
title: Stripping annotations out as a new optimization mode
type: enhancement
versions: Python 3.9
Added file: https://bugs.python.org/file49004/simple_tester.py

___
Python tracker 

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



[issue40080] Stripping annotations out as a new optimization mode

2020-03-26 Thread Batuhan Taskaya


Batuhan Taskaya  added the comment:

As an addition, I need to clarify that each optimization applied by its own.

--

___
Python tracker 

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



[issue1856] shutdown (exit) can hang or segfault with daemon threads running

2020-03-26 Thread STINNER Victor


STINNER Victor  added the comment:

bpo-1193099 was marked as a duplicate of this issue.

--

___
Python tracker 

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



[issue1193099] Embedded python thread crashes

2020-03-26 Thread STINNER Victor


Change by STINNER Victor :


--
superseder:  -> Embedded python thread crashes

___
Python tracker 

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



[issue40080] Stripping annotations out as a new optimization mode

2020-03-26 Thread Eric V. Smith


Eric V. Smith  added the comment:

Note that dataclasses will break without annotations.

--
nosy: +eric.smith

___
Python tracker 

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



[issue37247] swap distutils build_ext and build_py commands to allow proper SWIG extension installation

2020-03-26 Thread John Andersen


Change by John Andersen :


--
nosy: +pdxjohnny

___
Python tracker 

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



[issue40080] Stripping annotations out as a new optimization mode

2020-03-26 Thread Batuhan Taskaya


Batuhan Taskaya  added the comment:

> Note that dataclasses will break without annotations.

Yes, that is also affecting this simple tester script. There is no alternative 
to value-less annotated assignment.

I don't think this is preferable but just for information, these are the 
results for keeping AnnAssign nodes but just removing their annotation

def visit_AnnAssign(self, node):
self.stats += 1
node.annotation = ast.copy_location(ast.Constant(value=None), 
node.annotation)
return node

Total bytes: 1820086
Total bytes after 629 docstrings (total length of 180333) removed: 1643315
Total bytes after 8859 type annotations removed: 1664649

This way we can still support dataclasses but still gain as close as before

--

___
Python tracker 

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



[issue36989] test_thread fails because symbol is (no longer) exported

2020-03-26 Thread STINNER Victor


STINNER Victor  added the comment:

> Fatal Python error: Py_EndInterpreter: not the last thread

That's the bug bpo-36402 which I fixed with commit 
468e5fec8a2f534f1685d59da3ca4fad425c38dd in master.

--
nosy: +vstinner
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> threading._shutdown() race condition: test_threading 
test_threads_join_2() fails randomly

___
Python tracker 

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



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

2020-03-26 Thread Andy Lester


Change by Andy Lester :


--
pull_requests: +18544
pull_request: https://github.com/python/cpython/pull/19185

___
Python tracker 

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



[issue40080] Stripping annotations out as a new optimization mode

2020-03-26 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

I am -1 to this feature because compared with other optimization levels this 
can have unknown effects on the runtime, especially on dependencies you do not 
control. dataclasses is an example, but much more exist. To support this 
feature we would need also another extension for pyc files (like pyo) but (pyo) 
cannot be used to preserve backwards compatibility. Also, the feature will 
mainly serve to reduce file size, not much to speed up the runtime as any gain 
will be constant at definition time. IMHO the maintenance cost is too high for 
what the value is and it also has some potentially unintended dangerous 
consequences.

--
nosy: +pablogsal

___
Python tracker 

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



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

2020-03-26 Thread Andy Lester


Change by Andy Lester :


--
pull_requests: +18545
pull_request: https://github.com/python/cpython/pull/19186

___
Python tracker 

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



[issue40077] Convert static types to PyType_FromSpec()

2020-03-26 Thread STINNER Victor


STINNER Victor  added the comment:

Pablo:
> Wouldn't having less static types slow down startup time?

That's possible, even if I only expect a minor or non significant overhead.

But before starting talking about performances, we should focus on the 
correctness. Static types are causing issues with subinterpreters and the 
Python finalization.

--

___
Python tracker 

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



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

2020-03-26 Thread STINNER Victor


STINNER Victor  added the comment:

What is the rationale for adding const? For example, does the PR 19185 fix any 
compiler warning or any bug? While PR 19185 is correct, I am not sure that we 
should modify the 607K lines of C code of CPython to add const everywhere. I'm 
fine with using const for new code, but I'm not sure that it's worth it to 
modify exiting code.

--

___
Python tracker 

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



[issue40077] Convert static types to PyType_FromSpec()

2020-03-26 Thread Paulo Henrique Silva


Change by Paulo Henrique Silva :


--
nosy: +phsilva

___
Python tracker 

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



  1   2   >