[issue46906] Make _PyFloat_(Pack|Unpack)(4|8) cpython API, not internal.

2022-03-03 Thread STINNER Victor


STINNER Victor  added the comment:

I disagree. A function should be either fully public: tested, documented. Or 
fully internal.

In the past, many functions were in both, in the gray area.

If these functions are useful, please make them *public* and document them. I'm 
+1 to make these functions public.

--

___
Python tracker 

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



[issue46907] Update Windows and MacOS installer to SQLite 3.38.0.

2022-03-03 Thread Mariusz Felisiak


Change by Mariusz Felisiak :


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

___
Python tracker 

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



[issue46906] Add PyFloat_(Pack|Unpack)(2|4|8) to the public C API

2022-03-03 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +29775
stage: resolved -> patch review
pull_request: https://github.com/python/cpython/pull/31657

___
Python tracker 

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



[issue36709] Asyncio SSL keep-alive connections raise errors after loop close.

2022-03-03 Thread Kumar Aditya

Kumar Aditya  added the comment:

The original issue is fixed on main branch with bpo-44011 GH-31275,
It now only raises warnings but no exceptions:

---
(env) @kumaraditya303 ➜ /workspaces/cpython (latin1 ✗) $ python main.py
/workspaces/cpython/main.py:12: DeprecationWarning: There is no current event 
loop
  loop = asyncio.get_event_loop()
/workspaces/cpython/env/lib/python3.11/site-packages/certifi/core.py:36: 
DeprecationWarning: path is deprecated. Use files() instead. Refer to 
https://importlib-resources.readthedocs.io/en/latest/using.html#migrating-from-legacy
 for migration advice.
  _CACERT_CTX = get_path("certifi", "cacert.pem")
sys:1: ResourceWarning: unclosed 
ResourceWarning: Enable tracemalloc to get the object allocation traceback
/workspaces/cpython/Lib/asyncio/sslproto.py:116: ResourceWarning: unclosed 
transport 
  _warnings.warn(
/workspaces/cpython/Lib/asyncio/selector_events.py:710: ResourceWarning: 
unclosed transport <_SelectorSocketTransport fd=7>
  _warn(f"unclosed transport {self!r}", ResourceWarning, source=self)
ResourceWarning: Enable tracemalloc to get the object allocation traceback

---

@asvetlvo This can be closed now.

--
nosy: +kumaraditya303
type:  -> behavior
versions: +Python 3.11 -Python 3.7

___
Python tracker 

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



[issue46910] Expect IndentationError, get SyntaxError: 'break' outside loop

2022-03-03 Thread Jonathan Fine

New submission from Jonathan Fine :

This arises from a request for help made by Nguyễn Ngọc Tiến to the visually 
impaired programmers lists, see 
https://www.freelists.org/post/program-l/python,48. Please keep this in mind.

Nguyễn asked for help with the syntax error created by
===
count = 0
while count < 1:
 count = count + 1
 print(count)
break
 else:
 print("no break")
===

When I saved this to a file and ran it I got:
===
$ python3.8 funny_break_error.py 
  File "funny_break_error.py", line 6
else:
^
IndentationError: unexpected indent
===

However, remove the last two lines and you get the more helpful error
===
$ python3.8 funny_break_error.py 
  File "funny_break_error.py", line 5
break
^
SyntaxError: 'break' outside loop
===

Python3.6 and 3.7 also behave as above.

Note. I've heard that blind Python programmers prefer a single space to denote 
indent. I think this is because they hear the leading spaces via a screen 
reader, rather than see the indent with their eyes.

--
components: Parser
files: funny_break_error.py
messages: 414424
nosy: jfine2358, lys.nikolaou, pablogsal
priority: normal
severity: normal
status: open
title: Expect IndentationError, get SyntaxError: 'break' outside loop
type: behavior
versions: Python 3.7, Python 3.8
Added file: https://bugs.python.org/file50655/funny_break_error.py

___
Python tracker 

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



[issue45062] test_asyncio: test_huge_content_recvinto() failed on PPC64LE RHEL8 Refleaks 3.9

2022-03-03 Thread STINNER Victor


STINNER Victor  added the comment:

I didn't see this failure recently, I just close the issue.

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



[issue46832] unicodeobject.c doesn't compile when defined EXPERIMENTAL_ISOLATED_SUBINTERPRETERS, variable "interned" not found

2022-03-03 Thread STINNER Victor


STINNER Victor  added the comment:

This build flag is experimental and unsupported. If you care, you should target 
Python 3.11 which is currently under development.

--

___
Python tracker 

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



[issue46623] test_zlib: test_pair() and test_speech128() fail with s390x hardware accelerator

2022-03-03 Thread Petr Viktorin


Petr Viktorin  added the comment:

The current fix skips all of the tests, rather than just the parts that fail.

--
nosy: +petr.viktorin
resolution: fixed -> 
status: closed -> open

___
Python tracker 

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



[issue6634] [doc] sys.exit() called from threads other than the main one: undocumented behaviour

2022-03-03 Thread Irit Katriel


Irit Katriel  added the comment:


New changeset 10117f1d8cb49ce95493555c06050faf636ccee7 by vidhya in branch 
'main':
bpo-6634: [doc] clarify that sys.exit() does not always exit the interpreter 
(GH-31639)
https://github.com/python/cpython/commit/10117f1d8cb49ce95493555c06050faf636ccee7


--

___
Python tracker 

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



[issue6634] [doc] sys.exit() called from threads other than the main one: undocumented behaviour

2022-03-03 Thread miss-islington


Change by miss-islington :


--
pull_requests: +29779
pull_request: https://github.com/python/cpython/pull/31661

___
Python tracker 

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



[issue6634] [doc] sys.exit() called from threads other than the main one: undocumented behaviour

2022-03-03 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 11.0 -> 12.0
pull_requests: +29778
pull_request: https://github.com/python/cpython/pull/31660

___
Python tracker 

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



[issue46061] GCState *gcstate = get_gc_state() gives fatal error in Python 3.10.2

2022-03-03 Thread Eric V. Smith


Eric V. Smith  added the comment:

> I was running one python script

Again: you need to show us the script that's causing this problem. I (and 
millions of others) run scripts all the time which do not fail in the way you 
describe. Unless you show us a script that causes the problem, we cannot help 
you.

--

___
Python tracker 

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



[issue46906] Add PyFloat_(Pack|Unpack)(2|4|8) to the public C API

2022-03-03 Thread STINNER Victor


STINNER Victor  added the comment:

