[issue41203] Replace references to OS X in documentation with macOS

2020-07-03 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Would you submit at PR>

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



[issue41205] Documentation Decimal power 0 to the 0 is Nan (versus 0 to the 0 which is 1)

2020-07-03 Thread JD-Veiga


JD-Veiga  added the comment:

Well, it is the way that it has been defined in `decimal` package and in the 
document that inspired this package (IBM's General Decimal Arithmetic 
Specification, The General Decimal Arithmetic Specification: 
http://speleotrove.com/decimal/decarith.html).

--

___
Python tracker 

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



[issue41206] behaviour change with EmailMessage.set_content

2020-07-03 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

This is caused due to c1f1ddf30a595c2bfa3c06e54fb03fa212cd28b5 introduced as 
part of bpo-40597 which is reported back in the issue with 
https://bugs.python.org/msg370395

--
nosy: +xtreak

___
Python tracker 

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



[issue33864] collections.abc.ByteString does not register memoryview

2020-07-03 Thread Guido van Rossum


Change by Guido van Rossum :


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



[issue33864] collections.abc.ByteString does not register memoryview

2020-07-03 Thread miss-islington


miss-islington  added the comment:


New changeset 6857ebefc048e316f948091946d337b5ada807a4 by Miss Islington (bot) 
in branch '3.8':
bpo-33864: Clarify the docs for typing.ByteString (GH-21311)
https://github.com/python/cpython/commit/6857ebefc048e316f948091946d337b5ada807a4


--

___
Python tracker 

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



[issue33864] collections.abc.ByteString does not register memoryview

2020-07-03 Thread miss-islington


miss-islington  added the comment:


New changeset 1cbcf9833f26588a16b5b69d202df727dbd09968 by Miss Islington (bot) 
in branch '3.9':
bpo-33864: Clarify the docs for typing.ByteString (GH-21311)
https://github.com/python/cpython/commit/1cbcf9833f26588a16b5b69d202df727dbd09968


--

___
Python tracker 

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



[issue33864] collections.abc.ByteString does not register memoryview

2020-07-03 Thread miss-islington


Change by miss-islington :


--
pull_requests: +20465
pull_request: https://github.com/python/cpython/pull/21313

___
Python tracker 

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



[issue33864] collections.abc.ByteString does not register memoryview

2020-07-03 Thread miss-islington


Change by miss-islington :


--
pull_requests: +20464
pull_request: https://github.com/python/cpython/pull/21312

___
Python tracker 

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



[issue33864] collections.abc.ByteString does not register memoryview

2020-07-03 Thread miss-islington


miss-islington  added the comment:


New changeset b40e434386cd94a367d4a256e3364771140160e7 by Zackery Spytz in 
branch 'master':
bpo-33864: Clarify the docs for typing.ByteString (GH-21311)
https://github.com/python/cpython/commit/b40e434386cd94a367d4a256e3364771140160e7


--
nosy: +miss-islington

___
Python tracker 

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



[issue33864] collections.abc.ByteString does not register memoryview

2020-07-03 Thread Zackery Spytz


Change by Zackery Spytz :


--
keywords: +patch
nosy: +ZackerySpytz
nosy_count: 5.0 -> 6.0
pull_requests: +20463
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/21311

___
Python tracker 

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



[issue41205] Documentation Decimal power 0 to the 0 is Nan (versus 0 to the 0 which is 1)

2020-07-03 Thread Tim Peters


Tim Peters  added the comment:

Huh! I thought everyone in Standards World gave up by now, and agreed 0**0 
should be 1.

--
nosy: +tim.peters

___
Python tracker 

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



[issue41192] Some audit events are undocumented

2020-07-03 Thread Saiyang Gou


Change by Saiyang Gou :


--
pull_requests: +20462
pull_request: https://github.com/python/cpython/pull/21310

___
Python tracker 

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



[issue41205] Documentation Decimal power 0 to the 0 is Nan (versus 0 to the 0 which is 1)

2020-07-03 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +facundobatista, mark.dickinson, rhettinger, skrah

___
Python tracker 

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



[issue41203] Replace references to OS X in documentation with macOS

2020-07-03 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
components: +macOS
nosy: +ned.deily, ronaldoussoren

___
Python tracker 

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



[issue41207] distutils.command.build_ext raises FileNotFoundError

2020-07-03 Thread Jason R. Coombs


Change by Jason R. Coombs :


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



[issue41207] distutils.command.build_ext raises FileNotFoundError

2020-07-03 Thread Jason R. Coombs


New submission from Jason R. Coombs :

In [pypa/setuptools#2228](https://github.com/pypa/setuptools/issues/2228), by 
adopting the distutils codebase from a late release of CPython, Setuptools 
stumbled onto an API-breaking change in distutils rooted at issue39763.

Details are in the Setuptools investigation, but to summarize:

- distutils.ccompiler.CCompiler.compile declares "raises CompileError on 
failure" and calls `self._compile`, implemented by subclasses.
- In at least `distutils.unixcompiler.UnixCCompiler._compile`, 
`distutils.spawn.spawn` is called (through CCompiler.spawn).
- Since GH-18743, `distutils.spawn.spawn` calls `subprocess.Popen` which raises 
FileNotFoundError when the target executable doesn't exist.
- Programs trapping CompileError but not FileNotFoundError will crash where 
once they had error handling.

Setuptools discovered this behavior in the 48.0 release when it incorporated 
these distutils changes into a vendored release of Setuptools, but the failures 
exhibited will apply to all builds (including pyyaml) on Python 3.9.

--
assignee: lukasz.langa
components: Distutils
keywords: 3.9regression
messages: 372973
nosy: dstufft, eric.araujo, jaraco, lukasz.langa
priority: release blocker
severity: normal
status: open
title: distutils.command.build_ext raises FileNotFoundError
type: crash
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



[issue39763] distutils.spawn should use subprocess (hang in parallel builds on QNX)

2020-07-03 Thread Jason R. Coombs


Jason R. Coombs  added the comment:

I've flagged issue41207 as a regression stemming from this effort.

--
nosy: +jaraco

___
Python tracker 

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



[issue41165] [Python 3.10] Remove APIs deprecated long enough

2020-07-03 Thread Inada Naoki


Change by Inada Naoki :


--
keywords: +patch
pull_requests: +20461
pull_request: https://github.com/python/cpython/pull/21309

___
Python tracker 

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



[issue41192] Some audit events are undocumented

2020-07-03 Thread Saiyang Gou


Saiyang Gou  added the comment:

I've created PR 21308 for this. BTW, is issue 39567 (`os.walk`, `os.fwalk`, 
`pathlib.Path.glob` and `pathlib.Path.rglob`) intentionally not backported to 
3.8?

--

___
Python tracker 

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



[issue41192] Some audit events are undocumented

2020-07-03 Thread Saiyang Gou


Change by Saiyang Gou :


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

___
Python tracker 

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



[issue41206] behaviour change with EmailMessage.set_content

2020-07-03 Thread David Bremner


New submission from David Bremner :

Works in 3.8.3, but not in 3.8.4rc1

from email.message import EmailMessage
msg = EmailMessage()
msg.set_content("")

Apparently now at least one newline is required.

--
components: email
messages: 372971
nosy: barry, bremner, r.david.murray
priority: normal
severity: normal
status: open
title: behaviour change with EmailMessage.set_content
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



[issue41204] Use of unitialized variable `fields` along error path in code generated from asdl_c.py

2020-07-03 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue29778] _Py_CheckPython3 uses uninitialized dllpath when embedder sets module path with Py_SetPath

