[issue45993] Main branch of CPython does not build anymore on macOS

2021-12-06 Thread Nikita Sobolev

New submission from Nikita Sobolev :

New version of `main` branch does not build for me anymore.

Command: `make -j`
System information: 
- macOS 10.14.6
- Apple clang version 11.0.0 (clang-1100.0.33.16)

I am also attaching resulting Makefile.

Output:

```
» make -j
gcc -L/usr/local/opt/openssl/lib -L/usr/local/opt/openssl/lib   -o 
Programs/_freeze_module Programs/_freeze_module.o Modules/getpath_noop.o 
Modules/getbuildinfo.o Parser/token.o  Parser/pegen.o Parser/pegen_errors.o 
Parser/action_helpers.o Parser/parser.o Parser/string_parser.o Parser/peg_api.o 
Parser/myreadline.o Parser/tokenizer.o Objects/abstract.o Objects/accu.o 
Objects/boolobject.o Objects/bytes_methods.o Objects/bytearrayobject.o 
Objects/bytesobject.o Objects/call.o Objects/capsule.o Objects/cellobject.o 
Objects/classobject.o Objects/codeobject.o Objects/complexobject.o 
Objects/descrobject.o Objects/enumobject.o Objects/exceptions.o 
Objects/genericaliasobject.o Objects/genobject.o Objects/fileobject.o 
Objects/floatobject.o Objects/frameobject.o Objects/funcobject.o 
Objects/interpreteridobject.o Objects/iterobject.o Objects/listobject.o 
Objects/longobject.o Objects/dictobject.o Objects/odictobject.o 
Objects/memoryobject.o Objects/methodobject.o Objects/moduleobject.o 
Objects/namespaceobject.o Objects/object.o Objects/obmalloc.o 
Objects/picklebufobject.o Objects/rangeobject.o Objects/setobject.o 
Objects/sliceobject.o Objects/structseq.o Objects/tupleobject.o 
Objects/typeobject.o Objects/unicodeobject.o Objects/unicodectype.o 
Objects/unionobject.o Objects/weakrefobject.o Python/_warnings.o 
Python/Python-ast.o Python/Python-tokenize.o Python/asdl.o Python/ast.o 
Python/ast_opt.o Python/ast_unparse.o Python/bltinmodule.o Python/ceval.o 
Python/codecs.o Python/compile.o Python/context.o Python/dynamic_annotations.o 
Python/errors.o Python/frame.o Python/frozenmain.o Python/future.o 
Python/getargs.o Python/getcompiler.o Python/getcopyright.o 
Python/getplatform.o Python/getversion.o Python/hamt.o Python/hashtable.o 
Python/import.o Python/importdl.o Python/initconfig.o Python/marshal.o 
Python/modsupport.o Python/mysnprintf.o Python/mystrtoul.o Python/pathconfig.o 
Python/preconfig.o Python/pyarena.o Python/pyctype.o Python/pyfpe.o 
Python/pyhash.o Python/pylifecycle.o Python/pymath.o Python/pystate.o 
Python/pythonrun.o Python/pytime.o Python/bootstrap_hash.o Python/specialize.o 
Python/structmember.o Python/symtable.o Python/sysmodule.o Python/thread.o 
Python/traceback.o Python/getopt.o Python/pystrcmp.o Python/pystrtod.o 
Python/pystrhex.o Python/dtoa.o Python/formatter_unicode.o Python/fileutils.o 
Python/suggestions.o Python/dynload_shlib.oModules/config.o Modules/main.o 
Modules/gcmodule.o Modules/xxsubtype.o -lintl -ldl  -framework CoreFoundation   
 
Undefined symbols for architecture x86_64:
  "_PyErr_CheckSignals", referenced from:
  _my_fgets in myreadline.o
  _long_to_decimal_string_internal in longobject.o
  _x_mul in longobject.o
  _x_divrem in longobject.o
  _PyObject_Print in object.o
  _PyObject_Str in object.o
  _PyObject_Repr in object.o
  ...
  "_PyOS_FSPath", referenced from:
  _PyUnicode_FSConverter in unicodeobject.o
  _PyUnicode_FSDecoder in unicodeobject.o
  "__PyAtExit_Call", referenced from:
  _Py_FinalizeEx in pylifecycle.o
  _Py_EndInterpreter in pylifecycle.o
  "__PyAtExit_Fini", referenced from:
  _interpreter_clear in pystate.o
  "__PyAtExit_Init", referenced from:
  _pycore_interp_init in pylifecycle.o
  "__PyErr_CheckSignalsTstate", referenced from:
  _handle_signals in ceval.o
  "__PyFaulthandler_Fini", referenced from:
  _Py_FinalizeEx in pylifecycle.o
  _fatal_error in pylifecycle.o
  "__PyFaulthandler_Init", referenced from:
  _init_interp_main in pylifecycle.o
  "__PyMem_DumpTraceback", referenced from:
  __PyObject_AssertFailed in object.o
  __PyObject_DebugDumpAddress in obmalloc.o
  "__PyOS_InterruptOccurred", referenced from:
  _my_fgets in myreadline.o
  "__PySignal_Fini", referenced from:
  _Py_FinalizeEx in pylifecycle.o
  "__PySignal_Init", referenced from:
  _init_interp_main in pylifecycle.o
  "__PyTraceMalloc_Fini", referenced from:
  _Py_FinalizeEx in pylifecycle.o
  "__PyTraceMalloc_Init", referenced from:
  _init_interp_main in pylifecycle.o
  "__PyTraceMalloc_NewReference", referenced from:
  __Py_NewReference in object.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [Programs/_freeze_module] Error 1
```

--
components: Build
files: Makefile
messages: 407773
nosy: sobolevn
priority: normal
severity: normal
status: open
title: Main branch of CPython does not build anymore on macOS
type: compile error
versions: Python 3.11
Added file: https://bugs.python.org/file50479/Makefile

___
Python tracker 


[issue45993] Main branch of CPython does not build anymore on macOS

2021-12-06 Thread Christian Heimes


Christian Heimes  added the comment:

Did you run "make distclean" or "git clean -xdf" before ./configure?

--
nosy: +christian.heimes

___
Python tracker 

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



[issue44035] Regenerating the configure script fails even if dependencies are satisfied

2021-12-06 Thread Christian Heimes


Change by Christian Heimes :


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

___
Python tracker 

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



[issue45977] Unexpected effect of sys.pycache_prefix = ""

2021-12-06 Thread Christian Heimes


Christian Heimes  added the comment:

The cache prefix mirrors the directory structure. Python takes the absolute 
path to the .py file, converts the path to a relative path by stripping off the 
leading slash, and finally joins the path with the prefix.

Take this example:

$ PYTHONPYCACHEPREFIX=/tmp/pycache python3.10 -c pass

This will create the cache file 
"/tmp/pycache/usr/lib64/python3.10/os.cpython-310.pyc" for the Python file 
"/usr/lib64/python3.10/os.py.

--

___
Python tracker 

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



[issue45950] Reintroduce bootstrap_python for freezing

2021-12-06 Thread Ned Deily


Ned Deily  added the comment:

Framework builds on macOS now fail with a bus error when trying to run the 
newly built _bootstrap_python. A simplified example:

$ ./configure --enable-framework=$PWD/Library/Frameworks
checking for git... found
checking build system type... x86_64-apple-darwin20.6.0
checking host system type... x86_64-apple-darwin20.6.0
checking for Python interpreter freezing... ./_bootstrap_python
checking for python3.11... no
checking for python3.10... no
checking for python3.9... no
checking for python3.8... no
checking for python3.7... no
checking for python3.6... no
checking for python3... python3
checking Python for regen version... Python 3.8.9
[...]
creating Modules/Setup.local
creating Makefile

pkg-config is missing. Some dependencies may not be detected correctly.