I reopen the issue, I would like to make these functions public :-) I searched 
for the 6 functions moved to the internal C API and I found 6 projets using it 
in the top 5000 PyPI projects (at 2022-01-26):

* msgpack
* ddtrace
* bitstruct
* pickle5
* line_profiler
* zodbpickle

The 6 functions are used:

* _PyFloat_Pack2()
* _PyFloat_Pack4()
* _PyFloat_Pack8()
* _PyFloat_Unpack2()
* _PyFloat_Unpack4()
* _PyFloat_Unpack8()

--
resolution: rejected -> 
status: closed -> open
title: Make _PyFloat_(Pack|Unpack)(4|8) cpython API, not internal. -> Add 
PyFloat_(Pack|Unpack)(2|4|8) to the public C API

___
Python tracker 

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



[issue46891] Crash in ModuleType subclass with __slots__

2022-03-03 Thread Mark Shannon


Mark Shannon  added the comment:


New changeset 751c9ed801ad1189272ca10f0749bfc9d49b5038 by Mark Shannon in 
branch 'main':
bpo-46891: Fix creating a new instance of a module subclass with slots 
(GH-31643)
https://github.com/python/cpython/commit/751c9ed801ad1189272ca10f0749bfc9d49b5038


--

___
Python tracker 

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



[issue46832] unicodeobject.c doesn't compile when defined EXPERIMENTAL_ISOLATED_SUBINTERPRETERS, variable "interned" not found

2022-03-03 Thread Kumar Aditya


Kumar Aditya  added the comment:

@vstinner it is broken on main branch also.

--
nosy: +kumaraditya303

___
Python tracker 

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



[issue37368] test_asyncio: test_create_server_ssl_match_failed() failed on s390x SLES 3.x and logged an unraisable exception

2022-03-03 Thread STINNER Victor


STINNER Victor  added the comment:

I failed to reproduce the issue with:

"./python -m test test_asyncio -m test_create_server_ssl_match_failed -F -j50 
--fail-env-changed"

It ran 1000 iterations in 5 minutes with a load average of 50 (my laptop has 4 
CPU cores: 8 threads).

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



[issue46911] Early tracing has lineno=None for modules

2022-03-03 Thread Ned Batchelder


New submission from Ned Batchelder :

Coverage.py has a trick to measure the early execution of stdlib modules. It 
has an "encodings.py" file that sets a trace function, then gets out of the way 
to let the real encodings.py execute.  In 3.11.0a5, that early trace function 
gets None values for the line numbers when modules were first executed.

To reproduce, create two files, encodings.py and prog.py:

--- 8< --
# encodings.py
import sys

class FullCoverageTracer:
def __init__(self):
self.traces = []

def fullcoverage_trace(self, *args):
frame, event, arg = args
if frame.f_lineno is None:
self.traces.append((frame.f_code.co_name, frame.f_code.co_filename))
return self.fullcoverage_trace

sys.settrace(FullCoverageTracer().fullcoverage_trace)

parentdir = max(filter(__file__.startswith, sys.path), key=len)
sys.path.remove(parentdir)
del sys.modules['encodings']
import encodings
-

--- 8< --
# prog.py
import sys

print(sys.version)
trace = sys.gettrace()
print("None traces:", trace.__self__.traces)
print("Hello")
-

Then run:

% PYTHONPATH=$(pwd) python3.10 prog.py
3.10.2 (main, Jan 15 2022, 05:51:59) [Clang 12.0.0 (clang-1200.0.32.29)]
None traces: []
Hello

% PYTHONPATH=$(pwd) python3.11 prog.py
3.11.0a5 (main, Feb  3 2022, 19:11:58) [Clang 12.0.0 (clang-1200.0.32.29)]
None traces: [('', 
'/usr/local/pyenv/pyenv/versions/3.11.0a5/lib/python3.11/encodings/__init__.py'),
 ('', ''), ('', 
'/usr/local/pyenv/pyenv/versions/3.11.0a5/lib/python3.11/encodings/aliases.py'),
 ('', 
'/usr/local/pyenv/pyenv/versions/3.11.0a5/lib/python3.11/encodings/utf_8.py'), 
('', ''), ('', ''), ('', 
''), ('', ''), ('', ''), 
('', ''), ('', ''), 
('', ''), ('', ''), 
('', ''), ('', 
'/System/Volumes/Data/root/src/bugs/fullcov/prog.py')]
Hello

--
components: Interpreter Core
keywords: 3.11regression
messages: 414438
nosy: Mark.Shannon, nedbat
priority: normal
severity: normal
status: open
title: Early tracing has lineno=None for modules
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



[issue46389] 3.11: unused generator comprehensions cause f_lineno==None

2022-03-03 Thread Ned Batchelder


Ned Batchelder  added the comment:

Yes, this is fixed, thanks.

--

___
Python tracker 

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



[issue46874] [sqlite3] optimise user-defined functions

2022-03-03 Thread Erlend E. Aasland


Change by Erlend E. Aasland :


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



[issue46906] Add PyFloat_(Pack|Unpack)(2|4|8) to the public C API

2022-03-03 Thread STINNER Victor


STINNER Victor  added the comment:

The pack/unpack functions have been moved to the internal C API by this change:

commit 0a883a76cda8205023c52211968bcf87bd47fd6e
Author: Victor Stinner 
Date:   Thu Oct 14 23:41:06 2021 +0200

bpo-35134: Add Include/cpython/floatobject.h (GH-28957)

Split Include/floatobject.h into sub-files: add
Include/cpython/floatobject.h and
Include/internal/pycore_floatobject.h.

--

___
Python tracker 

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



[issue46891] Crash in ModuleType subclass with __slots__

2022-03-03 Thread Mark Shannon


Change by Mark Shannon :


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

___
Python tracker 

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



[issue46832] unicodeobject.c doesn't compile when defined EXPERIMENTAL_ISOLATED_SUBINTERPRETERS, variable "interned" not found

2022-03-03 Thread Kumar Aditya


Change by Kumar Aditya :


--
nosy: +eric.snow, vstinner

___
Python tracker 

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



[issue45062] test_asyncio: test_huge_content_recvinto() failed on PPC64LE RHEL8 Refleaks 3.9

2022-03-03 Thread Kumar Aditya


Kumar Aditya  added the comment:

@vstinner This issue has not been happening on the CI recently so can this be 
marked as pending or even close it and reopen when it does fail?

--
nosy: +kumaraditya303

___
Python tracker 

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