2020-07-03 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +20458
pull_request: https://github.com/python/cpython/pull/21306

___
Python tracker 

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



[issue41162] Clear audit hooks after destructors

2020-07-03 Thread Steve Dower


Steve Dower  added the comment:


New changeset b9e288cc1bfd583e887f784e38d9c511b43c0c3a by Steve Dower in branch 
'3.8':
bpo-41162: Clear audit hooks later during finalization (GH-21222)
https://github.com/python/cpython/commit/b9e288cc1bfd583e887f784e38d9c511b43c0c3a


--

___
Python tracker 

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



[issue41205] Documentation Decimal power 0 to the 0 is Nan (versus 0 to the 0 which is 1)

2020-07-03 Thread JD-Veiga

New submission from JD-Veiga :

Hi,

I would like to propose a minor addition to `decimal` package documentation 
page (https://docs.python.org/3/library/decimal.html). I think that we should 
add a paragraph in `context.power(x, y, modulo=None)` stating that `Decimal(0) 
** Decimal(0)` returns `Decimal('NaN')` instead of `1` --as `0 ** 0` does-- or 
`1.0` --in case of `0.0 ** 0.0`.

Indeed, `0 ** 0` is `NaN` is mentioned as example of operations raising 
`InvalidOperation` exceptions.

However, I think that this is not enough to indicate the different behaviour of 
decimal versus int and float numbers.

Moreover, in the case of `%` and `//` operators, there are clear remarks on 
these differences (See: “There are some small differences between arithmetic on 
Decimal objects and arithmetic on integers and floats [...]” in the page).

Thank you and sorry for the inconvenience.

--
assignee: docs@python
components: Documentation
messages: 372969
nosy: JD-Veiga, docs@python
priority: normal
severity: normal
status: open
title: Documentation Decimal power 0 to the 0 is Nan (versus 0 to the 0 which 
is 1)
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



[issue41173] Windows ARM buildbots cannot upload results

2020-07-03 Thread Steve Dower


Change by Steve Dower :


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

___
Python tracker 

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



[issue21222] Mock create_autospec with name argument fails

2020-07-03 Thread Steve Dower


Steve Dower  added the comment:


New changeset 941117aaa32bf8b02c739ad848ac727292f75b05 by Steve Dower in branch 
'3.9':
bpo-21222: Fix improperly merged change so that final hooks are called before 
types are cleared (GH-21304)
https://github.com/python/cpython/commit/941117aaa32bf8b02c739ad848ac727292f75b05


--

___
Python tracker 

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



[issue29778] _Py_CheckPython3 uses uninitialized dllpath when embedder sets module path with Py_SetPath

2020-07-03 Thread Steve Dower


Change by Steve Dower :


--
pull_requests:  -20454

___
Python tracker 

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



[issue41162] Clear audit hooks after destructors

2020-07-03 Thread Steve Dower


Change by Steve Dower :


--
pull_requests: +20456
pull_request: https://github.com/python/cpython/pull/21304

___
Python tracker 

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



[issue21222] Mock create_autospec with name argument fails

2020-07-03 Thread Steve Dower


Change by Steve Dower :


--
nosy: +steve.dower
nosy_count: 3.0 -> 4.0
pull_requests: +20455
pull_request: https://github.com/python/cpython/pull/21304

___
Python tracker 

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



[issue29778] _Py_CheckPython3 uses uninitialized dllpath when embedder sets module path with Py_SetPath

2020-07-03 Thread Steve Dower


Change by Steve Dower :


--
pull_requests: +20454
pull_request: https://github.com/python/cpython/pull/21304

___
Python tracker 

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



[issue21222] Mock create_autospec with name argument fails

2020-07-03 Thread Steve Dower


Change by Steve Dower :


--
nosy:  -steve.dower

___
Python tracker 

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



[issue21222] Mock create_autospec with name argument fails

2020-07-03 Thread Steve Dower


Change by Steve Dower :


--
pull_requests:  -20453

___
Python tracker 

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



[issue41199] Docstring convention not followed for dataclasses documentation page

2020-07-03 Thread Eric V. Smith


Change by Eric V. Smith :


--
keywords: +newcomer friendly -patch

___
Python tracker 

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



[issue41162] Clear audit hooks after destructors

2020-07-03 Thread Steve Dower


Change by Steve Dower :


--
pull_requests: +20452
pull_request: https://github.com/python/cpython/pull/21303

___
Python tracker 

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



[issue21222] Mock create_autospec with name argument fails

2020-07-03 Thread Steve Dower


Change by Steve Dower :


--
nosy: +steve.dower
nosy_count: 3.0 -> 4.0
pull_requests: +20453
pull_request: https://github.com/python/cpython/pull/21304

___
Python tracker 

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



[issue33327] Add a method to move messages to IMAPlib

2020-07-03 Thread Matej Cepl


Matej Cepl  added the comment:

Sorry, UIDPLUS capability.

--

___
Python tracker 

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



[issue33327] Add a method to move messages to IMAPlib

2020-07-03 Thread Matej Cepl

Matej Cepl  added the comment:

1. no this has not been included anywhere, just in the unfinished PR on GitHub
2. only thing which I was fighting to get into Python (and I did) was 
https://bugs.python.org/issue6 but that’s another issue (without this whole 
discussion here would not be even possible), it is now part of the upstream 
Python
3. are you certain that the IMAP server in question supports MOVE command? 
(have you noticed all that business with CAPABILITIES and particularly the UID 
one?)