If you want a release build with all stable optimizations active (PGO, etc),
please run ./configure --enable-optimizations


$ make
[...]
gcc -o _bootstrap_python Modules/getbuildinfo.o Parser/token.o  
Parser/pegen.o Parser/pegen_errors.o Parser/action_helpers.o Parser/parser.o 
Parser/string_parser.o Parser/peg_api.o Parser/myreadline.o Parser/tokenizer.o 
Objects/abstract.o Objects/accu.o Objects/boolobject.o Objects/bytes_methods.o 
Objects/bytearrayobject.o Objects/bytesobject.o Objects/call.o 
Objects/capsule.o Objects/cellobject.o Objects/classobject.o 
Objects/codeobject.o Objects/complexobject.o Objects/descrobject.o 
Objects/enumobject.o Objects/exceptions.o Objects/genericaliasobject.o 
Objects/genobject.o Objects/fileobject.o Objects/floatobject.o 
Objects/frameobject.o Objects/funcobject.o Objects/interpreteridobject.o 
Objects/iterobject.o Objects/listobject.o Objects/longobject.o 
Objects/dictobject.o Objects/odictobject.o Objects/memoryobject.o 
Objects/methodobject.o Objects/moduleobject.o Objects/namespaceobject.o 
Objects/object.o Objects/obmalloc.o Objects/picklebufobject.o 
Objects/rangeobject.o Objects/seto
 bject.o Objects/sliceobject.o Objects/structseq.o Objects/tupleobject.o 
Objects/typeobject.o Objects/unicodeobject.o Objects/unicodectype.o 
Objects/unionobject.o Objects/weakrefobject.o Python/_warnings.o 
Python/Python-ast.o Python/Python-tokenize.o Python/asdl.o Python/ast.o 
Python/ast_opt.o Python/ast_unparse.o Python/bltinmodule.o Python/ceval.o 
Python/codecs.o Python/compile.o Python/context.o Python/dynamic_annotations.o 
Python/errors.o Python/frame.o Python/frozenmain.o Python/future.o 
Python/getargs.o Python/getcompiler.o Python/getcopyright.o 
Python/getplatform.o Python/getversion.o Python/hamt.o Python/hashtable.o 
Python/import.o Python/importdl.o Python/initconfig.o Python/marshal.o 
Python/modsupport.o Python/mysnprintf.o Python/mystrtoul.o Python/pathconfig.o 
Python/preconfig.o Python/pyarena.o Python/pyctype.o Python/pyfpe.o 
Python/pyhash.o Python/pylifecycle.o Python/pymath.o Python/pystate.o 
Python/pythonrun.o Python/pytime.o Python/bootstrap_hash.o Python/specialize.o
  Python/structmember.o Python/symtable.o Python/sysmodule.o Python/thread.o 
Python/traceback.o Python/getopt.o Python/pystrcmp.o Python/pystrtod.o 
Python/pystrhex.o Python/dtoa.o Python/formatter_unicode.o Python/fileutils.o 
Python/suggestions.o Python/dynload_shlib.oModules/config.o Modules/main.o 
Modules/gcmodule.o Modules/atexitmodule.o  Modules/faulthandler.o  
Modules/posixmodule.o  Modules/signalmodule.o  Modules/_tracemalloc.o  
Modules/_codecsmodule.o  Modules/_collectionsmodule.o  Modules/errnomodule.o  
Modules/_io/_iomodule.o Modules/_io/iobase.o Modules/_io/fileio.o 
Modules/_io/bytesio.o Modules/_io/bufferedio.o Modules/_io/textio.o 
Modules/_io/stringio.o  Modules/itertoolsmodule.o  Modules/_sre.o  
Modules/_threadmodule.o  Modules/timemodule.o  Modules/_weakref.o  
Modules/_abc.o  Modules/_functoolsmodule.o  Modules/_localemodule.o  
Modules/_operator.o  Modules/_stat.o  Modules/symtablemodule.o  
Modules/pwdmodule.o  Modules/xxsubtype.o \
Programs/_bootstrap_python.o Modules/getpath.o -ldl  -framework 
CoreFoundation
./_bootstrap_python ./Tools/scripts/deepfreeze.py 
Python/frozen_modules/importlib._bootstrap.h -m importlib._bootstrap -o 
Python/deepfreeze/importlib._bootstrap.c
make: *** [Python/deepfreeze/importlib._bootstrap.c] Bus error: 10
$

--enable-framework causes a number of changes in interpreter building and 
initialization. Since, as it stands, _bootstrap_python executable isn't and 
doesn't need to be built as a framework, there is probably some path confusion 
in getpath.c or elsewhere.

Prior to these changes (at 3.11.0a2 at least), it was still possible to run a 
framework build executable in the build directory through some careful use of 
build variables in Makefile (like how "make test" works). Without delving 
deeper into it at the moment, I'm not sure what to suggest. It may be simpler 
to just do a clean separate non-framework build to provide _bootstrap_python. 
And/or possibly re-allow the use of --with-build-python to specify a 

[issue45950] Reintroduce bootstrap_python for freezing

2021-12-06 Thread Christian Heimes


Christian Heimes  added the comment:

Ned, does this change solve the issue with framework builds?

$ git diff
diff --git a/Makefile.pre.in b/Makefile.pre.in
index 8e6e553554d..2068db30855 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -106,7 +106,7 @@ PY_CFLAGS_NODIST=$(CONFIGURE_CFLAGS_NODIST) 
$(CFLAGS_NODIST) -I$(srcdir)/Include
 PY_CPPFLAGS=   $(BASECPPFLAGS) -I. -I$(srcdir)/Include $(CONFIGURE_CPPFLAGS) 
$(CPPFLAGS)
 PY_LDFLAGS=$(CONFIGURE_LDFLAGS) $(LDFLAGS)
 PY_LDFLAGS_NODIST=$(CONFIGURE_LDFLAGS_NODIST) $(LDFLAGS_NODIST)
-PY_LDFLAGS_NOLTO=$(PY_LDFLAGS) $(CONFIGURE_LDFLAGS_NOLTO) $(LDFLAGS_NODIST)
+PY_LDFLAGS_NOLTO=$(PY_LDFLAGS_NODIST) $(CONFIGURE_LDFLAGS_NOLTO) 
$(LDFLAGS_NODIST)
 NO_AS_NEEDED=  @NO_AS_NEEDED@
 CCSHARED=  @CCSHARED@
 # LINKFORSHARED are the flags passed to the $(CC) command that links

--

___
Python tracker 

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



[issue45993] Main branch of CPython does not build anymore on macOS

2021-12-06 Thread Nikita Sobolev


Nikita Sobolev  added the comment:

Looks like removing cache worked. Thanks!

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



[issue45950] Reintroduce bootstrap_python for freezing

2021-12-06 Thread Ned Deily


Ned Deily  added the comment:

> Ned, does this change solve the issue with framework builds?

No. I would guess at a minimum getpath.c for _bootstrap_python might need to be 
built without WITH_NEXT_FRAMEWORK defined. But I'm out of time for today and 
don't expect to have much time available in the immediate future.

--

___
Python tracker 

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



[issue45950] Reintroduce bootstrap_python for freezing

2021-12-06 Thread Christian Heimes


Change by Christian Heimes :


--
pull_requests: +28160
pull_request: https://github.com/python/cpython/pull/29936

___
Python tracker 

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



[issue41921] REDoS in parseentities

2021-12-06 Thread Irit Katriel


Change by Irit Katriel :


--
nosy: +lemburg
versions: +Python 3.11 -Python 3.5, Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

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



[issue44092] [sqlite3] Remove special rollback handling

2021-12-06 Thread Erlend E. Aasland


Erlend E. Aasland  added the comment:

> I think this change is no problem.

Thanks, and thank you for looking reviewing this change.

