[issue41071] from an int to a float , why

2020-06-22 Thread mike stern


New submission from mike stern :

please I would like to know why python changes an integer result in a division 
to a float even in the result is even

like print(2 / 2) gives 2.0 instead of 2

or 

a = 2 / 2
print(a)

--
components: Interpreter Core
messages: 372033
nosy: rskir...@hotmail.com
priority: normal
severity: normal
status: open
title: from an int to a float , why
type: behavior
versions: Python 3.7

___
Python tracker 

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



[issue34553] Python Crashes when trying to access any date related fields in MailItem

2020-06-22 Thread Nick Canfield


Nick Canfield  added the comment:

I'm having trouble with the .ReceivedTime breaking the program when I compile 
the .py script to an .exe using auto-py-to-exe.

Here's where the error occurs underneath this try: statement

try:
received_year = str(email.ReceivedTime)[0:4]
received_month = str(email.ReceivedTime)[5:7]
received_day = str(email.ReceivedTime)[8:10]

This works PERFECTLY well inside of my IDE (PyCharm), but once I've compiled it 
to .exe, it breaks here. 

I've updated pywin32 to the most up-to-date version (228) and also tried using 
224 to see if it was a version issue (it wasn't).

BUT!! Going through this, I FOUND THE BUG! When you compile to .exe with 
auto-py-to-exe, it does not include the package "win32timezone" which the 
.ReceivedTime portion needs to run correctly.

All you have to do to fix this is include this at the top of your .py script 
before compiling to .exe:
import win32timezone

Let me know if this works for anyone else facing this issue!

--
nosy: +Nick Canfield

___
Python tracker 

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



[issue41071] from an int to a float , why

2020-06-22 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

I cannot reproduce. 2 / 2 gives 1.0 to me.

As for reasons for changing the division operator, read PEP 238.

--
nosy: +serhiy.storchaka
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



[issue41056] minor NULL pointer and sign issues reported by Coverity

2020-06-22 Thread miss-islington


Change by miss-islington :


--
pull_requests: +20210
pull_request: https://github.com/python/cpython/pull/21039

___
Python tracker 

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



[issue41056] minor NULL pointer and sign issues reported by Coverity

2020-06-22 Thread miss-islington


miss-islington  added the comment:


New changeset 81328f30703bd7225e7e73aedb0994a7293ce190 by Gregory P. Smith in 
branch 'master':
bpo-41056: Fix reference to deallocated stack in pathconfig (Coverity) 
(GH-21013)
https://github.com/python/cpython/commit/81328f30703bd7225e7e73aedb0994a7293ce190


--

___
Python tracker 

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



[issue41056] minor NULL pointer and sign issues reported by Coverity

2020-06-22 Thread miss-islington


Change by miss-islington :


--
pull_requests: +20212
pull_request: https://github.com/python/cpython/pull/21041

___
Python tracker 

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



[issue41068] zipfile: read after write fails for non-ascii files

2020-06-22 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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

___
Python tracker 

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



[issue41069] Use non-ascii file names in tests by default

2020-06-22 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
dependencies: +zipfile: read after write fails for non-ascii files

___
Python tracker 

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



[issue41063] Avoid using the locale encoding for open() in tests

2020-06-22 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
dependencies: +Use non-ascii file names in tests by default

___
Python tracker 

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



[issue41072] Python

2020-06-22 Thread xcl


Change by xcl <1318683...@qq.com>:


--
nosy: xcl
priority: normal
severity: normal
status: open
title: Python

___
Python tracker 

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



[issue41072] Python

2020-06-22 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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



[issue41056] minor NULL pointer and sign issues reported by Coverity

2020-06-22 Thread miss-islington


miss-islington  added the comment:


New changeset d780fa7931d8ce94994827232d7cca79b0be3bf1 by Gregory P. Smith in 
branch 'master':
bpo-41056: Fix a possible MemoryError leak within zoneinfo. (GH-21007)
https://github.com/python/cpython/commit/d780fa7931d8ce94994827232d7cca79b0be3bf1


--

___
Python tracker 

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



[issue41040] Fix test_modulefinder

2020-06-22 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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

___
Python tracker 

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



[issue41061] Incorrect expressions / assert with side effect in hashtable

2020-06-22 Thread miss-islington


Change by miss-islington :


--
pull_requests: +20213
pull_request: https://github.com/python/cpython/pull/21042

___
Python tracker 

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



[issue41061] Incorrect expressions / assert with side effect in hashtable

2020-06-22 Thread miss-islington


miss-islington  added the comment:


New changeset 4901ea952691ad70aae21cfe04b6bd363b5a6aff by Christian Heimes in 
branch 'master':
bpo-41061: Fix incorrect expressions in hashtable (GH-21028)
https://github.com/python/cpython/commit/4901ea952691ad70aae21cfe04b6bd363b5a6aff


--
nosy: +miss-islington

___
Python tracker 

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



[issue40824] Unexpected errors in __iter__ are masked in "in" and the operator module

2020-06-22 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset cafe1b6e9d3594a34aba50e872d4198296ffaadf by Serhiy Storchaka in 
branch 'master':
bpo-40824: Do not mask errors in __iter__ in "in" and the operator module. 
(GH-20537)
https://github.com/python/cpython/commit/cafe1b6e9d3594a34aba50e872d4198296ffaadf


--

___
Python tracker 

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



[issue41056] minor NULL pointer and sign issues reported by Coverity

2020-06-22 Thread miss-islington


miss-islington  added the comment:


New changeset d5ee9b9940ba24120838b07061058afe931cfff1 by Miss Islington (bot) 
in branch '3.8':
bpo-41056: Fix reference to deallocated stack in pathconfig (Coverity) 
(GH-21013)
https://github.com/python/cpython/commit/d5ee9b9940ba24120838b07061058afe931cfff1


--

___
Python tracker 

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



[issue40824] Unexpected errors in __iter__ are masked in "in" and the operator module

2020-06-22 Thread miss-islington


Change by miss-islington :


--
pull_requests: +20216
pull_request: https://github.com/python/cpython/pull/21045

___
Python tracker 

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



[issue40824] Unexpected errors in __iter__ are masked in "in" and the operator module

2020-06-22 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 1.0 -> 2.0
pull_requests: +20214
pull_request: https://github.com/python/cpython/pull/21043

___
Python tracker 

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



[issue40824] Unexpected errors in __iter__ are masked in "in" and the operator module

2020-06-22 Thread miss-islington


Change by miss-islington :


--
pull_requests: +20215
pull_request: https://github.com/python/cpython/pull/21044

___
Python tracker 

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



[issue40824] Unexpected errors in __iter__ are masked in "in" and the operator module

2020-06-22 Thread miss-islington


Change by miss-islington :


--
pull_requests: +20217
pull_request: https://github.com/python/cpython/pull/21046

___
Python tracker 

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



[issue41056] minor NULL pointer and sign issues reported by Coverity

2020-06-22 Thread miss-islington


miss-islington  added the comment:


New changeset 9fe5decf5f38ae247f4f354dee27e4bfbe8bc5f8 by Miss Islington (bot) 
in branch '3.9':
bpo-41056: Fix reference to deallocated stack in pathconfig (Coverity) 
(GH-21013)
https://github.com/python/cpython/commit/9fe5decf5f38ae247f4f354dee27e4bfbe8bc5f8


--

___
Python tracker 

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



[issue41072] Python 3.8.3 passively introduced open source software contains CVE vulnerability

2020-06-22 Thread xcl

New submission from xcl <1318683...@qq.com>:

Open source software introduced passively in Python 3.8.3:
sqlite3(Documents involved sqlite3.dll),involve 
CVE-2020-11656,CVE-2020-11655,CVE-2020-13630,CVE-2020-13871,CVE-2020-9327,CVE-2020-13434,CVE-2020-13435,CVE-2020-13631,CVE-2020-13632
zlib 1.2.3(Documents involved 
wininst-7.1.exe、wininst-6.0.exe、wininst-9.0.exe、wininst-8.0.exe、wininst-9.0-amd64.exe).involve
 CVE-2016-9841,CVE-2016-9843,CVE-2016-9840,CVE-2016-9842
zlib 1.2.5(Documents involved wininst-14.0.exe、wininst-14.0-amd64.exe).involve 
CVE-2016-9841,CVE-2016-9843,CVE-2016-9840,CVE-2016-9842

zlib 1.2.8(Documents involved wininst-10.0.exe、wininst-10.0-amd64.exe).involve 
CVE-2016-9841,CVE-2016-9843,CVE-2016-9840,CVE-2016-9842
bzip2 1.0.6(Documents involved _bz2.pyd).involve 
CVE-2016-9841,CVE-2016-9843,CVE-2016-9840,CVE-2016-9842
openssl 1.1.1d(Documents involved 
_psycopg.cp38-win_amd64.pyd、_openssl.cp38-win_amd64.pyd).involve 
CVE-2020-1967,CVE-2019-1551
openssl 1.1.1f(Documents involved   
libcrypto-1_1.dll、libssl-1_1.dll).involve CVE-2020-1967
Does the above vulnerability pose a security risk to products using python 
3.8.3, or is there a fix

--
resolution: not a bug -> 
status: closed -> open
title: Python -> Python 3.8.3 passively introduced open source software 
contains CVE vulnerability
type:  -> security

___
Python tracker 

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



[issue41061] Incorrect expressions / assert with side effect in hashtable

2020-06-22 Thread miss-islington


miss-islington  added the comment:


New changeset f19ed6b0c77ba3bdaa1d8c304a61f2fa90b5d6ac by Miss Islington (bot) 
in branch '3.9':
bpo-41061: Fix incorrect expressions in hashtable (GH-21028)
https://github.com/python/cpython/commit/f19ed6b0c77ba3bdaa1d8c304a61f2fa90b5d6ac


--

___
Python tracker 

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



[issue40824] Unexpected errors in __iter__ are masked in "in" and the operator module

2020-06-22 Thread miss-islington


miss-islington  added the comment:


New changeset 353c4bab7d103cb66391a83f3c27cd75ae13a754 by Miss Islington (bot) 
in branch '3.9':
bpo-40824: Do not mask errors in __iter__ in "in" and the operator module. 
(GH-20537)
https://github.com/python/cpython/commit/353c4bab7d103cb66391a83f3c27cd75ae13a754


--

___
Python tracker 

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



[issue40824] Unexpected errors in __iter__ are masked in "in" and the operator module

2020-06-22 Thread miss-islington


miss-islington  added the comment:


New changeset b99824a8e14d94c3c5c29499a08fe70deb477d0c by Miss Islington (bot) 
in branch '3.8':
bpo-40824: Do not mask errors in __iter__ in "in" and the operator module. 
(GH-20537)
https://github.com/python/cpython/commit/b99824a8e14d94c3c5c29499a08fe70deb477d0c


--

___
Python tracker 

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



[issue26407] csv.writer.writerows masks exceptions from __iter__

2020-06-22 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 3.0 -> 4.0
pull_requests: +20218
pull_request: https://github.com/python/cpython/pull/21047

___
Python tracker 

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



[issue26407] csv.writer.writerows masks exceptions from __iter__

2020-06-22 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset c88239f864a27f673c0f0a9e62d2488563f9d081 by Serhiy Storchaka in 
branch 'master':
bpo-26407: Do not mask errors in csv. (GH-20536)
https://github.com/python/cpython/commit/c88239f864a27f673c0f0a9e62d2488563f9d081


--

___
Python tracker 

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



[issue41068] zipfile: read after write fails for non-ascii files

2020-06-22 Thread miss-islington


Change by miss-islington :


--
pull_requests: +20220
pull_request: https://github.com/python/cpython/pull/21049

___
Python tracker 

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



[issue41068] zipfile: read after write fails for non-ascii files

2020-06-22 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 36ff513f82e372ed3cea0bf7cbdf15a1ef6dab9e by Serhiy Storchaka in 
branch 'master':
bpo-41068: Fix read after write in zipfile for non-ASCII files names. (GH-21040)
https://github.com/python/cpython/commit/36ff513f82e372ed3cea0bf7cbdf15a1ef6dab9e


--

___
Python tracker 

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



[issue41068] zipfile: read after write fails for non-ascii files

2020-06-22 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 1.0 -> 2.0
pull_requests: +20219
pull_request: https://github.com/python/cpython/pull/21048

___
Python tracker 

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



[issue41068] zipfile: read after write fails for non-ascii files

2020-06-22 Thread miss-islington


Change by miss-islington :


--
pull_requests: +20221
pull_request: https://github.com/python/cpython/pull/21050

___
Python tracker 

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



[issue33738] PyIndex_Check conflicts with PEP 384

2020-06-22 Thread Ned Deily


Ned Deily  added the comment:

@serhiy, @Christian: Is there anything more needed to be done for this issue or 
can we close it?

--

___
Python tracker 

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



[issue41073] [C API] PyType_GetSlot() should accept static types

2020-06-22 Thread STINNER Victor


New submission from STINNER Victor :

To fix bpo-40170, I would like to modify Py_TRASHCAN_BEGIN() macro to use 
PyType_GetSlot() to get the deallocator function, rather than accessing 
directly the PyTypeObject.tp_dealloc member. The problem is that currently 
PyType_GetSlot() only works on heap allocated types.

Would it be possible to add support for statically allocated types to 
PyType_GetSlot()?

Py_TRASHCAN_BEGIN() is currently defined as:

#define Py_TRASHCAN_BEGIN(op, dealloc) \
Py_TRASHCAN_BEGIN_CONDITION(op, \
Py_TYPE(op)->tp_dealloc == (destructor)(dealloc))

--
components: C API
messages: 372049
nosy: vstinner
priority: normal
severity: normal
status: open
title: [C API] PyType_GetSlot() should accept static types
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



[issue40170] [C API] Make PyTypeObject structure an opaque structure in the public C API

2020-06-22 Thread STINNER Victor


STINNER Victor  added the comment:

> Py_TRASHCAN_BEGIN() access directly PyTypeObject.tp_dealloc (...) currently, 
> PyType_GetSlot() can only be used on a heap allocated types

I created bpo-41073: [C API] PyType_GetSlot() should accept static types.

--
versions: +Python 3.10 -Python 3.9

___
Python tracker 

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



[issue41068] zipfile: read after write fails for non-ascii files

2020-06-22 Thread miss-islington


miss-islington  added the comment:


New changeset d7f37d1ed4fd38555e3e5aad32d515c96b528df5 by Miss Islington (bot) 
in branch '3.8':
bpo-41068: Fix read after write in zipfile for non-ASCII files names. (GH-21040)
https://github.com/python/cpython/commit/d7f37d1ed4fd38555e3e5aad32d515c96b528df5


--

___
Python tracker 

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



[issue26407] csv.writer.writerows masks exceptions from __iter__

2020-06-22 Thread miss-islington


miss-islington  added the comment:


New changeset 5606d555b6e797625be9b0368472a86d8ad5252e by Miss Islington (bot) 
in branch '3.9':
bpo-26407: Do not mask errors in csv. (GH-20536)
https://github.com/python/cpython/commit/5606d555b6e797625be9b0368472a86d8ad5252e


--

___
Python tracker 

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



[issue41068] zipfile: read after write fails for non-ascii files

2020-06-22 Thread miss-islington


miss-islington  added the comment:


New changeset c916c48afc02c26a50843c7b381a2b567bb72e46 by Miss Islington (bot) 
in branch '3.9':
bpo-41068: Fix read after write in zipfile for non-ASCII files names. (GH-21040)
https://github.com/python/cpython/commit/c916c48afc02c26a50843c7b381a2b567bb72e46


--

___
Python tracker 

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



[issue40170] [C API] Make PyTypeObject structure an opaque structure in the public C API

2020-06-22 Thread STINNER Victor


STINNER Victor  added the comment:

PyIter_Check() and PySequence_ITEM() macros access directly PyTypeObject 
members and must be converted to opaque functions:

#define PyIter_Check(obj) \
(Py_TYPE(obj)->tp_iternext != NULL && \
 Py_TYPE(obj)->tp_iternext != &_PyObject_NextNotImplemented)

#define PySequence_ITEM(o, i)\
( Py_TYPE(o)->tp_as_sequence->sq_item(o, i) )

--

___
Python tracker 

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



[issue41005] Permission denied: 'xdg-settings' when executing 'jupyter notebook' from command line

2020-06-22 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 5.0 -> 6.0
pull_requests: +20222
pull_request: https://github.com/python/cpython/pull/21051

___
Python tracker 

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



[issue41005] Permission denied: 'xdg-settings' when executing 'jupyter notebook' from command line

2020-06-22 Thread miss-islington


Change by miss-islington :


--
pull_requests: +20223
pull_request: https://github.com/python/cpython/pull/21052

___
Python tracker 

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



[issue41005] Permission denied: 'xdg-settings' when executing 'jupyter notebook' from command line

2020-06-22 Thread Ronald Oussoren


Ronald Oussoren  added the comment:


New changeset 9e27bc0c1efc7478872f98729f87886e9333548f by Krishna Chivukula in 
branch 'master':
bpo-41005: Fixed perrmission error (GH-20936)
https://github.com/python/cpython/commit/9e27bc0c1efc7478872f98729f87886e9333548f


--

___
Python tracker 

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



[issue40170] [C API] Make PyTypeObject structure an opaque structure in the public C API

2020-06-22 Thread STINNER Victor


STINNER Victor  added the comment:

> PyIter_Check() and PySequence_ITEM() macros access directly PyTypeObject 
> members and must be converted to opaque functions: (...)

PyIter_Check() and PySequence_ITEM() are declared as functions in the limited C 
API, but overriden with macros in the CPython C API.

I suggest to simply remove the macros to always declare them as functions.

See bpo-33738 "PyIndex_Check conflicts with PEP 384" which added the functions.

See also Tools/scripts/pep384_macrocheck.py script.

--

___
Python tracker 

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



[issue33738] PyIndex_Check conflicts with PEP 384

2020-06-22 Thread STINNER Victor


STINNER Victor  added the comment:

Ned:
> @serhiy, @Christian: Is there anything more needed to be done for this issue 
> or can we close it?

The issue is fixed in Python 3.8, I close it.

See also bpo-40170 "[C API] Make PyTypeObject structure an opaque structure in 
the public C API" which goes further.

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



[issue38116] Make select module PEP-384 compatible

2020-06-22 Thread STINNER Victor


STINNER Victor  added the comment:

> PR 15971 is merged, what else is needed @dino.viehland?

Nothing, I close the issue.

--
nosy: +vstinner
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



[issue38073] Make pwd module PEP-384 compatible

2020-06-22 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue15654] PEP 384 Refactoring applied to bz2 module