--

___
Python tracker 

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



[issue41162] Clear audit hooks after destructors

2020-07-03 Thread Steve Dower


Steve Dower  added the comment:


New changeset e1d4fdc53347617bea1aff0d7112471453f65003 by Steve Dower in branch 
'3.9':
bpo-41162: Clear audit hooks later during finalization (GH-21222)
https://github.com/python/cpython/commit/e1d4fdc53347617bea1aff0d7112471453f65003


--

___
Python tracker 

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



[issue41192] Some audit events are undocumented

2020-07-03 Thread Steve Dower


Steve Dower  added the comment:

Maybe we need to add a page for "undocumented" events? I really don't want to 
document the _ctypes or _winapi modules - those should remain internal-only.

Maybe we can add a section to the end of the audit_events.rst file for "other 
events"? The generation of that page happens in two separate passes, so it 
should be safe enough.

It might even be possible to just provide the events and specify "" instead of 
the anchor to disable the backlink completely? I don't remember whether I coded 
that up or not.

--

___
Python tracker 

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



[issue41204] Use of unitialized variable `fields` along error path in code generated from asdl_c.py

2020-07-03 Thread Brad Larsen


New submission from Brad Larsen :

In commit b1cc6ba73 from earlier today, an error-handling path can now read an 
uninitialized variable.

https://github.com/python/cpython/commit/b1cc6ba73a51d5cc3aeb113b5e7378fb50a0e20a#diff-fa7f27df4c8df1055048e78340f904c4R695-R697

In particular, asdl_c.py is used to generate C source, and when building that 
code with Clang 10, there is the attached warning.

Likely fix: initialize `fields` to `NULL`. Also, perhaps a CI loop that has 
`-Werror=sometimes-uninitialized` would help detect these.

Compiler warning:

Python/Python-ast.c:1147:9: warning: variable 'fields' is used uninitialized 
whenever 'if' condition is true [-Wsometimes-uninitialized]
if (state == NULL) {
^
Python/Python-ast.c:1210:16: note: uninitialized use occurs here
Py_XDECREF(fields);
   ^~
./Include/object.h:520:51: note: expanded from macro 'Py_XDECREF'
#define Py_XDECREF(op) _Py_XDECREF(_PyObject_CAST(op))
  ^~
./Include/object.h:112:41: note: expanded from macro '_PyObject_CAST'
#define _PyObject_CAST(op) ((PyObject*)(op))
^~
Python/Python-ast.c:1147:5: note: remove the 'if' if its condition is always 
false
if (state == NULL) {
^~~~
Python/Python-ast.c:1145:35: note: initialize the variable 'fields' to silence 
this warning
PyObject *key, *value, *fields;
  ^
   = NULL
1 warning generated.

--
components: Interpreter Core
messages: 372963
nosy: blarsen, vstinner
priority: normal
severity: normal
status: open
title: Use of unitialized variable `fields` along error path in code generated 
from asdl_c.py
type: compile error
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



[issue39542] Cleanup object.h header

2020-07-03 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

PyTuple_Check() got slower across the board.  This is problematic because the 
principal use case for PyTuple_Check() is as a guard for various fast paths.

The direct cause of the degradation is that the inlining of PyType_Check() 
didn't go so well — commit 509dd90f4684e40af3105dd3e754fa4b9c1530c1. 

There are two issues.  First, we lost the fast path for an exact type match 
that was present in the 3.8 version of PyType_Check().  Second, functions like 
PyType_Check() cannot be fully inlined if they call other non-inlined functions 
like PyType_GetFlags().

The original unreviewed commit doesn't revert cleanly because subsequent 
changes were made.  Instead, I suggest:

* restore the short-cut for an exact type match, and
* convert PyType_GetFlags() to a macro or an inlined function

That would fix the performance regression while still treating type objects as 
opaque.

--- Incomplete inlines --
--- line 639 in object.h 

static inline int
PyType_HasFeature(PyTypeObject *type, unsigned long feature) {
return ((PyType_GetFlags(type) & feature) != 0);
}
   ^ Non-static function cannot be inlined

#define PyType_FastSubclass(type, flag) PyType_HasFeature(type, flag)

static inline int _PyType_Check(PyObject *op) {
return PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_TYPE_SUBCLASS);
}
#define PyType_Check(op) _PyType_Check(_PyObject_CAST(op))


--- Old Type Check Code -
--- line 646 in object.h 

#define PyObject_TypeCheck(ob, tp) \
(Py_TYPE(ob) == (tp) || PyType_IsSubtype(Py_TYPE(ob), (tp)))
 ^--- Fast path for exact match is now gone


--- Non-static function cannot be inlined --
--- line 2339 in typeobject.c  -

unsigned long
PyType_GetFlags(PyTypeObject *type)
{
return type->tp_flags;
}

--
nosy: +lukasz.langa, petr.viktorin, pitrou, rhettinger
priority: normal -> high
status: closed -> open

___
Python tracker 

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



[issue29778] _Py_CheckPython3 uses uninitialized dllpath when embedder sets module path with Py_SetPath

2020-07-03 Thread Steve Dower


Steve Dower  added the comment:

Bumping to release blocker and adding RMs. Should definitely get this fix 
merged within the next week, and I don't want the next round of releases to go 
out without it.

--
nosy: +lukasz.langa, ned.deily
priority: normal -> release blocker
versions:  -Python 3.5

___
Python tracker 

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



[issue41162] Clear audit hooks after destructors

2020-07-03 Thread Steve Dower


Change by Steve Dower :


--
pull_requests: +20451
pull_request: https://github.com/python/cpython/pull/21302

___
Python tracker 

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



[issue41180] marshal load bypass code.__new__ audit event

2020-07-03 Thread miss-islington


miss-islington  added the comment:


New changeset 1c776541a8805576c0a4363ca28c1d29423f02f6 by Miss Islington (bot) 
in branch '3.9':
bpo-41180: Audit code.__new__ when unmarshalling (GH-21271)
https://github.com/python/cpython/commit/1c776541a8805576c0a4363ca28c1d29423f02f6


--

___
Python tracker 

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



[issue41192] Some audit events are undocumented

2020-07-03 Thread Christian Heimes


Change by Christian Heimes :


--
nosy: +christian.heimes

___
Python tracker 

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



[issue41180] marshal load bypass code.__new__ audit event

2020-07-03 Thread miss-islington


miss-islington  added the comment:


New changeset c1d916595eb6979d4d87cc3e5216e26b3c6fac25 by Miss Islington (bot) 
in branch '3.8':
bpo-41180: Audit code.__new__ when unmarshalling (GH-21271)
https://github.com/python/cpython/commit/c1d916595eb6979d4d87cc3e5216e26b3c6fac25


--

___
Python tracker 

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



[issue41162] Clear audit hooks after destructors

2020-07-03 Thread Steve Dower


Steve Dower  added the comment:


New changeset daa0fe03a517d335d48e65ace8e5da636e265a8f by Konge in branch 
'master':
bpo-41162: Clear audit hooks later during finalization (GH-21222)
https://github.com/python/cpython/commit/daa0fe03a517d335d48e65ace8e5da636e265a8f


--

___
Python tracker 

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



[issue41180] marshal load bypass code.__new__ audit event

2020-07-03 Thread miss-islington


Change by miss-islington :


--
pull_requests: +20450
pull_request: https://github.com/python/cpython/pull/21301

___
Python tracker 

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



[issue41180] marshal load bypass code.__new__ audit event

2020-07-03 Thread Steve Dower


Steve Dower  added the comment:


New changeset d160e0f8e283d0a8737644588b38e8c6a07c134f by tkmikan in branch 
'master':
bpo-41180: Audit code.__new__ when unmarshalling (GH-21271)
https://github.com/python/cpython/commit/d160e0f8e283d0a8737644588b38e8c6a07c134f


--

___
Python tracker 

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



[issue41180] marshal load bypass code.__new__ audit event

2020-07-03 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



[issue41180] marshal load bypass code.__new__ audit event

2020-07-03 Thread Steve Dower


Steve Dower  added the comment:

Ah, you're right. Thanks for double checking me :)

I'll merge the PR and do the backports. Thanks!

--

___
Python tracker 

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



[issue33327] Add a method to move messages to IMAPlib

2020-07-03 Thread Hans-Peter Jansen


Hans-Peter Jansen  added the comment:

If I'm not mistaken, this is applied to the openSUSE TW version of Python. 
For some reason, this seems to not play well with .uid('move',...)
on a cyrus imap server (v2.4.19). Is that to be expected?

```
2020-07-03 18:04:05  INFO: [imap_reorg] move b'10399' from 2017-01-01 
06:30:35+02:00 to INBOX.2017
Traceback (most recent call last):
  File "./imap_reorg.py", line 431, in 
sys.exit(main())
  File "./imap_reorg.py", line 425, in main
return process()
  File "./imap_reorg.py", line 133, in trace_and_call
result = func(*args, **kwargs)
  File "./imap_reorg.py", line 358, in process
ret |= reorg.run_expr(expr)
  File "./imap_reorg.py", line 345, in run_expr
return method(*args)
  File "./imap_reorg.py", line 328, in yearly
ret = self.imap.uid('move', uid, dest)
  File "/usr/lib64/python3.8/imaplib.py", line 881, in uid
typ, dat = self._simple_command(name, command, *args)
  File "/usr/lib64/python3.8/imaplib.py", line 1205, in _simple_command
return self._command_complete(name, self._command(name, *args))
  File "/usr/lib64/python3.8/imaplib.py", line 1030, in _command_complete
raise self.error('%s command error: %s %s' % (name, typ, data))
imaplib.error: UID command error: BAD [b'Unrecognized UID subcommand']
```

--
nosy: +frispete

___
Python tracker 

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



[issue41198] Round built-in function not shows zeros acording significant figures and calculates different numbers of odd and even

2020-07-03 Thread Tim Peters


Tim Peters  added the comment:

Thanks, Mark! I didn't even know __round__ had become a dunder method.

For the rest, I'll follow StackOverflow - I don't have an instant answer, and 
the instant answers I _had_ didn't survive second thoughts ;-)

--

___
Python tracker 

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



[issue41176] revise Tkinter mainloop dispatching flag behavior

2020-07-03 Thread Richard Sheridan


Change by Richard Sheridan :


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

___
Python tracker 

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



[issue29778] _Py_CheckPython3 uses uninitialized dllpath when embedder sets module path with Py_SetPath

2020-07-03 Thread Steve Dower


Change by Steve Dower :


--
pull_requests: +20447
pull_request: https://github.com/python/cpython/pull/21298

___
Python tracker 

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



[issue41110] 2to3 reports some files as both not changing and having been modified

2020-07-03 Thread SilentGhost


Change by SilentGhost :


--
nosy: +benjamin.peterson
type:  -> behavior
versions:  -Python 3.5, Python 3.6, Python 3.7

___
Python tracker 

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



[issue38731] bad input crashes py_compile library

2020-07-03 Thread Hubert Pineault


Hubert Pineault  added the comment:

Thanks Joannah, I confirm this is a duplicate of 
https://bugs.python.org/issue40456

The issue is better tracked in 40456, so you can close here.

--

___
Python tracker 

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



[issue41199] Docstring convention not followed for dataclasses documentation page

2020-07-03 Thread Eric V. Smith


Change by Eric V. Smith :


--
pull_requests:  -20437

___
Python tracker 

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



[issue41198] Round built-in function not shows zeros acording significant figures and calculates different numbers of odd and even

2020-07-03 Thread Mark Dickinson


Mark Dickinson  added the comment:

Just for fun, I posted a Stack Overflow question: 
https://stackoverflow.com/q/62721186/270986

Let's close this here.

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



[issue41203] Replace references to OS X in documentation with macOS

2020-07-03 Thread Patrick Reader


New submission from Patrick Reader :

Since 10.12 (Sierra, released in 2016), macOS is no longer called OS X. 
References to macOS in the documentation should be updated to reflect this. 
This is now especially important because macOS 11 (Big Sur) is now in preview, 
and the X meaning 10 in roman numerals is now completely incorrect (not just 
the wrong name).

--
assignee: docs@python
components: Documentation
messages: 372951
nosy: docs@python, pxeger
priority: normal
severity: normal
status: open
title: Replace references to OS X in documentation with macOS
type: behavior

___
Python tracker 

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



[issue41194] Python 3.9.0b3 crash on compile() in PyAST_Check() when the _ast module is loaded more than once

2020-07-03 Thread STINNER Victor


STINNER Victor  added the comment:

I cannot reproduce msg372859 crash anymore. I tested 3.9 and master branches. I 
close the issue.

Thanks Arcadiy Ivanov for testing beta releases ;-)

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