[issue46906] Add PyFloat_(Pack|Unpack)(2|4|8) to the public C API

2022-03-03 Thread STINNER Victor


STINNER Victor  added the comment:

I prepared a pythoncapi_compat PR to provide these functions to Python 3.10 and 
older:
https://github.com/pythoncapi/pythoncapi_compat/pull/26

Note: bpo-11734 (commit 7c4e409d075fdb923807513353b18a75a4520eba) added 
_PyFloat_Pack2() and _PyFloat_Unpack2() to Python 3.6.0b1.

--

___
Python tracker 

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



[issue46906] Add PyFloat_(Pack|Unpack)(2|4|8) to the public C API

2022-03-03 Thread STINNER Victor


Change by STINNER Victor :


--
nosy: +lemburg, mark.dickinson, rhettinger, stutzbach

___
Python tracker 

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



[issue37368] test_asyncio: test_create_server_ssl_match_failed() failed on s390x SLES 3.x and logged an unraisable exception

2022-03-03 Thread Kumar Aditya


Kumar Aditya  added the comment:

This is outdated as the last failure was almost a year ago. This should be 
closed or at least marked pending @vstinner.

--
nosy: +kumaraditya303

___
Python tracker 

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



[issue16535] json encoder unable to handle decimal

2022-03-03 Thread Luca Lesinigo


Change by Luca Lesinigo :


--
nosy: +luca.lesinigo

___
Python tracker 

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



[issue46909] Update getpath.py to look for os.pyc in __pycache__ folders

2022-03-03 Thread Russel Webber


New submission from Russel Webber :

The STDLIB_LANDMARKS in Modules/getpath,py refers to os.pyc in an old location:
 STDLIB_LANDMARKS = [f'{STDLIB_SUBDIR}/os.py', f'{STDLIB_SUBDIR}/os.pyc']

Since https://www.python.org/dev/peps/pep-3147 the .pyc files are in 
__pycache__ folders.

The STDLIB_LANDMARKS should be updated.

--
assignee: docs@python
components: Documentation, Extension Modules, Interpreter Core
messages: 414421
nosy: RusselWebber, docs@python, ned.deily, steve.dower
priority: normal
severity: normal
status: open
title: Update getpath.py to look for os.pyc in __pycache__ folders
type: behavior
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



[issue46886] ARM64 Windows Non-Debug 3.x: random build error: failure during conversion to COFF: file invalid or corrupt

2022-03-03 Thread STINNER Victor


STINNER Victor  added the comment:

> I guess we can close the ticket and can reopen if it happens again.

Ok, let's do that!

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



[issue46894] make install DESTDIR= uses /lib/python3.10/lib-dynload out of DESTDIR

2022-03-03 Thread Дилян Палаузов

Дилян Палаузов  added the comment:

I want to compile and install python for a chrooted environment.  --prefix are 
the path within the chrooted-environment.  DESTDIR is the location of the root 
of the chrooted-environment.

When I glue DESTDIR with --prefix= (thus use no DESTDIR) this happens:

/lib/python3.10/_sysconfigdata__linux_x86_64-linux-gnu.py contains the value of 
--prefix.  When python is executed within the chrooted environment, this value 
is just wrong.

`strings python` also prints the value of --prefix.  Within the chrooted 
environment, that value is not correct.

--

___
Python tracker 

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



[issue46903] Crash when setting attribute with string subclass as the name (--with-pydebug)

2022-03-03 Thread Mark Shannon


Change by Mark Shannon :


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

___
Python tracker 

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



[issue45065] test_asyncio failed (env changed) on s390x RHEL8 Refleaks 3.10: RuntimeError('Event loop is closed') in _SSLProtocolTransport.__del__

2022-03-03 Thread STINNER Victor


STINNER Victor  added the comment:

I didn't see this issue recently, I close the issue.

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



[issue46874] [sqlite3] optimise user-defined functions

2022-03-03 Thread Dong-hee Na


Dong-hee Na  added the comment:


New changeset 88567a997005c9388137cd18c5d7f4483423dac3 by Erlend Egeberg 
Aasland in branch 'main':
bpo-46874: Speed up sqlite3 user-defined aggregate 'step' method (GH-31604)
https://github.com/python/cpython/commit/88567a997005c9388137cd18c5d7f4483423dac3


--
nosy: +corona10

___
Python tracker 

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



[issue46061] GCState *gcstate = get_gc_state() gives fatal error in Python 3.10.2

2022-03-03 Thread Ajaya Sutar


Ajaya Sutar  added the comment:

I was running one python script. At the time of python exit while calling 
Py_XDECREF(weakRefObject), it is calling giving exception in python 3.10.2. 

While debugging found  

In python 3.8.12, it is working fine with _PyRuntime.

void
PyObject_GC_Del(void *op)
{
PyGC_Head *g = AS_GC(op);
if (_PyObject_GC_IS_TRACKED(op)) {
gc_list_remove(g);
}
struct _gc_runtime_state *state = &_PyRuntime.gc;
if (state->generations[0].count > 0) {
state->generations[0].count--;
}
PyObject_FREE(g);
}

But in Python 3.10.2 it is not working with get_gc_state() giving exception. It 
seems it is memory issues. 

void
PyObject_GC_Del(void *op)
{
PyGC_Head *g = AS_GC(op);
if (_PyObject_GC_IS_TRACKED(op)) {
gc_list_remove(g);
}
GCState *gcstate = get_gc_state();
if (gcstate->generations[0].count > 0) {
gcstate->generations[0].count--;
}
PyObject_Free(g);
}

Could you please check this issue.
Is there any fix or any workaround for it. Because so many python script are 
failing at the exit of python interpreter.

Thanks in advance

--
status: pending -> open
title: Journal execution gives fatal error in Python 3.10.1 -> GCState *gcstate 
= get_gc_state() gives fatal error in Python 3.10.2

___
Python tracker 

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



[issue46389] 3.11: unused generator comprehensions cause f_lineno==None

2022-03-03 Thread Mark Shannon


Mark Shannon  added the comment:

Ned, is this fixed for you now?

--

___
Python tracker 

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



[issue39758] StreamWriter.wait_closed() can hang indefinitely.

2022-03-03 Thread Kumar Aditya


Kumar Aditya  added the comment:

On main branch with rewritten SSL implementation GH-31275 bpo-44011, this 
raises TimeoutError:


opened
close started

Traceback (most recent call last):
  File "/workspaces/cpython/main.py", line 18, in 
