[issue45433] libpython should not be linked with libcrypt

2021-10-11 Thread Sam James


Change by Sam James :


--
nosy: +thesamesam

___
Python tracker 

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



[issue45410] python -m test -jN: write stderr in stdout to get messages in order

2021-10-11 Thread STINNER Victor


STINNER Victor  added the comment:

Calling sys.stdout doesn't help :-(

Fail at commit ce3489cfdb9f0e050bdc45ce5d3902c2577ea683:
https://buildbot.python.org/all/#/builders/73/builds/788
---
0:00:10 load avg: 7.59 [306/427/1] test_ftplib failed (env changed)
Warning -- Uncaught thread exception: Exception
Exception in thread Thread-67:
(...)
Exception
test__all__ (test.test_ftplib.MiscTestCase) ... ok
test_abort (test.test_ftplib.TestFTPClass) ... ok
test_acct (test.test_ftplib.TestFTPClass) ... ok
(...)
---

The warning cannot come from MiscTestCase.test__all__(), so the warning is 
still logged at the wrong place.

--

___
Python tracker 

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



[issue45439] [C API] Move usage of tp_vectorcall_offset from public headers to the internal C API

2021-10-11 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +27190
pull_request: https://github.com/python/cpython/pull/28895

___
Python tracker 

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



[issue45440] [C API] Py_IS_INFINITY() macro doesn't work in the limited C API if isinf() is not defined

2021-10-11 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue45440] [C API] Py_IS_INFINITY() macro doesn't work in the limited C API if isinf() is not defined

2021-10-11 Thread STINNER Victor


STINNER Victor  added the comment:

The Py_FORCE_DOUBLE() macro was added in bpo-5724 by the change:

commit e05e8409e1b47a2c018ad8a67016546217165c60
Author: Mark Dickinson 
Date:   Mon May 4 13:30:43 2009 +

Issue #5724: Fix cmath failures on Solaris 10.

--

___
Python tracker 

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



[issue45396] Custom frozen modules get ignored.

2021-10-11 Thread Guido van Rossum


Guido van Rossum  added the comment:

I'm not convinced by the comment you linked to.

It seems Brett is referring to the case where at the C level someone overrides 
`PyImport_FrozenModules` (a global in frozen.c) -- though it is never 
explicitly named in the thread. And that variable *is* ignored when the -X flag 
is set to off (at least, it is ignored when use_frozen() is false and we're not 
talking about an "essensial" frozen module; and I think use_frozen() 
corresponds to whether the -X flag is on or off, or its default). So I think 
the -X flag is named correctly.

--
nosy: +gvanrossum

___
Python tracker 

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



[issue45440] [C API] Py_IS_INFINITY() macro doesn't work in the limited C API if isinf() is not defined

2021-10-11 Thread STINNER Victor


New submission from STINNER Victor :

If the HAVE_DECL_ISINF macro is not defined in pyconfig.h, the Py_IS_INFINITY 
macro is defined as:

#define Py_IS_INFINITY(X) \
((X) && (Py_FORCE_DOUBLE(X)*0.5 == Py_FORCE_DOUBLE(X)))

Problem: Py_FORCE_DOUBLE() is excluded from the limited C API (and the stable 
ABI).

I see different options:

* Implement Py_IS_INFINITY() as an opaque function if the HAVE_DECL_ISINF macro 
is not defined. I did something similar in Py_INCREF() to support the limited C 
API with a debug build of Python: call _Py_IncRef() opaque function.

* Make Py_FORCE_DOUBLE() private and add it to the limited C API as an 
implementation detail.

* Add Py_FORCE_DOUBLE() macro to the limited C API: the current implementation 
is fragile, it depends on how Python.h is included. Also, I dislike macros in 
the limited C API.

I would prefer to *remove* Py_FORCE_DOUBLE() to all APIs, than adding it to the 
limited C API.

--
components: C API
messages: 403704
nosy: vstinner
priority: normal
severity: normal
status: open
title: [C API] Py_IS_INFINITY() macro doesn't work in the limited C API if 
isinf() is not defined
versions: Python 3.11

___
Python tracker 

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



[issue45429] [Windows] time.sleep() should use CREATE_WAITABLE_TIMER_HIGH_RESOLUTION

2021-10-11 Thread Eryk Sun


Eryk Sun  added the comment:

It's up to the core devs whether or not Python should try to use a 
high-resolution timer, which is currently undocumented in the Windows API and 
implemented only in recent releases of Windows 10 and 11. But if this does get 
supported, the code should fall back on creating a normal timer if 
CREATE_WAITABLE_TIMER_HIGH_RESOLUTION makes the call fail. For example:

#ifndef CREATE_WAITABLE_TIMER_HIGH_RESOLUTION
#define CREATE_WAITABLE_TIMER_HIGH_RESOLUTION 0x0002
#endif

LARGE_INTEGER relative_timeout;
// No need to check for integer overflow, both types are signed
assert(sizeof(relative_timeout) == sizeof(timeout_100ns));
// SetWaitableTimerEx(): a negative due time is relative
relative_timeout.QuadPart = -timeout_100ns;
DWORD flags = CREATE_WAITABLE_TIMER_HIGH_RESOLUTION;

create_timer:

HANDLE timer = CreateWaitableTimerExW(NULL, NULL, flags, 
TIMER_ALL_ACCESS);
if (timer == NULL)
{
if (flags && GetLastError() == ERROR_INVALID_PARAMETER) {
// CREATE_WAITABLE_TIMER_HIGH_RESOLUTION is not supported.
flags = 0;
goto create_timer;
}
PyErr_SetFromWindowsErr(0);
return -1;
}

if (!SetWaitableTimerEx(timer, _timeout,
  0,  // no period; the timer is signaled once
  NULL, NULL, // no completion routine
  NULL,   // no wake context; do not resume from suspend
  0)) // no tolerable delay for timer coalescing
{
PyErr_SetFromWindowsErr(0);
goto error;
}

--
nosy: +eryksun

___
Python tracker 

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



[issue40890] Dict views should be introspectable

2021-10-11 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
nosy:  -pablogsal

___
Python tracker 

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



[issue45433] libpython should not be linked with libcrypt

2021-10-11 Thread STINNER Victor


STINNER Victor  added the comment:

Nicely spotted, thanks for the fix!

I prefer to not backport to avoid any risk of regression. In my experience, the 
build system is fragile.

--
components: +Build -C API
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions:  -Python 3.10, 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



[issue45433] libpython should not be linked with libcrypt