[issue41194] Python 3.9.0b3 crash on compile() in PyAST_Check() when the _ast module is loaded more than once

2020-07-03 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset b1cc6ba73a51d5cc3aeb113b5e7378fb50a0e20a by Victor Stinner in 
branch 'master':
bpo-41194: Convert _ast extension to PEP 489 (GH-21293)
https://github.com/python/cpython/commit/b1cc6ba73a51d5cc3aeb113b5e7378fb50a0e20a


--

___
Python tracker 

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



[issue29778] _Py_CheckPython3 uses uninitialized dllpath when embedder sets module path with Py_SetPath

2020-07-03 Thread Steve Dower


Change by Steve Dower :


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

___
Python tracker 

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



[issue40874] Update to libmpdec-2.5.0

2020-07-03 Thread Stefan Krah


Stefan Krah  added the comment:

How witty!

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

___
Python tracker 

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



[issue40874] Update to libmpdec-2.5.0

2020-07-03 Thread Christian Heimes


Christian Heimes  added the comment:

Are you saying that you are not follow advises and guidelines of the developer 
guide?

--

___
Python tracker 

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



[issue40874] Update to libmpdec-2.5.0

2020-07-03 Thread Stefan Krah


Stefan Krah  added the comment:

> Finally, while Raymond and Antoine are welcome to voice their opinions on the 
> matter, your change is landing in 3.9.0b4 which I'm about to announce. So we 
> won't be reverting it. In the future let's make sure we stick to the release 
> calendar to avoid similar heat. If we need to bend a rule or two, that's 
> okay, it happens. Making a fellow core developer stamp your change in such 
> case will increase visibility, and is a good practice regardless, required 
> for example in avionics software.

I've added Antoine, Mark and Raymond because they know the history of
libmpdec, unlike people who came later.

Like for libffi, it is not feasible to get review, because there is
no time.  This would effectively mean that nothing ever changes.

The alternative is to trust that the zero fault situation continues.

Or download *one* of the gigantic test suites, which I have laboriously
updated for this release:

http://www.bytereef.org/software/mpdecimal/releases/mpdecimal-testit-2.5.0.tar.gz

The second one isn't even published.


So again, just clamoring for review (which often is just rubber
stamping) leads to nothing but scoring a few cheap points.

--

___
Python tracker 

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



[issue41110] 2to3 reports some files as both not changing and having been modified

2020-07-03 Thread Ashley Whetter


Change by Ashley Whetter :


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

___
Python tracker 

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



[issue40874] Update to libmpdec-2.5.0

2020-07-03 Thread Stefan Krah


Stefan Krah  added the comment:

Finally, about the Debian issue, of course you could also link 3.8
against the static lib.

--

___
Python tracker 

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



[issue40874] Update to libmpdec-2.5.0

2020-07-03 Thread Stefan Krah

Stefan Krah  added the comment:

Łukasz, which one is nicer?

> reverting this patch passes all the tests, what's the motivation and why were 
> there no code reviews for this?

or:

> Yeah, I already felt a bit guilty about adding you -- it could be a compiler 
> bug or an actual overflow.  My bet is also that the reordering exposes an 
> existing overflow.  The reordering itself certainly looks correct to me.