2020-06-22 Thread STINNER Victor


STINNER Victor  added the comment:

Issue fixed by these two changes.

commit 5d38517aa1836542a5417b724c093bcb245f0f47
Author: Hai Shi 
Date:   Tue Feb 18 19:17:39 2020 +0800

bpo-1635741: Port _bz2 extension module to multiphase initialization(PEP 
489) (GH-18050)

commit ec689187957cc80af56b9a63251bbc295bafd781
Author: Dong-hee Na 
Date:   Sat Jun 20 00:56:13 2020 +0900

bpo-40077: Convert _bz2 module to use PyType_FromSpec (GH-20960)

--
nosy: +corona10, shihai1991, vstinner
resolution:  -> fixed
stage:  -> resolved
status: open -> closed
versions: +Python 3.10 -Python 3.4

___
Python tracker 

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



[issue15655] PEP 384 Refactoring applied to json module

2020-06-22 Thread STINNER Victor


STINNER Victor  added the comment:

Issue fixed in Python 3.9 with:

commit 33f15a16d40cb8010a8c758952cbf88d7912ee2d
Author: Dong-hee Na 
Date:   Fri Mar 27 19:59:59 2020 +0900

bpo-40077: Convert _json module to use PyType_FromSpec() (GH-19177)

Replace statically allocated types with heap allocated types:
use PyType_FromSpec().