asyncio.run(main())
^^^
  File "/workspaces/cpython/Lib/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
   ^
  File "/workspaces/cpython/Lib/asyncio/base_events.py", line 645, in 
run_until_complete
return future.result()
   ^^^
  File "/workspaces/cpython/main.py", line 14, in main
await writer.wait_closed()
^^
  File "/workspaces/cpython/Lib/asyncio/streams.py", line 344, in wait_closed
await self._protocol._get_close_waiter(self)

TimeoutError: SSL shutdown timed out


This issue has been fixed, it can be closed @asvetlov.

--
nosy: +kumaraditya303
type: performance -> behavior
versions:  -Python 3.10, Python 3.8, Python 3.9

___
Python tracker 

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



[issue46909] Update getpath.py to look for os.pyc in __pycache__ folders

2022-03-03 Thread Steve Dower


Steve Dower  added the comment:

It's looking for a precompiled bundled stdlib, rather than one that's been 
generated from adjacent source files. This is deliberate (also quite an 
advanced scenario, but it does get used).

--
components:  -Documentation
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



[issue45065] test_asyncio failed (env changed) on s390x RHEL8 Refleaks 3.10: RuntimeError('Event loop is closed') in _SSLProtocolTransport.__del__

2022-03-03 Thread Kumar Aditya


Kumar Aditya  added the comment:

asyncio ssl implementation has been rewritten with bpo-44011: This is outdated 
now and should be closed @vstinner.

--
nosy: +kumaraditya303

___
Python tracker 

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



[issue46675] Allow more than 16 items in split-keys dicts and "virtual" object dicts.

2022-03-03 Thread Mark Shannon


Change by Mark Shannon :


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

___
Python tracker 

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



[issue46908] Debugger jumps to a wrong instruction in for loop

2022-03-03 Thread Francisco Arenas Afán de Rivera

New submission from Francisco Arenas Afán de Rivera :

I found that the debugger doesn't follow the normal program order when 
executing a foor loop with more than 3 instructions inside and one loop.

code example:

a = 0
b = 0
c = 0
for i in range(1):
a += 1
b += 1 # Set breakpoint here
c += 1 # Also crash with breakpoint here

jumps to the line b += 1 after the end of the loop and crashes with error: 
Process finished with exit code -1073741819 (0xC005)

--
messages: 414417
nosy: franarenasafan
priority: normal
severity: normal
status: open
title: Debugger jumps to a wrong instruction in for loop
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



[issue46389] 3.11: unused generator comprehensions cause f_lineno==None

2022-03-03 Thread Mark Shannon


Change by Mark Shannon :


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



[issue46845] dict: Use smaller entry for Unicode-key only dict.

2022-03-03 Thread Mark Shannon


Change by Mark Shannon :


--
pull_requests: +29777
pull_request: https://github.com/python/cpython/pull/31659

___
Python tracker 

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



[issue46907] Update Windows and MacOS installer to SQLite 3.38.0.

2022-03-03 Thread Erlend E. Aasland


Erlend E. Aasland  added the comment:

Steve, would you mind updating the cpython sources repo? (No hurry; let's see 
if a patch release surfaces first.)

--

___
Python tracker 

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



[issue43455] pathlib mistakenly assumes os.getcwd() is a resolved path in Windows

2022-03-03 Thread Tzu-ping Chung


Tzu-ping Chung  added the comment:

I believe this has been fixed in https://github.com/python/cpython/pull/25264

--

___
Python tracker 

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



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

2022-03-03 Thread Erlend E. Aasland


Change by Erlend E. Aasland :


--
nosy: +erlendaasland

___
Python tracker 

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



[issue46906] Make _PyFloat_(Pack|Unpack)(4|8) cpython API, not internal.

2022-03-03 Thread Inada Naoki


Change by Inada Naoki :


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



[issue46906] Make _PyFloat_(Pack|Unpack)(4|8) cpython API, not internal.

2022-03-03 Thread Inada Naoki


Inada Naoki  added the comment:

OK. By quick grepping, I found only msgpack and bitstruct use these API.
It is not enough number to make them public.

--

___
Python tracker 

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



[issue46907] Update Windows and MacOS installer to SQLite 3.38.0.

2022-03-03 Thread Erlend E. Aasland


Erlend E. Aasland  added the comment:

+1 for SQLite 3.38.0.

--

___
Python tracker 

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



[issue46907] Update Windows and MacOS installer to SQLite 3.38.0.

2022-03-03 Thread Mariusz Felisiak


Change by Mariusz Felisiak :


--
pull_requests: +29774
pull_request: https://github.com/python/cpython/pull/31656

___
Python tracker 

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



[issue46907] Update Windows and MacOS installer to SQLite 3.38.0.

2022-03-03 Thread Mariusz Felisiak


New submission from Mariusz Felisiak :

SQLite 3.37.0 was released on 2022-02-22: 
https://sqlite.org/releaselog/3_38_0.html

--
components: Windows, macOS
messages: 414412
nosy: erlendaasland, felixxm, ned.deily, paul.moore, ronaldoussoren, 
steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Update Windows and MacOS installer to SQLite 3.38.0.
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



[issue44800] Code readability: rename InterpreterFrame to `_Py_framedata`

2022-03-03 Thread STINNER Victor


STINNER Victor  added the comment:

Oh. I didn't know this issue. I recently made changes around PyFrameObject:

* Move PyFrameObject to the internal C API (see bpo-46836 for the rationale)
* Rename CFrame to _PyCFrame
* Rename InterpreterFrame to _PyInterpreterFrame

I prepared PRs for Cython, greenlet and gevent to use the internal C API 
pycore_frame.h to get the PyFrameObject structure:

https://bugs.python.org/issue46836#msg414283

For the short term, these projects should use the internal C API. But I sent a 
call to add getter and setter functions:

https://mail.python.org/archives/list/capi-...@python.org/thread/RCT4SB5LY5UPRRRALEOHWEQHIXFNTHYF/

If possible, it would be great to have a public C API so these projects don't 
use the internal C API at all, that's being discussed at:

* https://github.com/faster-cpython/ideas/issues/309
* https://bugs.python.org/issue40421

In terms of backward compatibility, since PyFrameObject is now part of the 
internal C API, we can break things. In practice... it's better to not break 
3rd party code too often. See for example Brandt Bucher who is directly 
impacted by these changes:

https://bugs.python.org/issue46836#msg414279

--
nosy: +vstinner

___
Python tracker 

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



[issue46913] UBSAN: test_ctypes, test_faulthandler and test_hashlib are failing

2022-03-03 Thread STINNER Victor