I'm always astonished that some of the CoC proponents (and reporters)
have little idea about actual politeness, a fact which is a main source
of friction.


Hint: I'd prefer actual politeness.

--

___
Python tracker 

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



[issue40874] Update to libmpdec-2.5.0

2020-07-03 Thread Łukasz Langa

Łukasz Langa  added the comment:

> And a release manager who has no libmpdec expertise or authority took the 
> side of the "bug" reporter without much thought.

What is this elusive "authority" you keep bringing up?

> Note that I do not go straight into accusing people, especially in uncertain 
> cases.

Neither did Anthony. He observed breakage in his builds and reported it. He 
noted that the change happened during the beta freeze which is documented to 
only allow bug fixes:

https://devguide.python.org/devcycle/#beta

Anthony's only fault here was depending on the system libmpdec which you claim 
is invalid use. As he explained, he did this to mirror behavior of the official 
Python packages. And it worked for the first three betas. His surprise breakage 
report wasn't unreasonable, let alone "petulant". Compare with your own 
responses which to many of us read unnecessarily defensive.

Nobody is challenging your competence. The problem is entirely with the timing 
and making non-bugfix changes during the beta phase. Bringing up credentials, 
track records, or listing professional networks doesn't change that.

Finally, while Raymond and Antoine are welcome to voice their opinions on the 
matter, your change is landing in 3.9.0b4 which I'm about to announce. So we 
won't be reverting it. In the future let's make sure we stick to the release 
calendar to avoid similar heat. If we need to bend a rule or two, that's okay, 
it happens. Making a fellow core developer stamp your change in such case will 
increase visibility, and is a good practice regardless, required for example in 
avionics software.

--

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


Dong-hee Na  added the comment:


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


--

___
Python tracker 

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



[issue41198] Round built-in function not shows zeros acording significant figures and calculates different numbers of odd and even

2020-07-03 Thread Mark Dickinson


Mark Dickinson  added the comment:

One note: in the original post, not only are the values being tested coming 
from NumPy's arange, but round(x[i],1) is testing *NumPy's* rounding 
functionality, not Python's. x[i] has type np.float64, and while np.float64 
does inherit from Python's float, it also overrides float.__round__ with its 
own implementation (that essentially amounts to scale-by-power-of-ten, 
round-to-nearest-int, unscale, just like Python used to do in the bad old 
days). So errors from arange plus NumPy's non-correctly-rounded round means 
that all bets are off on what happens for values that _look_ as though they're 
ties when shown in decimal, but aren't actually ties thanks to the 
what-you-see-is-not-what-you-get nature of binary floating-point.

On arange in particular, I've never looked closely into the implementation; 
it's never noticeably not been "close enough" (i.e., accurate to within a few 
ulps either way), and I've never needed it or expected it to be perfectly 
correctly rounded. Now that it's been brought up, I'll take a look. (But that 
shouldn't keep this issue open, since that's a pure NumPy issue.)

Honestly, given the usual floating-point imprecision issues, I'm surprised that 
the balance is coming out as evenly as it is in Tim's and Steven's experiments. 
I can see why it might work for a single binade, but I'm at a loss to explain 
why you'd expect a perfect balance across several binades. 

For example: if you're looking at values of the form 0.xx5 in the binade [0.5, 
1.0], and rounding those to two decimal places, you'd expect perfect parity, 
because if you pair the values from [0.5, 0.75] with the reverse of the values 
from [0.75, 1.0], in each pair exactly one of the two values will round up, and 
one down (the paired values always add up to *exactly* 1.5, with no rounding, 
so the errors from the decimal-to-binary rounding will always go in opposite 
directions). For example 0.505 rounds up, and dually 0.995 rounds down. (But 
whether the pair gives (up, down) or (down, up) will depend on exactly which 
way the rounding went when determining the nearest binary64 float, so will be 
essentially unpredictable.)

>>> test_values = [x/1000 for x in range(505, 1000, 10)]
>>> len(test_values)  # total count of values
50
>>> sum(round(val, 2) > val for val in test_values)  # number rounding up
25

But then you need to make a similar argument for the next binade down: [0.25, 
0.5] (which doesn't work at all in this case, because that binade contains an 
odd number of values).

Nevertheless, this *does* seem to work, and I haven't yet found a good 
explanation why. Any offers?

>>> k = 8
>>> test_values = [x/10**(k+1) for x in range(5, 10**(k+1), 10)]
>>> sum(round(val, k) > val for val in test_values)
5000

BTW, yes, I think this issue can be closed.

--

___
Python tracker 

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



[issue37322] test_ssl: test_pha_required_nocert() emits a ResourceWarning

2020-07-03 Thread Matthew Hughes


Matthew Hughes  added the comment:

Whoops, I realise the patch I shared contained a combination of two 
(independent) approaches I tried:

1. Add sleep and perform cleanup
2. Naively patch catch_threading_exception to accept a cleanup routine to be 
run upon exiting but before removing the thread.

--

___
Python tracker 

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



[issue37322] test_ssl: test_pha_required_nocert() emits a ResourceWarning

2020-07-03 Thread Matthew Hughes


Matthew Hughes  added the comment:

I noticed this test was still emitting a "ResourceWarning":
--
$ ./python -m test test_ssl -m TestPostHandshakeAuth 
0:00:00 load avg: 0.74 Run tests sequentially
0:00:00 load avg: 0.74 [1/1] test_ssl
/home/mjh/src/cpython/Lib/test/support/threading_helper.py:209: 
ResourceWarning: unclosed 
  del self.thread
ResourceWarning: Enable tracemalloc to get the object allocation traceback

== Tests result: SUCCESS ==

1 test OK.