Add a module state to store the Scanner and Encoder types.
Add traverse, clear and free functions to the module.

--
nosy: +corona10, vstinner
resolution:  -> fixed
stage:  -> resolved
status: open -> closed
versions: +Python 3.9 -Python 3.4

___
Python tracker 

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



[issue15655] PEP 384 Refactoring applied to json module

2020-06-22 Thread Antoine Pitrou


Change by Antoine Pitrou :


--
nosy:  -pitrou

___
Python tracker 

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



[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-06-22 Thread STINNER Victor


STINNER Victor  added the comment:

See also the 48 open issues with "pep3121" keyword:

https://bugs.python.org/issue?%40search_text=&ignore=file%3Acontent&title=&%40columns=title&id=&%40columns=id&stage=&creation=&creator=&activity=&%40columns=activity&%40sort=activity&actor=&nosy=&type=&components=&versions=&dependencies=&assignee=&keywords=13&priority=&status=1&%40columns=status&resolution=&nosy_count=&message_count=&%40group=&%40pagesize=50&%40startwith=0&%40sortdir=on&%40queryname=&%40old-queryname=&%40action=search

(yeah enjoy the ugly Roundup URL...)

--

___
Python tracker 

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



[issue15688] PEP 3121 Refactoring applied to nis module

2020-06-22 Thread STINNER Victor


STINNER Victor  added the comment:

Fixed by:

commit ddef3bdc7b254a7e1129a52c17d79cb7c73a88f5
Author: Dong-hee Na 
Date:   Fri Jun 12 11:26:00 2020 +0900

bpo-40950: Port nis module to multiphase initialization (GH-20811)

--
nosy: +vstinner
resolution:  -> fixed
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



[issue15691] PEP 3121, 384 Refactoring applied to posix module

2020-06-22 Thread STINNER Victor


STINNER Victor  added the comment:

Fixed by:

commit 1c2fa781560608aa4be50c748d4b3f403cfa5035
Author: Victor Stinner 
Date:   Sun May 10 11:05:29 2020 +0200

bpo-40549: Convert posixmodule.c to multiphase init (GH-19982)

Convert posixmodule.c ("posix" or "nt" module) to the multiphase
initialization (PEP 489).

* Create the module using PyModuleDef_Init().
* Create ScandirIteratorType and DirEntryType with the new
  PyType_FromModuleAndSpec() (PEP 573)
* Get the module state from ScandirIteratorType and DirEntryType with
  the new PyType_GetModule() (PEP 573)
* Pass module to functions which access the module state.
* convert_sched_param() gets a new module parameter. It is now called
  directly since Argument Clinic doesn't support passing the module
  to an argument converter callback.
* Remove _posixstate_global macro.

--
nosy: +vstinner
resolution:  -> fixed
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



[issue15685] PEP 3121, 384 Refactoring applied to itertools module

2020-06-22 Thread STINNER Victor


STINNER Victor  added the comment:

Fixed by:

commit 514c469719f149e1722a91a9d0c63bf89dfefb2a
Author: Dong-hee Na 
Date:   Wed Mar 18 02:46:24 2020 +0900

bpo-1635741: Port itertools module to multiphase initialization (GH-19044)

--
nosy: +corona10, vstinner
resolution:  -> fixed
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



[issue15685] PEP 3121, 384 Refactoring applied to itertools module

2020-06-22 Thread STINNER Victor


Change by STINNER Victor :


--
versions: +Python 3.10 -Python 3.4

___
Python tracker 

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



[issue15690] PEP 3121, 384 Refactoring applied to parser module

2020-06-22 Thread STINNER Victor


STINNER Victor  added the comment:

The parser module was removed in Python 3.10 (PEP 617).

--
nosy: +vstinner
resolution:  -> fixed
stage:  -> resolved
status: open -> closed
versions: +Python 3.10 -Python 3.4

___
Python tracker 

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



[issue15687] PEP 3121, 384 Refactoring applied to mmap module

2020-06-22 Thread STINNER Victor


STINNER Victor  added the comment:

Fixed by:

commit 3ad52e366fea37b02a3f619e6b7cffa7dfbdfa2e
Author: Dong-hee Na 
Date:   Sat Jun 6 00:01:02 2020 +0900

bpo-1635741: Port mmap module to multiphase initialization (GH-19459)

--
nosy: +corona10, vstinner
resolution:  -> fixed
stage:  -> resolved
status: open -> closed
versions: +Python 3.10 -Python 3.4

___
Python tracker 

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



[issue15689] PEP 3121, 384 Refactoring applied to operator module

2020-06-22 Thread STINNER Victor


STINNER Victor  added the comment:

Fixed by:

commit f3d5ac47720045a72f7ef5af13046d9531e6007b
Author: Paulo Henrique Silva 
Date:   Tue Mar 24 23:18:47 2020 -0300

bpo-1635741: Port operator module to multiphase initialization (PEP 489) 
(GH-19150)

--
nosy: +vstinner
resolution:  -> fixed
stage:  -> resolved
status: open -> closed
versions: +Python 3.10 -Python 3.4

___
Python tracker 

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



[issue15700] PEP 3121, 384 Refactoring applied to resource module

2020-06-22 Thread STINNER Victor


STINNER Victor  added the comment:

Fixed by:

commit 45f7008a66a30cdf749ec03e580bd2692be9a8df
Author: Hai Shi 
Date:   Thu Apr 2 20:35:08 2020 +0800

bpo-1635741: Port resource extension module to multiphase initialization 
(PEP 489) (GH-19252)

Fix also reference leaks on error.

--
nosy: +shihai1991, vstinner
resolution:  -> fixed
stage:  -> resolved
status: open -> closed
versions: +Python 3.10 -Python 3.4

___
Python tracker 

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



[issue38116] Make select module PEP-384 compatible

2020-06-22 Thread STINNER Victor


STINNER Victor  added the comment:

I marked bpo-15703 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



[issue15849] PEP 3121, 384 Refactoring applied to xx module

2020-06-22 Thread STINNER Victor


STINNER Victor  added the comment:

Fixed by:

commit d5cacbb1d9c3edc02bf0ba01702e7c06da5bc318
Author: Nick Coghlan 
Date:   Sat May 23 22:24:10 2015 +1000

PEP 489: Multi-phase extension module initialization

Known limitations of the current implementation:

- documentation changes are incomplete
- there's a reference leak I haven't tracked down yet

The leak is most visible by running:

  ./python -m test -R3:3 test_importlib

However, you can also see it by running:

  ./python -X showrefcount

Importing the array or _testmultiphase modules, and
then deleting them from both sys.modules and the local
namespace shows significant increases in the total
number of active references each cycle. By contrast,
with _testcapi (which continues to use single-phase
initialisation) the global refcounts stabilise after
a couple of cycles.

--
nosy: +vstinner
resolution:  -> fixed
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



[issue15703] PEP 3121, 384 Refactoring applied to select module

2020-06-22 Thread STINNER Victor


STINNER Victor  added the comment:

Fixed by:

New changeset f919054e539a5c1afde1b31c9fd7a8f5b2313311 by Dino Viehland in 
branch 'master':
bpo-38116: Convert select module to PEP-384 (#15971)
https://github.com/python/cpython/commit/f919054e539a5c1afde1b31c9fd7a8f5b2313311

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

--
nosy: +vstinner
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Make select module PEP-384 compatible

___
Python tracker 

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



[issue15849] PEP 3121, 384 Refactoring applied to xx module

2020-06-22 Thread STINNER Victor


STINNER Victor  added the comment:

Hum, I reopen the issue: the xx module still defines types statically and so 
the "PEP 384" part of this issue is not fixed yet.

--
resolution: fixed -> 
status: closed -> open

___
Python tracker 

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



[issue15849] PEP 3121, 384 Refactoring applied to xx module

2020-06-22 Thread STINNER Victor


STINNER Victor  added the comment:

See also bpo-40077: "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



[issue41068] zipfile: read after write fails for non-ascii files

2020-06-22 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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

___
Python tracker 

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



[issue40077] Convert static types to PyType_FromSpec()

2020-06-22 Thread STINNER Victor


STINNER Victor  added the comment:

Search also for issues with "384" in their title (34 open issues):

https://bugs.python.org/issue?%40search_text=&ignore=file%3Acontent&title=384&%40columns=title&id=&%40columns=id&stage=&creation=&creator=&activity=&%40columns=activity&%40sort=activity&actor=&nosy=&type=&components=&versions=&dependencies=&assignee=&keywords=&priority=&status=1&%40columns=status&resolution=&nosy_count=&message_count=&%40group=&%40pagesize=50&%40startwith=0&%40sortdir=on&%40queryname=&%40old-queryname=&%40action=search

Search for issues with pep3121 keyword (40 open issues):

https://bugs.python.org/issue?%40search_text=&ignore=file%3Acontent&title=&%40columns=title&id=&%40columns=id&stage=&creation=&creator=&activity=&%40columns=activity&%40sort=activity&actor=&nosy=&type=&components=&versions=&dependencies=&assignee=&keywords=13&priority=&status=1&%40columns=status&resolution=&nosy_count=&message_count=&%40group=&%40pagesize=50&%40startwith=0&%40sortdir=on&%40queryname=&%40old-queryname=&%40action=search

--

___
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-06-22 Thread STINNER Victor


STINNER Victor  added the comment:

For example, see bpo-15849 for the xx module.

--

___
Python tracker 

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



[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-06-22 Thread STINNER Victor


STINNER Victor  added the comment:

See meta bpo-15787 "PEP 3121, 384 Refactoring" which tracks all these issues as 
dependencies.

--

___
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-06-22 Thread STINNER Victor


STINNER Victor  added the comment:

See meta bpo-15787 "PEP 3121, 384 Refactoring" which tracks all these issues as 
dependencies.

--

___
Python tracker 

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



[issue40824] Unexpected errors in __iter__ are masked in "in" and the operator module

2020-06-22 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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

___
Python tracker 

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



[issue15711] PEP 3121, 384 Refactoring applied to time module

2020-06-22 Thread STINNER Victor


STINNER Victor  added the comment:

Fixed by:

commit bd409bb5b78e7ccac5fcda9ab4cec770552f3090
Author: Paulo Henrique Silva 
Date:   Mon Mar 23 15:58:23 2020 -0300

bpo-1635741: Port time module to multiphase initialization (PEP 489) 
(GH-19107)

--
nosy: +vstinner
resolution:  -> fixed
stage:  -> resolved
status: open -> closed
versions: +Python 3.10 -Python 3.4

___
Python tracker 

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



[issue15668] PEP 3121, 384 Refactoring applied to random module

2020-06-22 Thread STINNER Victor


STINNER Victor  added the comment:

The PEP 384 part was fixed by:

commit 04f0bbfbedf8d2bb69b012f853de6648b1a9f27f
Author: Dino Viehland 
Date:   Fri Sep 13 11:12:27 2019 +0100

bpo-38075: Port _randommodule.c to PEP-384 (GH-15798)

- Migrate `Random_Type` to `PyType_FromSpec`
- To simulate an old use of `PyLong_Type.tp_as_number->nb_absolute`, I added
  code to the module init function to stash `int.__abs__` for later
  use. Ideally we'd use `PyType_GetSlot()` instead, but it doesn't currently
  work for static types in CPython, and implementing it just for this case
  doesn't seem worth it.
- Do exact check for long and dispatch to PyNumber_Absolute, use vector 
call when not exact.

--
nosy: +vstinner

___
Python tracker 

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



[issue15652] PEP 3121, 384 refactoring applied to gdbm module

2020-06-22 Thread STINNER Victor


STINNER Victor  added the comment:

Fixed by:

commit c4862e333ab405dd5789b4061222db1982147de4
Author: Dong-hee Na 
Date:   Wed Jun 17 01:41:23 2020 +0900

bpo-1635741: Port _gdbm module to multiphase initialization (GH-20920)

--
nosy: +corona10, vstinner
resolution:  -> fixed
stage:  -> resolved
status: open -> closed
versions: +Python 3.10 -Python 3.4

___
Python tracker 

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



[issue15675] PEP 3121, 384 Refactoring applied to array module

2020-06-22 Thread STINNER Victor


STINNER Victor  added the comment:

The PEP 384 part is fixed by:

commit d5cacbb1d9c3edc02bf0ba01702e7c06da5bc318
Author: Nick Coghlan 
Date:   Sat May 23 22:24:10 2015 +1000

PEP 489: Multi-phase extension module initialization

Known limitations of the current implementation:

- documentation changes are incomplete
- there's a reference leak I haven't tracked down yet

The leak is most visible by running:

  ./python -m test -R3:3 test_importlib

However, you can also see it by running:

  ./python -X showrefcount

Importing the array or _testmultiphase modules, and
then deleting them from both sys.modules and the local
namespace shows significant increases in the total
number of active references each cycle. By contrast,
with _testcapi (which continues to use single-phase
initialisation) the global refcounts stabilise after
a couple of cycles.

--
nosy: +vstinner

___
Python tracker 

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



[issue15848] PEP 3121, 384 Refactoring applied to xxsubtype module

2020-06-22 Thread STINNER Victor


STINNER Victor  added the comment:

The PEP 3121 part is fixed by:

commit d5cacbb1d9c3edc02bf0ba01702e7c06da5bc318
Author: Nick Coghlan 
Date:   Sat May 23 22:24:10 2015 +1000

PEP 489: Multi-phase extension module initialization

Known limitations of the current implementation:

- documentation changes are incomplete
- there's a reference leak I haven't tracked down yet

The leak is most visible by running:

  ./python -m test -R3:3 test_importlib

However, you can also see it by running:

  ./python -X showrefcount

Importing the array or _testmultiphase modules, and
then deleting them from both sys.modules and the local
namespace shows significant increases in the total
number of active references each cycle. By contrast,
with _testcapi (which continues to use single-phase
initialisation) the global refcounts stabilise after
a couple of cycles.

--
nosy: +vstinner

___
Python tracker 

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



[issue41074] msilib does not work correctly with non-ASCII names

2020-06-22 Thread Serhiy Storchaka


New submission from Serhiy Storchaka :

It encodes input string arguments with utf-8 and pass encoded strings to 8-bit 
API which expect they be encoded using the locale encoding. It may pass tests, 
create and read files, but these files will just have wrong names.

--
components: Extension Modules, Windows
messages: 372083
nosy: paul.moore, serhiy.storchaka, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: msilib does not work correctly with non-ASCII names
type: behavior
versions: Python 3.10, 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



[issue41069] Use non-ascii file names in tests by default

2020-06-22 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
dependencies: +msilib does not work correctly with non-ASCII names

___
Python tracker 

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



[issue38870] Expose ast.unparse in the ast module

2020-06-22 Thread Batuhan Taskaya


Change by Batuhan Taskaya :


--
pull_requests: +20224
pull_request: https://github.com/python/cpython/pull/21053

___
Python tracker 

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



[issue41073] [C API] PyType_GetSlot() should accept static types

2020-06-22 Thread hai shi


Change by hai shi :


--
nosy: +shihai1991

___
Python tracker 

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



[issue41073] [C API] PyType_GetSlot() should accept static types

2020-06-22 Thread hai shi


hai shi  added the comment:

Hi, victor. If you have much bpo need to manage, I could take a look in this 
week :)

--

___
Python tracker 

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



[issue41075] Add support of navigating through prev. commands in IDLE

2020-06-22 Thread wyz23x2

New submission from wyz23x2 :

Terminals like CMD have support of navigating through commands with ↑↓. While 
directly implementing the arrows is not good in IDLE (the use for jumping to 
the prev. line in GUI is needed), there should be a good way.
Some ways:
1. Alt+↑↓. The current behavior is exactly like ↑↓.
2. A "Previous input" option in the right-click menu.
3. A "Navigate" option in the right-click menu. A GUI like this will pop up:
——
┃Navigate┃
┃  × The [4]th command   ┃
┃  O [1] command before  ┃
┃___ ┃
┃┃Paste┃ ┃
┃——— ┃
——

It would be better if 2&3 are together.

--
assignee: terry.reedy
components: IDLE
messages: 372085
nosy: terry.reedy, wyz23x2
priority: normal
severity: normal
status: open
title: Add support of navigating through prev. commands in IDLE
type: enhancement
versions: Python 3.10, 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



[issue27721] distutils strtobool returns 0 and 1 rather than False and True

2020-06-22 Thread Nathaniel Manista


Change by Nathaniel Manista :


--
nosy: +Nathaniel Manista

___
Python tracker 

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



[issue41076] Pre-feed the parser with the f-string location

2020-06-22 Thread Lysandros Nikolaou


New submission from Lysandros Nikolaou :

Inspired by bpo-41064, I sat down to try and find problems with f-string 
locations in the new parser. I was able to come up with a way to compute the 
locations of the f-string expressions that I think is more consistent and 
allows us to delete all the code that was fixing the expression locations after 
the actual parsing, which accounted for about 1/6 of string_parser.c.

A high-level explanation of the change:

Before this change we were pre-feeding the parser with the location of the 
f-string itself. The parser was then parsing the expression and was computing 
the locations of all the nodes based on the offset of the f-string. After the 
parsing was done, we were identifying the offset and the lineno of the 
expression *within* the fstring and were fixing the node locations accordingly. 
For example, for an f-string like `a = 0; f'irrelevant {a}'` we were doing the 
following:

- Pre-feed the parser with lineno=0 and col_offset=7 (the offset of the 
f-string itself in the current line).
- Parse the expression (adding 7 to the col_offset of each parsed node, lineno 
remains the same since it's 0).
- Fix the node locations by shifting the Name node by 14, which is the number 
of characters in the f-string (counting the `f` and the opening quote) before 
the start of the expression.

With this change we now pre-feed the parser with the exact lineno and offset of 
the expression itself, not the f-string. This allows us to completely skip the 
third step of shifting the node locations.

--
assignee: lys.nikolaou
components: Interpreter Core
messages: 372086
nosy: eric.smith, gvanrossum, lys.nikolaou, pablogsal
priority: normal
severity: normal
status: open
title: Pre-feed the parser with the f-string location
type: behavior
versions: Python 3.10, Python 3.9

___
Python tracker 

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



[issue41076] Pre-feed the parser with the f-string location

2020-06-22 Thread Lysandros Nikolaou


Change by Lysandros Nikolaou :


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

___
Python tracker 

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



[issue41077] Make Cookiejar a bit more pythonic

2020-06-22 Thread శ్రీనివాస్ రెడ్డి తాటిపర్తి

New submission from Srinivas  Reddy Thatiparthy(శ్రీనివాస్ రెడ్డి తాటిపర్తి) 
:

Title says it all.

--
messages: 372087
nosy: thatiparthy
priority: normal
severity: normal
status: open
title: Make Cookiejar a  bit more pythonic

___
Python tracker 

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



[issue41077] Make Cookiejar a bit more pythonic

2020-06-22 Thread శ్రీనివాస్ రెడ్డి తాటిపర్తి

Srinivas  Reddy Thatiparthy(శ్రీనివాస్ రెడ్డి తాటిపర్తి) 
 added the comment:

I am not sure this PR will be accepted. If you are a core dev, and thinks this 
is not Okay, please feel free close this issue.

--
keywords: +patch
message_count: 1.0 -> 2.0
pull_requests: +20226
stage:  -> patch review
versions: +Python 3.10
pull_request: https://github.com/python/cpython/pull/20872

___
Python tracker 

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



[issue41075] Add support of navigating through prev. commands in IDLE

2020-06-22 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

There is an old issue proposing making ↑↓ navigate through history in Shell, 
with cntl/alt ↑↓, for instance, navigating through lines.  


In the meanwhile, one is supposed to be able to redefine the abstract 
 and  keys in the Keys tab of the settings 
dialog.  For instance, to Alt-Down and Alt-Up.  However, it is not currently 
working as I expect and I need to investigate more.

A new history list mechanism is a possibility, but I would want to first change 
Shell to only add syntactically correct entries to the permanent list.  One 
should be able to edit a statement until it is correct, just as when trying to 
run from the editor.  This would reduce the need to retrieve history by perhaps 
half (depending on one's syntax knowledge and typing accuracy).

--

___
Python tracker 

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



[issue41077] Make Cookiejar a bit more pythonic

2020-06-22 Thread శ్రీనివాస్ రెడ్డి తాటిపర్తి

Change by Srinivas  Reddy Thatiparthy(శ్రీనివాస్ రెడ్డి తాటిపర్తి) 
:


--
resolution:  -> wont fix
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



[issue41077] Make Cookiejar a bit more pythonic

2020-06-22 Thread Rémi Lapeyre

Rémi Lapeyre  added the comment:

Hi Srinivas, as I said on the PR, cosmetic changes are usually not accepted. 
You can have a look at the other opened bug reports to find issues you can work 
on and at the Python Dev Guide (https://devguide.python.org/) for help to get 
started hacking Python!

--
nosy: +remi.lapeyre

___
Python tracker 

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



[issue41076] Pre-feed the parser with the f-string expression location

2020-06-22 Thread Lysandros Nikolaou


Change by Lysandros Nikolaou :


--
title: Pre-feed the parser with the f-string location -> Pre-feed the parser 
with the f-string expression location

___
Python tracker 

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



[issue41078] [C API] Convert PyTuple_GET_ITEM() macro to a static inline function

2020-06-22 Thread STINNER Victor


New submission from STINNER Victor :

PyTuple_GET_ITEM() can be abused to access directly the PyTupleObject.ob_item 
member:

   PyObject **items = &PyTuple_GET_ITEM(0);

Giving a direct access to an array or PyObject* (PyObject**) is causing issues 
with other Python implementations, like PyPy, which don't use PyObject 
internally.

I propose to convert the PyTuple_GET_ITEM() and PyList_GET_ITEM() macros to 
static inline functions to disallow that.

--
components: C API
messages: 372091
nosy: vstinner
priority: normal
severity: normal
status: open
title: [C API] Convert PyTuple_GET_ITEM() macro to a static inline function
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



[issue16623] argparse help formatter does not honor non-breaking space

2020-06-22 Thread Zackery Spytz


Zackery Spytz  added the comment:

Python 2 is EOL, so I think this issue should be closed.

--
nosy: +ZackerySpytz

___
Python tracker 

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



[issue41078] [C API] Convert PyTuple_GET_ITEM() macro to a static inline function

2020-06-22 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue41078] [C API] Convert PyTuple_GET_ITEM() macro to a static inline function

2020-06-22 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +20228
pull_request: https://github.com/python/cpython/pull/21057

___
Python tracker 

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



[issue41078] [C API] Convert PyTuple_GET_ITEM() macro to a static inline function

2020-06-22 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 384621c42f9102e31ba2c47feba144af09c989e5 by Victor Stinner in 
branch 'master':
bpo-41078: Rename pycore_tupleobject.h to pycore_tuple.h (GH-21056)
https://github.com/python/cpython/commit/384621c42f9102e31ba2c47feba144af09c989e5


--

___
Python tracker 

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



[issue41071] from an int to a float , why

2020-06-22 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

Mike, the bug tracker is not a help-desk for questions. There are many other 
forums where you can ask for help:

- the python-list and tutor mailing lists 
  https://www.python.org/community/lists/

- Stackoverflow

- The Python IRC channel https://www.python.org/community/irc/

- Reddit's r/learnpython

- https://python-forum.io/

--
nosy: +steven.daprano

___
Python tracker 

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



[issue41078] [C API] Convert PyTuple_GET_ITEM() macro to a static inline function

2020-06-22 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset c45dbe93b7094fe014442c198727ee38b25541c4 by Victor Stinner in 
branch 'master':
bpo-41078: Add pycore_list.h internal header file (GH-21057)
https://github.com/python/cpython/commit/c45dbe93b7094fe014442c198727ee38b25541c4


--

___
Python tracker 

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



[issue41078] [C API] Convert PyTuple_GET_ITEM() macro to a static inline function

2020-06-22 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +20229
pull_request: https://github.com/python/cpython/pull/21058

___
Python tracker 

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



[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-06-22 Thread Dong-hee Na


Dong-hee Na  added the comment:


New changeset 1937edd376274cb26090d71253191502a9de32d6 by Dong-hee Na in branch 
'master':
bpo-1635741: Port _lzma module to multiphase initialization  (GH-19382)
https://github.com/python/cpython/commit/1937edd376274cb26090d71253191502a9de32d6


--

___
Python tracker 

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



[issue41078] [C API] Convert PyTuple_GET_ITEM() macro to a static inline function

2020-06-22 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset c96d00e88ead8f99bb6aa1357928ac4545d9287c by Victor Stinner in 
branch 'master':
bpo-41078: Fix bltinmodule.c with Py_TRACE_REFS (GH-21058)
https://github.com/python/cpython/commit/c96d00e88ead8f99bb6aa1357928ac4545d9287c


--

___
Python tracker 

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



[issue41078] [C API] Convert PyTuple_GET_ITEM() macro to a static inline function

2020-06-22 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +20230
pull_request: https://github.com/python/cpython/pull/21059

___
Python tracker 

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



  1   2   >