New submission from STINNER Victor :

I recently changed how tests are skipped in ASAN, MSAN and UBSAN CIs (buildbot 
workers and GitHub Action jobs):

* bpo-46633
* 
https://github.com/python/buildmaster-config/commit/0fd1e3e49e4b688d5767501484cccea5fa35d3fc

3 tests are now failing on "AMD64 Arch Linux Usan 3.x":

* test_ctypes
* test_faulthandler
* test_hashlib

First failed build:
https://buildbot.python.org/all/#/builders/719/builds/632

--
components: Tests
messages: 414455
nosy: pablogsal, vstinner
priority: normal
severity: normal
status: open
title: UBSAN: test_ctypes, test_faulthandler and test_hashlib are failing
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



[issue6634] [doc] sys.exit() called from threads other than the main one: undocumented behaviour

2022-03-03 Thread miss-islington


miss-islington  added the comment:


New changeset 9d9dc59d07d51d73e5af7dd506d0da63aa336995 by Miss Islington (bot) 
in branch '3.10':
bpo-6634: [doc] clarify that sys.exit() does not always exit the interpreter 
(GH-31639)
https://github.com/python/cpython/commit/9d9dc59d07d51d73e5af7dd506d0da63aa336995


--

___
Python tracker 

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



[issue6634] [doc] sys.exit() called from threads other than the main one: undocumented behaviour

2022-03-03 Thread Vidhya


Vidhya  added the comment:

Thanks Irit for your help.

On Thu., Mar. 3, 2022, 10:17 a.m. Irit Katriel, 
wrote:

>
> Irit Katriel  added the comment:
>
> Thank you @vidhya.
>
> --
> resolution:  -> fixed
> stage: patch review -> resolved
> status: open -> closed
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue46912] Full gc collection blocked from collecting after some amount of objects in oldest gen

2022-03-03 Thread Alexei Komarov


New submission from Alexei Komarov :

Hi!

Maybe it is just my misunderstanding of the mechanism, so please excuse me if 
it is so. Looking at the GC module code, I think that once there are X objects 
in the oldest gen, a full collection blocked due to the condition 
https://github.com/python/cpython/blob/3.10/Modules/gcmodule.c#L1465-L1467 
being always True.