Total duration: 1.1 sec
Tests result: SUCCESS
--
and thought I would try silencing it by ensuring the SSL connection handled by 
the separate thread was closed before exiting. My attempt involved checking the 
thread's exception and acting accordingly, but I ran into a race condition 
which (solely as a proof of concept) I resolved by adding a sleep() call (see 
patch).

While I continue to search for a proper resolution I was wondering what 
approach someone with more insight might suggest.

--
nosy: +mhughes
Added file: https://bugs.python.org/file49294/naive_proof_of_concept.patch

___
Python tracker 

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



[issue29778] _Py_CheckPython3 uses uninitialized dllpath when embedder sets module path with Py_SetPath

2020-07-03 Thread Steve Dower


Change by Steve Dower :


--
assignee:  -> steve.dower

___
Python tracker 

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



[issue41202] Allow to provide custom exception handler to asyncio.run()

2020-07-03 Thread tomaszdrozdz


Change by tomaszdrozdz :


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

___
Python tracker 

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



[issue41202] Allow to provide custom exception handler to asyncio.run()

2020-07-03 Thread tomaszdrozdz


Change by tomaszdrozdz :


--
title: Allo to provide custom exception handler to asyncio.run() -> Allow to 
provide custom exception handler to asyncio.run()

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


STINNER Victor  added the comment:


New changeset 3549ca313a6103a3adb281ef3a849298b7d7f72c by Victor Stinner in 
branch 'master':
bpo-1635741: Fix unicode_dealloc() for mortal interned string (GH-21270)
https://github.com/python/cpython/commit/3549ca313a6103a3adb281ef3a849298b7d7f72c


--

___
Python tracker 

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



[issue41194] Python 3.9.0b3 crash on compile() in PyAST_Check() when the _ast module is loaded more than once

2020-07-03 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset f8599279b6ac8c44538b608fd08c13ccf674f497 by Victor Stinner in 
branch '3.9':
[3.9] bpo-41194: The _ast module cannot be loaded more than once (GH-21290) 
(GH-21292)
https://github.com/python/cpython/commit/f8599279b6ac8c44538b608fd08c13ccf674f497


--

___
Python tracker 

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



[issue41196] APPDATA directory is different in store installed python

2020-07-03 Thread Steve Dower


Steve Dower  added the comment:

> A crude workaround is to script PowerShell or CMD in a child process.

I mean, that's not a *terrible* workaround:

>>> import os
>>> p1 = os.path.expandvars("%APPDATA%\\test.txt")
>>> p1
'C:\\Users\\steve\\AppData\\Roaming\\test.txt'
>>> open(p1, "w").close()
>>> os.system(f'copy "{os.path.realpath(p1)}" "{p1}"')
1 file(s) copied.
0
>>>

But yeah, definitely crude :)

--

___
Python tracker 

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



[issue40874] Update to libmpdec-2.5.0

2020-07-03 Thread Stefan Krah


Stefan Krah  added the comment:

> both 3.8 and 3.9 have to be available on the systems for the transition 
> period.

If sonames can be incremented for libraries even if they are ABI compatible, 
how about using up as many as you need for the Debian
package?  Next time when I release mpdecimal, I'll ask you about
the highest version that's in use at Debian and increment it by
one.

--

___
Python tracker 

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



[issue41202] Allo to provide custom exception handler to asyncio.run()

2020-07-03 Thread tomaszdrozdz


New submission from tomaszdrozdz :

I wish we had:  

asyncio.run(coro, *, debug=False, excepton_handler=None)

so we could provide custome exception handler function for the loop.

--
components: asyncio
messages: 372934
nosy: asvetlov, tomaszdrozdz, yselivanov
priority: normal
severity: normal
status: open
title: Allo to provide custom exception handler to asyncio.run()
type: enhancement
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



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

2020-07-03 Thread Dong-hee Na


Change by Dong-hee Na :


--
pull_requests: +20443
pull_request: https://github.com/python/cpython/pull/21294

___
Python tracker 

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



[issue38731] bad input crashes py_compile library

2020-07-03 Thread Joannah Nanjekye


Joannah Nanjekye  added the comment:

The regression is tracked here: https://bugs.python.org/issue40456

And a PR is under review here: https://github.com/python/cpython/pull/17134

Also, this issue is a duplicate to this: https://bugs.python.org/issue40456

One of these should be closed.

--

___
Python tracker 

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



[issue40874] Update to libmpdec-2.5.0

2020-07-03 Thread Stefan Krah


Stefan Krah  added the comment:

> In the mean time may I request that you follow our protocol for code review.

Ah, who reviews libffi?  It is just updated.  Not counting the thousands of 
other cases people commit unreviewed, like in changing the C-API.

And no, Christian, that isn't "whataboutism", that is comparative analysis.

--

___
Python tracker 

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



[issue40874] Update to libmpdec-2.5.0

2020-07-03 Thread Stefan Krah


Stefan Krah  added the comment:

Matthias, to tell the truth, I was never sure about the soname.
I read this:

   https://www.debian.org/doc/debian-policy/ch-sharedlibs.html


"""
The SONAME and binary package name need not, and indeed normally should not, 
change if new interfaces are added but none are removed or changed, since this 
will not break binaries linked against the old shared library. Correct 
versioning of dependencies on the newer shared library by binaries that use the 
new interfaces is handled via the symbols or shlibs system (see Dependencies 
between the library and other packages).
"""

I took the interface to mean ABI, which did not change.  Also this:


"""Every time the shared library ABI changes in a way that may break binaries 
linked against older versions of the shared library, the SONAME of the library 
and the corresponding name for the binary package containing the runtime shared 
library should change. Normally, this means the SONAME should change any time 
an interface is removed from the shared library or the signature of an 
interface (the number of parameters or the types of parameters that it takes, 
for example) is changed. This practice is vital to allowing clean upgrades from 
older versions of the package and clean transitions between the old ABI and new 
ABI without having to upgrade every affected package simultaneously.
"""