2021-10-11 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset be21706f3760bec8bd11f85ce02ed6792b07f51f by Mike Gilbert in 
branch 'main':
bpo-45433: Do not link libpython against libcrypt (GH-28881)
https://github.com/python/cpython/commit/be21706f3760bec8bd11f85ce02ed6792b07f51f


--
nosy: +vstinner

___
Python tracker 

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



[issue45435] delete misleading faq entry about atomic operations

2021-10-11 Thread Steven D'Aprano


New submission from Steven D'Aprano :

Why do you say that the FAQ is misleading?

If it is misleading, it should be replaced with a more correct answer, not just 
deleted.

--
nosy: +steven.daprano

___
Python tracker 

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



[issue45439] [C API] Move usage of tp_vectorcall_offset from public headers to the internal C API

2021-10-11 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +27188
pull_request: https://github.com/python/cpython/pull/28893

___
Python tracker 

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



[issue45356] Calling `help` executes @classmethod @property decorated methods

2021-10-11 Thread Alex Waygood


Alex Waygood  added the comment:

Some thoughts from me, as an unqualified but interested party:

Like Randolph, I very much like having class properties in the language, and 
have used them in several projects since their introduction in 3.9. I find 
they're especially useful with Enums. However, while the bug in doctest, for 
example, is relatively trivial to fix (see my PR in #44904), it seems to me 
plausible that bugs might crop up in other standard library modules as well. As 
such, leaving class properties in the language might mean that several more 
bugfixes relating to this feature would have to be made in the future. So, I 
can see the argument for removing them.

It seems to me that Randolph's idea of changing `classmethod` from a class into 
a function would break a lot of existing code. As an alternative, one small 
adjustment that could be made would be to special-case `isinstance()` when it 
comes to class properties. In pure Python, you could achieve this like this:

```
oldproperty = property

class propertymeta(type):
def __instancecheck__(cls, obj):
return super().__instancecheck__(obj) or (
isinstance(obj, classmethod)
and super().__instancecheck__(obj.__func__)
)


class property(oldproperty, metaclass=propertymeta): pass
```

This would at least mean that `isinstance(classmethod(property(lambda cls: 
42)), property)` and `isinstance(classmethod(property(lambda cls: 42)), 
classmethod)` would both evaluate to `True`. This would be a bit of a lie (an 
instance of `classmethod` isn't an instance of `property`), but would at least 
warn the caller that the object they were dealing with had some propertylike 
qualities to it.

Note that this change wouldn't fix the bugs in abc and doctest, nor does it fix 
the issue with class-property setter logic that Randolph identified.

With regards to the point that `@staticmethod` cannot be stacked on top of 
`@property`: it strikes me that this feature isn't really needed. You can 
achieve the same effect just by stacking `@classmethod` on top of `@property` 
and not using the `cls` parameter.

--

___
Python tracker 

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



[issue45439] [C API] Move usage of tp_vectorcall_offset from public headers to the internal C API

2021-10-11 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset ce3489cfdb9f0e050bdc45ce5d3902c2577ea683 by Victor Stinner in 
branch 'main':
bpo-45439: Rename _PyObject_CallNoArg() to _PyObject_CallNoArgs() (GH-28891)
https://github.com/python/cpython/commit/ce3489cfdb9f0e050bdc45ce5d3902c2577ea683


--

___
Python tracker 

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



[issue40890] Dict views should be introspectable

2021-10-11 Thread Joshua Bronson


Change by Joshua Bronson :


--
nosy: +jab
nosy_count: 6.0 -> 7.0
pull_requests: +27187
pull_request: https://github.com/python/cpython/pull/28892

___
Python tracker 

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



[issue45438] inspect not capturing type annotations created by __class_getitem__

2021-10-11 Thread Guido van Rossum


Guido van Rossum  added the comment:

Raymond, the bug must be in the Python code in inspect.py. Could you dig a 
little deeper there? I don't know much about it. Specifically I think the 
problem may just be in the repr() of class Parameter:

>>> inspect.signature(g).parameters['s'] 

>>> inspect.signature(g).parameters['s'].annotation
list[float]
>>>

--
nosy: +kj

___
Python tracker 

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



[issue45439] [C API] Move usage of tp_vectorcall_offset from public headers to the internal C API

2021-10-11 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +27186
pull_request: https://github.com/python/cpython/pull/28891

___
Python tracker 

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



[issue45439] [C API] Move usage of tp_vectorcall_offset from public headers to the internal C API

2021-10-11 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset fb8f208a4ddb38eedee71f9ecd0f22058802dab1 by Victor Stinner in 
branch 'main':
bpo-45439: _PyObject_Call() only checks tp_vectorcall_offset once (GH-28890)
https://github.com/python/cpython/commit/fb8f208a4ddb38eedee71f9ecd0f22058802dab1


--

___
Python tracker 

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



[issue45439] [C API] Move usage of tp_vectorcall_offset from public headers to the internal C API

2021-10-11 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue45439] [C API] Move usage of tp_vectorcall_offset from public headers to the internal C API

2021-10-11 Thread STINNER Victor


New submission from STINNER Victor :

The public C API should avoid accessing directly PyTypeObject members: see 
bpo-40170.

I propose to move static inline functions to the internal C API, and only 
expose opaque function calls to the public C API.

--
components: C API
messages: 403695
nosy: vstinner
priority: normal
severity: normal
status: open
title: [C API] Move usage of tp_vectorcall_offset from public headers to the 
internal C API
versions: Python 3.11

___
Python tracker 

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



[issue45412] [C API] Remove Py_OVERFLOWED(), Py_SET_ERRNO_ON_MATH_ERROR(), Py_ADJUST_ERANGE1()

2021-10-11 Thread STINNER Victor


STINNER Victor  added the comment:

Include/pymath.h is now better, I close the 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



[issue45412] [C API] Remove Py_OVERFLOWED(), Py_SET_ERRNO_ON_MATH_ERROR(), Py_ADJUST_ERANGE1()

2021-10-11 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 61190e092b8258ede92ac543bb39bad0f7168104 by Victor Stinner in 
branch 'main':
bpo-45412: Move copysign() define to pycore_pymath.h (GH-28889)
https://github.com/python/cpython/commit/61190e092b8258ede92ac543bb39bad0f7168104


--

___
Python tracker 

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



[issue45438] inspect not capturing type annotations created by __class_getitem__

2021-10-11 Thread Raymond Hettinger


New submission from Raymond Hettinger :

In the example below, __annotations__ is correct but not the corresponding 
Signature object.

---

from typing import List

def f(s: List[float]) -> None: pass

def g(s: list[float]) -> None: pass

>>> inspect.signature(f)
 None>

>>> inspect.signature(g)
 None>

g.__annotations__
{'s': list[float], 'return': None}

--
components: Library (Lib)
messages: 403692
nosy: gvanrossum, levkivskyi, rhettinger
priority: normal
severity: normal
status: open
title: inspect not capturing type annotations created by __class_getitem__
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



[issue45437] Assignment to a list of dictionary wrong

2021-10-11 Thread Zachary Ware


Zachary Ware  added the comment:

See 
https://docs.python.org/3/faq/programming.html#how-do-i-create-a-multidimensional-list

Not quite the same example, but the underlying reason for what you're seeing is 
the same: each of the `dict` objects in `[{}] * 4` is actually the *same* dict 
object:

>>> inner = {}
>>> details = [inner] * 4
>>> details
[{}, {}, {}, {}]
>>> assert all(d is inner for d in details)
>>> # Instead, do:
>>> details = [{} for each in range(4)]
>>> details
[{}, {}, {}, {}]
>>> details[1]['A'] = 5
>>> details
[{}, {'A': 5}, {}, {}]

--
nosy: +zach.ware
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



[issue41123] Remove Py_UNICODE APIs except PEP 623

2021-10-11 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 1f316ea3b4fa319eec4f375fb683467b424c964e by Victor Stinner in 
branch 'main':
bpo-41123: Remove Py_UNICODE_COPY() and Py_UNICODE_FILL() (GH-28887)
https://github.com/python/cpython/commit/1f316ea3b4fa319eec4f375fb683467b424c964e


--

___
Python tracker 

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



[issue45434] [C API] Clean-up the Python.h header file

2021-10-11 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 03ea862b8a8234176761240ba122254e9eb11663 by Victor Stinner in 
branch 'main':
bpo-45434: Python.h no longer includes  (GH-2)
https://github.com/python/cpython/commit/03ea862b8a8234176761240ba122254e9eb11663


--

___
Python tracker 

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



[issue45412] [C API] Remove Py_OVERFLOWED(), Py_SET_ERRNO_ON_MATH_ERROR(), Py_ADJUST_ERANGE1()

2021-10-11 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +27184
pull_request: https://github.com/python/cpython/pull/28889

___
Python tracker 

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



[issue45412] [C API] Remove Py_OVERFLOWED(), Py_SET_ERRNO_ON_MATH_ERROR(), Py_ADJUST_ERANGE1()

2021-10-11 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 7103356455c8b0c2ba3523929327756413337a31 by Victor Stinner in 
branch 'main':
bpo-45412: Move _Py_SET_53BIT_PRECISION_START to pycore_pymath.h (GH-28882)
https://github.com/python/cpython/commit/7103356455c8b0c2ba3523929327756413337a31


--

___
Python tracker 

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



[issue45412] [C API] Remove Py_OVERFLOWED(), Py_SET_ERRNO_ON_MATH_ERROR(), Py_ADJUST_ERANGE1()

2021-10-11 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset a9fe1a8e5b4698937e06c2c419da92e6f78f2ee7 by Victor Stinner in 
branch 'main':
bpo-45412: Update _Py_ADJUST_ERANGE1() comment (GH-28884)
https://github.com/python/cpython/commit/a9fe1a8e5b4698937e06c2c419da92e6f78f2ee7


--

___
Python tracker 

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



[issue45410] python -m test -jN: write stderr in stdout to get messages in order

2021-10-11 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 1ebd798fddef51e1f6fd40a4860278a1851ac268 by Victor Stinner in 
branch 'main':
bpo-45410: Add test.support.flush_std_streams() (GH-28885)
https://github.com/python/cpython/commit/1ebd798fddef51e1f6fd40a4860278a1851ac268


--

___
Python tracker 

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



[issue45434] [C API] Clean-up the Python.h header file

2021-10-11 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +27183
pull_request: https://github.com/python/cpython/pull/2

___
Python tracker 

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



[issue41123] Remove Py_UNICODE APIs except PEP 623

2021-10-11 Thread STINNER Victor


Change by STINNER Victor :


--
nosy: +vstinner
nosy_count: 2.0 -> 3.0
pull_requests: +27182
pull_request: https://github.com/python/cpython/pull/28887

___
Python tracker 

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



[issue45405] configure fails on macOS with non-Apple clang version 13 which implements --print-multiarch

2021-10-11 Thread Ned Deily


Ned Deily  added the comment:

> Note that this issue isn't macOS specific: you will get the same failure when 
> cross-compiling targeting Linux. e.g. --build=x86_64-unknown-linux-gnu 
> --host=i686-unknown-linux-gnu.

Can you be more specific? This particular issue isn't about cross-compiling. 
It's just about building for macOS on macOS. Under what circumstances is there 
a problem when trying to build one of the supported cross-compilation targets 
and does this proposed change fix that problem or create a new problem?

--

___
Python tracker 

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



[issue45434] [C API] Clean-up the Python.h header file

2021-10-11 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 47717d1186563695e798b40350d15b00d04a5237 by Victor Stinner in 
branch 'main':
bpo-45434: Cleanup Python.h header file (GH-28883)
https://github.com/python/cpython/commit/47717d1186563695e798b40350d15b00d04a5237


--

___
Python tracker 

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



[issue43139] test_ttk test_compound, test_tk test_type fail with Tk 8.6.11.1

2021-10-11 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
title: test_ttk test_compound and test_tk test_type fails with Tk 8.6.11.1 -> 
test_ttk test_compound, test_tk test_type fail with Tk 8.6.11.1

___
Python tracker 

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



[issue45436] test_tk.test_configure_type() failed on x86 Gentoo Non-Debug with X 3.x

2021-10-11 Thread STINNER Victor


STINNER Victor  added the comment:

> 2 tests failed:test_tk test_ttk_guionly

They also failed on:

* x86 Gentoo Non-Debug with X 3.9
* x86 Gentoo Non-Debug with X 3.10

--

___
Python tracker 

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



[issue45405] configure fails on macOS with non-Apple clang version 13 which implements --print-multiarch

2021-10-11 Thread Gregory Szorc


Gregory Szorc  added the comment:

Note that this issue isn't macOS specific: you will get the same failure when 
cross-compiling targeting Linux. e.g. --build=x86_64-unknown-linux-gnu 
--host=i686-unknown-linux-gnu.

--
nosy: +indygreg

___
Python tracker 

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



[issue43139] test_ttk test_compound and test_tk test_type fails with Tk 8.6.11.1

2021-10-11 Thread STINNER Victor


STINNER Victor  added the comment:

See also bpo-45436: test_tk.test_configure_type() failed on x86 Gentoo 
Non-Debug with X 3.x.

--
nosy: +vstinner

___
Python tracker 

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



[issue45436] test_tk.test_configure_type() failed on x86 Gentoo Non-Debug with X 3.x

2021-10-11 Thread STINNER Victor


STINNER Victor  added the comment:

See also bpo-43139: test_ttk test_compound and test_tk test_type fails with Tk 
8.6.11.1.

--

___
Python tracker 

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



[issue45436] test_tk.test_configure_type() failed on x86 Gentoo Non-Debug with X 3.x

2021-10-11 Thread STINNER Victor


Change by STINNER Victor :


--
title: test_configure_type() failed on -> test_tk.test_configure_type() failed 
on x86 Gentoo Non-Debug with X 3.x

___
Python tracker 

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



[issue45435] delete misleading faq entry about atomic operations

2021-10-11 Thread Thomas Grainger


Change by Thomas Grainger :


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

___
Python tracker 

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



[issue45437] Assignment to a list of dictionary wrong

2021-10-11 Thread Xin Sheng Zhou


New submission from Xin Sheng Zhou :

>>> details = [{}]*4
>>> details
[{}, {}, {}, {}]
>>> details[1]['A']=5
>>> details
[{'A': 5}, {'A': 5}, {'A': 5}, {'A': 5}]
>>>

--
messages: 403679
nosy: xinshengzhou
priority: normal
severity: normal
status: open
title: Assignment to a list of dictionary wrong
type: behavior
versions: Python 3.6

___
Python tracker 

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



[issue45436] test_configure_type() failed on

2021-10-11 Thread STINNER Victor


New submission from STINNER Victor :

x86 Gentoo Non-Debug with X 3.x:
https://buildbot.python.org/all/#/builders/58/builds/891

test.pythoninfo:

tkinter.TCL_VERSION: 8.6
tkinter.TK_VERSION: 8.6
tkinter.info_patchlevel: 8.6.11

2 tests failed:
test_tk test_ttk_guionly

==
FAIL: test_configure_type (tkinter.test.test_tkinter.test_widgets.MenuTest)
--
Traceback (most recent call last):
  File 
"/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Lib/tkinter/test/test_tkinter/test_widgets.py",
 line 1244, in test_configure_type
self.checkEnumParam(widget, 'type',
^^^
  File 
"/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Lib/tkinter/test/widget_tests.py",
 line 151, in checkEnumParam
self.checkInvalidParam(widget, name, '',

  File 
"/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Lib/tkinter/test/widget_tests.py",
 line 73, in checkInvalidParam
with self.assertRaises(tkinter.TclError) as cm:
^^^
AssertionError: TclError not raised

==
FAIL: test_configure_compound (tkinter.test.test_ttk.test_widgets.ButtonTest)
--
Traceback (most recent call last):
  File 
"/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Lib/tkinter/test/test_ttk/test_widgets.py",
 line 173, in test_configure_compound
self.checkEnumParam(widget, 'compound',
^^^
  File 
"/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Lib/tkinter/test/widget_tests.py",
 line 151, in checkEnumParam
self.checkInvalidParam(widget, name, '',

  File 
"/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Lib/tkinter/test/widget_tests.py",
 line 73, in checkInvalidParam
with self.assertRaises(tkinter.TclError) as cm:
^^^
AssertionError: TclError not raised

==
FAIL: test_configure_compound 
(tkinter.test.test_ttk.test_widgets.CheckbuttonTest)
--
Traceback (most recent call last):
  File 
"/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Lib/tkinter/test/test_ttk/test_widgets.py",
 line 173, in test_configure_compound
self.checkEnumParam(widget, 'compound',
^^^
  File 
"/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Lib/tkinter/test/widget_tests.py",
 line 151, in checkEnumParam
self.checkInvalidParam(widget, name, '',

  File 
"/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Lib/tkinter/test/widget_tests.py",
 line 73, in checkInvalidParam
with self.assertRaises(tkinter.TclError) as cm:
^^^
AssertionError: TclError not raised

==
FAIL: test_configure_compound (tkinter.test.test_ttk.test_widgets.LabelTest)
--
Traceback (most recent call last):
  File 
"/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Lib/tkinter/test/test_ttk/test_widgets.py",
 line 173, in test_configure_compound
self.checkEnumParam(widget, 'compound',
^^^
  File 
"/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Lib/tkinter/test/widget_tests.py",
 line 151, in checkEnumParam
self.checkInvalidParam(widget, name, '',

  File 
"/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Lib/tkinter/test/widget_tests.py",
 line 73, in checkInvalidParam
with self.assertRaises(tkinter.TclError) as cm:
^^^
AssertionError: TclError not raised

==
FAIL: test_configure_compound 
(tkinter.test.test_ttk.test_widgets.MenubuttonTest)
--
Traceback (most recent call last):
  File 
"/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Lib/tkinter/test/test_ttk/test_widgets.py",
 line 173, in test_configure_compound
self.checkEnumParam(widget, 'compound',
^^^
  File 
"/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Lib/tkinter/test/widget_tests.py",
 line 151, in checkEnumParam
self.checkInvalidParam(widget, name, '',

[issue45435] delete misleading faq entry about atomic operations

2021-10-11 Thread Thomas Grainger


Change by Thomas Grainger :


--
assignee: docs@python
components: Documentation
nosy: docs@python, graingert
priority: normal
severity: normal
status: open
title: delete misleading faq entry about atomic operations

___
Python tracker 

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



[issue45434] [C API] Clean-up the Python.h header file

2021-10-11 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue45410] python -m test -jN: write stderr in stdout to get messages in order

2021-10-11 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +27179
pull_request: https://github.com/python/cpython/pull/28885

___
Python tracker 

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



[issue45410] python -m test -jN: write stderr in stdout to get messages in order

2021-10-11 Thread STINNER Victor


STINNER Victor  added the comment:

Sadly, a recent build failure (at commit 
560a79f94e94de66a18f2a5e4194c2fe51e2adf1) still write "Uncaught thread 
exception" at the top of logs:
---
0:00:11 load avg: 6.07 [315/427/1] test_ftplib failed (env changed)
Warning -- Uncaught thread exception: Exception
Exception in thread Thread-67:
(...)
Exception
test__all__ (test.test_ftplib.MiscTestCase) ... ok
test_abort (test.test_ftplib.TestFTPClass) ... ok
(...)
Ran 94 tests in 3.234s
OK (skipped=1)
---

--

___
Python tracker 

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



[issue45412] [C API] Remove Py_OVERFLOWED(), Py_SET_ERRNO_ON_MATH_ERROR(), Py_ADJUST_ERANGE1()

2021-10-11 Thread STINNER Victor


STINNER Victor  added the comment:

>  *This isn't reliable.  See Py_OVERFLOWED comments.

Oops, Py_OVERFLOWED() has been removed: I created PR 28884 to fix the comment.

--

___
Python tracker 

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



[issue45434] [C API] Clean-up the Python.h header file

2021-10-11 Thread STINNER Victor


New submission from STINNER Victor :

I would like to remove #include  from Python.h, and make Python.h 
smaller.

--
components: C API
messages: 403675
nosy: vstinner
priority: normal
severity: normal
status: open
title: [C API] Clean-up the Python.h header file
versions: Python 3.11

___
Python tracker 

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



[issue45412] [C API] Remove Py_OVERFLOWED(), Py_SET_ERRNO_ON_MATH_ERROR(), Py_ADJUST_ERANGE1()

2021-10-11 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +27178
pull_request: https://github.com/python/cpython/pull/28884

___
Python tracker 

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



[issue45412] [C API] Remove Py_OVERFLOWED(), Py_SET_ERRNO_ON_MATH_ERROR(), Py_ADJUST_ERANGE1()

2021-10-11 Thread STINNER Victor


STINNER Victor  added the comment:

> +1 for the removals. (We should fix #44970 too, but as you say that's a 
> separate issue. And I suspect that the Py_ADJUST_ERANGE1() use for float pow 
> should be replaced, too.)

Well, it's scary of use functions which are documented as:

 * Caution:
 *This isn't reliable.  See Py_OVERFLOWED comments.
 *X and Y may be evaluated more than once.

--

___
Python tracker 

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



[issue45412] [C API] Remove Py_OVERFLOWED(), Py_SET_ERRNO_ON_MATH_ERROR(), Py_ADJUST_ERANGE1()

2021-10-11 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +27177
pull_request: https://github.com/python/cpython/pull/28882

___
Python tracker 

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



[issue45351] asyncio doc: List all sockets in TCP echo server using streams

2021-10-11 Thread STINNER Victor


STINNER Victor  added the comment:

Thanks Olaf van der Spek, I merged your PR and backported it to 3.9 and 3.10 
branches.

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
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



[issue45351] asyncio doc: List all sockets in TCP echo server using streams

2021-10-11 Thread miss-islington


miss-islington  added the comment:


New changeset 320084fe7de90319928d8f3e597d5bca04db13f3 by Miss Islington (bot) 
in branch '3.9':
bpo-45351, asyncio: Enhance echo server example, print all addresses (GH-28828)
https://github.com/python/cpython/commit/320084fe7de90319928d8f3e597d5bca04db13f3


--

___
Python tracker 

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



[issue45351] asyncio doc: List all sockets in TCP echo server using streams

2021-10-11 Thread miss-islington


miss-islington  added the comment:


New changeset bb4f885892be0c337db3a81ef2936be0b3855de3 by Miss Islington (bot) 
in branch '3.10':
bpo-45351, asyncio: Enhance echo server example, print all addresses (GH-28828)
https://github.com/python/cpython/commit/bb4f885892be0c337db3a81ef2936be0b3855de3


--

___
Python tracker 

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



[issue45428] py_compile fails to read filenames from stdin

2021-10-11 Thread Stefano Rivera


Change by Stefano Rivera :


--
nosy: +stefanor

___
Python tracker 

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



[issue45433] libpython should not be linked with libcrypt

2021-10-11 Thread Mike Gilbert


Change by Mike Gilbert :


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

___
Python tracker 

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



[issue45412] [C API] Remove Py_OVERFLOWED(), Py_SET_ERRNO_ON_MATH_ERROR(), Py_ADJUST_ERANGE1()

2021-10-11 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 2f92e2a590f0e5d2d3093549f5af9a4a1889eb5a by Victor Stinner in 
branch 'main':
bpo-45412: Remove Py_SET_ERRNO_ON_MATH_ERROR() macro (GH-28820)
https://github.com/python/cpython/commit/2f92e2a590f0e5d2d3093549f5af9a4a1889eb5a


--

___
Python tracker 

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



[issue45351] asyncio doc: List all sockets in TCP echo server using streams

2021-10-11 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



[issue45351] asyncio doc: List all sockets in TCP echo server using streams

2021-10-11 Thread miss-islington


Change by miss-islington :


--
pull_requests: +27175
pull_request: https://github.com/python/cpython/pull/28880

___
Python tracker 

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



[issue45351] asyncio doc: List all sockets in TCP echo server using streams

2021-10-11 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 659812b451aefe1f0e5f83540296519a5fb8f313 by Olaf van der Spek in 
branch 'main':
bpo-45351, asyncio: Enhance echo server example, print all addresses (GH-28828)
https://github.com/python/cpython/commit/659812b451aefe1f0e5f83540296519a5fb8f313


--

___
Python tracker 

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



[issue44828] Using tkinter.filedialog crashes on macOS Python 3.9.6

2021-10-11 Thread Guy DeStefano


Guy DeStefano  added the comment:

I appreciate the information, In the future I will do as is stated.  Thanks
for the reply.
Guy DeStefano

On Mon, Oct 11, 2021 at 2:24 PM Ned Deily  wrote:

>
> Ned Deily  added the comment:
>
> @Guy, thanks for your interest but in the future please don't use the
> issue tracker as a help forum. There are lots of places to ask about such
> matters; https://www.python.org/about/help/ has a good list of resources
> and, among the Python-specific mailing lists at
> https://www.python.org/about/help/, there are ones specifically for
> Python usage on macOS (
> https://mail.python.org/mailman/listinfo/pythonmac-sig) and Tkinter usage
> (https://mail.python.org/mailman/listinfo/tkinter-discuss).
>
> --
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue44828] Using tkinter.filedialog crashes on macOS Python 3.9.6

2021-10-11 Thread Ned Deily


Ned Deily  added the comment:

@Guy, thanks for your interest but in the future please don't use the issue 
tracker as a help forum. There are lots of places to ask about such matters; 
https://www.python.org/about/help/ has a good list of resources and, among the 
Python-specific mailing lists at https://www.python.org/about/help/, there are 
ones specifically for Python usage on macOS 
(https://mail.python.org/mailman/listinfo/pythonmac-sig) and Tkinter usage 
(https://mail.python.org/mailman/listinfo/tkinter-discuss).

--

___
Python tracker 

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



[issue45253] mimetypes cannot detect mime of mka files

2021-10-11 Thread Andrei Kulakov


Change by Andrei Kulakov :


--
status: open -> pending

___
Python tracker 

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



[issue45253] mimetypes cannot detect mime of mka files

2021-10-11 Thread Andrei Kulakov


Change by Andrei Kulakov :


--
nosy: +kj

___
Python tracker 

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



[issue45253] mimetypes cannot detect mime of mka files

2021-10-11 Thread Andrei Kulakov


Andrei Kulakov  added the comment:

mkv (matroska) is not registered with IANA here: 
http://www.iana.org/assignments/media-types/media-types.xhtml

Therefore according to the comment in mimetypes.py, it should not be added.

Also note that .mkv is also not in mimetypes.py, so it's being loaded from your 
system's mime types, so if you want .mka to work as well, make sure it's 
registered on your system rather than in Python's mimetypes.py .

I will close this as not a bug, please comment here if you think it should stay 
open.

--
nosy: +andrei.avk

___
Python tracker 

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



[issue44828] Using tkinter.filedialog crashes on macOS Python 3.9.6

2021-10-11 Thread Guy DeStefano


Guy DeStefano  added the comment:

Thank you very much for the reply. Sorry for previous text.
Guy DeStefano

On Mon, Oct 11, 2021 at 2:10 PM Marc Culler  wrote:

>
> Marc Culler  added the comment:
>
> No, Apple is not going to do away with their NSOpenPanel.  There is always
> some churn when they release a new OS.  Subtle changes to APIs can occur
> with no warning and no documentation.  Sometimes they are bugs. Sometimes
> they disappear when the OS is released.  Sometimes they are permanent.  I
> would not recommend using a beta version of the OS to develop your tkinter
> app.
>
> --
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue44828] Using tkinter.filedialog crashes on macOS Python 3.9.6

2021-10-11 Thread Guy DeStefano


Guy DeStefano  added the comment:

Thank you very
Guy DeStefano

On Mon, Oct 11, 2021 at 2:10 PM Marc Culler  wrote:

>
> Marc Culler  added the comment:
>
> No, Apple is not going to do away with their NSOpenPanel.  There is always
> some churn when they release a new OS.  Subtle changes to APIs can occur
> with no warning and no documentation.  Sometimes they are bugs. Sometimes
> they disappear when the OS is released.  Sometimes they are permanent.  I
> would not recommend using a beta version of the OS to develop your tkinter
> app.
>
> --
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue45433] libpython should not be linked with libcrypt

2021-10-11 Thread Mike Gilbert


New submission from Mike Gilbert :

In https://bugs.python.org/issue44751, crypt.h was removed from Python.h. This 
would imply that libpython is not meant to expose any crypt-related symbols.

In fact, it looks like libpython does not use crypt() or crypt_r() at all. 
These are only used by cryptmodule.

In configure.ac, we have this this logic to determine if crypt_r() is available:

```
# We search for both crypt and crypt_r as one or the other may be defined
# This gets us our -lcrypt in LIBS when required on the target platform.
AC_SEARCH_LIBS(crypt, crypt)
AC_SEARCH_LIBS(crypt_r, crypt)

AC_CHECK_FUNC(crypt_r,
  AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#define _GNU_SOURCE  /* Required for crypt_r()'s prototype in glibc. */
#include 
]], [[
struct crypt_data d;
char *r = crypt_r("", "", );
]])],
[AC_DEFINE(HAVE_CRYPT_R, 1, [Define if you have the crypt_r() function.])],
[])
)
```

The AC_SEARCH_LIBS macro adds "-lcrypt" to LIBS, and this gets passed down to 
the link command for libpython. This is probably not intentional.

The HAVE_CRYPT_R value is used in _cryptmodule.c. setup.py performs its own 
check for libcrypt when building the module.

I think the value of LIBS should be saved before the AC_SEARCH_LIBS calls and 
restored after the AC_CHECK_FUNC call. I have tested this locally on Gentoo 
Linux, and it seems to work fine.

I will work on a pull request.

--
components: C API
messages: 403663
nosy: floppymaster
priority: normal
severity: normal
status: open
title: libpython should not be linked with libcrypt
type: compile error
versions: Python 3.10, Python 3.11, 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



[issue44828] Using tkinter.filedialog crashes on macOS Python 3.9.6

2021-10-11 Thread Marc Culler


Marc Culler  added the comment:

No, Apple is not going to do away with their NSOpenPanel.  There is always some 
churn when they release a new OS.  Subtle changes to APIs can occur with no 
warning and no documentation.  Sometimes they are bugs. Sometimes they 
disappear when the OS is released.  Sometimes they are permanent.  I would not 
recommend using a beta version of the OS to develop your tkinter app.

--

___
Python tracker 

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



[issue44828] Using tkinter.filedialog crashes on macOS Python 3.9.6

2021-10-11 Thread Guy DeStefano


Guy DeStefano  added the comment:

Please help me.  Am new to Python, and don't know enough to post here, but I 
will try.  Have written a couple of programs that use tkinter, especially 
tkinter.filedialog.askopenfilenames, and as everyone else mine has quit working 
since Monterey. I have a macOS Monterey version beta( 21A5543b ).  Am 
using Python3 v3.10.0.  Have tried using v3.11.0a1, but could not even compile, 
says that import ( PIL ) does not exist.  Put back v 3.10.0 and am back to no 
filedialog.  Is Apple attempting to do away with the file API.  Just asking. 
Thank you.

--
nosy: +guydestefano
versions:  -Python 3.11, Python 3.9

___
Python tracker 

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



[issue45412] [C API] Remove Py_OVERFLOWED(), Py_SET_ERRNO_ON_MATH_ERROR(), Py_ADJUST_ERANGE1()

2021-10-11 Thread Mark Dickinson


Mark Dickinson  added the comment:

+1 for the removals. (We should fix #44970 too, but as you say that's a 
separate issue. And I suspect that the Py_ADJUST_ERANGE1() use for float pow 
should be replaced, too.)

--

___
Python tracker 

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



[issue45429] [Windows] time.sleep() should use CREATE_WAITABLE_TIMER_HIGH_RESOLUTION

2021-10-11 Thread STINNER Victor


STINNER Victor  added the comment:

See also bpo-19007: "precise time.time() under Windows 8: use 
GetSystemTimePreciseAsFileTime".

--

___
Python tracker 

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



[issue45432] sys.argv is processed strangely under Windows

2021-10-11 Thread Paul


Paul  added the comment:

oh ok. thx

--

___
Python tracker 

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



[issue45432] sys.argv is processed strangely under Windows

2021-10-11 Thread Zachary Ware


Zachary Ware  added the comment:

This is Windows behavior, not Python; ^ is an escape character in cmd.exe.  Try 
for example `echo test ^| python -c "print('hello world')"` with and without 
the ^ character.

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



[issue45432] sys.argv is processed strangely under Windows

2021-10-11 Thread Paul


New submission from Paul :

here is my test file:
'''
import sys
print(sys.argv)
'''

when I then try 'python test.py ^test' the ^ character is stripped away, this 
doesn't happen on Linux. This also doesn't happen if I put ^test in quotes 
(only ") the ' quotes don't work

--
components: Windows
messages: 403656
nosy: paul.moore, paulhippler21, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: sys.argv is processed strangely under Windows
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



[issue45424] ssl.SSLError: unknown error (_ssl.c:4034)

2021-10-11 Thread Rahul Lakshmanan


Rahul Lakshmanan  added the comment:

Thanks for the answer!

When I upgraded Python to 3.8.12, the issue went away.

Can be closed.

--
resolution:  -> works for me
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



[issue45373] ./configure --enable-optimizations should enable LTO

2021-10-11 Thread Dong-hee Na


Change by Dong-hee Na :


--
nosy: +corona10

___
Python tracker 

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



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

2021-10-11 Thread Dong-hee Na


Dong-hee Na  added the comment:

> There is IBM effort to do this in container level, so that os.cpu_count() 
> will return right result in container

Good news!

--
nosy: +corona10

___
Python tracker 

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



[issue45429] [Windows] time.sleep() should use CREATE_WAITABLE_TIMER_HIGH_RESOLUTION

2021-10-11 Thread Dong-hee Na


Change by Dong-hee Na :


--
nosy: +corona10

___
Python tracker 

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



[issue45356] Calling `help` executes @classmethod @property decorated methods

2021-10-11 Thread Randolf Scholz

Randolf Scholz  added the comment:

Dear Raymond,

I think decorator chaining is a very useful concept. At the very least, if all 
decorators are functional (following the `functools.wraps` recipe), things work 
out great -- we even get associativity of function composition if things are 
done properly!

The question is: can we get similar behaviour when allowing decoration with 
stateful objects, i.e. classes? This seems a lot more difficult. At the very 
least, in the case of `@classmethod` I think one can formulate a 
straightforward desiderata:

### Expectation

- `classmethod(property)` should still be a `property`!
- More generally: `classmethod(decorated)` should always be a subclass of 
`decorated`!

Using your pure-python versions of property / classmethod from 
, I was able to write down a 
variant of `classmethod` that works mostly as expected in conjunction with 
`property`. The main idea is rewrite the `classmethod` to dynamically be a 
subclass of whatever it wrapped; roughly:

```python
def ClassMethod(func):
  class Wrapped(type(func)):
  def __get__(self, obj, cls=None):
  if cls is None:
  cls = type(obj)
  if hasattr(type(self.__func__), '__get__'):
  return self.__func__.__get__(cls)
  return MethodType(self.__func__, cls)
  return Wrapped(func)
```

I attached a full MWE. Unfortunately, this doesn't fix the `help` bug, though 
it is kind of weird because the decorated class-property now correctly shows up 
under the "Readonly properties" section. Maybe `help` internally checks 
`isinstance(cls.func, property)` at some point instead of 
`isinstance(cls.__dict__["func"], property)`?

### Some further Proposals / Ideas

1. Decorators could always have an attribute that points to whatever object 
they wrapped. For the sake of argument, let's take `__func__`.
   ⟹ raise Error when typing `@decorator` if `not hasattr(decorated, 
"__func__")`
   ⟹ Regular functions/methods should probably by default have `__func__` as a 
pointer to themselves?
   ⟹ This could hae several subsidiary benefits, for example, currently, how 
would you implement a pair of decorators `@print_args_and_kwargs` and 
`@time_execution` such that both of them only apply to the base function, no 
matter the order in which they are decorating it? The proposed `__func__` 
convention would make this very easy, almost trivial.
2. `type.__setattr__` could support checking if `attr` already exists and has 
`__set__` implemented.
  ⟹ This would allow true class-properties with `getter`, `setter` and 
`deleter`. I provide a MWE here: 

3. I think an argument can be made that it would be really, really cool if `@` 
could become a general purpose function composition operator?
  ⟹ This is already kind of what it is doing with decorators
  ⟹ This is already exacltly what it is doing in numpy -- matrix multiplication 
\*is\* the composition of linear functions.
  ⟹ In fact this is a frequently requested feature on python-ideas!
  ⟹ But here is probably the wrong place to discuss this.

--
Added file: https://bugs.python.org/file50344/ClassPropertyIdea.py

___
Python tracker 

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



[issue44828] Using tkinter.filedialog crashes on macOS Python 3.9.6

2021-10-11 Thread Marc Culler


Marc Culler  added the comment:

Hi Ronald,
There is no calendar scheduling for Tk releases.  Don Porter decides when they 
happen.  But I think we are due for another one soonish.  In case it doesn't 
happen before the next Python release I will attach the patch file for commit 
a32262e9.  (Note that this is subject to change - I still need to test on 
10.14.) I believe that this patch is completely self-contained and can be 
applied to the 8.6.11 release.

(Hint: Tk uses fossil as its SCM system.  On a fossil timeline, clicking any 
two nodes generates their diff.  The Tk timeline is at 
https://core.tcl-lang.org/tk/timeline)

--
keywords: +patch
Added file: https://bugs.python.org/file50343/openfile.patch

___
Python tracker 

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



[issue20028] csv: Confusing error message when giving invalid quotechar in initializing dialect

2021-10-11 Thread Dong-hee Na


Change by Dong-hee Na :


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



[issue20028] csv: Confusing error message when giving invalid quotechar in initializing dialect

2021-10-11 Thread Dong-hee Na


Dong-hee Na  added the comment:


New changeset ab62051152cb24470056ffaeb9107c8b4311375e by Dong-hee Na in branch 
'main':
bpo-20028: Empty escapechar/quotechar is not allowed for csv.Dialect (GH-28833)
https://github.com/python/cpython/commit/ab62051152cb24470056ffaeb9107c8b4311375e


--

___
Python tracker 

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



[issue45411] Add Mimetypes for Subtitle Files

2021-10-11 Thread Julien Palard


Julien Palard  added the comment:


New changeset d74da9e140441135a4eddaef9a37f00f32579038 by Josephine-Marie in 
branch 'main':
bpo-45411: Update mimetypes.py (GH-28792)
https://github.com/python/cpython/commit/d74da9e140441135a4eddaef9a37f00f32579038


--

___
Python tracker 

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



[issue45431] [C API] Rename CFrame or hide it to only export names starting with Py

2021-10-11 Thread STINNER Victor


STINNER Victor  added the comment:

Mark Shannon:
> Struct names aren't exported as symbols.

Right.

> So, I assume that are worried about name clashes for code that has
> #include "Python.h".

Right :-)

> Isn't the threadstate struct supposed to be opaque?

Technically, it's public. I'm working on making it opaque in bpo-39947.

--

___
Python tracker 

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



[issue45430] PEP 523 no longer works

2021-10-11 Thread Mark Shannon


Change by Mark Shannon :


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



[issue45431] [C API] Rename CFrame or hide it to only export names starting with Py

2021-10-11 Thread Mark Shannon


Mark Shannon  added the comment:

Struct names aren't exported as symbols.

$ nm ./python | grep CFrame

So, I assume that are worried about name clashes for code that has
#include "Python.h".


Isn't the threadstate struct supposed to be opaque?
If so, then shouldn't it be moved to an internal header?


I don't want to add a "Py" prefix to the name of the CFrame struct.
The names of the various frames are confusing enough, without adding a "Py" 
prefix to something that isn't a Python frame.

--

___
Python tracker 

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



[issue44828] Using tkinter.filedialog crashes on macOS Python 3.9.6

2021-10-11 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

Marc, thanks for the update.

Will there be a Tcl/Tk release soonish that includes this fix? 

Alternatively, is there patch that we can apply to the latest release when 
building the copy of Tk included with the installers?

--

___
Python tracker 

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



[issue42253] xml.dom.minidom.rst missing standalone documentation

2021-10-11 Thread miss-islington


Change by miss-islington :


--
keywords: +patch
nosy: +miss-islington
nosy_count: 3.0 -> 4.0
pull_requests: +27172
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/28874

___
Python tracker 

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



[issue42253] xml.dom.minidom.rst missing standalone documentation

2021-10-11 Thread miss-islington


Change by miss-islington :


--
pull_requests: +27173
pull_request: https://github.com/python/cpython/pull/28875

___
Python tracker 

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



[issue42253] xml.dom.minidom.rst missing standalone documentation

2021-10-11 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset c7e81fcf9548ab6a0a4828d6f2db9ece9d204826 by Jens Diemer in branch 
'main':
bpo-42253: Update xml.dom.minidom.rst (GH-23126)
https://github.com/python/cpython/commit/c7e81fcf9548ab6a0a4828d6f2db9ece9d204826


--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue45427] importlib.readers.MultiplexedPath

2021-10-11 Thread David Rajaratnam


David Rajaratnam  added the comment:

Thanks for the quick response. I think the attached file shows the issue. 

In the directory where you download and run this file create a sub-directory 
'data'. Then running the file creates the output (note: I've truncated the path 
name):

> Traverse data: MultiplexedPath('<>/data') ( 'importlib.readers.MultiplexedPath'>)

I think the idea behind MultiplexedPath() is that it merges together multiple 
base/root directories so even though in this case it is a single path it 
wouldn't necessarily be the case in general. So while it makes sense that for 
some MultiplexedPath object X that str(X) isn't itself a proper directory path, 
however, there seems to be no method/property to access these root paths.

Note: Traverable.iterdir() iterates over the files/sub-directories in the 
root(s) so doesn't return the root path(s) themselves.

A further note. If you add a file `data/__init__.py` then data is now a package 
and running the code this time returns a PosixPath object (on a posix system): 

> Traverse data: <>/data ()
> X: <>/data/__init__.py ()
> X: <>/data/__pycache__ ()

--
Added file: https://bugs.python.org/file50342/navigate.py

___
Python tracker 

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



[issue45401] logging TimedRotatingFileHandler must not rename devices like /dev/null

2021-10-11 Thread miss-islington


Change by miss-islington :


--
pull_requests: +27171
pull_request: https://github.com/python/cpython/pull/28873

___
Python tracker 

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



[issue45401] logging TimedRotatingFileHandler must not rename devices like /dev/null

2021-10-11 Thread miss-islington


Change by miss-islington :


--
pull_requests: +27170
pull_request: https://github.com/python/cpython/pull/28872

___
Python tracker 

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



[issue45401] logging TimedRotatingFileHandler must not rename devices like /dev/null

2021-10-11 Thread STINNER Victor

STINNER Victor  added the comment:


New changeset 5aca34f17c4baf8e4882a7e8a827cff06ac6ef25 by Miss Islington (bot) 
in branch '3.10':
bpo-45401: Change shouldRollover() methods to only rollover regular f… 
(GH-28822) (#28867)
https://github.com/python/cpython/commit/5aca34f17c4baf8e4882a7e8a827cff06ac6ef25


--

___
Python tracker 

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



[issue45401] logging TimedRotatingFileHandler must not rename devices like /dev/null

2021-10-11 Thread STINNER Victor

STINNER Victor  added the comment:


New changeset ac421c348bf422f9a0d85fe0a1de3fa3f4886650 by Miss Islington (bot) 
in branch '3.9':
bpo-45401: Change shouldRollover() methods to only rollover regular f… 
(GH-28822) (#28866)
https://github.com/python/cpython/commit/ac421c348bf422f9a0d85fe0a1de3fa3f4886650


--

___
Python tracker 

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



[issue45431] [C API] Rename CFrame or hide it to only export names starting with Py

2021-10-11 Thread STINNER Victor


STINNER Victor  added the comment:

See also the old isssue with "READONLY": bpo-2897 "PyMemberDef missing in 
limited API / Deprecate structmember.h".

--

___
Python tracker 

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



[issue45316] [C API] Functions not exported with PyAPI_FUNC()

2021-10-11 Thread STINNER Victor


STINNER Victor  added the comment:

See also bpo-45431: [C API] Rename CFrame or hide it to only export names 
starting with Py.

--

___
Python tracker 

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



  1   2   >