> There is only one situation that a problem may occur. Write code with SQLite
> 3.8.7.2+ (2014-11-18), and run it on 3.7.15 (2012-12-12) ~ 3.8.7.1-, but
> this situation may be difficult to happen, we can note this situation in
> doc.

How realistic is this scenario? If you compile with, for example 3.14.0 or 
newer, you'd link with sqlite3_trace_v2, not sqlite3_trace, so the loader would 
prevent you from running with anything pre 3.14. AFAIK, we've never had such 
problems.

> More securely, if run on SQLite 3.8.7.1-, and encounter
> SQLITE_ABORT_ROLLBACK error code, a prompt can be given to explain the
> reason.

You already get both an error message, an (extended) error code. That should be 
sufficient.

> Also note that the current main branch is buggy. If don't adopt this change
> or revert this change later, don't forget to fix the bug of msg407185
> (`pysqlite_Statement.in_use` flag is not reset).

It is a change of behaviour of the internal machinery. Does the change lead to 
wrong results (duplicate rows, wrong rows returned, no rows returned)? 
Corrupted/garbage data? Non-deterministic behaviour? Does any of the API's 
provided by sqlite3 not behave according to the documentation anymore?

NB: I plan to get rid of the in_use flag long before the beta sets in.

--

___
Python tracker 

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



[issue45963] Embed interpreter frame in generator.

2021-12-06 Thread Mark Shannon


Mark Shannon  added the comment:


New changeset 299483c95d601ddcfdce2f96418b6499c1fc7b9f by Mark Shannon in 
branch 'main':
bpo-45963: Make space for the InterpreterFrame of a generator in that 
generator. (GH-29891)
https://github.com/python/cpython/commit/299483c95d601ddcfdce2f96418b6499c1fc7b9f


--

___
Python tracker 

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



[issue45950] Reintroduce bootstrap_python for freezing

2021-12-06 Thread Christian Heimes


Christian Heimes  added the comment:

Ronald, Pablo, could you please test GH-29936 on macOS with --enable-framework?

--
nosy: +pablogsal, ronaldoussoren

___
Python tracker 

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



[issue41921] REDoS in parseentities

2021-12-06 Thread Marc-Andre Lemburg


Marc-Andre Lemburg  added the comment:

Interesting that the tool still exists. It uses mxTextTools, but in a 
non-packaged version, so it's been broken for two decades now :-)

I think it's safe to remove it from Tools\scripts.

--

___
Python tracker 

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



[issue44092] [sqlite3] Remove special rollback handling

2021-12-06 Thread Ma Lin


Ma Lin  added the comment:

> How realistic is this scenario? If you compile with, for example 3.14.0 or
> newer, you'd link with sqlite3_trace_v2, not sqlite3_trace, so the loader
> would prevent you from running with anything pre 3.14. AFAIK, we've never
> had such problems.

I mean, after this change, different versions of SQLite will behave 
differently. And give a message for SQLITE_ABORT_ROLLBACK to explain this 
problem.

> It is a change of behaviour of the internal machinery. Does the change lead
> to wrong results (duplicate rows, wrong rows returned, no rows returned)?
> Corrupted/garbage data? Non-deterministic behaviour? Does any of the API's
> provided by sqlite3 not behave according to the documentation anymore?

It just leaks resource, apart from this, there seems to be no problem.

--

___
Python tracker 

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



[issue43805] multiprocessing.Queue hangs when process on other side dies

2021-12-06 Thread Thomas Kluyver


Thomas Kluyver  added the comment:

It's not my decision, so I can't really say. But the Queue API is pretty 
stable, and exists 3 times over in Python (the queue module for use with 
threads, in multiprocessing and in asyncio). So I'd guess that anyone wanting 
to add to that API would need to make a compelling case for why it's important, 
and be prepared for a lot of wrangling over API details (like method names and 
exceptions).

If you want to push that idea, you could try the ideas board on the Python 
discourse forum: https://discuss.python.org/c/ideas/6 .

You might also want to look at previous discussions about adding a 
Queue.close() method: issue29701 and issue40888.

--

___
Python tracker 

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



[issue44092] [sqlite3] Remove special rollback handling

2021-12-06 Thread Erlend E. Aasland


Erlend E. Aasland  added the comment:

> I mean, after this change, different versions of SQLite will behave 
> differently.

Yes, this is explained in the news item:

Fetch across rollback no longer raises :exc:`~sqlite3.InterfaceError`.
Instead we leave it to the SQLite library to handle these cases.

> And give a message for SQLITE_ABORT_ROLLBACK to explain this problem.

I'm not sure this is a good idea; I believe letting the underlying SQLite 
library explain the error is better than trying to deduce stuff based on what 
was known at compile time and what we know at runtime.

> It just leaks resource, apart from this, there seems to be no problem.

Can you provide a reproducer? We've run this change through the ref. leak bots, 
and they are all green, so if there's a ref. leak, the test suite needs 
improvements.

--

___
Python tracker 

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



[issue44092] [sqlite3] Remove special rollback handling

2021-12-06 Thread Ma Lin


Ma Lin  added the comment:

Imagine a person write a code with Python 3.11 and SQLite 3.8.7.2+, and then 
deploying it to Python 3.11 and SQLite 3.8.7.1-, error may occur. However, this 
situation is difficult to happen.

> Can you provide a reproducer? We've run this change through the ref.
> leak bots, and they are all green, so if there's a ref. leak, the
> test suite needs improvements.

The statement in cache will be never reused. If you don't mind, it's not a big 
problem.

--

___
Python tracker 

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



[issue45994] Add simple usage to email module

2021-12-06 Thread Taiga Katarao


Change by Taiga Katarao :


--
assignee: docs@python
components: Documentation
nosy: docs@python, tarao1006
priority: normal
severity: normal
status: open
title: Add simple usage to email module
type: enhancement
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



[issue44092] [sqlite3] Remove special rollback handling

2021-12-06 Thread Erlend E. Aasland


Erlend E. Aasland  added the comment:

> Imagine a person write a code with Python 3.11 and SQLite 3.8.7.2+, and then
> deploying it to Python 3.11 and SQLite 3.8.7.1-, error may occur. However,
> this situation is difficult to happen.

Yes, I also think this is a far fetched case. I'll see if there's an easy way 
to handle this. If there isn't, I'm not sure the added complexity will be worth 
it.

> The statement in cache will be never reused.

That is not necessarily correct; if the "problematic cursor" executes a new 
statement, the statement in the cache will be reset, thus it can be reused. 
Also, if the "problematic cursor" is closed (or deleted), the statement can 
also be reused. But, if the "problematic cursor" just gets stale and is _never_ 
used again, it may be a performance issue if it is a hot statement. But, as 
soon as I can land my changes related to the in_use flag, this will not be an 
issue anyway.

--

___
Python tracker 

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



[issue38836] Links are duplicated in documentation search result

2021-12-06 Thread Irit Katriel


Change by Irit Katriel :


--
status: pending -> open

___
Python tracker 

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



[issue30988] Exception parsing invalid email address headers starting or ending with dot

2021-12-06 Thread Irit Katriel


Irit Katriel  added the comment:

Reproduced on 3.11.

--
nosy: +iritkatriel
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.5, Python 3.6, Python 
3.7

___
Python tracker 

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



[issue45950] Reintroduce bootstrap_python for freezing

2021-12-06 Thread Christian Heimes


Christian Heimes  added the comment:

If the patch does not help then I can re-enable --with-build-python for 
non-cross builds.

--

___
Python tracker 

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



[issue45256] Remove the usage of the C stack in Python to Python calls

2021-12-06 Thread pmp-p


Change by pmp-p :


--
nosy: +pmpp

___
Python tracker 

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



[issue45829] Remove C stack use by specializing BINARY_SUBSCR, STORE_SUBSCR, LOAD_ATTR, and STORE_ATTR

2021-12-06 Thread pmp-p


Change by pmp-p :


--
nosy: +pmpp

