[issue37207] Use PEP 590 vectorcall to speed up calls to range(), list() and dict()

2020-04-04 Thread Dong-hee Na


Dong-hee Na  added the comment:

IMHO, we can close this PR.

Summary:
The PEP 590 vectorcall is applied to list, tuple, dict, set, frozenset and range

If someone wants to apply PEP 590 to other cases.
Please open a new issue for it!

Thank you, Mark, Jeroen, Petr and everyone who works for this issue.

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

___
Python tracker 

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



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

2020-04-04 Thread Dong-hee Na


Change by Dong-hee Na :


--
pull_requests: +18745
pull_request: https://github.com/python/cpython/pull/19382

___
Python tracker 

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



[issue40193] thread.get_native_id() support for solaris

2020-04-04 Thread Batuhan Taskaya


Batuhan Taskaya  added the comment:

Looks like neither pthread_self nor thr_self gives the native id. Closing the 
issue...

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



[issue40191] tempfile.mkstemp() | Documentation Error

2020-04-04 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

I think you may have misread the documentation. It says:

"an OS-level handle to an open file"

which is what you call a file descriptor. Not a file object, which is what you 
get by calling the builtin `open`, but a file handle like you get from calling 
`os.open` (as stated).

So I believe that the documentation is correct, but given that at least one 
person misunderstood it, perhaps it could do with improvement.

Do you have any suggestion for improvement?

--
nosy: +steven.daprano

___
Python tracker 

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



[issue40193] thread.get_native_id() support for solaris

2020-04-04 Thread Batuhan Taskaya


New submission from Batuhan Taskaya :

Solaris supports accessing the native id of thread via pthread_self()
https://docs.oracle.com/cd/E19455-01/806-5257/6je9h032i/index.html#tlib-89129

--
messages: 365808
nosy: BTaskaya
priority: normal
severity: normal
status: open
title: thread.get_native_id() support for solaris

___
Python tracker 

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



[issue40192] time.thread_time isn't outputting in nanoseconds in AIX

2020-04-04 Thread Batuhan Taskaya


Change by Batuhan Taskaya :


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



[issue40192] time.thread_time isn't outputting in nanoseconds in AIX

2020-04-04 Thread Batuhan Taskaya


Change by Batuhan Taskaya :


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

___
Python tracker 

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



[issue40192] time.thread_time isn't outputting in nanoseconds in AIX

2020-04-04 Thread Batuhan Taskaya


New submission from Batuhan Taskaya :

The resolution for thread_time is really low on AIX, but fortunately there is a 
way to get thread time in nanoseconds with thread_cputime.

-bash-4.4$ ./python
Python 3.9.0a5+ (heads/master:909f4a3, Apr  4 2020, 20:15:24) [C] on aix
Type "help", "copyright", "credits" or "license" for more information.
>>> import time
>>> time.thread_time()
0.02

--
components: Library (Lib)
messages: 365807
nosy: BTaskaya, pitrou
priority: normal
severity: normal
status: open
title: time.thread_time isn't outputting in nanoseconds in AIX
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



[issue40190] Add support for _SC_AIX_REALMEM in posix.sysconf

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



[issue40190] Add support for _SC_AIX_REALMEM in posix.sysconf

2020-04-04 Thread STINNER Victor

STINNER Victor  added the comment:


New changeset 909f4a30093f74d409711e564f93a43167ca0919 by Batuhan Taşkaya in 
branch 'master':
bpo-40190: Add support for _SC_AIX_REALMEM in sysconf (GH-19380)
https://github.com/python/cpython/commit/909f4a30093f74d409711e564f93a43167ca0919


--
nosy: +vstinner

___
Python tracker 

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



[issue40191] tempfile.mkstemp() | Documentation Error

2020-04-04 Thread Howard Waterfall


New submission from Howard Waterfall :

The documentation for tempfile.mkstemp() says:
returns a tuple containing an OS-level handle to an open file (as would be 
returned by os.open()) and the absolute pathname of that file, in that order.

I don't believe this is correct. It should say:
returns a tuple containing an OS-level file descriptor and the absolute 
pathname of that file, in that order.

I say this because this works:
file_descriptor, uri = tempfile.mkstemp()
open_file = os.fdopen(file_descriptor, 'w')
open_file.write("hello world")
print(uri)

but this raises an error:
open_file, uri = tempfile.mkstemp()
open_file.write("hello world")
print(uri)

Traceback (most recent call last):
File "test.py", line 78, in 
main()
File "test.py", line 74, in main
open_file.write("hello world")
AttributeError: 'int' object has no attribute 'write'

--
assignee: docs@python
components: Documentation
messages: 365805
nosy: Howard Waterfall, docs@python
priority: normal
severity: normal
status: open
title: tempfile.mkstemp() | Documentation Error
type: behavior
versions: Python 3.8

___
Python tracker 

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



[issue40188] Azure Pipelines jobs failing randomly with: Unable to connect to azure.archive.ubuntu.com

2020-04-04 Thread Batuhan Taskaya


Change by Batuhan Taskaya :


--
keywords:  -patch
stage: patch review -> 

___
Python tracker 

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



[issue40188] Azure Pipelines jobs failing randomly with: Unable to connect to azure.archive.ubuntu.com

2020-04-04 Thread Batuhan Taskaya


Change by Batuhan Taskaya :


--
keywords: +patch
nosy: +BTaskaya
nosy_count: 2.0 -> 3.0
pull_requests: +18743
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/19380

___
Python tracker 

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



