[issue45758] Crash on Py_DecRef'ing builtin object from previous run

2021-11-09 Thread Hai Shi


Hai Shi  added the comment:

Hi, Victor Milovanov. The memory allocated by interpreter will be freed after 
calling Py_Finalize().

--
nosy: +pablogsal, shihai1991

___
Python tracker 

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



[issue45776] abc submodule not an attribute of collections on Python 3.10.0 on Windows

2021-11-09 Thread Steve Canny


New submission from Steve Canny :

On CPython 3.10.0 on Windows but not MacOS, AttributeError is raised when 
referencing `abc` on collections (instead of importing `collections.abc`).

>>> import collections
>>> collections.abc.Container
AttributeError: module 'collections' has no attribute 'abc'

This works on MacOS CPython 3.10.0 and also works on Windows CPython 3.9.6.

It's possibly interesting this coincides with collection ABCs being made 
unavailable directly from `collections` with this 3.9 -> 3.10 version change, 
but that's just a guess, for whatever it's worth.

--
components: Windows
messages: 406074
nosy: paul.moore, stcanny, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: abc submodule not an attribute of collections on Python 3.10.0 on Windows
type: behavior
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



[issue45689] Add the ability to give custom names to threads created by ThreadPoolExecutor

2021-11-09 Thread Tangellapalli Sai Hanuma Rahul


Tangellapalli Sai Hanuma Rahul  added the comment:

Yes, it's true, it's so naive method, Contextvars! may be inside the Future 
Object?

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



[issue30533] missing feature in inspect module: getmembers_static

2021-11-09 Thread Itamar Ostricher


Itamar Ostricher  added the comment:

interested in this too - came here to see if I can implement, but found that a 
patch is already available (GH-20911), and applies cleanly on latest main 
branch (see my PR comments)

would be great if it gets merged!

--
nosy: +itamaro

___
Python tracker 

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



[issue45220] Windows builds sometimes fail on Azure and GitHub Action: fatal error RC1116: RC terminating after preprocessor errors

2021-11-09 Thread Eryk Sun


Eryk Sun  added the comment:

Also, I suggest using CREATEPROCESS_MANIFEST_RESOURCE_ID (1) and 
ISOLATIONAWARE_MANIFEST_RESOURCE_ID (2) instead of hard-coded resource IDs.

--

___
Python tracker 

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



[issue45220] Windows builds sometimes fail on Azure and GitHub Action: fatal error RC1116: RC terminating after preprocessor errors

2021-11-09 Thread Eryk Sun


Eryk Sun  added the comment:

Steve, instead of manually defining RT_MANIFEST, try including "winresrc.h" in 
the resource definition files. This SDK header includes "winuser.rh" (note the 
".rh" extension), which, among other things, includes the following RC_INVOKED 
definitions from "winuser.h":

#ifdef RC_INVOKED
#define RT_MANIFEST24
#define CREATEPROCESS_MANIFEST_RESOURCE_ID  1
#define ISOLATIONAWARE_MANIFEST_RESOURCE_ID 2
#define ISOLATIONAWARE_NOSTATICIMPORT_MANIFEST_RESOURCE_ID 3
#define ISOLATIONPOLICY_MANIFEST_RESOURCE_ID 4
#define ISOLATIONPOLICY_BROWSER_MANIFEST_RESOURCE_ID 5
#define MINIMUM_RESERVED_MANIFEST_RESOURCE_ID 1   /* inclusive */
#define MAXIMUM_RESERVED_MANIFEST_RESOURCE_ID 16  /* inclusive */

--
nosy: +eryksun

___
Python tracker 

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



[issue43588] [Subinterpreters]: use static variable under building Python with --with-experimental-isolated-subinterpreters cause crash.

2021-11-09 Thread junyixie


junyixie  added the comment:

About PEP
How is the progress? Where can I track it? Is there any relevant plan?
thanks

--

___
Python tracker 

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



[issue44532] multi subinterpreters use _PyStructSequence_InitType failed.

2021-11-09 Thread junyixie


junyixie  added the comment:

Include/internal/pycore_structseq.h:
   10  
   11  
   12: PyAPI_FUNC(int) _PyStructSequence_InitType(
   13  PyTypeObject *type,
   14  PyStructSequence_Desc *desc,

Modules/_cursesmodule.c:
 4794  /* ncurses_version */
 4795  if (NcursesVersionType.tp_name == NULL) {
 4796: if (_PyStructSequence_InitType(,
 4797 _version_desc,
 4798 
Py_TPFLAGS_DISALLOW_INSTANTIATION) < 0) {

Objects/structseq.c:
  463  
  464  int
  465: _PyStructSequence_InitType(PyTypeObject *type, PyStructSequence_Desc 
*desc,
  466 unsigned long tp_flags)
  467  {
  ...
  527  PyStructSequence_InitType2(PyTypeObject *type, PyStructSequence_Desc 
*desc)
  528  {
  529: return _PyStructSequence_InitType(type, desc, 0);
  530  }
  531  

Python/sysmodule.c:
 2813  /* version_info */
 2814  if (VersionInfoType.tp_name == NULL) {
 2815: if (_PyStructSequence_InitType(,
 2816 _info_desc,
 2817 
Py_TPFLAGS_DISALLOW_INSTANTIATION) < 0) {
 
 2827  // sys.flags: updated in-place later by _PySys_UpdateConfig()
 2828  if (FlagsType.tp_name == 0) {
 2829: if (_PyStructSequence_InitType(, _desc,
 2830 
Py_TPFLAGS_DISALLOW_INSTANTIATION) < 0) {
 2831  goto type_init_failed;
 
 2837  /* getwindowsversion */
 2838  if (WindowsVersionType.tp_name == 0) {
 2839: if (_PyStructSequence_InitType(,
 2840 _version_desc,
 2841 
Py_TPFLAGS_DISALLOW_INSTANTIATION) < 0) {

--

___
Python tracker 

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



[issue45775] Implementation of colorsys.rgb_to_yuv and vice versa

2021-11-09 Thread Thomas Stolarski


Change by Thomas Stolarski :


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

___
Python tracker 

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



[issue45775] Implementation of colorsys.rgb_to_yuv and vice versa

2021-11-09 Thread Thomas Stolarski


New submission from Thomas Stolarski :

Since the implementation of `rgb_to_yiq` roughly 30 years ago now, the advent 
of HDTV has resulted in most broadcasting and video processing having moved 
towards Rec 709 (or BT.709).

While I know colorsys has been on the chopping block for a while, it seemed a 
little silly that what is now arguably the most common color space used in 
video editors isn't available as part of this module, despite being a matrix 
mapping like much of the others.

YUV is a bit more contentious on its definition than YIQ is, but it is still 
widely used to refer to Rec 709 and this is the ATSC standardization for HDTV.

I've written a PR for both conversions and will add it to this ticket once it's 
up.

--
components: Library (Lib)
messages: 406067
nosy: thomas.stolarski
priority: normal
severity: normal
status: open
title: Implementation of colorsys.rgb_to_yuv and vice versa
type: enhancement
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



[issue45774] Detect SQLite in configure.ac

2021-11-09 Thread Erlend E. Aasland


Erlend E. Aasland  added the comment:

Nice. I think I'll steal some of your ideas tomorrow :)

--

___
Python tracker 

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



[issue45765] importlib.metadata fails to find distributions in empty path

2021-11-09 Thread Jason R. Coombs


Change by Jason R. Coombs :


--
pull_requests: +27762
pull_request: https://github.com/python/cpython/pull/29511

___
Python tracker 

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



[issue45765] importlib.metadata fails to find distributions in empty path

2021-11-09 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



[issue45765] importlib.metadata fails to find distributions in empty path

2021-11-09 Thread Jason R. Coombs


Jason R. Coombs  added the comment:


New changeset 6ec0dec7b7b50d4fee5b2b66cf38e4291bcdf44c by Jason R. Coombs in 
branch 'main':
[bpo-45765] Fix distribution discovery on empty path. (#29487)
https://github.com/python/cpython/commit/6ec0dec7b7b50d4fee5b2b66cf38e4291bcdf44c


--

___
Python tracker 

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



[issue32679] concurrent.futures should store full sys.exc_info()

2021-11-09 Thread Irit Katriel


Irit Katriel  added the comment:

The SO link seems to refer to Python 2, but on this issue the version are 
Python 3.   In Python 3 the traceback is accessible from the exception via its 
__traceback__ attribute. Does that not give you what you need?

--
nosy: +iritkatriel

___
Python tracker 

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



[issue45701] Add tuple tests to `functools.lru_cache`

2021-11-09 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



[issue45701] Add tuple tests to `functools.lru_cache`

2021-11-09 Thread Raymond Hettinger


Raymond Hettinger  added the comment:


New changeset 912a4ccc3a523e2990cc501393adfc661614c73a by Raymond Hettinger in 
branch 'main':
bpo-45701:  Improve documentation for *typed* parameter (GH-29498)
https://github.com/python/cpython/commit/912a4ccc3a523e2990cc501393adfc661614c73a


--

___
Python tracker 

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



[issue15967] Slaves don't seem to clean up their /tmp mess if a step fails.

2021-11-09 Thread Irit Katriel


Change by Irit Katriel :


--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> regrtest: when interrupted, temporary directory is not removed

___
Python tracker 

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



[issue40464] functools.singledispatch doesn't verify annotation is on FIRST parameter

2021-11-09 Thread Alex Waygood


Alex Waygood  added the comment:

Reproduced on 3.11.

--
nosy: +AlexWaygood, lukasz.langa, rhettinger
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.7

___
Python tracker 

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



[issue45774] Detect SQLite in configure.ac

2021-11-09 Thread Christian Heimes


Christian Heimes  added the comment:

Your solution looks very similar to my WIP patch:

AC_CHECK_HEADERS([sqlite3.h],
  [AC_SEARCH_LIBS([sqlite3_version], [sqlite3])]
)

AS_VAR_IF([ac_cv_search_sqlite3_version], [no], [], [
  # found a working sqlite3.h and sqlite3 library
  # ac_cv_search_sqlite3_version != no
  LIBS="$LIBS $ac_cv_search_sqlite3_version"
  
  AC_CACHE_CHECK([for sqlite3 version >= 3.7.15], 
[ac_cv_lib_sqlite3_supported], [
AC_LINK_IFELSE([
  AC_LANG_PROGRAM([
#include 
#if SQLITE_VERSION_NUMBER < 3007015
  #error "sqlite version is too old"
#endif], []
  )
], [ac_cv_lib_sqlite3_supported=yes], [ac_cv_lib_sqlite3_supported=no])
  ])
  
  AC_CACHE_CHECK([for sqlite3_enable_load_extension], 
[ac_cv_lib_sqlite3_sqlite3_enable_load_extension], [
AC_LINK_IFELSE(
  [AC_LANG_PROGRAM([#include ], [void *x = 
sqlite3_enable_load_extension])],
  [ac_cv_lib_sqlite3_sqlite3_enable_load_extension=yes],
  [ac_cv_lib_sqlite3_sqlite3_enable_load_extension=no])
  ])
])

LIBS=$LIBS_SAVE

AS_VAR_IF([ac_cv_lib_sqlite3_supported], [yes],
  [AC_DEFINE([HAVE_LIBSQLITE3], [1], [Define to 1 if you have the `sqlite3' 
library (-lsqlite3).])]
)

AS_VAR_IF([ac_cv_lib_sqlite3_sqlite3_enable_load_extension], [yes],
  [AC_DEFINE([HAVE_SQLITE3_ENABLE_LOAD_EXTENSION], [1], 
 [Define to 1 if `sqlite3' library supports 
sqlite3_enable_load_extension.])]
)

--

___
Python tracker 

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



[issue34498] Python 3.7+ break on singledispatch_function.register(pseudo_type), which Python 3.6 accepted

2021-11-09 Thread Alex Waygood


Change by Alex Waygood :


--
keywords: +patch
nosy: +AlexWaygood
nosy_count: 8.0 -> 9.0
pull_requests: +27759
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/29508

___
Python tracker 

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



[issue45757] compiler emits EXTENDED_ARG + NOP sequence in 3.10

2021-11-09 Thread Irit Katriel


Irit Katriel  added the comment:

That sounds like a good idea. Please go ahead.

--

___
Python tracker 

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



[issue45774] Detect SQLite in configure.ac

2021-11-09 Thread Erlend E. Aasland


Change by Erlend E. Aasland :


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

___
Python tracker 

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



[issue45774] Detect SQLite in configure.ac

2021-11-09 Thread Erlend E. Aasland


New submission from Erlend E. Aasland :

"Autoconfiscate" SQLite detection. Plan:

- Detect header/library using AC_CHECK_HEADERS/AC_CHECK_LIB
- Check required version using AC_COMPILE_IFELSE
- Use AC_CHECK_LIB to check if sqlite3_load_extension is present, and if the 
result harmonises with --enable-loadable-sqlite-extensions; bail if not


Nice side effect: configure will bail if --enable-loadable-sqlite-extensions is 
used and the target SQLite library was compiled with 
SQLITE_OMIT_LOAD_EXTENSION, even if we are not on macOS.

--
components: Build
messages: 406059
nosy: christian.heimes, erlendaasland
priority: normal
severity: normal
status: open
title: Detect SQLite in configure.ac
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



[issue45757] compiler emits EXTENDED_ARG + NOP sequence in 3.10

2021-11-09 Thread Brandt Bucher


Brandt Bucher  added the comment:

Indeed. Do you plan on removing the extra EXTENDED_ARGs in instrsize and 
write_op_arg? I can take care of it if not.

--

___
Python tracker 

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



[issue44813] generate specialization stat names list into opcode.h

2021-11-09 Thread Irit Katriel


Change by Irit Katriel :


--
resolution:  -> wont fix
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

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



[issue45757] compiler emits EXTENDED_ARG + NOP sequence in 3.10

2021-11-09 Thread Irit Katriel


Irit Katriel  added the comment:

> I don't think that it does, since oparg gets totally reassigned each time
> we load a new instruction. EXTENDED_ARG actually needs to hack around
> this by advancing the instruction itself, updating oparg, and jumping
> straight into the next opcode.

Right, it's like this:

TARGET(EXTENDED_ARG) {
int oldoparg = oparg;
NEXTOPARG();
oparg |= oldoparg << 8;
PRE_DISPATCH_GOTO();
DISPATCH_GOTO();
}

It's seems correct (the next arg will be NOP so nothing happens). But it's 
wasteful.

--
title: dis module incorrectly handles EXTENDED_ARG + NOP sequence -> compiler 
emits EXTENDED_ARG + NOP sequence in 3.10

___
Python tracker 

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



[issue45757] dis module incorrectly handles EXTENDED_ARG + NOP sequence

2021-11-09 Thread Irit Katriel


Irit Katriel  added the comment:


New changeset c5bfb88eb6f82111bb1603ae9d78d0476b552d66 by Irit Katriel in 
branch '3.10':
[3.10] bpo-45757: Fix bug where dis produced an incorrect oparg on EXTENDED_ARG 
before a no-arg opcode (GH-29480) (GH-29506)
https://github.com/python/cpython/commit/c5bfb88eb6f82111bb1603ae9d78d0476b552d66


--

___
Python tracker 

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



[issue45745] ./python -m test --help output for refleaks seems wrong

2021-11-09 Thread Irit Katriel


Irit Katriel  added the comment:

That's probably why --findleaks was deprecated (in 3.8, PR12951).  We could 
remove it now. 

+ vstinner

--
nosy: +iritkatriel, vstinner

___
Python tracker 

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



[issue45757] dis module incorrectly handles EXTENDED_ARG + NOP sequence

2021-11-09 Thread Irit Katriel


Change by Irit Katriel :


--
pull_requests: +27757
pull_request: https://github.com/python/cpython/pull/29506

___
Python tracker 

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



[issue45235] argparse does not preserve namespace with subparser defaults

2021-11-09 Thread RhinosF1


Change by RhinosF1 :


--
nosy: +RhinosF1

___
Python tracker 

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



[issue43773] macOS official installer builds not respecting DYLD_LIBRARY_PATH environment variable.

2021-11-09 Thread Brandt Bucher


Change by Brandt Bucher :


--
nosy:  -brandtbucher

___
Python tracker 

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



[issue43773] macOS official installer builds not respecting DYLD_LIBRARY_PATH environment variable.

2021-11-09 Thread Brandt Bucher


Change by Brandt Bucher :


--
pull_requests:  -27755

___
Python tracker 

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



[issue45773] Compiler hangs during jump elimination

2021-11-09 Thread Brandt Bucher


Change by Brandt Bucher :


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

___
Python tracker 

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



[issue43773] macOS official installer builds not respecting DYLD_LIBRARY_PATH environment variable.

2021-11-09 Thread Brandt Bucher


Change by Brandt Bucher :


--
nosy: +brandtbucher
nosy_count: 3.0 -> 4.0
pull_requests: +27755
pull_request: https://github.com/python/cpython/pull/29505

___
Python tracker 

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



[issue45723] Improve and simplify configure.ac checks

2021-11-09 Thread miss-islington


miss-islington  added the comment:


New changeset 49171aa91ab78c2608a26e5a75cdceab3bad6176 by Erlend Egeberg 
Aasland in branch 'main':
bpo-45723: Remove dead code for obsolete `--with-dyld` option (GH-29500)
https://github.com/python/cpython/commit/49171aa91ab78c2608a26e5a75cdceab3bad6176


--

___
Python tracker 

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



[issue45747] Detect dbm and gdbm dependencies in configure.ac

2021-11-09 Thread Erlend E. Aasland


Erlend E. Aasland  added the comment:

AC_SEARCH_LIBS() will search libc before checking external libraries, FWIW.

--
nosy: +erlendaasland

___
Python tracker 

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



[issue45235] argparse does not preserve namespace with subparser defaults

2021-11-09 Thread dgw


dgw  added the comment:

Can confirm that this patch DOES cause backward compatibility issues, as 
paul.j3's gut feeling said it could. One of my projects, testing against 
3.6-3.9, now fails its test suite on Python 3.9.8, which includes this change. 
Arguments passed to a subparser are indeed ignored in lieu of default values. 
We are tracking the problem in our own issue, 
https://github.com/sopel-irc/sopel/issues/2210

I, for one, am not amused that 7-year-old behavior was "clobbered" (as 
previously described in this thread) in a patch release.

--
nosy: +dgw

___
Python tracker 

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



[issue45767] Fix types for dev_t processing in posix module

2021-11-09 Thread Dmitry Marakasov


Dmitry Marakasov  added the comment:

In case you're curious, here are some st_dev values which are encountered on my 
FreeBSD:
- 0xac2308de99d1f699 - ZFS
- 0x7100ff00 - devfs
- 0x8700ff01  - tmpfs
- 0x2900ff4e - nullfs
I suspect Linux uses smaller numbers which do not cause overflows so tese tests 
hasn't fired on Linux.

--

___
Python tracker 

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



[issue45220] Windows builds sometimes fail on Azure and GitHub Action: fatal error RC1116: RC terminating after preprocessor errors

2021-11-09 Thread miss-islington


miss-islington  added the comment:


New changeset d29f591dd6b1dcd4f36b5b49761cf8225be690bd by Miss Islington (bot) 
in branch '3.10':
bpo-45220: Ensure RT_MANIFEST is defined when compiling Windows resource files 
(GH-29501)
https://github.com/python/cpython/commit/d29f591dd6b1dcd4f36b5b49761cf8225be690bd


--

___
Python tracker 

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



[issue45220] Windows builds sometimes fail on Azure and GitHub Action: fatal error RC1116: RC terminating after preprocessor errors

2021-11-09 Thread Steve Dower


Steve Dower  added the comment:


New changeset a56fbad85ea655631bce68d4c0f47f1a8b500abd by Steve Dower in branch 
'main':
bpo-45220: Ensure RT_MANIFEST is defined when compiling Windows resource files 
(GH-29501)
https://github.com/python/cpython/commit/a56fbad85ea655631bce68d4c0f47f1a8b500abd


--

___
Python tracker 

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



[issue45220] Windows builds sometimes fail on Azure and GitHub Action: fatal error RC1116: RC terminating after preprocessor errors

2021-11-09 Thread miss-islington


Change by miss-islington :


--
pull_requests: +27754
pull_request: https://github.com/python/cpython/pull/29504

___
Python tracker 

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



[issue45757] dis module incorrectly handles EXTENDED_ARG + NOP sequence

2021-11-09 Thread Irit Katriel


Irit Katriel  added the comment:

The 3.9 backport had a conflict, but I think it's not worth worrying about 
because this scenario only showed up in 3.10.

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



[issue45220] Windows builds sometimes fail on Azure and GitHub Action: fatal error RC1116: RC terminating after preprocessor errors

2021-11-09 Thread miss-islington


Change by miss-islington :


--
pull_requests: +27753
pull_request: https://github.com/python/cpython/pull/29503

___
Python tracker 

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



[issue45757] dis module incorrectly handles EXTENDED_ARG + NOP sequence

2021-11-09 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



[issue45757] dis module incorrectly handles EXTENDED_ARG + NOP sequence

2021-11-09 Thread Irit Katriel


Irit Katriel  added the comment:


New changeset cb414cf0e207668300c4fe3f310c0bd249153273 by Irit Katriel in 
branch 'main':
bpo-45757: Fix bug where dis produced an incorrect oparg on EXTENDED_ARG before 
a no-arg opcode (GH-29480)
https://github.com/python/cpython/commit/cb414cf0e207668300c4fe3f310c0bd249153273


--

___
Python tracker 

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



[issue45773] Compiler hangs during jump elimination

2021-11-09 Thread Brandt Bucher


New submission from Brandt Bucher :

The following code hangs during compilation on 3.11 and 3.10:

>>> while True or spam: pass

Our peepholer gets stuck in a loop, repeatedly "optimizing" instruction 4 
(POP_JUMP_IF_TRUE -> JUMP_ABSOLUTE):

  1   0 JUMP_ABSOLUTE0 (to 0)
  2 LOAD_NAME0 (spam)
  4 POP_JUMP_IF_TRUE 0 (to 0)

After optimizing jumps to jumps like these, we always back up and attempt to 
optimize the same instruction again (which makes it possible to optimize three 
or more chained jumps on the same line). The issue is that this particular 
optimization doesn't actually change the instruction, since both jumps target 
the same exact block. Since nothing changes, we loop forever.

The fix is really simple: just skip the optimization if instr->i_target == 
target->i_target. We already do this for several other types of jumps; it just 
looks like POP_JUMP_IF_TRUE and POP_JUMP_IF_FALSE might have been missed.

I'll have a PR up soon.

--
assignee: brandtbucher
components: Interpreter Core
messages: 406046
nosy: Mark.Shannon, brandtbucher
priority: high
severity: normal
status: open
title: Compiler hangs during jump elimination
type: crash
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



[issue45772] socket.socket should be a class instead of a function

2021-11-09 Thread Oleg Iarygin


New submission from Oleg Iarygin :

Found a twice stale bpo-less but useful pull request 23960, so publish it here:

> Currently socket.socket is documented as a function, but it is really
a class (and thus has function-like usage to construct an object). This
correction would ensure that Python projects that are interlinking
Python's documentation can properly locate socket.socket as a type.

--
assignee: docs@python
components: Documentation
messages: 406045
nosy: arhadthedev, docs@python, xuhdev
priority: normal
pull_requests: 27751
severity: normal
status: open
title: socket.socket should be a class instead of a function
versions: Python 3.10, Python 3.11, Python 3.6, Python 3.7, Python 3.8, Python 
3.9

___
Python tracker 

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



[issue45220] Windows builds sometimes fail on Azure and GitHub Action: fatal error RC1116: RC terminating after preprocessor errors

2021-11-09 Thread Steve Dower


Change by Steve Dower :


--
pull_requests: +27750
pull_request: https://github.com/python/cpython/pull/29501

___
Python tracker 

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



[issue39026] Include/cpython/pystate.h contains non-relative of initconfig.h include causing macOS Framework include failure

2021-11-09 Thread Gaige Paulsen


Gaige Paulsen  added the comment:

I'll try to check that in the next day or two.

--

___
Python tracker 

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



[issue45354] test_winconsoleio fails on Windows 11

2021-11-09 Thread Steve Dower


Steve Dower  added the comment:

FYI, adding a fix for this on issue45220

--

___
Python tracker 

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



[issue45723] Improve and simplify configure.ac checks

2021-11-09 Thread Erlend E. Aasland


Change by Erlend E. Aasland :


--
pull_requests: +27749
pull_request: https://github.com/python/cpython/pull/29500

___
Python tracker 

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



[issue43656] TracebackException or StackSummary.extract with capture_locals=True fail to catch exceptions raised by repr() on value of frame local variable in FrameSummary.__init__.

2021-11-09 Thread Joe Wells


Joe Wells  added the comment:

Some quick comments on Martin's pull request.

1. The changes are sufficient to let the user make things work the way it is 
requested that they work and anyone who does not start using the new 
format_locals parameter will get the old behavior.

2. A side comment: I just noticed that the docstring for FrameSummary.__init__ 
does not document the filename, lineno, and name parameters.  Perhaps this 
could be fixed at the same time?

3. The new parameter format_locals is slightly confusingly named, because it 
does not format a single string from all the locals but instead gives a 
dictionary of strings with one string for each local.

4. I personally think it would be better to include something like the example 
value for format_locals as an extra attribute of the traceback module so 
everybody doesn't have to write the same function.  That said, the documented 
example is sufficient.

5. It is not clear to me why this stringify-ing of the locals can't be done in 
StackSummary._extract_from_extended_frame_gen.  It passes the dictionary of 
locals and also the function to transform it to FrameSummary.  It would make 
more sense to transform it first.  I suppose there might be some user somewhere 
who is directly calling FrameSummary so the interface needs to stay.

6. I fantasize that the new format_locals parameter would have access to the 
frame object.  In order for this to happen, the frame object would have to be 
passed to FrameSummary instead of the 3 values (locals, name, filename) that 
are extracted from it.  I think the current interface of FrameSummary was 
designed to interoperate with very old versions of Python.  Oh well.

7. If anyone wanted to ever refactor FrameSummary (e.g., to enable my fantasy 
in point #6 just above), it becomes harder after this.  This change has the 
effect of exposing details of the interface of FrameSummary to users of 
StackSummary.extract and TracebackException.  The four parameters that the new 
parameter format_locals takes are most of the parameters of FrameSummary.

--

___
Python tracker 

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



[issue45754] [sqlite3] SQLITE_LIMIT_LENGTH is incorrectly used to check statement length

2021-11-09 Thread Erlend E. Aasland


Erlend E. Aasland  added the comment:

I believe it is best to go with alternative 1. The error strings produced by 
SQLite may change from release to release, so for example a buildbot update may 
suddenly break the CI.

--

___
Python tracker 

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



[issue45771] urllib.request.urlopen can leak socket.timeout to callers

2021-11-09 Thread Michael Thorpe


Change by Michael Thorpe :


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

___
Python tracker 

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



[issue45732] Update python.org Windows and macOS installers to use Tk 8.6.12

2021-11-09 Thread Steve Dower


Steve Dower  added the comment:


New changeset 4d1cdd7006def053c815c354bd6f266b4850bd97 by Steve Dower in branch 
'3.9':
bpo-45732: Update bundled Tcl/Tk on Windows to 8.6.12 (GH-29477)
https://github.com/python/cpython/commit/4d1cdd7006def053c815c354bd6f266b4850bd97


--

___
Python tracker 

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



[issue45754] [sqlite3] SQLITE_LIMIT_LENGTH is incorrectly used to check statement length

2021-11-09 Thread Erlend E. Aasland


Erlend E. Aasland  added the comment:

Also, SQLITE_LIMIT_LENGTH and SQLITE_LIMIT_SQL_LENGTH is inclusive in SQLite. 
We should treat them likewise.

--

___
Python tracker 

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



[issue45701] Add tuple tests to `functools.lru_cache`

2021-11-09 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
nosy: +rhettinger
nosy_count: 1.0 -> 2.0
pull_requests: +27747
pull_request: https://github.com/python/cpython/pull/29498

___
Python tracker 

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



[issue45771] urllib.request.urlopen can leak socket.timeout to callers

2021-11-09 Thread Michael Thorpe


New submission from Michael Thorpe :

urllib.request.urlopen can raise socket.timeout, outside of the documented 
contract, if reading response data times out.

--
components: Library (Lib)
messages: 406038
nosy: thorpe-dev
priority: normal
severity: normal
status: open
title: urllib.request.urlopen can leak socket.timeout to callers
type: behavior

___
Python tracker 

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



[issue42411] respect cgroups limits when trying to allocate memory

2021-11-09 Thread Caleb Collins-Parks


Caleb Collins-Parks  added the comment:

@christian.heimes following up on this - we have been having frequent memory 
issues with Python 3.7 in Kubernetes. It could just be the code, but if it does 
turn out this is a bug then fixing it could be very beneficial.

--
nosy: +caleb2

___
Python tracker 

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



[issue45732] Update python.org Windows and macOS installers to use Tk 8.6.12

2021-11-09 Thread Steve Dower


Change by Steve Dower :


--
pull_requests: +27746
pull_request: https://github.com/python/cpython/pull/29496

___
Python tracker 

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



[issue45689] Add the ability to give custom names to threads created by ThreadPoolExecutor

2021-11-09 Thread Mark Dickinson


Mark Dickinson  added the comment:

Sorry Rahul: I'm not the right person to help you push this forward.

I'm sympathetic to the problem: I've encountered similar issues in "Real Code", 
where we needed to associate log outputs generated by worker pool threads with 
the actual tasks that generated those logs. But I'm not convinced either that 
setting the thread name is the right mechanism to get that association (it 
doesn't extend nicely to other executor types, for example), or that the API 
you propose is the right one (I find the duplication between `submit` and 
`submit_with_name` to be a bit much).

I'm wondering whether there's some way that executors could use contextvars to 
provide a per-task context. Then a task "name" could potentially be part of 
that context, and possibly you could write a custom log handler that read the 
name from the context when emitting log messages.

If you want to find someone to help push this forward, it may be worth posting 
on the python-ideas mailing list to get discussion going.

--

___
Python tracker 

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



[issue45732] Update python.org Windows and macOS installers to use Tk 8.6.12

2021-11-09 Thread Steve Dower


Steve Dower  added the comment:


New changeset 340ecafdf3bfb1377a1b8584addbb8e7bb423459 by Steve Dower in branch 
'3.10':
bpo-45732: Update bundled Tcl/Tk on Windows to 8.6.12 (GH-29477)
https://github.com/python/cpython/commit/340ecafdf3bfb1377a1b8584addbb8e7bb423459


--

___
Python tracker 

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



[issue45770] SyntaxError: 'await' outside function" in "asyncio-task.html#waiting-primitives" code snippets

2021-11-09 Thread Jose Ville


New submission from Jose Ville :

https://docs.python.org/3/library/asyncio-task.html#asyncio.wait has the 
following two code snippets both of which fail with ""SyntaxError: 'await' 
outside function" when I run them in Python 3.9.7

Snippet 1:

```
async def foo():
return 42

coro = foo()
done, pending = await asyncio.wait({coro})

if coro in done:
# This branch will never be run!
pass # I added this to prevent IndentationError
```

Snippet 2:

```
async def foo():
return 42

task = asyncio.create_task(foo())
done, pending = await asyncio.wait({task})

if task in done:
# Everything will work as expected now.
pass # I added this to prevent IndentationError
```

--
messages: 406034
nosy: joseville
priority: normal
severity: normal
status: open
title: SyntaxError: 'await' outside function" in 
"asyncio-task.html#waiting-primitives" code snippets
type: compile error
versions: Python 3.9

___
Python tracker 

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



[issue45769] SyntaxError: 'await' outside function" in "asyncio-task.html#waiting-primitives" code snippets

2021-11-09 Thread Jose Ville


New submission from Jose Ville :

https://docs.python.org/3/library/asyncio-task.html#asyncio.wait has the 
following two code snippets both of which fail with ""SyntaxError: 'await' 
outside function" when I run them in Python 3.9.7

Snippet 1:

```
async def foo():
return 42

coro = foo()
done, pending = await asyncio.wait({coro})

if coro in done:
# This branch will never be run!
pass # I added this to prevent IndentationError
```

Snippet 2:

```
async def foo():
return 42

task = asyncio.create_task(foo())
done, pending = await asyncio.wait({task})

if task in done:
# Everything will work as expected now.
pass # I added this to prevent IndentationError
```

--
messages: 406033
nosy: joseville
priority: normal
severity: normal
status: open
title: SyntaxError: 'await' outside function" in 
"asyncio-task.html#waiting-primitives" code snippets
type: compile error
versions: Python 3.9

___
Python tracker 

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



[issue45768] SyntaxError: 'await' outside function" in "asyncio-task.html#waiting-primitives" code snippets

2021-11-09 Thread Jose Ville


New submission from Jose Ville :

https://docs.python.org/3/library/asyncio-task.html#asyncio.wait has the 
following two code snippets both of which fail with ""SyntaxError: 'await' 
outside function" when I run them in Python 3.9.7

Snippet 1:

```
async def foo():
return 42

coro = foo()
done, pending = await asyncio.wait({coro})

if coro in done:
# This branch will never be run!
pass # I added this to prevent IndentationError
```

Snippet 2:

```
async def foo():
return 42

task = asyncio.create_task(foo())
done, pending = await asyncio.wait({task})

if task in done:
# Everything will work as expected now.
pass # I added this to prevent IndentationError
```

--
messages: 406032
nosy: joseville
priority: normal
severity: normal
status: open
title: SyntaxError: 'await' outside function" in 
"asyncio-task.html#waiting-primitives" code snippets

___
Python tracker 

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



[issue45711] Simplify the interpreter's (type, val, tb) exception representation

2021-11-09 Thread Irit Katriel


Change by Irit Katriel :


--
pull_requests: +27745
pull_request: https://github.com/python/cpython/pull/29495

___
Python tracker 

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



[issue45757] dis module incorrectly handles EXTENDED_ARG + NOP sequence

2021-11-09 Thread Brandt Bucher


Brandt Bucher  added the comment:

I don't think that it does, since oparg gets totally reassigned each time we 
load a new instruction. EXTENDED_ARG actually needs to hack around this by 
advancing the instruction itself, updating oparg, and jumping straight into the 
next opcode.

--

___
Python tracker 

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



[issue45767] Fix types for dev_t processing in posix module

2021-11-09 Thread Dmitry Marakasov


Change by Dmitry Marakasov :


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

___
Python tracker 

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



[issue45767] Fix types for dev_t processing in posix module

2021-11-09 Thread Dmitry Marakasov


New submission from Dmitry Marakasov :

So, I was investigating a test failure of python 3.11 and 3.10 on FreeBSD (but 
it likely applies to all python versions):

==
FAIL: test_makedev (test.test_posix.PosixTester)
--
Traceback (most recent call last):
  File "/usr/ports/lang/python311/work/Python-3.11.0a1/Lib/test/test_posix.py", 
line 686, in test_makedev
self.assertGreaterEqual(dev, 0)
^^^
AssertionError: -5228656221359548839 not greater than or equal to 0

--

The test checks that posix.stat(somepath).st_dev >= 0, but negative value was 
returned.

Python uses PyLong_FromLongLong to convert from dev_t C type which st_dev is:

https://github.com/python/cpython/blob/main/Modules/posixmodule.c#L2410
https://github.com/python/cpython/blob/main/Modules/posixmodule.c#L901

POSIX does not seem to define signedness of dev_t,

https://pubs.opengroup.org/onlinepubs/9699919799.2018edition/basedefs/sys_types.h.html

only saying it shall be an "integer type". However on practice on both FreeBSD 
and Linux it's unsigned:

FreeBSD:
typedef __dev_t dev_t;   // sys/types.h
typedef __uint64_t  __dev_t; // sys/_types.h

Linux (Ubuntu 18.04):
typedef __dev_t dev_t; // sys/stat.h
__STD_TYPE __DEV_T_TYPE __dev_t;   // sys/types.h
#define __DEV_T_TYPE__UQUAD_TYPE;  // sys/typesizes.h

So I suggest the attached patch to switch _PyLong_FromDev to 
PyLong_FromUnsignedLongLong which also makes it consistent with 
_Py_Dev_Converter which converts the other way with PyLong_AsUnsignedLongLong.




This change fixes the mentioned test, but another test failure is unmasked:

==
ERROR: test_makedev (test.test_posix.PosixTester)
--
Traceback (most recent call last):
  File "/usr/ports/lang/python311/work/Python-3.11.0a1/Lib/test/test_posix.py", 
line 704, in test_makedev
self.assertEqual(posix.makedev(major, minor), dev)
 ^^^
OverflowError: Python int too large to convert to C int

--

This problem needs couple more trivial changes, but I'm not sure how to make 
them correctly (and I'm also confused by how this file relates with 
clinic/posixmodule.c).

The problems are that:
- os_major_impl/os_minor_impl and os_makedev_impl are inconsistent in their 
argument/return types for major/minor dev numbers: the former use `unsigned 
int`, while the latter uses `int`.
- the correct type is platform dependent, for instance Linux uses `unsigned 
int` and FreeBSD uses `int` (from `man makedev`).

I guess that to fix this failure one needs to add a macro/typedef for the type 
for minor/major dev numbers like

#if defined(__FreeBSD__)
#define DEVICE_MAJORMINOR_T int
#else
#define DEVICE_MAJORMINOR_T unsigned int
#endif

and use it in the named functions:

static DEVICE_MAJORMINOR_T os_major_impl(PyObject *module, dev_t device)
static DEVICE_MAJORMINOR_T os_minor_impl(PyObject *module, dev_t device)

static dev_t os_makedev_impl(PyObject *module, DEVICE_MAJORMINOR_T major, 
DEVICE_MAJORMINOR_T minor)

--
components: Extension Modules, FreeBSD
files: posixmodule.c.patch
keywords: patch
messages: 406030
nosy: AMDmi3, koobs
priority: normal
severity: normal
status: open
title: Fix types for dev_t processing in posix module
type: behavior
versions: Python 3.10, Python 3.11, Python 3.6, Python 3.7, Python 3.8, Python 
3.9
Added file: https://bugs.python.org/file50433/posixmodule.c.patch

___
Python tracker 

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



[issue45732] Update python.org Windows and macOS installers to use Tk 8.6.12

2021-11-09 Thread Steve Dower


Change by Steve Dower :


--
pull_requests: +27742
pull_request: https://github.com/python/cpython/pull/29493

___
Python tracker 

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



[issue45732] Update python.org Windows and macOS installers to use Tk 8.6.12

2021-11-09 Thread Steve Dower


Steve Dower  added the comment:


New changeset bcc4e46832010469bb35a97c1d1e962a82ee7fd9 by Steve Dower in branch 
'main':
bpo-45732: Update bundled Tcl/Tk on Windows to 8.6.12 (GH-29477)
https://github.com/python/cpython/commit/bcc4e46832010469bb35a97c1d1e962a82ee7fd9


--

___
Python tracker 

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



[issue45763] Detect compression libraries in configure

2021-11-09 Thread Christian Heimes


Change by Christian Heimes :


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



[issue45763] Detect compression libraries in configure

2021-11-09 Thread Christian Heimes


Christian Heimes  added the comment:


New changeset 5b7c7cb104163a178e9d70cb3c80cbfa6af8fbfc by Christian Heimes in 
branch 'main':
bpo-45763: Detect compression build deps in configure (GH-29483)
https://github.com/python/cpython/commit/5b7c7cb104163a178e9d70cb3c80cbfa6af8fbfc


--

___
Python tracker 

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



[issue45723] Improve and simplify configure.ac checks

2021-11-09 Thread miss-islington


miss-islington  added the comment:


New changeset 185533639d6eddd42a28f9e3517067bd877e34c5 by Erlend Egeberg 
Aasland in branch 'main':
bpo-45723: Remove obsolete AC_EXEEXT from configure.ac (GH-29486)
https://github.com/python/cpython/commit/185533639d6eddd42a28f9e3517067bd877e34c5


--
nosy: +miss-islington

___
Python tracker 

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



[issue45766] Add direct proportion option to statistics.linear_regression()

2021-11-09 Thread Raymond Hettinger


Change by Raymond Hettinger :


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

___
Python tracker 

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



[issue45766] Add direct proportion option to statistics.linear_regression()

2021-11-09 Thread Raymond Hettinger


New submission from Raymond Hettinger :

Signature:

def linear_regression(x, y, /, *, proportional=False):

Additional docstring with example:

If *proportional* is true, the independent variable *x* and the
dependent variable *y* are assumed to be directly proportional.
The data is fit to a line passing through the origin.

Since the *intercept* will always be 0.0, the underlying linear
function simplifies to:

y = slope * x + noise

>>> y = [3 * x[i] + noise[i] for i in range(5)]
>>> linear_regression(x, y, proportional=True)  #doctest: +ELLIPSIS
LinearRegression(slope=3.0244754248461283, intercept=0.0)

See Wikipedia entry for regression without an intercept term:
https://en.wikipedia.org/wiki/Simple_linear_regression#Simple_linear_regression_without_the_intercept_term_(single_regressor)

Compare with the *const* parameter in MS Excel's linest() function:
https://support.microsoft.com/en-us/office/linest-function-84d7d0d9-6e50-4101-977a-fa7abf772b6d

Compare with the *IncludeConstantBasis* option in Mathematica:
https://reference.wolfram.com/language/ref/IncludeConstantBasis.html

--
components: Library (Lib)
messages: 406026
nosy: rhettinger, steven.daprano
priority: normal
severity: normal
status: open
title: Add direct proportion option to statistics.linear_regression()
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



[issue45754] [sqlite3] SQLITE_LIMIT_LENGTH is incorrectly used to check statement length

2021-11-09 Thread Erlend E. Aasland


Change by Erlend E. Aasland :


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

___
Python tracker 

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



[issue39026] Include/cpython/pystate.h contains non-relative of initconfig.h include causing macOS Framework include failure

2021-11-09 Thread STINNER Victor


STINNER Victor  added the comment:

I wrote a different fix: PR 29488. Can someone please check if it fix the issue 
with Xcode?

--

___
Python tracker 

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



[issue39026] Include/cpython/pystate.h contains non-relative of initconfig.h include causing macOS Framework include failure

2021-11-09 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +27739
pull_request: https://github.com/python/cpython/pull/29488

___
Python tracker 

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



[issue45764] Parse error improvement forgetting ( after def

2021-11-09 Thread miss-islington


miss-islington  added the comment:


New changeset 2819e98d1048238bf94dc2ba88ae2455d01861bc by Carl Friedrich 
Bolz-Tereick in branch 'main':
bpo-45764: improve error message when missing '(' after 'def' (GH-29484)
https://github.com/python/cpython/commit/2819e98d1048238bf94dc2ba88ae2455d01861bc


--
nosy: +miss-islington

___
Python tracker 

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



[issue45765] importlib.metadata fails to find distributions in empty path

2021-11-09 Thread Jason R. Coombs


Change by Jason R. Coombs :


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

___
Python tracker 

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



[issue45765] importlib.metadata fails to find distributions in empty path

2021-11-09 Thread Jason R. Coombs


Change by Jason R. Coombs :


--
assignee:  -> jaraco

___
Python tracker 

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



[issue45754] [sqlite3] SQLITE_LIMIT_LENGTH is incorrectly used to check statement length

2021-11-09 Thread Erlend E. Aasland


Erlend E. Aasland  added the comment:

> > What happens if set SQLITE_LIMIT_SQL_LENGTH to 0 [...]

In this case, the limit is actually zero:

>>> cx.setlimit(sqlite3.SQLITE_LIMIT_SQL_LENGTH, 0)
1024
>>> cx.execute("select 1")
Traceback (most recent call last):
  File "", line 1, in 
sqlite3.DataError: string or blob too big

--

___
Python tracker 

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



[issue45765] importlib.metadata fails to find distributions in empty path

2021-11-09 Thread Jason R. Coombs


New submission from Jason R. Coombs :

Reported in https://github.com/python/importlib_metadata/issues/353, 
importlib.metadata fails to find distributions in the path "". A fix was 
applied to importlib_metadata 2.1.2 and 4.8.2. Let's apply that fix and 
backport it to supported Pythons.

--
messages: 406022
nosy: jaraco
priority: normal
severity: normal
status: open
title: importlib.metadata fails to find distributions in empty path

___
Python tracker 

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



[issue45723] Improve and simplify configure.ac checks

2021-11-09 Thread Erlend E. Aasland


Erlend E. Aasland  added the comment:

AC_CHECK_TYPE is obsolete and it's use is discouraged. There are some gotchas 
we need to check before switching to AC_CHECK_TYPES.

See:
- 
https://www.gnu.org/software/autoconf/manual/autoconf-2.70/html_node/Obsolete-Macros.html
- 
https://www.gnu.org/software/autoconf/manual/autoconf-2.70/html_node/Generic-Types.html

--

___
Python tracker 

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



[issue45723] Improve and simplify configure.ac checks

2021-11-09 Thread Erlend E. Aasland


Change by Erlend E. Aasland :


--
pull_requests: +27737
pull_request: https://github.com/python/cpython/pull/29486

___
Python tracker 

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



[issue45354] test_winconsoleio fails on Windows 11

2021-11-09 Thread STINNER Victor


STINNER Victor  added the comment:

> #define RT_MANIFEST 24

If possible, add a comment with a reference to this issue (bpo-45354) to help 
future readers ;-)

--

___
Python tracker 

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



[issue30082] hide command prompt when using subprocess.Popen with shell=False on Windows

2021-11-09 Thread swgmma


swgmma  added the comment:

Just squashed all the commits.

--

___
Python tracker 

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



[issue45354] test_winconsoleio fails on Windows 11

2021-11-09 Thread Steve Dower


Steve Dower  added the comment:

> bpo-45220 removed the winuser.h include from the PC\*.rc files, so the 
> RT_MANIFEST resource type macro isn't defined. It needs to be defined in the 
> file or a common header. For example:
> 
>  #define RT_MANIFEST 24
>  1 RT_MANIFEST "python.manifest"

I vote for this approach, since apparently RC doesn't complain about 
undefined macros. Otherwise I'd put it in the build scripts.

It's weird that the WinSDK breaks RC with the winuser.h header, but 
since it does, we don't really have a choice but to hard-code the value.

--

___
Python tracker 

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



[issue23041] csv needs more quoting rules

2021-11-09 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

The quoting style affects not only the CSV formatting, but also the CSV 
parsing. How QUOTE_NOTNULL and QUOTE_STRINGS will affect parsing?

--

___
Python tracker 

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



[issue45723] Improve and simplify configure.ac checks

2021-11-09 Thread Erlend E. Aasland


Change by Erlend E. Aasland :


--
pull_requests: +27736
pull_request: https://github.com/python/cpython/pull/29485

___
Python tracker 

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



[issue45354] test_winconsoleio fails on Windows 11

2021-11-09 Thread Eryk Sun


Eryk Sun  added the comment:

It would also work to add RT_MANIFEST=24 to the ResourceCompile 
PreprocessorDefinitions in PCbuild\pyproject.props. Though to me, adding the 
definition there is obscure compared to including a private header, such as 
"resourcetype.h".

--

___
Python tracker 

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



[issue23041] csv needs more quoting rules

2021-11-09 Thread Miha Šetina

Miha Šetina  added the comment:

I would say that it should follow a rule:
both cases values of None are output as an empty field

so empty filed should map to None with both 
QUOTE_NOTNULL and 
QUOTE_STRINGS

that would make:
["", None, 1, "a"]

for QUOTE_STRINGS in effect.
This would also make it possible to have circular usage. Export with one   
quoting rule should be able to read with the same rule and produce same data.

--

___
Python tracker 

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



[issue45354] test_winconsoleio fails on Windows 11

2021-11-09 Thread Eryk Sun


Eryk Sun  added the comment:

The embedded manifest in python[_d].exe is missing, so the process is running 
with Windows 8 compatibility mode (i.e. 6.2.9200), and thus the check for 
Windows 11+ (10.0.22000+) is false. It's disappointing that compatibility mode 
doesn't restore the old DOS device behavior, but whatever.

bpo-45220 removed the winuser.h include from the PC\*.rc files, so the 
RT_MANIFEST resource type macro isn't defined. It needs to be defined in the 
file or a common header. For example:

#define RT_MANIFEST 24
1 RT_MANIFEST "python.manifest"

--

___
Python tracker 

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



[issue23041] csv needs more quoting rules

2021-11-09 Thread Skip Montanaro


Skip Montanaro  added the comment:

Further question... All the discussion has been on the writer side of the csv 
module. Is there any reason that using QUOTE_STRINGS or QUOTE_NOTNULL should 
have an effect when reading? For example, should this line on input

"",,1,'a'

produce this list

["", None, "1", "a"]

with QUOTE_NOTNULL in effect, and

["", "", 1, "a"]

or

["", None, 1, "a"]

with QUOTE_STRINGS in effect?

--

___
Python tracker 

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



[issue43656] TracebackException or StackSummary.extract with capture_locals=True fail to catch exceptions raised by repr() on value of frame local variable in FrameSummary.__init__.

2021-11-09 Thread Ken Jin


Change by Ken Jin :


--
nosy:  -kj

___
Python tracker 

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



[issue43656] TracebackException or StackSummary.extract with capture_locals=True fail to catch exceptions raised by repr() on value of frame local variable in FrameSummary.__init__.

2021-11-09 Thread Martin


Martin  added the comment:

I improved the example in traceback.rst to illustrate how format_locals works.

--

___
Python tracker 

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



[issue45759] Improve error messages for non-matching `elif`/`else` statements

2021-11-09 Thread Andre Roberge


Change by Andre Roberge :


--
nosy: +aroberge

___
Python tracker 

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



[issue45764] Parse error improvement forgetting ( after def

2021-11-09 Thread Carl Friedrich Bolz-Tereick


Change by Carl Friedrich Bolz-Tereick :


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

___
Python tracker 

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



  1   2   >