So, if youngest gen is collected each 700 objects, the middle gen will have 
maximum 7000 objects. Full collection will be triggered each ~70K objects. X/4 
= 7 ===> X=28. If oldest gen has >280K objects in it, the condition for 
full collection (long_lived_pending < gcstate->long_lived_total / 4) is always 
true since to my understanding, long_lived_pending is 70K at most, and got 
zeroed each full collection 
(https://github.com/python/cpython/blob/3.10/Modules/gcmodule.c#L1253).

--
components: Extension Modules
messages: 41
nosy: al3x3i.k
priority: normal
severity: normal
status: open
title: Full gc collection blocked from collecting after some amount of objects 
in oldest gen
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



[issue46061] GCState *gcstate = get_gc_state() gives fatal error in Python 3.10.2

2022-03-03 Thread Eric V. Smith


Eric V. Smith  added the comment:

I understand. Then I'm going to close this issue, since there's nothing we can 
do.

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



[issue46913] UBSAN: test_ctypes, test_faulthandler and test_hashlib are failing

2022-03-03 Thread STINNER Victor


STINNER Victor  added the comment:

test_faulthandler: test_sigfpe() fails with:

==
FAIL: test_sigfpe (test.test_faulthandler.FaultHandlerTests)
--
Traceback (most recent call last):
  File "/home/vstinner/python/main/Lib/test/test_faulthandler.py", line 228, in 
test_sigfpe
self.check_fatal_error("""
^^
  File "/home/vstinner/python/main/Lib/test/test_faulthandler.py", line 129, in 
check_fatal_error
self.check_error(code, line_number, fatal_error, **kw)
^^
  File "/home/vstinner/python/main/Lib/test/test_faulthandler.py", line 122, in 
check_error
self.assertRegex(output, regex)
^^^
AssertionError: Regex didn't match: '(?m)^Fatal Python error: Floating point 
exception\n\nCurrent thread 0x[0-9a-f]+ \\(most recent call first\\):\n  File 
"", line 3 in ' not found in 'Modules/faulthandler.c:1112:11: 
runtime error: division by zero\nSUMMARY: UndefinedBehaviorSanitizer: 
undefined-behavior Modules/faulthandler.c:1112:11 in '

--

___
Python tracker 

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



[issue1666807] Incorrect file path reported by inspect.getabsfile()

2022-03-03 Thread Guido van Rossum


Guido van Rossum  added the comment:

So this bug is referenced when pydevd encounters some problem with 3.11a5+:

https://github.com/fabioz/PyDev.Debugger/issues/213

Since the link to this bug is apparently baked into the error messages printed 
by pydevd, I am adding this comment to this old, closed bug.

I can't seem to reproduce it. I modernized the reproducer script:

###

import inspect,sys

print('Version info:',sys.version_info)
print()

f1 = inspect.getabsfile(inspect)
f2 = inspect.getabsfile(inspect.iscode)
print('File for `inspect`   :',f1)
print('File for `inspect.iscode`:',f2)
print('Do these match?',f1==f2)
if f1==f2:
print('OK')
else:
print('BUG - this is a bug in this version of Python')

###EOF

And the output is:

Version info: sys.version_info(major=3, minor=11, micro=0, 
releaselevel='alpha', serial=5)

File for `inspect`   : 
c:\users\gvanrossum\appdata\local\programs\python\python311\lib\inspect.py
File for `inspect.iscode`: 
c:\users\gvanrossum\appdata\local\programs\python\python311\lib\inspect.py
Do these match? True
OK

I tried it with the most recent Python built from source and get the same 
result:

Version info: sys.version_info(major=3, minor=11, micro=0, 
releaselevel='alpha', serial=5)

File for `inspect`   : c:\users\gvanrossum\cpython\lib\inspect.py
File for `inspect.iscode`: c:\users\gvanrossum\cpython\lib\inspect.py
Do these match? True
OK


So I wonder if the problem that's currently plagueing pydevd in 3.11 alpha 
releases is slightly different?

--
nosy: +gvanrossum

___
Python tracker 

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



[issue6634] [doc] sys.exit() called from threads other than the main one: undocumented behaviour

2022-03-03 Thread Irit Katriel


Irit Katriel  added the comment:

Thank you @vidhya.

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



[issue46061] GCState *gcstate = get_gc_state() gives fatal error in Python 3.10.2

2022-03-03 Thread Ajaya Sutar


Ajaya Sutar  added the comment:

Actually we can not share code due to certain term and conditions. 

Thanks.

--

___
Python tracker 

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



[issue43312] Interface to select preferred "user" or "home" sysconfig scheme for an environment

2022-03-03 Thread Miro Hrončok

Change by Miro Hrončok :


--
nosy: +hroncok
nosy_count: 8.0 -> 9.0
pull_requests: +29780
pull_request: https://github.com/python/cpython/pull/31034

___
Python tracker 

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



[issue46913] UBSAN: test_ctypes, test_faulthandler and test_hashlib are failing

2022-03-03 Thread STINNER Victor


STINNER Victor  added the comment:

test_ctypes: test_shorts() of ctypes.test.test_bitfields.C_Test is failing with:

---
test_shorts (ctypes.test.test_bitfields.C_Test) ... 
/home/vstinner/python/main/Modules/_ctypes/cfield.c:554:5: runtime error: shift 
exponent 18446744073709551614 is too large for 16-bit type 'short'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior 
/home/vstinner/python/main/Modules/_ctypes/cfield.c:554:5 in 
---

It's a test on the "h" format code:

#define LOW_BIT(x)  ((x) & 0x)
#define NUM_BITS(x) ((x) >> 16)

#define GET_BITFIELD(v, size)   \
if (NUM_BITS(size)) {   \
v <<= (sizeof(v)*8 - LOW_BIT(size) - NUM_BITS(size));   \
v >>= (sizeof(v)*8 - NUM_BITS(size));   \

static PyObject *
h_get(void *ptr, Py_ssize_t size)
{
short val;
memcpy(, ptr, sizeof(val));
GET_BITFIELD(val, size); // < HERE
return PyLong_FromLong((long)val);
}

static struct fielddesc formattable[] = {
...
{ 'h', h_set, h_get, NULL, h_set_sw, h_get_sw},
...
};


--
nosy: +gregory.p.smith

___
Python tracker 

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



[issue46913] UBSAN: test_ctypes, test_faulthandler and test_hashlib are failing

2022-03-03 Thread STINNER Victor


STINNER Victor  added the comment:

test_hashlib: test_gil() fails with:
---
test_gil (test.test_hashlib.HashLibTestCase) ... 
/home/vstinner/python/main/Modules/_sha3/kcp/KeccakP-1600-opt64.c:467:9: 
runtime error: load of misaligned address 0x02daafd7 for type 'UINT64' (aka 
'unsigned long'), which requires 8 byte alignment
0x02daafd7: note: pointer points here
 23 23 23 23 23  23 23 23 23 23 23 23 23  23 23 23 23 23 23 23 23  23 23 23 23 
23 23 23 23  23 23 23
 ^ 
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior 
/home/vstinner/python/main/Modules/_sha3/kcp/KeccakP-1600-opt64.c:467:9 in 
---

--

___
Python tracker 

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



[issue46913] UBSAN: test_ctypes, test_faulthandler and test_hashlib are failing

2022-03-03 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue6634] [doc] sys.exit() called from threads other than the main one: undocumented behaviour

2022-03-03 Thread Irit Katriel


Irit Katriel  added the comment:


New changeset 09819863a3fb7092ca5cbdfcb722882ebbac806b by Miss Islington (bot) 
in branch '3.9':
bpo-6634: [doc] clarify that sys.exit() does not always exit the interpreter 
(GH-31639) (GH-31661)
https://github.com/python/cpython/commit/09819863a3fb7092ca5cbdfcb722882ebbac806b


--

___
Python tracker 

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



[issue46908] Debugger jumps to a wrong instruction in for loop

2022-03-03 Thread Mark Shannon


Mark Shannon  added the comment:

Which debugger? Which version of Python?

Please provide all the steps required to reproduce, otherwise there is little 
we can do.

--
nosy: +Mark.Shannon

___
Python tracker 

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



[issue46910] Expect IndentationError, get SyntaxError: 'break' outside loop

2022-03-03 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Unfortunately, we cannot do much here. The reason is that the parser allows 
break and continue outside loops as they count as statements. As these are 
associated with control flow, is the compiler the one that will show the Syntax 
warning once it tries to make sense of the abstract syntax tree that the parser 
generates.

The error you are getting happens because for the parser, the unindented else 
*is* a syntax error so it fails much sooner and prevents the compiler to 
complain about the break.

This means that in the presence of two syntax errors, one being a parser error 
and the other a compiler error, the parser will always be first, no matter if 
the other one appears before in the code.

Given this, I am afraid we need to close this issue as "won't fix" :(

Bing said that, if someone devises some easy way to do this without major 
changes everywhere, I am happy to reopen it

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

___
Python tracker 

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



[issue46877] [doc] unittest.doModuleCleanups() does not exist

2022-03-03 Thread Guido van Rossum


Guido van Rossum  added the comment:


New changeset cc400585fab02994255f21ae8183d5f147236815 by Kumar Aditya in 
branch 'main':
bpo-46877: export unittest.doModuleCleanups in unittest package (#31613)
https://github.com/python/cpython/commit/cc400585fab02994255f21ae8183d5f147236815


--
nosy: +gvanrossum

___
Python tracker 

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



[issue46908] Debugger jumps to a wrong instruction in for loop

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



[issue46908] Debugger jumps to a wrong instruction in for loop

2022-03-03 Thread Vedran Čačić

Vedran Čačić  added the comment:

pdb on Py3.10.2 works fine with that code.

--
nosy: +veky

___
Python tracker 

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



[issue46896] add support for watching writes to selected dictionaries

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



[issue46914] On Osx Monterey(12.x), Logging.handlers.SysLogHandler does not work

2022-03-03 Thread Philip Bloom


New submission from Philip Bloom :

Hello, don't file these often so apologies for any mistakes, trying to be good 
python citizen here.

Checked this on the python-list first, and others reported it as reproducible.

The issue is:
On Osx Monterey(12.x), Logging.handlers.SysLogHandler does not work.  It won't 
throw any error but the ASL/Console.App does not see any messages from it.  On 
OSX Big Sur (11.x) this works just fine with the exact same code.

I think I've cut this into a small example proof that can be run to demonstrate 
the issue.  If this is run and any of the substrings are searched for in 
Console.App when it is checking events, only the QQQ message from SysLog will 
show up.

Gonna work around it likely on our end, but hope this helps it get fixed for a 
future version.

---

import logging
from logging.handlers import SysLogHandler

root_logger = logging.getLogger()
root_logger.setLevel(logging.DEBUG)
basic_datefmt = '%m/%d/%Y %I:%M:%S %p'

syslog_format = logging.Formatter(fmt='SetupCDNGUI: %(message)s', 
datefmt=basic_datefmt)

sys_handler = SysLogHandler(address='/var/run/syslog')
#sys_handler.encodePriority(SysLogHandler.LOG_USER, SysLogHandler.LOG_ALERT)
# Tried with the above, but didn't make a difference.  Neither did not defining 
the address and letting it go to local host.
sys_handler.setFormatter(syslog_format)
root_logger.addHandler(sys_handler)


# None of these will show up.
logging.critical("CCC This is a test critical")
logging.error("EEE This is a test error")
logging.info("III Still a test")


# Comparatively this sends a message received just fine
import syslog

syslog.openlog(logoption=syslog.LOG_PID, facility=syslog.LOG_USER)
syslog.syslog(syslog.LOG_NOTICE, 'QQQ test log')

--
components: macOS
messages: 414464
nosy: ned.deily, pbloom, ronaldoussoren
priority: normal
severity: normal
status: open
title: On Osx Monterey(12.x), Logging.handlers.SysLogHandler does not work
versions: Python 3.10, Python 3.7, Python 3.8, Python 3.9

___
Python tracker 

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



[issue46914] On Osx Monterey(12.x), Logging.handlers.SysLogHandler does not work

2022-03-03 Thread Ned Deily


Change by Ned Deily :


--
nosy: +vinay.sajip

___
Python tracker 

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



[issue40421] [C API] Add getter functions for PyFrameObject and maybe move PyFrameObject to the internal C API

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



[issue46896] add support for watching writes to selected dictionaries

2022-03-03 Thread Carl Meyer


Carl Meyer  added the comment:

> Could we (or others) end up with unguarded stale caches if some buggy 
> extension forgets to chain the calls correctly?

Yes. I can really go either way on this. I initially opted for simplicity in 
the core support at the cost of asking a bit more of clients, on the theory 
that a) there are lots of ways for a buggy C extension to cause crashes with 
bad use of the C API, and b) I don't expect there to be very many extensions 
using this API. But it's also true that the consequences of a mistake here 
could be hard to debug (and easily blamed to the wrong place), and there might 
turn out to be more clients for dict-watching than I expect! If the consensus 
is to prefer CPython tracking an array of callbacks instead, we can try that.

> when you say "only one global callback": does that mean per-interpreter, or 
> per-process?

Good question! The currently proposed API suggests per-process, but it's not a 
question I've given a lot of thought to yet; open to suggestions. It seems like 
in general the preference is to avoid global state and instead tie things to an 
interpreter instance? I'll need to do a bit of research to understand exactly 
how that would affect the implementation. Doesn't seem like it should be a 
problem, though it might make the lookup at write time to see if we have a 
callback a bit slower.

--

___
Python tracker 

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



[issue46894] make install DESTDIR= uses /lib/python3.10/lib-dynload out of DESTDIR

2022-03-03 Thread Ned Deily


Ned Deily  added the comment:

My apologies: I'm not sure where I got the idea you were building on macOS!

In any case, this problem has come up a few times in the past, no doubt for a 
similar reason, most recently in open issue Issue31114. I'm closing this issue 
as a duplicate of that. But be aware that Distutils is now deprecated in 
general and in the upcoming 3.11 feature release, there are major changes to 
getpath and also to begin the process of eliminating the use of Distutils when 
building Python itself, so it is unlikely that any bug fixes for this minor 
wart will be forthcoming for current releases.

But a very simple workaround should be to use --prefix=/usr/local or some other 
path within your chroot environment rather than trying to install in / of the 
chroot.

--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> 'make install' fails when the configure 'prefix' is '/' and 
DESTDIR is used

___
Python tracker 

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



[issue46915] Build with Py_LIMITED_API fails unknown type name ‘PyModuleDef_Slot’

2022-03-03 Thread STINNER Victor


STINNER Victor  added the comment:

I proposed a fix: https://github.com/python/cpython/pull/31668

--

___
Python tracker 

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



[issue46877] [doc] unittest.doModuleCleanups() does not exist

2022-03-03 Thread Guido van Rossum


Change by Guido van Rossum :


--
components: +Library (Lib)
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
type: enhancement -> behavior

___
Python tracker 

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



[issue46823] Add LOAD_FAST__LOAD_ATTR_INSTANCE_VALUE combined opcode

2022-03-03 Thread Brandt Bucher


Brandt Bucher  added the comment:

Reopening since this needed to be removed for 
https://github.com/python/cpython/pull/31640.

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



[issue44800] Code readability: rename InterpreterFrame to `_Py_framedata`

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



[issue46913] UBSAN: test_ctypes, test_faulthandler and test_hashlib are failing

2022-03-03 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 4173d677a1d7c72bb32d292fbff1b4cf073d615c by Victor Stinner in 
branch 'main':
bpo-46913: Fix test_faulthandler.test_sigfpe() on UBSAN (GH-31662)
https://github.com/python/cpython/commit/4173d677a1d7c72bb32d292fbff1b4cf073d615c


--

___
Python tracker 

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



[issue46913] UBSAN: test_ctypes, test_faulthandler and test_hashlib are failing

2022-03-03 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 3.0 -> 4.0
pull_requests: +29784
pull_request: https://github.com/python/cpython/pull/31665

___
Python tracker 

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



[issue46913] UBSAN: test_ctypes, test_faulthandler and test_hashlib are failing

2022-03-03 Thread miss-islington


Change by miss-islington :


--
pull_requests: +29785
pull_request: https://github.com/python/cpython/pull/31666

___
Python tracker 

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



[issue45459] Limited API support for Py_buffer

2022-03-03 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +29787
pull_request: https://github.com/python/cpython/pull/31668

___
Python tracker 

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



[issue45459] Limited API support for Py_buffer

2022-03-03 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +29788
pull_request: https://github.com/python/cpython/pull/31669

___
Python tracker 

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



[issue14156] argparse.FileType for '-' doesn't work for a mode of 'rb'

2022-03-03 Thread William Woodruff


William Woodruff  added the comment:

Nosying myself; this affects 3.9 and 3.10 as well.

--
nosy: +yossarian
versions: +Python 3.10, Python 3.9

___
Python tracker 

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



[issue45459] Limited API support for Py_buffer

2022-03-03 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 32f0c8271706550096c454eb512450b85fbfc320 by Victor Stinner in 
branch 'main':
bpo-45459: Use type names in the internal C API (GH-31669)
https://github.com/python/cpython/commit/32f0c8271706550096c454eb512450b85fbfc320


--

___
Python tracker 

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



[issue46915] Build with Py_LIMITED_API fails unknown type name ‘PyModuleDef_Slot’

2022-03-03 Thread STINNER Victor


STINNER Victor  added the comment:

Fixed by 
https://github.com/python/cpython/commit/0b63215bb152c06404cecbd5303b1a50969a9f9f

--
priority: release blocker -> 
resolution:  -> fixed
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



[issue46896] add support for watching writes to selected dictionaries

2022-03-03 Thread Carl Meyer


Carl Meyer  added the comment:

Thanks gps! Working on a PR and will collect pyperformance data as well.

We haven't observed any issues in Cinder with the callback just being called at 
shutdown, too, but if there are problems with that it should be possible to 
just have CPython clear the callback at shutdown time.

--

___
Python tracker 

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



[issue46896] add support for watching writes to selected dictionaries

2022-03-03 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

Per interpreter seems best.

If someone using this feature writes a buggy implementation of a callback that 
doesn't chain reliably, that is a bug in their code and all of the fallout from 
that is "just" a bug to be fixed in said code.

Think of it like a C signal handler, the OS doesn't chain for you - it is the 
signal handler installer's responsibility to chain to the previous one.  Not an 
unusual pattern for callback hooks in C.

We already have such global C callback hooks in SetProfile and SetTrace. 
https://docs.python.org/3/c-api/init.html#profiling-and-tracing

Those don't even provide for chaining.  We could do the same here and not let a 
hook be set more than once instead of providing a Get API to allow for manual 
chaining.  That seems less useful.

--

___
Python tracker 

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



[issue46914] On Osx Monterey(12.x), Logging.handlers.SysLogHandler does not work

2022-03-03 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

This is probably not a bug in python, but a change in system behaviour.

In particular, I've used the lsof command to check the open files for the 
syslogd proces on a macOS 10.13 and 12.2 system. On the former syslogd has 
/var/run/syslog open, on the latter it doesn't.

The feature to listen on this socket has been removed entirely, the 12.2 system 
no longer lists a "-bsd_in" option for syslogd in the manual page whereas it is 
both available and enabled by default on 10.13.

It might be possible to change the SyslogHandler to optionally use the syslog 
module to log, but I'm not sure it is worth doing this and that would 
definitely be a new feature.

--
resolution:  -> third party
type:  -> behavior

___
Python tracker 

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



[issue46915] Build with Py_LIMITED_API fails unknown type name ‘PyModuleDef_Slot’

2022-03-03 Thread Christian Heimes


Change by Christian Heimes :


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

___
Python tracker 

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



[issue46916] There is a problem with escape characters in the path passed in by pathlib.Path.mkdir()

2022-03-03 Thread Vincent FUNG


New submission from Vincent FUNG :

This problem occurs when the directory starts with 't', but works with 
os.makedirs(e) or macOS.

>>> e = Path(r'F:\ceven\test2')
>>> e.mkdir()
Traceback (most recent call last):
  File "", line 1, in 
  File "C:\Program Files\Python310\lib\pathlib.py", line 1173, in mkdir
self._accessor.mkdir(self, mode)
FileNotFoundError: [WinError 3] The system cannot find the path specified: 
'F:\\ceven\\test2'
>>> os.makedirs(e)

--
components: Windows
messages: 414483
nosy: paul.moore, steve.dower, tim.golden, vincent.fung, zach.ware
priority: normal
severity: normal
status: open
title: There is a problem with escape characters in the path passed in by 
pathlib.Path.mkdir()
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



[issue46841] Inline bytecode caches

2022-03-03 Thread Brandt Bucher


Change by Brandt Bucher :


--
pull_requests: +29782
pull_request: https://github.com/python/cpython/pull/31663

___
Python tracker 

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



[issue46896] add support for watching writes to selected dictionaries

2022-03-03 Thread Brandt Bucher


Brandt Bucher  added the comment:

Also, when you say "only one global callback": does that mean per-interpreter, 
or per-process?

--

___
Python tracker 

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



[issue46915] Build with Py_LIMITED_API fails unknown type name ‘PyModuleDef_Slot’

2022-03-03 Thread Christian Heimes

New submission from Christian Heimes :

Extension modules with bare "#define Py_LIMITED_API" without version fail to 
build with error:

   moduleobject.h:82:3: error: unknown type name ‘PyModuleDef_Slot’

The issue was introduced in PR GH-31528 and bpo-45459. The type 
PyModuleDef_Slot is only defined when Py_LIMITED_API is set to Python 3.5.0 or 
higher.

--
assignee: christian.heimes
components: Build, Interpreter Core
keywords: 3.11regression
messages: 414473
nosy: christian.heimes, pablogsal, vstinner
priority: release blocker
severity: normal
status: open
title: Build with Py_LIMITED_API fails unknown type name ‘PyModuleDef_Slot’
type: compile error
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



[issue46915] Build with Py_LIMITED_API fails unknown type name ‘PyModuleDef_Slot’

2022-03-03 Thread Christian Heimes


Christian Heimes  added the comment:

The problem was first reported to PyCA cryptography project in bug 
https://github.com/pyca/cryptography/issues/6929

--

___
Python tracker 

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



[issue45459] Limited API support for Py_buffer

2022-03-03 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 0b63215bb152c06404cecbd5303b1a50969a9f9f by Victor Stinner in 
branch 'main':
bpo-45459: Fix PyModuleDef_Slot type in the limited C API (GH-31668)
https://github.com/python/cpython/commit/0b63215bb152c06404cecbd5303b1a50969a9f9f


--

___
Python tracker 

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



[issue46841] Inline bytecode caches

2022-03-03 Thread Brandt Bucher


Change by Brandt Bucher :


--
pull_requests: +29791
pull_request: https://github.com/python/cpython/pull/31671

___
Python tracker 

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



[issue46841] Inline bytecode caches

2022-03-03 Thread Brandt Bucher


Brandt Bucher  added the comment:


New changeset 127797f572cc7374192e415c44ea2e95b009d5ab by Brandt Bucher in 
branch 'main':
bpo-46841: Improve the failure stats for COMPARE_OP (GH-31663)
https://github.com/python/cpython/commit/127797f572cc7374192e415c44ea2e95b009d5ab


--

___
Python tracker 

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



  1   2   >