[issue40190] Add support for _SC_AIX_REALMEM in posix.sysconf

2020-04-04 Thread Batuhan Taskaya


Change by Batuhan Taskaya :


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

___
Python tracker 

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



[issue40190] Add support for _SC_AIX_REALMEM in posix.sysconf

2020-04-04 Thread Batuhan Taskaya


New submission from Batuhan Taskaya :

We already have support for linux alternatives of this (PHYS_PAGES * PAGESIZE), 
it would good to add AIX_REALMEM to sysconf for AIX.

--
components: Library (Lib)
messages: 365804
nosy: BTaskaya
priority: normal
severity: normal
status: open
title: Add support for _SC_AIX_REALMEM in posix.sysconf
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



[issue40189] MultiProcessing Subclass - overrides run method issue

2020-04-04 Thread Guy Kogan


Change by Guy Kogan :


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



[issue40189] MultiProcessing Subclass - overrides run method issue

2020-04-04 Thread Guy Kogan


Guy Kogan  added the comment:

I have fixed the issue

--
resolution:  -> fixed

___
Python tracker 

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



[issue40189] MultiProcessing Subclass - overrides run method issue

2020-04-04 Thread Guy Kogan


New submission from Guy Kogan :

unable to override run method. 

when running the code i am unable to run the "run" function

output from the code: 

Process 0 has been created
Process 1 has been created
Join for process  is done
Join for process  is done
Test Done

--
files: Multi-processing_SYN_scan.py
messages: 365802
nosy: Python_dev_IL
priority: normal
severity: normal
status: open
title: MultiProcessing Subclass - overrides run method issue
versions: Python 3.8
Added file: https://bugs.python.org/file49035/Multi-processing_SYN_scan.py

___
Python tracker 

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



[issue40180] isinstance(cls_with_metaclass, non_type) raises KeyError

2020-04-04 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

> Sorry, I should have quoted the doc.  " If object is not an object of the 
> given type, the function always returns False."  Raising instead is a bug -- 
> even of the object itself is somewhat buggy.

You take it too literally. It does not mean that the function always returns a 
value. It can also raise an exception. If you press Ctrl-C it may raise an 
exception. If there is no memory to create some temporary objects, it may raise 
an exception. If you turn of the computer, it may neither return a value nor 
raise an exception.

You created a class whose __class__ attribute always raises an exception. What 
do you expect to get when you use this attribute? {}.__getitem__ always raise a 
KeyError, because an empty dict does not contain any key.

--

___
Python tracker 

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



[issue40174] HAVE_CLOCK_GETTIME not repected in pytime.c

2020-04-04 Thread STINNER Victor


STINNER Victor  added the comment:

Usually, what I did to use #error in the C code. Something like:

#ifdef MS_WINDOWS
...
#elif defined(...)
...
#else
#  error "your platform doesn't support monotonic clock"
#endif

I dislike relying on configure for that, it's too far from the actual 
implementation (like pymonotonic()).

--

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


Change by STINNER Victor :


--
pull_requests: +18741
pull_request: https://github.com/python/cpython/pull/19379

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


Change by STINNER Victor :


--
pull_requests: +18740
pull_request: https://github.com/python/cpython/pull/19378

___
Python tracker 

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



[issue40188] Azure Pipelines jobs failing randomly with: Unable to connect to azure.archive.ubuntu.com

2020-04-04 Thread STINNER Victor


Change by STINNER Victor :


--
title: Azure Pipelines jobs failing randomy with: Unable to connect to 
azure.archive.ubuntu.com -> Azure Pipelines jobs failing randomly with: Unable 
to connect to azure.archive.ubuntu.com

___
Python tracker 

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



[issue39837] Remove Azure Pipelines from GitHub PRs

2020-04-04 Thread STINNER Victor


STINNER Victor  added the comment:

> There is another issue: sometimes, the Ubuntu VM fails to download .deb from 
> azure.archive.ubuntu.com.

I created bpo-40188: "Azure Pipelines jobs failing randomly with: Unable to 
connect to azure.archive.ubuntu.com".

--

___
Python tracker 

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



[issue40188] Azure Pipelines jobs failing randomy with: Unable to connect to azure.archive.ubuntu.com

2020-04-04 Thread STINNER Victor


New submission from STINNER Victor :

Example:

https://github.com/python/cpython/pull/19375/checks?check_run_id=561058404
of https://github.com/python/cpython/pull/19375

The Install Dependencies step failed with:

 sudo ./.github/workflows/posix-deps-apt.sh && sudo apt-get install wamerican
(...)
Err:1 http://azure.archive.ubuntu.com/ubuntu bionic/universe amd64 lcov all 
1.13-3
  Could not connect to azure.archive.ubuntu.com:80 (52.177.174.250), connection 
timed out [IP: 52.177.174.250 80]
Err:2 http://azure.archive.ubuntu.com/ubuntu bionic/main amd64 libgdbm-dev 
amd64 1.14.1-6
  Unable to connect to azure.archive.ubuntu.com:http: [IP: 52.177.174.250 80]
(..)
Err:15 http://azure.archive.ubuntu.com/ubuntu bionic-updates/main amd64 
uuid-dev amd64 2.31.1-0.4ubuntu3.6
  Unable to connect to azure.archive.ubuntu.com:http: [IP: 52.177.174.250 80]