___
Python tracker 

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



[issue18774] There is still last bit of GNU Pth code in signalmodule.c

2021-12-06 Thread Irit Katriel


Irit Katriel  added the comment:

Two of the three remaining comments Christian mentioned are still there:

% grep -r "gnu pth" Python/ configure.ac
Python//thread.c:   library (e.g. gnu pth in pthread emulation) */
configure.ac:# (e.g. gnu pth with pthread emulation)

--
nosy: +iritkatriel
versions: +Python 3.11 -Python 3.4

___
Python tracker 

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



[issue45995] string formatting: normalize negative zero

2021-12-06 Thread John Belmonte


New submission from John Belmonte :

proposal: add a string formatting option to normalize negative 0 values to 0

use case:  rounded display of a float that is nominally 0, where the 
distraction of a flashing minus sign from minute changes around 0 is unwanted

example:
>>> '%~5.1f' % -.1
'  0.0'

format spec before:
  format_spec ::=  
[[fill]align][sign][#][0][width][grouping_option][.precision][type]
after:
  format_spec ::=  
[[fill]align][sign][~][#][0][width][grouping_option][.precision][type]
  where '~' is only allowed for number types

implementation: if '~' is present in the spec, add 0 to the value after 
applying precision

--
components: Library (Lib)
messages: 407792
nosy: John Belmonte
priority: normal
severity: normal
status: open
title: string formatting: normalize negative zero
type: enhancement

___
Python tracker 

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



[issue45995] string formatting: normalize negative zero

2021-12-06 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

To normalize negative 0.0 to 0.0 you can just add 0.0. It will work with any 
method of converting floats to string, there is no need to change all 
formatting specifications.

>>> x = -0.0
>>> x
-0.0
>>> x + 0.0
0.0

--
nosy: +mark.dickinson, serhiy.storchaka

___
Python tracker 

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



[issue44035] Regenerating the configure script fails even if dependencies are satisfied

2021-12-06 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



[issue44035] Regenerating the configure script fails even if dependencies are satisfied

2021-12-06 Thread Christian Heimes


Christian Heimes  added the comment:


New changeset 98fac8bc183c113903403793ffe411358ee40d8a by Christian Heimes in 
branch 'main':
bpo-44035: Check autoconf files thoroughly (GH-29935)
https://github.com/python/cpython/commit/98fac8bc183c113903403793ffe411358ee40d8a


--

___
Python tracker 

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



[issue44035] Regenerating the configure script fails even if dependencies are satisfied

2021-12-06 Thread Christian Heimes


Change by Christian Heimes :


--
pull_requests: +28162
pull_request: https://github.com/python/cpython/pull/29938

___
Python tracker 

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



[issue45934] python curses newterm implementation

2021-12-06 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Thank you Guido for clarification. I have found that post:

https://mail.python.org/archives/list/core-mentors...@python.org/thread/YGSMPKP7G3HO73ISEQZFAWPPGCOA3JYZ/

I agree that it is worth to implement newterm. In particular it would be useful 
in tests.

--

___
Python tracker 

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



[issue45995] string formatting: normalize negative zero

2021-12-06 Thread John Belmonte


John Belmonte  added the comment:

> To normalize negative 0.0 to 0.0 you can just add 0.0.

yes, I'm aware-- see "implementation" in the original post

> there is no need to change all formatting specifications

For adding 0 to work, it must be done after the rounding.  That means if you 
want make use of anything in the current formatting spec regarding precision, 
normalizing negative zero would need to be a proper option of the formatting 
spec.

--

___
Python tracker 

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



[issue45664] resolve_bases() and new_class() do not work with type alias of a built-in type

2021-12-06 Thread Chris Wesseling


Change by Chris Wesseling :


--
nosy:  -CharString, CharString

___
Python tracker 

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



[issue44035] Regenerating the configure script fails even if dependencies are satisfied

2021-12-06 Thread Christian Heimes


Christian Heimes  added the comment:


New changeset 1528d249a5f8492801d09755f402618688337006 by Miss Islington (bot) 
in branch '3.10':
[3.10] bpo-44035: Check autoconf files thoroughly (GH-29935) (GH-29937)
https://github.com/python/cpython/commit/1528d249a5f8492801d09755f402618688337006


--

___
Python tracker 

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



[issue44035] Regenerating the configure script fails even if dependencies are satisfied

2021-12-06 Thread Christian Heimes


Christian Heimes  added the comment:


New changeset f147248795bf22be05bbc891053d60ef6a2f035d by Christian Heimes in 
branch '3.9':
[3.9] bpo-44035: Check autoconf files thoroughly (GH-29935) (GH-29938)
https://github.com/python/cpython/commit/f147248795bf22be05bbc891053d60ef6a2f035d


--

___
Python tracker 

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



[issue44035] Regenerating the configure script fails even if dependencies are satisfied

2021-12-06 Thread Christian Heimes


Change by Christian Heimes :


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



[issue45934] python curses newterm implementation

2021-12-06 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
assignee:  -> serhiy.storchaka

___
Python tracker 

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



[issue45950] Reintroduce bootstrap_python for freezing

2021-12-06 Thread Christian Heimes


Change by Christian Heimes :


--
pull_requests: +28163
pull_request: https://github.com/python/cpython/pull/29939

___
Python tracker 

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



[issue45950] Reintroduce bootstrap_python for freezing

2021-12-06 Thread Christian Heimes


Change by Christian Heimes :


--
pull_requests: +28163, 28164
pull_request: https://github.com/python/cpython/pull/29939

___
Python tracker 

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



[issue45256] Remove the usage of the C stack in Python to Python calls

2021-12-06 Thread STINNER Victor


Change by STINNER Victor :


--
nosy:  -vstinner

___
Python tracker 

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



[issue45996] Worse error from asynccontextmanager in Python 3.10

2021-12-06 Thread Dima Tisnek


New submission from Dima Tisnek :

Consider this illegal code:



import logging
from asyncio import sleep, gather, run
from contextlib import asynccontextmanager

@asynccontextmanager
async def foo():
await sleep(1)
yield


async def test():
f = foo()
await gather(f.__aenter__(), f.__aenter__())

run(test())



If it's ran with Python 3.9, user gets a sensible error:


  File 
"/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/contextlib.py",
 line 175, in __aenter__
return await self.gen.__anext__()
RuntimeError: anext(): asynchronous generator is already running



However, if it's ran with Python 3.10, user gets a cryptic error:


  File 
"/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/contextlib.py",
 line 197, in __aenter__
del self.args, self.kwds, self.func
AttributeError: args



Which makes it harder to pinpoint what's wrong when the stack is complex.
I've hit this with fastapi/starlette/mangum combo and a custom middleware.

--
components: asyncio
messages: 407799
nosy: Dima.Tisnek, asvetlov, yselivanov
priority: normal
severity: normal
status: open
title: Worse error from asynccontextmanager in Python 3.10
type: behavior
versions: Python 3.10, Python 3.11

___
Python tracker 

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



[issue33632] undefined behaviour: signed integer overflow in threadmodule.c

2021-12-06 Thread STINNER Victor


STINNER Victor  added the comment:

> I think PR https://github.com/python/cpython/pull/28674 has resolved this 
> issue.

You're right.

_threadmodule.c now uses _PyDeadline_Init() which calls _PyTime_Add(), and 
_PyTime_Add() prevents integer overflows; Extract of its implementation:

// Compute t1 + t2. Clamp to [_PyTime_MIN; _PyTime_MAX] on overflow.
static inline int
pytime_add(_PyTime_t *t1, _PyTime_t t2)
{
if (t2 > 0 && *t1 > _PyTime_MAX - t2) {
*t1 = _PyTime_MAX;
return -1;
}
else if (t2 < 0 && *t1 < _PyTime_MIN - t2) {
*t1 = _PyTime_MIN;
return -1;
}
else {
*t1 += t2;
return 0;
}
}

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
superseder:  -> threading.Lock.acquire(timeout) should use 
sem_clockwait(CLOCK_MONOTONIC)

___
Python tracker 

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



[issue41710] threading.Lock.acquire(timeout) should use sem_clockwait(CLOCK_MONOTONIC)

2021-12-06 Thread STINNER Victor


STINNER Victor  added the comment:

bpo-33632 "undefined behaviour: signed integer overflow in threadmodule.c" has 
been fixed by this change:

New changeset 833fdf126c8fe77fd17e8a8ffbc5c571b3bf64bd by Victor Stinner in 
branch 'main':
bpo-41710: Add private _PyDeadline_Get() function (GH-28674)
https://github.com/python/cpython/commit/833fdf126c8fe77fd17e8a8ffbc5c571b3bf64bd

--

___
Python tracker 

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



[issue45950] Reintroduce bootstrap_python for freezing

2021-12-06 Thread Christian Heimes


Christian Heimes  added the comment:

I added --enable-framework=yes to macOS GHA builder.

GH-29939 has ./configure --enable-framework=yes without proposed bootstrap fix. 
The build is failing early:

./_bootstrap_python ./Tools/scripts/deepfreeze.py 
Python/frozen_modules/importlib._bootstrap.h -m importlib._bootstrap -o 
Python/deepfreeze/importlib._bootstrap.c
make: *** [Python/deepfreeze/importlib._bootstrap.c] Bus error: 10


GH-29936 has ./configure --enable-framework=yes and introduces a 
Modules/getpath_bootstrap.o file. It is the same build as Modules/getpath.o 
except it does not use the framework feature. The target compiles getpath.c 
with an additional -DPY_BOOTSTRAP_PYTHON=1 option. The build fails later:

/bin/sh: line 1: 14772 Bus error: 10   
DYLD_FRAMEWORK_PATH=/Users/runner/work/cpython/cpython ./python.exe -E -S -m 
sysconfig --generate-posix-vars
generate-posix-vars failed

--

___
Python tracker 

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



[issue45994] Add simple usage to email module

2021-12-06 Thread Eric V. Smith


New submission from Eric V. Smith :

What sort of usage example would help you?

Is https://docs.python.org/3/library/email.examples.html lacking something?

--
nosy: +eric.smith

___
Python tracker 

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



[issue37927] No Instantiation Restrictions for AbstractBaseClasses derived from builtin types

2021-12-06 Thread Irit Katriel


Irit Katriel  added the comment:

Closed issue35362 as duplicate of this issue because there is a bit more info 
here.

--
nosy: +iritkatriel
versions: +Python 3.10, Python 3.11 -Python 2.7, Python 3.5, Python 3.6, Python 
3.7, Python 3.8

___
Python tracker 

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



[issue35362] list inheritor with abstract content does not raise

2021-12-06 Thread Irit Katriel


Change by Irit Katriel :


--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> No Instantiation Restrictions for AbstractBaseClasses derived 
from builtin types

___
Python tracker 

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



[issue35063] Checking for abstractmethod implementation fails to consider MRO for builtins

2021-12-06 Thread Irit Katriel


Irit Katriel  added the comment:

See also issue37927.

--
nosy: +iritkatriel
type:  -> behavior
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



[issue45996] Worse error from asynccontextmanager in Python 3.10

2021-12-06 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
nosy: +graingert, lukasz.langa, ncoghlan

___
Python tracker 

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



[issue34338] abstractmethod can run on classes

2021-12-06 Thread Irit Katriel


Change by Irit Katriel :


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



[issue37927] No Instantiation Restrictions for AbstractBaseClasses derived from builtin types

2021-12-06 Thread Alex Waygood


Alex Waygood  added the comment:

See also #5996

--
nosy: +AlexWaygood

___
Python tracker 

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



[issue45620] A misleading url in 'Floating Point Arithmetic' page

2021-12-06 Thread Akuli


Akuli  added the comment:

To me, it redirects or doesn't redirect to the drugs site, depending on what 
Accept-Language header your browser sends. And when the redirecting happens, 
the site is in chinese. (I don't speak chinese, and I don't know why my browser 
is sending zh-CN in Accept-Language.)


akuli@akuli-desktop:~$ curl -s -H 'Accept-Language: en-US,en;q=0.9' 
https://www.lahey.com/float.htm | head


Lahey - Floating point









akuli@akuli-desktop:~$ curl -s -H 'Accept-Language: en-US,en;q=0.9,zh-CN;q=0.4' 
https://www.lahey.com/float.htm | head
Document Moved
Object MovedThis document may be found https://www.hmbags.tw/";>here


Incognito mode worked for me, because it sends `Accept-Language: 
en-US,en;q=0.9` without any additional languages.

--
nosy: +Akuli

___
Python tracker 

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



[issue45620] A misleading url in 'Floating Point Arithmetic' page

2021-12-06 Thread Eric V. Smith


Eric V. Smith  added the comment:

That's interesting. I see the same behavior.

So this seems to be a problem on www.lahey.com. I'll see if I can report it to 
them.

--

___
Python tracker 

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



[issue45997] asyncio.Semaphore waiters deqeueu doesn't work

2021-12-06 Thread Yevhenii Hyzyla


New submission from Yevhenii Hyzyla :

Class `asyncio.Semaphore` has dequeue in implementation for waiters of 
semaphore and seems like the intention of this dequeue is to maintain FIFO 
queue of waiters. But it doesn't work, coroutine that releases semaphore can 
acquire semaphore again. Below is reproducible example:

```python
import asyncio


async def process(idx: int, semaphore: asyncio.Semaphore) -> None:
while True:
async with semaphore:
print(f'ACQUIRE {idx}')
await asyncio.sleep(1)


async def main() -> None:
semaphore = asyncio.Semaphore(5)
await asyncio.gather(*[process(idx, semaphore) for idx in range(20)])

asyncio.run(main())
```

In console:
```
/home/y.hyzyla/Work/asynciosemaphorebug/venv/bin/python 
/home/y.hyzyla/Work/asynciosemaphorebug/main.py
ACQUIRE 0
ACQUIRE 1
ACQUIRE 2
ACQUIRE 3
ACQUIRE 4
ACQUIRE 0
ACQUIRE 1
ACQUIRE 2
ACQUIRE 3
ACQUIRE 4
ACQUIRE 0
ACQUIRE 1
ACQUIRE 2
ACQUIRE 3
ACQUIRE 4

```

Ugly fix, is to add asyncio.sleep right before semaphore.
```python
while True:
await asyncio.sleep(0)
async with semaphore:
...
```

Also, I found a comment on Stack Overflow about race condition in Semaphore 
implementation, but I don't know about the quality of that comment:

https://stackoverflow.com/questions/55951233/does-pythons-asyncio-lock-acquire-maintain-order#comment112978366_55951304

--
components: asyncio
messages: 407809
nosy: asvetlov, hyzyla, yselivanov
priority: normal
severity: normal
status: open
title: asyncio.Semaphore waiters deqeueu doesn't work
versions: Python 3.8

___
Python tracker 

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



[issue45620] A misleading url in 'Floating Point Arithmetic' page

2021-12-06 Thread Eric V. Smith


Change by Eric V. Smith :


--
resolution: works for me -> 
stage: resolved -> 
status: closed -> open

___
Python tracker 

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



[issue43153] tempfile seems to treat a file as a directory when processing an exception in the onerror()

2021-12-06 Thread Ken Jin


Change by Ken Jin :


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

___
Python tracker 

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



[issue45995] string formatting: normalize negative zero

2021-12-06 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

It was decided long ago that % formatting would not be enhanced with new 
features. I think that it is supposed to match the standard C formatting codes, 
and nothing else.

So this is unlikely to be approved for % formatting.

It *might* be approved for the format method and f-strings. (I suspect that 
unless you get immediate and uncontroversial agreement from multiple core 
developers, you may need to take it for further discussion and perhaps even a 
PEP.)

What you call a "distraction" I consider to be critical part of the display. 
The numbers you are displaying actually are negative, and rounding them for 
display does not change that. So they ought to show the minus sign. So I'm not 
really very sympathetic to this feature request.

--
nosy: +steven.daprano
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



[issue45996] Worse error from asynccontextmanager in Python 3.10

2021-12-06 Thread Thomas Grainger


Thomas Grainger  added the comment:

I think `AttributeError: args` is the desired/expected behaviour

consider the sync version:

```
import logging
from asyncio import sleep, gather, run
from contextlib import asynccontextmanager, contextmanager

@contextmanager
def foo():
yield


def test():
f = foo()
f.__enter__()
f.__enter__()

test()
```

```
Traceback (most recent call last):
  File "/home/graingert/projects/example/sync.py", line 15, in 
test()
  File "/home/graingert/projects/example/sync.py", line 13, in test
f.__enter__()
  File "/usr/lib/python3.9/contextlib.py", line 117, in __enter__
del self.args, self.kwds, self.func
AttributeError: args
```

--

___
Python tracker 

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



[issue45996] Worse error from asynccontextmanager in Python 3.10

2021-12-06 Thread Thomas Grainger


Thomas Grainger  added the comment:

or consider the trio version:

```
import logging
import trio
from contextlib import asynccontextmanager

@asynccontextmanager
async def foo():
await trio.sleep(1)
yield


async def test():
async with trio.open_nursery() as n:
f = foo()
n.start_soon(f.__aenter__)
n.start_soon(f.__aenter__)

trio.run(test)
```

```
Traceback (most recent call last):
  File "/home/graingert/projects/examples/bar.py", line 17, in 
trio.run(test)
  File 
"/home/graingert/.virtualenvs/testing39/lib/python3.9/site-packages/trio/_core/_run.py",
 line 1932, in run
raise runner.main_task_outcome.error
  File "/home/graingert/projects/examples/bar.py", line 15, in test
n.start_soon(f.__aenter__)
  File 
"/home/graingert/.virtualenvs/testing39/lib/python3.9/site-packages/trio/_core/_run.py",
 line 815, in __aexit__
raise combined_error_from_nursery
  File "/usr/lib/python3.9/contextlib.py", line 179, in __aenter__
del self.args, self.kwds, self.func
AttributeError: args
```

--

___
Python tracker 

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



[issue45582] Rewrite getpath.c in Python

2021-12-06 Thread neonene


Change by neonene :


--
pull_requests: +28166
pull_request: https://github.com/python/cpython/pull/29941

___
Python tracker 

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



[issue45996] Worse error from asynccontextmanager in Python 3.10

2021-12-06 Thread Thomas Grainger


Thomas Grainger  added the comment:

ah I can repeat this on python3.8.10 trio but not python3.9.9 trio:

```
import logging
import trio
from contextlib import asynccontextmanager

@asynccontextmanager
async def foo():
await trio.sleep(1)
yield


async def test():
async with trio.open_nursery() as n:
f = foo()
n.start_soon(f.__aenter__)
n.start_soon(f.__aenter__)

trio.run(test)

```

```
Traceback (most recent call last):
  File "bar.py", line 17, in 
trio.run(test)
  File 
"/home/graingert/.virtualenvs/osirium-main/lib/python3.8/site-packages/trio/_core/_run.py",
 line 1932, in run
raise runner.main_task_outcome.error
  File "bar.py", line 15, in test
n.start_soon(f.__aenter__)
  File 
"/home/graingert/.virtualenvs/osirium-main/lib/python3.8/site-packages/trio/_core/_run.py",
 line 815, in __aexit__
raise combined_error_from_nursery
  File "/usr/lib/python3.8/contextlib.py", line 171, in __aenter__
return await self.gen.__anext__()
RuntimeError: anext(): asynchronous generator is already running
```

--

___
Python tracker 

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



[issue45996] Worse error from asynccontextmanager in Python 3.10

2021-12-06 Thread Thomas Grainger


Thomas Grainger  added the comment:

I see the change here: 
https://github.com/python/cpython/commit/1c5c9c89ffc36875afaf4c3cc6a716d4bd089bbf#diff-e00601a380ba6c916ba4333277fe6ea43d2477804002ab1ae64480f80fec8e3aR177-R179

this is intentionally implementing https://bugs.python.org/issue30306 for 
asynccontextmanagers that was initially missing

--

___
Python tracker 

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



[issue45957] _tkinter.TclError: expected boolean value but got ""

2021-12-06 Thread E. Paine


E. Paine  added the comment:

I cannot reproduce on Ubuntu 21.10 (Tk 8.6.11), so I believe we can close this 
issue.

--
type: behavior -> crash

___
Python tracker 

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



[issue7325] tempfile.mkdtemp() does not return absolute pathname when relative dir is specified

2021-12-06 Thread Irit Katriel


Irit Katriel  added the comment:

It's still the same in 3.11. I don't know whether this is something to fix in 
the code or in the docs.

>> import tempfile
>>> tempfile.mkdtemp(dir='.')
'./tmplvkt14za'
>>> tempfile.mkstemp(dir='.')
(3, '/Users/iritkatriel/src/cpython/tmp86ljh34k')

--
nosy: +iritkatriel
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.2, Python 
3.3, Python 3.4

___
Python tracker 

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



[issue45996] Worse error from asynccontextmanager in Python 3.10

2021-12-06 Thread Thomas Grainger


Thomas Grainger  added the comment:

you can see the analogous sync contextmanager issue on python3.6 with:

```
import logging
from contextlib import contextmanager

@contextmanager
def foo():
yield


def test():
f = foo()
f.__enter__()
f.__enter__()

test()
```

on python3.7+ you get the bpo-30306 behaviour

```
Traceback (most recent call last):
  File "sync.py", line 14, in 
test()
  File "sync.py", line 12, in test
f.__enter__()
  File "/usr/lib/python3.8/contextlib.py", line 111, in __enter__
del self.args, self.kwds, self.func
AttributeError: args
```

and python3.6 you get the same sort of error you see now for 
asynccontextmanagers:

```
Traceback (most recent call last):
  File "sync.py", line 14, in 
test()
  File "sync.py", line 12, in test
f.__enter__()
  File "/usr/lib/python3.6/contextlib.py", line 83, in __enter__
raise RuntimeError("generator didn't yield") from None
RuntimeError: generator didn't yield
```

--

___
Python tracker 

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



[issue44525] Implement CALL_FUNCTION adaptive interpreter optimizations

2021-12-06 Thread Mark Shannon


Change by Mark Shannon :


--
pull_requests: +28167
pull_request: https://github.com/python/cpython/pull/29942

___
Python tracker 

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



[issue15013] [doc] smtplib: add low-level APIs to doc?

2021-12-06 Thread Irit Katriel


Change by Irit Katriel :


--
title: smtplib: add low-level APIs to doc? -> [doc] smtplib: add low-level APIs 
to doc?
type:  -> enhancement
versions: +Python 3.11 -Python 2.7, Python 3.2, Python 3.3

___
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() fails with Tcl/Tk 8.6.11

2021-12-06 Thread E. Paine


E. Paine  added the comment:

> Any word on the tk Menu type parameter change?

I'll admit to having completely forgot about this issue and not raising it with 
the Tk team. Manually trying this case on Tk 8.6.12 segfaults, so I really need 
to raise it. To reproduce the segfault, simply run the top command in Python, 
or the bottom command in Wish:

tk.Menu(type="")
menu .m -type {}

--

___
Python tracker 

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



[issue29309] Interpreter hang when interrupting a loop.run_in_executor() future

2021-12-06 Thread Irit Katriel


Irit Katriel  added the comment:

@asyncio.coroutine was removed in 3.10, and the run_in_executor.py doesn't run 
with async def because that does not allow yield.

I'll close this as out of date, please create a new issue if you are still 
having a related problem with async def.

--
nosy: +iritkatriel
resolution:  -> out of date
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



[issue36392] IPv4Interface Object has no attributte prefixlen

2021-12-06 Thread Ken Jin


Ken Jin  added the comment:

The link to what Andrei is referring to:
https://docs.python.org/3/library/ipaddress.html#ipaddress.IPv4Network.prefixlen

--

___
Python tracker 

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



[issue45998] Document best practice for including and linking python framework

2021-12-06 Thread Ronald Oussoren


New submission from Ronald Oussoren :

There are two ways to develop against a Python.framework on MacOS:

1. Use the regular Unix pattern with "#include "Python.h", using compiler flags 
to select the right headers and libraries.

2. Using the native framework pattern with "#import " and 
"-framework Python"

Both works, but the latter has the disadvantage of loosing control over which 
version of Python is used when multiple versions are installed.  The version is 
selected by the "Current" link in the framework, which is overwritten to point 
to whatever version was last installed or updated.

IMHO we should document this pitfall in the C API documentation.

--
assignee: docs@python
components: Documentation, macOS
messages: 407821
nosy: docs@python, ned.deily, ronaldoussoren
priority: normal
severity: normal
stage: needs patch
status: open
title: Document best practice for including and linking python framework
type: enhancement
versions: Python 3.10, Python 3.11

___
Python tracker 

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



[issue45995] string formatting: normalize negative zero

2021-12-06 Thread John Belmonte


John Belmonte  added the comment:

Here is the same proposal made for C++ `std::format`:

  http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2020/p1496r2.pdf

It makes fair arguments for the feature's use, and explains why the problem is 
hard to work around.

It was withdrawn by the author for C++20, but a consensus proposal is promised 
for C++23.

--

___
Python tracker 

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



[issue13548] line number when tracing an implicit return

2021-12-06 Thread Irit Katriel


Irit Katriel  added the comment:

Reproduced on 3.11. 


An implicit return doesn't have a line, so it's not clear what should happen. 
Assigning the next line to it wouldn't be correct either (it could be the first 
line of the next function). 

We could say that in this case there is no line event, just a return event 
(unless that messes up the tracer somehow).

If you add a return statement it makes sense:

/Users/iritkatriel/src/cpython/mm.py 7 call
/Users/iritkatriel/src/cpython/mm.py 8 line
/Users/iritkatriel/src/cpython/mm.py 10 line
/Users/iritkatriel/src/cpython/mm.py 11 line
/Users/iritkatriel/src/cpython/mm.py 14 line
/Users/iritkatriel/src/cpython/mm.py 14 return

(line 13 does not appear because that's the else, the return is assigned line 
14 which is where it really is).

--
nosy: +iritkatriel
title: Invalid 'line' tracer event on pass within else clause -> line number 
when tracing an implicit return
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.2, Python 
3.3

___
Python tracker 

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



[issue45997] asyncio.Semaphore waiters deque doesn't work

2021-12-06 Thread Alex Waygood


Change by Alex Waygood :


--
title: asyncio.Semaphore waiters deqeueu doesn't work -> asyncio.Semaphore 
waiters deque doesn't work

___
Python tracker 

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



[issue45997] asyncio.Semaphore waiters deque doesn't work

2021-12-06 Thread Alex Waygood


Change by Alex Waygood :


--
type:  -> behavior

___
Python tracker 

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



[issue45999] Links to packaging broken

2021-12-06 Thread Douglas Wright


New submission from Douglas Wright :

Links in this section from the docs from 3.9 and newer are currently broken.

https://docs.python.org/3.9/distributing/index.html#reading-the-python-packaging-user-guide

They are currently leading to a "page not found" error.

--
assignee: docs@python
components: Documentation
messages: 407824
nosy: docs@python, douglas277
priority: normal
severity: normal
status: open
title: Links to packaging broken
versions: Python 3.10, 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



[issue46000] NetBSD curses compatibility

2021-12-06 Thread Thomas Klausner


New submission from Thomas Klausner :

The code in Modules/_cursesmodule.c has an assumption on ncurses.
The attached simple patch fixes this and works with both NetBSD curses and 
ncurses.

--
components: Extension Modules
files: patch-Modules___cursesmodule.c
messages: 407825
nosy: wiz
priority: normal
severity: normal
status: open
title: NetBSD curses compatibility
type: behavior
versions: Python 3.10
Added file: https://bugs.python.org/file50480/patch-Modules___cursesmodule.c

___
Python tracker 

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



[issue12413] make faulthandler dump traceback of child processes

2021-12-06 Thread STINNER Victor


STINNER Victor  added the comment:

There is not activity for 10 years. I consider that this feature is not really 
needed. I reject this feature request.

--
resolution:  -> rejected
stage: needs patch -> 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



[issue45950] Reintroduce bootstrap_python for freezing

2021-12-06 Thread Christian Heimes


Christian Heimes  added the comment:


New changeset 612e59b53f0c730ce1b881f7c08dc6d49f02c123 by Christian Heimes in 
branch 'main':
bpo-45950: Fix macOS framework builds of _bootstrap_python (GH-29936)
https://github.com/python/cpython/commit/612e59b53f0c730ce1b881f7c08dc6d49f02c123


--

___
Python tracker 

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



[issue44016] Enum related deprecation warnings in test_httpservers and test_faulthandler

2021-12-06 Thread STINNER Victor


STINNER Victor  added the comment:

test_httpservers warnings have been fixed.

I cannot reproduce test_faulthandler warnings. I close the issue. If someone 
still gets warnnings in test_faulthandler, please provide the full command line 
to reproduce them.


commit d3b9134ebb40bdb01ff52a37515c7c96970c9a0b
Author: Shreyan Avigyan 
Date:   Tue May 4 00:57:47 2021 +0530

Remove Enum warnings from test_httpservers (GH-25844)

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



[issue21952] fnmatch.py can appear in tracemalloc diffs

2021-12-06 Thread STINNER Victor


STINNER Victor  added the comment:

Exposing internal caches in tracemalloc is not a bug but a deliberate choice. 
It's easy to write your own filters to ignore selected files (or even specific 
functions if you can locate them by line nubmers).

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