So I left the soname at 2.

--

___
Python tracker 

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



[issue40874] Update to libmpdec-2.5.0

2020-07-03 Thread Stefan Krah


Stefan Krah  added the comment:

Since this issue has been brought to the attention of the CoC
committee. Here is how *I* report issues:

   https://bugs.python.org/issue40223#msg372578
   https://bugs.python.org/issue40223#msg372637
   https://github.com/google/sanitizers/issues/1257


Note that I do not go straight into accusing people, especially
in uncertain cases. I never have any problems with my bug reports.

--

___
Python tracker 

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



[issue41201] Long integer arithmetic

2020-07-03 Thread Christian Heimes


Change by Christian Heimes :


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



[issue41201] Long integer arithmetic

2020-07-03 Thread Rémi Lapeyre

Rémi Lapeyre  added the comment:

This is because you used the floating point division operator `/` instead of 
the integer division `//`:


def digitsum(num):
digsum = 0
tnum = num
while tnum > 0:
print("tnum = %d, digsum = %d" % (tnum,digsum))
digsum += (tnum % 10)
tnum = int((tnum - (tnum % 10)) // 10)
return digsum

gives the result you expect.


Please ask for help on StackOverflow or the python-help mailing list first as 
this bug tracker is for reporting bugs in the Python interpreter itself and not 
for general help with Python programming.

The various numeric operator are documented at 
https://docs.python.org/3/library/stdtypes.html#numeric-types-int-float-complex

--
nosy: +remi.lapeyre

___
Python tracker 

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



[issue40874] Update to libmpdec-2.5.0

2020-07-03 Thread Matthias Klose


Matthias Klose  added the comment:

I'm +-0 on if that should be integrated into 3.9. Only a few people are using 
--with-system-libmpdec.  However the way that mpdecimal 2.4 and 2.5 are 
released, they are not usable for Debian or Ubuntu for the transition from 3.8 
to 3.9.  For that, both 3.8 and 3.9 have to be available on the systems for the 
transition period, and that's just not possible without mpdecimal changing it's 
soname, or building one Python version with the internal libmpdec.

--

___
Python tracker 

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



[issue38113] Remove statics from ast.c

2020-07-03 Thread STINNER Victor


STINNER Victor  added the comment:

> New changeset ac46eb4ad6662cf6d771b20d8963658b2186c48c by Eric Snow (Dino 
> Viehland) in branch 'master':
> bpo-38113: Update the Python-ast.c generator to PEP384 (gh-15957)

This change introduced a subtle regression: bpo-41194. I modified the _ast 
module to use again a global state:

New changeset 91e1bc18bd467a13bceb62e16fbc435b33381c82 by Victor Stinner in 
branch 'master':
bpo-41194: The _ast module cannot be loaded more than once (GH-21290)
https://github.com/python/cpython/commit/91e1bc18bd467a13bceb62e16fbc435b33381c82


I also proposed PR 21293 to use again a module state, even if the 
implementation has some drawbacks (see the PR comments).

--

___
Python tracker 

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



[issue40874] Update to libmpdec-2.5.0

2020-07-03 Thread Stefan Krah


Stefan Krah  added the comment:

> backwards incompatible changes.

It is not a backwards incompatible change. Slamming a 3.9 into
a nightly build has never been supported.

--

___
Python tracker 

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



[issue41201] Long integer arithmetic

2020-07-03 Thread David Srebnick


New submission from David Srebnick :

The following program is one way of computing the sum of digits in a number.  
It works properly for the first case, but fails for the second one.

def digitsum(num):
digsum = 0
tnum = num
while tnum > 0:
print("tnum = %d, digsum = %d" % (tnum,digsum))
digsum += (tnum % 10)
tnum = int((tnum - (tnum % 10)) / 10)
return digsum

print(digitsum())
print(digitsum(9))

--
messages: 372925
nosy: David Srebnick
priority: normal
severity: normal
status: open
title: Long integer arithmetic
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



[issue40874] Update to libmpdec-2.5.0

2020-07-03 Thread Stefan Krah


Stefan Krah  added the comment:

Raymond, Mark, Antoine:  If you think this should be reverted, I'll
revert it.

--
nosy: +mark.dickinson, pitrou, rhettinger

___
Python tracker 

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



[issue41194] Python 3.9.0b3 crash on compile() in PyAST_Check() when the _ast module is loaded more than once

2020-07-03 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +20442
pull_request: https://github.com/python/cpython/pull/21293

___
Python tracker 

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



[issue41194] Python 3.9.0b3 crash on compile() in PyAST_Check() when the _ast module is loaded more than once

2020-07-03 Thread Arcadiy Ivanov


Change by Arcadiy Ivanov :


--
nosy:  -Digital India

___
Python tracker 

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



[issue41194] Python 3.9.0b3 crash on compile() in PyAST_Check() when the _ast module is loaded more than once

2020-07-03 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +20441
pull_request: https://github.com/python/cpython/pull/21292

___
Python tracker 

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



[issue41194] Python 3.9.0b3 crash on compile() in PyAST_Check() when the _ast module is loaded more than once

2020-07-03 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 91e1bc18bd467a13bceb62e16fbc435b33381c82 by Victor Stinner in 
branch 'master':
bpo-41194: The _ast module cannot be loaded more than once (GH-21290)
https://github.com/python/cpython/commit/91e1bc18bd467a13bceb62e16fbc435b33381c82


--

___
Python tracker 

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



[issue40874] Update to libmpdec-2.5.0

2020-07-03 Thread Stefan Krah


Stefan Krah  added the comment:

I was accused of breaking the release, which is false. It is outside
of a release manager's authority to claim that an *experimental* and
*nightly* build that uses a flag in an unintended manner needs counts
as breakage.

--

___
Python tracker 

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



  1   2   >