Get:5 http://security.ubuntu.com/ubuntu bionic-updates/main amd64 
libsqlite3-dev amd64 3.22.0-1ubuntu0.3 [632 kB]
Fetched 632 kB in 1min 1s (10.5 kB/s)
E: Failed to fetch 
http://azure.archive.ubuntu.com/ubuntu/pool/universe/l/lcov/lcov_1.13-3_all.deb 
 Could not connect to azure.archive.ubuntu.com:80 (52.177.174.250), connection 
timed out [IP: 52.177.174.250 80]
E: Failed to fetch 
http://azure.archive.ubuntu.com/ubuntu/pool/main/g/gdbm/libgdbm-dev_1.14.1-6_amd64.deb
  Unable to connect to azure.archive.ubuntu.com:http: [IP: 52.177.174.250 80]
(...)
E: Failed to fetch 
http://azure.archive.ubuntu.com/ubuntu/pool/main/u/util-linux/uuid-dev_2.31.1-0.4ubuntu3.6_amd64.deb
  Unable to connect to azure.archive.ubuntu.com:http: [IP: 52.177.174.250 80]
E: Unable to fetch some archives, maybe run apt-get update or try with 
--fix-missing?
##[error]Process completed with exit code 100.

--
components: Tests
messages: 365798
nosy: steve.dower, vstinner
priority: normal
severity: normal
status: open
title: Azure Pipelines jobs failing randomy with: Unable to connect to 
azure.archive.ubuntu.com
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



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

2020-04-04 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +18739
pull_request: https://github.com/python/cpython/pull/19377

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


Change by STINNER Victor :


--
pull_requests: +18738
pull_request: https://github.com/python/cpython/pull/19376

___
Python tracker 

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



[issue40180] isinstance(cls_with_metaclass, non_type) raises KeyError

2020-04-04 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

(Serhiy posted while I wrote this.)
Sorry, I should have quoted the doc.  " If object is not an object of the given 
type, the function always returns False."  Raising instead is a bug -- even of 
the object itself is somewhat buggy.

My knowledge of the C codebase is insufficient to review, let alone write, 
non-trivial changes.  But I was curious where and why Object itself was being 
used as a key. I presume
  retval = _PyObject_LookupAttrId(inst, ___class__, );
is roughly equivalent to Object.__class__ and indeed, that raises the KeyError. 
 I presume the why has something to do with the interaction between 
metaclasses, properties, and slots.  So if the details are correct, your patch 
should plug this hole.  Can you submit a PR with added test?

Issue background.  The example is from Dan Snider, OP of #38689.  When he typed 
'Object(' into IDLE, IDLE tried to pop up a calltip.  But 
inspect.signature(Object) failed with the (unexpected and undocumented) 
KeyError when it called isinstance(Object, types.MethodTypes), and IDLE froze.  
Given Python's flexibility, it can be hard to write code that works with any 
user code thrown at it.

--
nosy:  -serhiy.storchaka

___
Python tracker 

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



[issue40180] isinstance(cls_with_metaclass, non_type) raises KeyError

2020-04-04 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
nosy: +serhiy.storchaka

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


Change by STINNER Victor :


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

___
Python tracker 

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



[issue40182] Remove the _field_types attribute of NamedTuple

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



[issue40184] Compiler warnings under sparc64

2020-04-04 Thread Benjamin Peterson


Benjamin Peterson  added the comment:


New changeset 411555075401aa831a2228196c2d8f9a54b6f577 by Benjamin Peterson in 
branch '3.8':
[3.8] closes bpo-40184: Only define pysiphash if the hash algorithm is 
SIPHASH24. (GH-19373)
https://github.com/python/cpython/commit/411555075401aa831a2228196c2d8f9a54b6f577


--

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


STINNER Victor  added the comment:

Macros and static inline functions of the public C API which access directly 
PyTypeObject fields. There may be more.

#define _PyObject_SIZE(typeobj) ( (typeobj)->tp_basicsize )

static inline vectorcallfunc
PyVectorcall_Function(PyObject *callable)
{
...
tp = Py_TYPE(callable);
offset = tp->tp_vectorcall_offset;
...
}

#define PyObject_CheckBuffer(obj) \
((Py_TYPE(obj)->tp_as_buffer != NULL) &&  \
 (Py_TYPE(obj)->tp_as_buffer->bf_getbuffer != NULL))

#define PyIndex_Check(obj)  \
(Py_TYPE(obj)->tp_as_number != NULL &&\
 Py_TYPE(obj)->tp_as_number->nb_index != NULL)

#define PyObject_GET_WEAKREFS_LISTPTR(o) \
((PyObject **) (((char *) (o)) + Py_TYPE(o)->tp_weaklistoffset))

static inline int
PyType_HasFeature(PyTypeObject *type, unsigned long feature) {
#ifdef Py_LIMITED_API
return ((PyType_GetFlags(type) & feature) != 0);
#else
return ((type->tp_flags & feature) != 0);
#endif
}

#define _PyObject_SIZE(typeobj) ( (typeobj)->tp_basicsize )

--

___
Python tracker 

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



[issue40174] HAVE_CLOCK_GETTIME not repected in pytime.c

2020-04-04 Thread Jérôme

Jérôme  added the comment:

Hi,

I think it is nice to inform the user that clock_gettime is mandatory (just 
like pthreads, see PR). Can be nice for someone trying to port it to a new 
platform.

"It's no particularly silly, is it?"

--

___
Python tracker 

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



[issue40182] Remove the _field_types attribute of NamedTuple

2020-04-04 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 6fed3c85402c5ca704eb3f3189ca3f5c67a08d19 by Serhiy Storchaka in 
branch 'master':
bpo-40182: Remove the _field_types attribute of the NamedTuple class (GH-19368)
https://github.com/python/cpython/commit/6fed3c85402c5ca704eb3f3189ca3f5c67a08d19