[issue45950] Reintroduce bootstrap_python for freezing

2021-12-06 Thread Christian Heimes


Christian Heimes  added the comment:

Ned, I have implemented a fix for _bootstrap_python for framework builds and 
re-enabled --with-build-python for all builds. Previously I disabled the option 
for standard builds, because --with-build-python can cause build issues when a 
user runs ./configure --with-build-python with an older 3.11 alpha build.

--

___
Python tracker 

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



[issue31139] Improve tracemalloc demo code in docs

2021-12-06 Thread STINNER Victor


STINNER Victor  added the comment:

https://github.com/python/cpython/pull/3020 is closed, I close this issue as 
well.

--
resolution:  -> out of date
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



[issue45973] Not possible to clear PyImport_Inittab after PyImport_AppendInittab

2021-12-06 Thread STINNER Victor


STINNER Victor  added the comment:

Currently, the global variable PyImport_Inittab is used. It should be made 
per-interpreter and I suggest to add something like PyConfig_AppendInittab() to 
the PyConfig API, so the configuration change would only impact a single 
interpreter. It would be possible to run two interpreters with two different 
inittab configuration.

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



[issue22815] unexpected successes are not output

2021-12-06 Thread Irit Katriel


Irit Katriel  added the comment:

I think this has been fixed:

% cat mm.py 
import unittest

class TestStringMethods(unittest.TestCase):

@unittest.expectedFailure
def test_upper(self):
self.assertEqual(2, 2)

if __name__ == '__main__':
unittest.main()




% ./python.exe mm.py 
x
--
Ran 1 test in 0.001s

OK (expected failures=1)
iritkatriel@Irits-MBP cpython % vi mm.py  
iritkatriel@Irits-MBP cpython % ./python.exe mm.py
u
--
Ran 1 test in 0.000s

FAILED (unexpected successes=1)

--
nosy: +iritkatriel
resolution:  -> out of date
status: open -> pending

___
Python tracker 

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



[issue22815] unexpected successes are not output

2021-12-06 Thread Irit Katriel


Irit Katriel  added the comment:

Or do you mean that there should be more output?

--
status: pending -> open

___
Python tracker 

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



[issue45973] Not possible to clear PyImport_Inittab after PyImport_AppendInittab

2021-12-06 Thread STINNER Victor


STINNER Victor  added the comment:

See also bpo-1 (fixed).

--

___
Python tracker 

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



[issue45997] asyncio.Semaphore waiters deqeueu doesn't work

2021-12-06 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Good point.
Currently, asyncio lock objects don't provide a strong FIFO guarantee.

In a tight loop, a task can re-acquire the lock just after releasing even if 
there are pending waiters that were scheduled earlier. It's true also for Lock, 
Conditional, Event, etc.