--

___
Python tracker 

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



[issue36320] typing.NamedTuple to switch from OrderedDict to regular dict

2020-04-04 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 0d1d7c8bae3f9fe9e937d2931dcbbd3555d1a9f1 by Serhiy Storchaka in 
branch '3.8':
bpo-36320: Use the deprecated-removed directive for _field_types (GH-19370)
https://github.com/python/cpython/commit/0d1d7c8bae3f9fe9e937d2931dcbbd3555d1a9f1


--

___
Python tracker 

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



[issue40180] isinstance(cls_with_metaclass, non_type) raises KeyError

2020-04-04 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

All works as expected to me. Your __class__ attribute raise an arbitrary 
exception, and it is expected, that the code which uses it passes it to you.

I am against silencing all exceptions. It may hide bugs.

It is even documented. See What's New in Python 3.8:

* The CPython interpreter can swallow exceptions in some circumstances.
  In Python 3.8 this happens in fewer cases.  In particular, exceptions
  raised when getting the attribute from the type dictionary are no longer
  ignored. (Contributed by Serhiy Storchaka in :issue:`35459`.)

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue40174] HAVE_CLOCK_GETTIME not repected in pytime.c

2020-04-04 Thread Roundup Robot


Change by Roundup Robot :


--
keywords: +patch
nosy: +python-dev
nosy_count: 3.0 -> 4.0
pull_requests: +18736
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/19374

___
Python tracker 

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



[issue36630] failure of test_colors_funcs in test_curses with ncurses 6.1

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



[issue40179] Argument Clinic incorretly translates #elif

2020-04-04 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

See PR 19360 for real example.

--

___
Python tracker 

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



[issue40184] Compiler warnings under sparc64

2020-04-04 Thread Benjamin Peterson


Change by Benjamin Peterson :


--
pull_requests: +18735
pull_request: https://github.com/python/cpython/pull/19373

___
Python tracker 

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



[issue40184] Compiler warnings under sparc64

2020-04-04 Thread Benjamin Peterson

Benjamin Peterson  added the comment:


New changeset 1b21573a89632356737a24302dd64c9eb1457a7b by Batuhan Taşkaya in 
branch 'master':
closes bpo-40184: Only define pysiphash if the hash algorithm is SIPHASH24. 
(GH-19369)
https://github.com/python/cpython/commit/1b21573a89632356737a24302dd64c9eb1457a7b


--
nosy: +benjamin.peterson
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



[issue40187] Refactor typing.TypedDict

2020-04-04 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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

___
Python tracker 

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



[issue40185] Refactor typing.NamedTuple

2020-04-04 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

See also issue40187.

--

___
Python tracker 

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



[issue40187] Refactor typing.TypedDict

2020-04-04 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

See also issue40185.

--

___
Python tracker 

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



[issue40187] Refactor typing.TypedDict

2020-04-04 Thread Serhiy Storchaka


New submission from Serhiy Storchaka :

typing.TypedDict is used in two ways.

1. It is a callable which produces a new pseudo-subtype of dict.
2. It can also be used as a base in the class statement for creating a new 
pseudo-subtype of dict.

In both cases it is not a real class. You cannot create an instance of 
TypedDict or its "subclass". isinstance() and issubclass() do not work with it. 
Instantiating it "subclass" always returns a dict. But it is implemented as a 
class, and help() shows methods and data descriptors for it, which are useless.

The proposed PR implements TypedDict as a function. It adds the __mro_entries__ 
method that allows to use it as a base in the class statement.

--
components: Library (Lib)
messages: 365786
nosy: gvanrossum, levkivskyi, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Refactor typing.TypedDict
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



[issue40186] test_notify_all hangs forever in sparc64

2020-04-04 Thread Batuhan Taskaya


Batuhan Taskaya  added the comment:

This behavior looks random, for 10 run it hangs 2 times.

--

___
Python tracker 

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



[issue40185] Refactor typing.NamedTuple

2020-04-04 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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

___
Python tracker 

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



[issue40186] test_notify_all hangs forever in sparc64

2020-04-04 Thread Batuhan Taskaya


New submission from Batuhan Taskaya :

isidentical@gcc202:~/cpython$ ./python -m test test_multiprocessing_fork -m 
test_notify_all -v
== CPython 3.9.0a5+ (heads/bpo-40184:b2504dfd51, Apr 4 2020, 23:55:00) [GCC 
9.3.0]
== Linux-5.4.0-4-sparc64-smp-sparc64-with-glibc2.31 big-endian
== cwd: /home/isidentical/cpython/build/test_python_596632
== CPU count: 64
== encodings: locale=UTF-8, FS=utf-8
0:00:00 load avg: 3.29 Run tests sequentially
0:00:00 load avg: 3.29 [1/1] test_multiprocessing_fork
test_notify_all (test.test_multiprocessing_fork.WithManagerTestCondition) ... ok
test_notify_all (test.test_multiprocessing_fork.WithProcessesTestCondition) ... 
ok
test_notify_all (test.test_multiprocessing_fork.WithThreadsTestCondition) ...

--
components: Tests
messages: 365784
nosy: BTaskaya
priority: normal
severity: normal
status: open
title: test_notify_all hangs forever in sparc64
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



[issue40185] Refactor typing.NamedTuple

2020-04-04 Thread Serhiy Storchaka


New submission from Serhiy Storchaka :

typing.NamedTuple is used in two ways.

1. It is a callable which produces a new namedtuple type.
2. It can also be used as a base in the class statement for creating a new 
namedtuple type.

In both cases it is not a real class. You cannot create an instance of 
NamedTuple or a subclass of NamedTuple. But it is implemented as a class, and 
help() shows methods and data descriptors for it, which are useless.

The proposed PR implements NamedTuple like a function. Implementation of the 
__mro_entries__ method allows to use it as a base in the class statement.

--
components: Library (Lib)
messages: 365783
nosy: gvanrossum, levkivskyi, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Refactor typing.NamedTuple
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



[issue36320] typing.NamedTuple to switch from OrderedDict to regular dict

2020-04-04 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
nosy: +serhiy.storchaka
nosy_count: 4.0 -> 5.0
pull_requests: +18732
pull_request: https://github.com/python/cpython/pull/19370

___
Python tracker 

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



[issue40184] Compiler warnings under sparc64

2020-04-04 Thread Batuhan Taskaya


Change by Batuhan Taskaya :


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

___
Python tracker 

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



[issue40184] Compiler warnings under sparc64

2020-04-04 Thread Batuhan Taskaya

New submission from Batuhan Taskaya :

gcc -pthread -c -Wno-unused-result -Wsign-compare -g -Og -Wall-std=c99 
-Wextra -Wno-unused-result -Wno-unused-parameter 
-Wno-missing-field-initializers -Werror=implicit-function-declaration 
-fvisibility=hidden  -I./Include/internal  -I. -I./Include-DPy_BUILD_CORE 
-o Python/symtable.o Python/symtable.c
Python/pyhash.c:416:1: warning: ‘pysiphash’ defined but not used 
[-Wunused-function]
  416 | pysiphash(const void *src, Py_ssize_t src_sz) {
  | ^
gcc -pthread -c -Wno-unused-result -Wsign-compare -g -Og -Wall-std=c99 
-Wextra -Wno-unused-result -Wno-unused-parameter 
-Wno-missing-field-initializers -Werror=implicit-function-declaration 
-fvisibility=hidden  -I./Include/internal  -I. -I./Include-DPy_BUILD_CORE \
-DABIFLAGS='"d"' \
-DPLATLIBDIR='"lib"' \
-DMULTIARCH=\"sparc64-linux-gnu\" \
-o Python/sysmodule.o ./Python/sysmodule.c

--
messages: 365782
nosy: BTaskaya
priority: normal
severity: normal
status: open
title: Compiler warnings under sparc64

___
Python tracker 

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



[issue40182] Remove the _field_types attribute of NamedTuple

2020-04-04 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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

___
Python tracker 

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



[issue40183] AC_COMPILE_IFELSE doesn't work in all cases

2020-04-04 Thread Roundup Robot


Change by Roundup Robot :


--
keywords: +patch
nosy: +python-dev
nosy_count: 1.0 -> 2.0
pull_requests: +18729
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/19367

___
Python tracker 

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



[issue40183] AC_COMPILE_IFELSE doesn't work in all cases

2020-04-04 Thread Jérôme

New submission from Jérôme :

Just compiling the symbol sometimes gives a false positive (for example chroot 
compiles OK), but also linking properly detects the symbol is missing.

--
components: Interpreter Core
messages: 365781
nosy: jerome.hamm
priority: normal
severity: normal
status: open
title: AC_COMPILE_IFELSE doesn't work in all cases
type: compile error
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



[issue40182] Remove the _field_types attribute of NamedTuple

2020-04-04 Thread Serhiy Storchaka


New submission from Serhiy Storchaka :

It was deprecated since 3.8 (see issue36320). The __annotations__ attribute has 
the same information.

--
components: Library (Lib)
messages: 365780
nosy: gvanrossum, levkivskyi, rhettinger, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Remove the _field_types attribute of NamedTuple
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



[issue38689] IDLE crashes when KeyError is raised during calltip generation

2020-04-04 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

get_argspec accesses the user object 3 times.  The first, ob.__call__ was 
already wrapped in try-except.  The second, signature(ob or ob.__call) is 
wrapped by this issue.  It also adds a new test based on Dan's example. The 
third is (ob or ob.__call__).__doc__.  I did not wrap this because I could not 
create an example for which this fails.  There seems to be some special casing 
of this special attribute so that its default is None.

I opened #40180 for the isinstance bug and #40181 for further get_argspec 
changes, in particular, removing the positional-only '/' note.

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



[issue40181] IDLE: remove positional-only note from calltips

2020-04-04 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

#35763 reduced the footprint of the note.
#35764 is about revising the calltip doc.  Part of the intention was to add 
something about '/'.  Maybe no need now, but if I did, I might remove the 
calltip note in 3.7.

--

___
Python tracker 

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



[issue40181] IDLE: remove positional-only note from calltips

2020-04-04 Thread Terry J. Reedy


New submission from Terry J. Reedy :

IDLE calltips currently contain "  # '/' marks preceding args as 
positional-only." when the signature contains '/' because, before 3.8, '/' was 
only used by argument clinic and only displayed by inspect.signature.  Now that 
'/' is a regular part of Python, the special note is not needed for the 3.8+ 
versions of IDLE.

The get_argspec docstring also needs updating, and I think the body has some 
redundant code.  The main test change needed is to remove the '/' note from 
expected returns.  I may first isolate any affected tests to minimize the 
difference between 3.7 and 3.8-9 code, so as to minimize the possibility of 
merge conflicts in backports.

--
messages: 365777
nosy: terry.reedy
priority: normal
severity: normal
stage: test needed
status: open
title: IDLE: remove positional-only note from calltips
type: enhancement
versions: 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



[issue40180] isinstance(cls_with_metaclass, non_type) raises KeyError

2020-04-04 Thread Batuhan Taskaya


Batuhan Taskaya  added the comment:

What would you expect in this case? Objects/abstract.c:2429 is where the 
isinstance code. If only returning False would be enough, something like this 
(untested) would be enough

--- a/Objects/abstract.c
+++ b/Objects/abstract.c
@@ -2436,6 +2436,10 @@ object_isinstance(PyObject *inst, PyObject *cls)
 retval = PyObject_TypeCheck(inst, (PyTypeObject *)cls);
 if (retval == 0) {
 retval = _PyObject_LookupAttrId(inst, ___class__, );
+if (retval == NULL && PyErr_Occurred()) {
+PyErr_Clear();
+retval = 0;
+}

--
nosy: +BTaskaya

___
Python tracker 

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



[issue40174] HAVE_CLOCK_GETTIME not repected in pytime.c

2020-04-04 Thread STINNER Victor


STINNER Victor  added the comment:

Python has a long history (30 years). time.time() had multiple implementations. 
When I added time.monotonic() in Python 3.3, it was optional. I changed that in 
Python 3.5: time.monotonic() is now always available.
https://docs.python.org/dev/library/time.html#time.monotonic

time.monotonic() has multiple implementations:

* Windows: GetTickCount64()
* macOS (Darwin): mach_absolute_time()
* HP-UX: gethrtime()
* Solaris: clock_gettime(CLOCK_HIGHRES)
* Otherwise: clock_gettime(CLOCK_MONOTONIC)

So far (since Python 3.5), no one complained about build error on any platform. 
It looks safe in practice to expect clock_gettime() to be available.

I suggest to close this issue, and only change the code is Python fails to 
build on a specific platform.

By the way, glibc 2.31 release notes: "We plan to remove the obsolete function 
ftime, and the header , in a future version of glibc."

--

___
Python tracker 

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



[issue40180] isinstance(cls_with_metaclass, non_type) raises KeyError

2020-04-04 Thread Terry J. Reedy


New submission from Terry J. Reedy :

Consider class Object defined as follows:

import types
class Type(type):
__class__ = property({}.__getitem__, {}.__setitem__)
class Object(metaclass=Type):
__slots__ = '__class__'

isinstance(Object, ob) is true for type and Type and false for anything else.  
But for the examples of the latter that I tried, (list, int, types.CodeType, 
types.MethodType, see attached tem3.py), it incorrectly raises
  KeyError:  

I cannot find the C source for isinstance.  In Python/bltinmodule.c, function 
builtin_isinstance_impl wraps
  retval = PyObject_IsInstance(obj, class_or_tuple);
but grepping for PyObject_IsInstance in *.c and *.h only returned other calls.

--
components: Interpreter Core
files: tem3.py
messages: 365774
nosy: terry.reedy
priority: normal
severity: normal
stage: needs patch
status: open
title: isinstance(cls_with_metaclass, non_type) raises KeyError
type: behavior
versions: Python 3.7, Python 3.8, Python 3.9
Added file: https://bugs.python.org/file49034/tem3.py

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


STINNER Victor  added the comment:


New changeset b709302f3125622986bd458dfb2954fda5e8366d by Hai Shi in branch 
'master':
bpo-40077: Fix potential refleaks of _json: traverse memo (GH-19344)
https://github.com/python/cpython/commit/b709302f3125622986bd458dfb2954fda5e8366d


--

___
Python tracker 

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



[issue40179] Argument Clinic incorretly translates #elif

2020-04-04 Thread Larry Hastings


Larry Hastings  added the comment:

Good catch, and thanks for submitting a patch too!  I want to play with your 
patch a little before I just say "yes of course".

--

___
Python tracker 

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



[issue36517] typing.NamedTuple does not support mixins

2020-04-04 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset a94e6272f16381349dbed74cdb738ec8ae23b4fe by Serhiy Storchaka in 
branch 'master':
bpo-36517: Raise error on multiple inheritance with NamedTuple (GH-19363)
https://github.com/python/cpython/commit/a94e6272f16381349dbed74cdb738ec8ae23b4fe


--

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


Change by Dong-hee Na :


--
pull_requests:  -18728

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


Change by Dong-hee Na :


--
pull_requests: +18728
pull_request: https://github.com/python/cpython/pull/19366

___
Python tracker 

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



[issue36207] robotsparser deny all with some rules

2020-04-04 Thread Rodriguez


Rodriguez  added the comment:

I can't display my robot.TXT. I want to ban robots
 https://melwynn-rodriguez.fr/robots.txt

--
nosy: +lagustais

___
Python tracker 

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



[issue40179] Argument Clinic incorretly translates #elif

2020-04-04 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests: +18727
pull_request: https://github.com/python/cpython/pull/19360

___
Python tracker 

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



[issue40179] Argument Clinic incorretly translates #elif

2020-04-04 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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

___
Python tracker 

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



[issue40179] Argument Clinic incorretly translates #elif

2020-04-04 Thread Serhiy Storchaka


New submission from Serhiy Storchaka :

It converts

#if A
...
#elif B
...
#else
...
#endif

into

#if A
...
#endif /* A */

#if B
...
#endif /* B */

#if !B
...
#endif /* !B */

The correct translation is:

#if A
...
#endif /* A */

#if !A && B
...
#endif /* !A && B */

#if !A && !B
...
#endif /* !A && !B */

--
components: Argument Clinic, Build
messages: 365769
nosy: larry, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Argument Clinic incorretly translates #elif
type: compile error
versions: 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



[issue33240] shutil.rmtree fails if inner folder is open in Windows Explorer

2020-04-04 Thread Ofek Lev


Ofek Lev  added the comment:

> For convenience, a handler that retries unlink() and rmdir() could be 
> distributed with shutil. For ease of use, it could be enabled by default on 
> Windows.

Any update on that? I just spent a bunch of time debugging this on Windows.

--
nosy: +Ofekmeister

___
Python tracker 

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



[issue40173] test.support.import_fresh_module fails to correctly block submodules when fresh is specified

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



[issue36517] typing.NamedTuple does not support mixins

2020-04-04 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
keywords: +patch
nosy: +serhiy.storchaka
nosy_count: 3.0 -> 4.0
pull_requests: +18725
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/19363

___
Python tracker 

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



[issue40164] Upgrade Windows and macOS installer builds to OpenSSL 1.1.1f

2020-04-04 Thread Steve Dower


Steve Dower  added the comment:


New changeset 37126e7bd242bce03f3c4f208d8871edd3febcbe by Steve Dower in branch 
'3.8':
bpo-40164: Update Windows to OpenSSL 1.1.1f (GH-19359)
https://github.com/python/cpython/commit/37126e7bd242bce03f3c4f208d8871edd3febcbe


--

___
Python tracker 

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



[issue40164] Upgrade Windows and macOS installer builds to OpenSSL 1.1.1f

2020-04-04 Thread Steve Dower


Steve Dower  added the comment:


New changeset e7a47c23dd25a144ec4afc2db46393818694926f by Steve Dower in branch 
'3.7':
bpo-40164: Update Windows to OpenSSL 1.1.1f (GH-19359)
https://github.com/python/cpython/commit/e7a47c23dd25a144ec4afc2db46393818694926f


--

___
Python tracker 

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



[issue40176] unterminated string literal tokenization error messages could be better

2020-04-04 Thread Batuhan Taskaya


Batuhan Taskaya  added the comment:

>>> message = "sadsa
  File "", line 1
message = "sadsa
  ^
SyntaxError: unterminated double quote

--

___
Python tracker 

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



[issue40164] Upgrade Windows and macOS installer builds to OpenSSL 1.1.1f

2020-04-04 Thread Steve Dower


Change by Steve Dower :


--
pull_requests: +18724
pull_request: https://github.com/python/cpython/pull/19362

___
Python tracker 

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



[issue40164] Upgrade Windows and macOS installer builds to OpenSSL 1.1.1f

2020-04-04 Thread Steve Dower


Change by Steve Dower :


--
pull_requests: +18723
pull_request: https://github.com/python/cpython/pull/19361

___
Python tracker 

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



[issue40164] Upgrade Windows and macOS installer builds to OpenSSL 1.1.1f

2020-04-04 Thread Steve Dower


Steve Dower  added the comment:


New changeset a1d4dbdfc78e3aed4c245e1810ef24eaa4e744c2 by Steve Dower in branch 
'master':
bpo-40164: Update Windows to OpenSSL 1.1.1f (GH-19359)
https://github.com/python/cpython/commit/a1d4dbdfc78e3aed4c245e1810ef24eaa4e744c2


--

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



[issue40178] Convert the remaining os funtions to Argument Clinic

2020-04-04 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
components: +Argument Clinic
nosy: +larry

___
Python tracker 

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



[issue40178] Convert the remaining os funtions to Argument Clinic

2020-04-04 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

The problems which prevented their conversions before (in issue20170):

1. os.sendfile() had parameter names conflicting with Python keywords. Was 
solved in issue38378.

2. os.get_terminal_size() has an optional argument without default value. It 
was solved in a way similar to issue37206.

3. Some functions have platform-specific types of arguments. os.sendfile() has 
additional parameters. It was solved by using a preprocessor. We need to repeat 
most of the declaration and docstring, but it is the best that we can have now.

--

___
Python tracker 

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



[issue40178] Convert the remaining os funtions to Argument Clinic

2020-04-04 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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

___
Python tracker 

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



[issue40178] Convert the remaining os funtions to Argument Clinic

2020-04-04 Thread Serhiy Storchaka


New submission from Serhiy Storchaka :

The proposed PR converts os.getgrouplist(), os.initgroups(), os.sendfile() and 
os.get_terminal_size() to Argument Clinic.

--
components: Extension Modules
messages: 365762
nosy: serhiy.storchaka
priority: normal
severity: normal
status: open
title: Convert the remaining os funtions to Argument Clinic
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



[issue40164] Upgrade Windows and macOS installer builds to OpenSSL 1.1.1f

2020-04-04 Thread Steve Dower


Change by Steve Dower :


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

___
Python tracker 

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



[issue40139] mimetypes module racy

2020-04-04 Thread David K. Hess

David K. Hess  added the comment:

I’m not sure I can shed any light on this particular bug, but I would say that 
based on my dealings with this module, it is definitely not thread-safe. That 
means that if you are going to have multiple threads accessing it 
simultaneously, you really should have a mutex around that access ensuring only 
one thread is running through the code in this module at a time. 

Now in reality, asyncio and other cooperatively scheduled multi-processing 
packages like gevent are not going to unpredictably yield control to another 
thread like true threads will. So, in this particular case, since the init code 
doesn’t use async or await, I don’t think there is a chance of an 
initialization race bug there. 

As to the bug witnessed, the only thing I can suggest is to add a considerable 
amount of debugging that logs the argument to guess_type and prints out the 
mimetype module’s internal state if and when this happens again. My best guess 
based on the amount of work that method does to inspect the passed in url, is 
that it has something to do with the url itself.

--

___
Python tracker 

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



[issue40166] UNICODE HOWTO: Change the total number of code points in the introduction section

2020-04-04 Thread Ama Aje My Fren


Change by Ama Aje My Fren :


--
type:  -> enhancement

___
Python tracker 

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



[issue17088] ElementTree incorrectly refuses to write attributes without namespaces when default_namespace is used

2020-04-04 Thread Márton Marczell

Márton Marczell  added the comment:

Can he please get a review of the pull request?

--
nosy: +marczellm

___
Python tracker 

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



[issue40139] mimetypes module racy

2020-04-04 Thread Uwe Kleine-König

Uwe Kleine-König  added the comment:

I agree that 3.5 is ancient and the focus should be to fix the newer versions 
of Python.

But given that the problem seems to be hard to reproduce -- I have the 
reproducer script from the original report running under the tracer since over 
a week now without a hit -- it seems to be beneficial to me to understand the 
issue on 3.5 to then check if 3.8+ is also affected.

Also note that Lib/mimetypes.py didn't change between 3.5.3 and 3.5.9.
The difference between 3.5.x and 3.6.x in this file doesn't affect the code 
flow, in fact the first commit that has a change to actually change the 
behavior I saw between 3.5.0 and current master is bpo-4963 that only went into 
3.9.x.

I added dhess and steve.dower who were involved in bpo-4963 to the nosy list, 
maybe one of them remembers or is able to quickly spot the problem.

--
nosy: +dhess, steve.dower

___
Python tracker 

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



[issue40174] HAVE_CLOCK_GETTIME not repected in pytime.c

2020-04-04 Thread Jérôme

Jérôme  added the comment:

Hi, 
OK, I was looking at the wrong line numbers, the problem is still there and as 
follows.
You might call me a perfectionist, but if HAVE_CLOCK_GETTIME is not defined, 
the function pytime_fromtimespec is taken out by the preprocessor, but still 
called  by the function pymonotonic, so python does not compile.
I'm thinking of two ways to go, either stop configure if HAVE_CLOCK_GETTIME is 
not defined, or rewrite the function differently (I don't know how badly a 
truly monotonic clock is needed).
It does feel strange to me to partially only honor HAVE_CLOCK_GETTIME.

"With government backing, I could make it very silly"

--

___
Python tracker 

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



[issue6818] remove/delete method for zipfile/tarfile objects

2020-04-04 Thread nergall2


Change by nergall2 :


--
pull_requests: +18720
pull_request: https://github.com/python/cpython/pull/19358

___
Python tracker 

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



[issue6818] remove/delete method for zipfile/tarfile objects

2020-04-04 Thread nergall2


nergall2  added the comment:

Sorry, typo, here's the new PR -
https://github.com/python/cpython/pull/19358

--

___
Python tracker 

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



[issue6818] remove/delete method for zipfile/tarfile objects

2020-04-04 Thread nergall2


nergall2  added the comment:

Closed my initial PR and opened this one instead -
https://github.com/python/cpython/pull/19336

--

___
Python tracker 

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



[issue6818] remove/delete method for zipfile/tarfile objects

2020-04-04 Thread nergall2


Change by nergall2 :


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

___
Python tracker 

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



[issue6818] remove/delete method for zipfile/tarfile objects

2020-04-04 Thread nergall2


nergall2  added the comment:

I wasn't aware of this issue and opened another one which I just closed as a 
duplicate -
https://bugs.python.org/issue40175

I also submitted a PR for the other one -
https://github.com/python/cpython/pull/19336

The implementation does involve shifting the bytes of the files and updating 
the offset of each file in the central directory.
I do handle the case in which the central directory order and the order of the 
actual files in the archive isn't the same simply by sorting the central 
directory in memory before execution.

The only issue I see here is the fact that if something happens during the 
process, the archive might get corrupted - but IMO it's worth it.
Many tools provide that functionality (Windows, Total Commander) and as far as 
I know they do it in place.
In the worst case, it's possible to implement it by creating a temp archive 
like Serhiy suggested - not too difficult to implement either since it simply 
requires duplicating the file and operating on it.

--
nosy: +nergall2

___
Python tracker 

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



[issue40175] Add support for removing zip entry in ZipInfo

2020-04-04 Thread nergall2


nergall2  added the comment:

Sorry, I didn't see the old issue, let's move the discussion over there -
https://bugs.python.org/issue6818

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



[issue40175] Add support for removing zip entry in ZipInfo

2020-04-04 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

There were other issues and discussions about this.

The problem of removing a file from a ZIP archive is similar to the problem of 
removing a line from a file. It cannot be made efficiently, and it is not even 
always possible. In some cases it may be better (simpler, more efficient and 
robust) to copy a file line by line into a new file, skipping particular lines, 
and the same is true for a ZIP archive. In other cases you can truncate the 
file or the ZIP archive. Solution that is optimal in one case may be 
inappropriate in other case.

--

___
Python tracker 

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



[issue40177] Python Language Reference Documentation

2020-04-04 Thread Mark Dickinson


Change by Mark Dickinson :


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

___
Python tracker 

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



  1   2   >