The solution requires *async* release method. Since the change is not backward 
compatible, a new method should be added, e.g. `await sem.release_and_wait()` 
for endorsing the context switch if there are pending waiters.

async context manager can be modified for using the new method without backward 
compatibility problems easily.

A hero who can help is welcome!

--
assignee:  -> asvetlov
title: asyncio.Semaphore waiters deque doesn't work -> asyncio.Semaphore 
waiters deqeueu doesn't work
type: behavior -> 

___
Python tracker 

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



[issue46001] JSON module documentation mentions OverflowError for case that raises RecursionError

2021-12-06 Thread James Gerity


New submission from James Gerity :

The docstrings for `json.JSONEncoder, json.dump(), json.dumps()` all refer to 
`OverflowError` when describing the behavior of the `check_circular` parameter, 
but the module's test of this parameter catches a `RecursionError` and the 
documentation does make reference to recursion.

Since the fix for bpo-43225 (7b78d43) the string-escaping machinery in 
`_json.c` is capable of raising OverflowError, but the reference in the 
documentation predates this addition by quite a long time.

--
assignee: docs@python
components: Documentation
messages: 407837
nosy: SnoopJeDi, docs@python
priority: normal
severity: normal
status: open
title: JSON module documentation mentions OverflowError for case that raises 
RecursionError
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



[issue45755] Specialized generic class does not return class attributes in dir

2021-12-06 Thread Ken Jin


Ken Jin  added the comment:

Not exactly sure if this is a bug, but the reason is that Foo[int] used to be a 
class, now it's a plain object. It's a change brought in 3.7 by PEP 560.

3.6:
>>> isinstance(Foo[int], type)
True
>>> Foo[int].__dir__
>> type(Foo[int].__dir__)


main:
>>> isinstance(Foo[int], type)
False
>>> Foo[int].__dir__

>>> type(Foo[int].__dir__)


The fix is just a 2-line change in either _GenericAlias or _BaseGenericAlias:
+def __dir__(self):
+return dir(self.__origin__)

Should we go ahead with this?

--

___
Python tracker 

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



[issue45994] Add simple usage to email module

2021-12-06 Thread Taiga Katarao


Taiga Katarao  added the comment:

There are the simplest example to send text email and a little bit complicated 
example to an email with some files.

However, beginners like me want simple example to create an email composed of 
the combination of multipart/alternative and multipart/mixed.

There are many web sites to explain sending an email composed of 
multipart/alternative and multipart/mixed, but all of them use MIMEText and 
MIMEMultipart, which can be replaced and simplified with EmailMessage like 
below.

```
import smtplib
from email.message import EmailMessage

msg = EmailMessage()
msg['From'] = 'f...@example.com'
msg['To'] = 't...@example.com'
msg['Subject'] = 'Subject'

msg.add_alternative('Hello, world.', subtype='text')
msg.add_alternative('Helo, world.', subtype='html')
with open('example.pdf', 'rb') as f:
msg.add_attachment(
f.read(),
maintype='application',
subtype='pdf',
filename='example.pdf'
)

with smtplib.SMTP('SMTP_HOST', 'SMTP_PORT') as smtp:
smtp.starttls()
smtp.login('USER', 'PASSWORD')
smtp.send_message(msg)
```

Of cause I know we can obtain the code above from the combination of existing 
example codes, but it's a little bit difficult.

I guess the reason why they cannot find simple way partially because the 
official documentation does not provide example.

--

___
Python tracker 

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



[issue46001] JSON module documentation mentions OverflowError for case that raises RecursionError

2021-12-06 Thread James Gerity


Change by James Gerity :


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

___
Python tracker 

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



[issue46002] py Launcher for Windows with MSYS2

2021-12-06 Thread Tze Chian Kam


New submission from Tze Chian Kam :

Using "pyenv" for python installations. "py" launcher detects all installed 
python versions from "pyenv". When using the shebang feature, if the following 
shebang is specified, "#!/usr/bin/env python -V", it will detect python version 
of "3.9.9" from MSYS2 (where the latest version is "3.9.9"). But MSYS2 python 
is not in registered in registry so it should not be detecting it.

--
components: Windows
messages: 407840
nosy: Zernoxi, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: py Launcher for Windows with MSYS2
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



[issue45997] asyncio.Semaphore waiters deque doesn't work

2021-12-06 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Or, maybe, there is a way to do everything without changing public API.

The idea is: _wake_up_next can create a future which is set by *waked up task* 
on its acquiring. acquire method should wait for this future first before 
entering in `while self._value < 0:` loop.

If the future is cancelled, `_wake_up_next` should be called again and waiting 
for the next future acquiring to be performed.

If there is no *acquire waiting* future exists -- do everything as usual.

All other lock objects should be modified also.

--
title: asyncio.Semaphore waiters deqeueu doesn't work -> asyncio.Semaphore 
waiters deque doesn't work
type:  -> behavior
versions: +Python 3.11 -Python 3.8

___
Python tracker 

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



[issue46002] py Launcher for Windows with MSYS2

2021-12-06 Thread Tze Chian Kam


Tze Chian Kam  added the comment:

This is not in a a virtual environment by the way.

--

___
Python tracker 

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



[issue45997] asyncio.Semaphore waiters deque doesn't work

2021-12-06 Thread Yevhenii Hyzyla


Yevhenii Hyzyla  added the comment:

Thanks for response!

> A hero who can help is welcome!

I will try to make PR :raising_hand

--
type: behavior -> 
versions: +Python 3.8 -Python 3.11

___
Python tracker 

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



[issue45934] python curses newterm implementation

2021-12-06 Thread Julius Hamilton

Julius Hamilton  added the comment:

I’m currently planning on studying the C code for initscr and newterm so I can 
really understand how they work.

I’ll post any updates about this soon.

Thanks.

--

___
Python tracker 

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



[issue31879] Launcher fails on custom command starting with "python"

2021-12-06 Thread Steve Dower


Steve Dower  added the comment:

Not sure if Mark and Martin are part of an expert group, but neither are active 
in this area these days.

For the original question, I have no idea why the command can't use a builtin 
name, so hard to say whether we'd change it. A summary of why it's broken and 
what the fix would be is needed before we can say whether the change would be 
accepted or not.

--

___
Python tracker 

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



[issue45582] Rewrite getpath.c in Python

2021-12-06 Thread Steve Dower


Steve Dower  added the comment:


New changeset af1db4eb555e02d2bff3476f99f7a653764203b0 by neonene in branch 
'main':
bpo-45582: Fix getpath_isxfile() and test_embed on Windows (GH-29930)
https://github.com/python/cpython/commit/af1db4eb555e02d2bff3476f99f7a653764203b0


--

___
Python tracker 

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



  1   2   >