[issue37290] Mistranslation

2019-06-14 Thread p

New submission from p :

https://docs.python.org/ja/3.5/library/multiprocessing.html?highlight=multiprocessing#module-multiprocessing
(名前付きセマフォのリンク解除は、システムが個数の上限のみ許可している場合に深刻な問題になるため、それらは再起動されるまで自動的にリンク解除されることはありません。)

-->(名前付きセマフォのリンク解除はシステムが限られた数しか許可しないので重大な問題であり、それらは次の再起動まで自動的にリンク解除されません。)

--
assignee: docs@python
components: Documentation
messages: 345659
nosy: docs@python, p
priority: normal
severity: normal
status: open
title: Mistranslation
versions: Python 3.5

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



[issue46315] Add support for WebAssembly System Interface (wasm32-wasi)

2022-01-09 Thread pmp-p


Change by pmp-p :


--
nosy: +pmpp

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



[issue14916] PyRun_InteractiveLoop fails to run interactively when using a Linux pty that's not tied to stdin/stdout

2022-01-28 Thread pmp-p


Change by pmp-p :


--
pull_requests: +29187
pull_request: https://github.com/python/cpython/pull/31006

___
Python tracker 
<https://bugs.python.org/issue14916>
___
___
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-02-07 Thread pmp-p


Change by pmp-p :


--
nosy: +pmpp

___
Python tracker 
<https://bugs.python.org/issue45459>
___
___
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-02-07 Thread pmp-p


pmp-p  added the comment:

There's some side effects with "buffer.h" inclusion in Panda3D when building 
againt 3.11a5, project manager concerns are here 
https://github.com/python/cpython/pull/29991#issuecomment-1031731100

--

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



[issue31370] Remove support for threads-less builds

2022-03-04 Thread pmp-p


Change by pmp-p :


--
nosy: +pmpp

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



[issue3510] Site-specific configuration hook documentation incorrect

2008-08-06 Thread P. Roebuck

New submission from P. Roebuck <[EMAIL PROTECTED]>:

Documentation does not match due to version number inconsistency.

Current:
< Then the following directories are added to sys.path, in this order:
<
<
< /usr/local/lib/python2.3/site-packages/bar
< /usr/local/lib/python2.3/site-packages/foo

Proposed:
> Then the following directories are added to sys.path, in this order:
>
>
> /usr/local/lib/python{X.Y}/site-packages/bar
> /usr/local/lib/python{X.Y}/site-packages/foo

Syntax for proposed documentation fix may be incorrect, but this gives 
the general idea anyway...

<http://svn.python.org/view/python/trunk/Doc/library/site.rst?
rev=62788&view=markup>

--
assignee: georg.brandl
components: Documentation
messages: 70785
nosy: georg.brandl, proebuck
severity: normal
status: open
title: Site-specific configuration hook documentation incorrect
versions: Python 2.4, Python 2.5, Python 2.6

___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue3510>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue47232] Difficulties building tip of tree Python for emscripten

2022-04-05 Thread pmp-p


Change by pmp-p :


--
nosy: +pmpp

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



[issue35243] readline timeout too long for async gfx use

2019-09-13 Thread pmp-p


Change by pmp-p :


--
nosy: +twouters -pmpp

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



[issue35243] readline timeout too long for async gfx use

2019-09-23 Thread pmp-p


Change by pmp-p :


--
nosy: +pmpp
type: enhancement -> performance

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



[issue38393] building modules from 3.8.0rc1 fails in a venv when system 3.8 is present

2019-10-07 Thread pmp-p


New submission from pmp-p :

when trying to build rc1 from a b4 venv to prepare a python host for cross 
compilation on ubuntu xenial flavour x64

i got :


cd /tmp
python3.7 -m venv testenv
cd testenv/
. bin/activate
(testenv) /tmp/testenv $ tar xf /tmp/Python-3.8.0rc1.tar.xz && cd 
Python-3.8.0rc1

CC=clang ./configure --prefix=/tmp/python3.host --with-system-ffi 
--disable-ipv6 --without-ensurepip --with-c-locale-coercion --disable-shared && 
make

./python -E ./setup.py  build
step will fail for the reason i suspect is srcdir is taken from system 
python3.8 if installed ( /usr/local in that case )

$ ./python -E 
Python 3.8.0rc1 (default, Oct  7 2019, 15:16:07) 
[Clang 6.0.0 (tags/RELEASE_600/final)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sysconfig
>>> sysconfig.get_config_var('srcdir')
'/usr/local/lib/python3.8/config-3.8-x86_64-linux-gnu'
>>>

--
messages: 354095
nosy: pmpp, vstinner
priority: normal
severity: normal
status: open
title: building modules from 3.8.0rc1 fails in a venv when system 3.8 is present
type: compile error
versions: Python 3.8

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



[issue38393] building modules from 3.8.0rc1 fails in a venv when system 3.8 is present

2019-10-07 Thread pmp-p


Change by pmp-p :


--
versions: +Python 3.7

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



[issue28833] cross compilation of third-party extension modules

2019-10-25 Thread pmp-p


Change by pmp-p :


--
nosy: +pmpp

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



[issue36666] threading.Thread should have way to catch an exception thrown within

2019-10-29 Thread pmp-p


Change by pmp-p :


--
nosy: +pmpp

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



[issue38634] Symbol resolution conflict when embeding python in an application using libedit

2019-10-29 Thread pmp-p


Change by pmp-p :


--
nosy: +pmpp

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



[issue17792] Unhelpful UnboundLocalError due to del'ing of exception target

2021-03-21 Thread pmp-p


Change by pmp-p :


--
nosy: +pmpp

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



[issue44644] Implement “Happy Eyeballs” algorithim (RFC 8503) in socket.create_connection()

2021-07-15 Thread origin400-p

New submission from origin400-p :

While support for the so-called “Happy Eyeballs” algorithim described in RFC 
8503 was implemented for asyncio in Issue #33530, socket's create_connection 
function remains left without it causing suboptimal performance in broken 
dual-stack environments.

--
components: Library (Lib)
messages: 397542
nosy: origin400-p
priority: normal
severity: normal
status: open
title: Implement “Happy Eyeballs” algorithim (RFC 8503) in 
socket.create_connection()
type: performance
versions: Python 3.9

___
Python tracker 
<https://bugs.python.org/issue44644>
___
___
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 
<https://bugs.python.org/issue45256>
___
___
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 
<https://bugs.python.org/issue45829>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38791] readline history file is hard-coded

2019-11-13 Thread pmp-p


Change by pmp-p :


--
nosy: +pmpp

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



[issue38791] readline history file is hard-coded

2019-11-13 Thread pmp-p


Change by pmp-p :


--
nosy: +twouters

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



[issue39536] Datetime strftime: %Y exports years < 1000 with 3 digits instead of 4 on Linux

2020-02-03 Thread pmp-p


Change by pmp-p :


--
nosy: +pmpp

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



[issue40174] HAVE_CLOCK_GETTIME not repected in pytime.c

2020-04-05 Thread pmp-p


Change by pmp-p :


--
nosy: +pmpp

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



[issue40280] Consider supporting emscripten/webassembly as a build target

2020-04-14 Thread pmp-p


pmp-p  added the comment:

you can add 
* https://github.com/pmp-p/pydk/tree/master/sources.em/Python-3.8.0b4.patchset 
-- Python 3.8.x 

(wasm not asm.js, clang-10+ required)

demo https://pmp-p.github.io/python-next/test.html

CPython can already run in the browser with very little patching, but major 
issues are :
 
 - asyncify'ing the whole wasm VM to have pre-emption over cPython's one to 
prevent blocking I/O slows down things *a lot* (10x)
=> (very?) bad user experience.

 - the size of vm + stdlib  ~ 30 MiB and wasm compilation time.
=> bad user experience on first load or slow connexion.

 - the lack of threading in wasm MinimumViableProduct specification (but this 
is the browser standard for now), that leads to rewrite bits of stdlib ( like 
eg asyncio module )
=> adding more maintenance burden on stdlib (!)


i tested them all and my personnal opinion is : I can see no use case that 
would favour "stock" cPython wasm versus a blazing fast MicroPytho (or pycopy) 
wasm flavour or supercharged full stack pyodide.

--
nosy: +pmpp

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



[issue3770] test_multiprocessing fails on systems with HAVE_SEM_OPEN=0

2020-12-07 Thread pmp-p


Change by pmp-p :


--
nosy: +pmpp

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



[issue42609] Eval with too high string multiplication crashes newer Python versions

2020-12-09 Thread pmp-p


Change by pmp-p :


--
nosy: +pmpp

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



[issue22100] Use $HOSTPYTHON when determining candidate interpreter for $PYTHON_FOR_BUILD.

2021-02-28 Thread pmp-p


Change by pmp-p :


--
nosy: +pmpp

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



[issue43410] Parser does not handle correctly some errors when parsin from stdin

2021-03-05 Thread pmp-p


Change by pmp-p :


--
nosy: +pmpp

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



[issue40710] Malfunctioning of '\r'

2020-05-21 Thread pmp-p


pmp-p  added the comment:

Hi, i can't reproduce on standard terminals, what is your OS version and 
terminal application ( also please state value of $TERM )

--
nosy: +pmpp

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



[issue40743] [CMake] It's 2020, where is CMake?

2020-05-23 Thread pmp-p


pmp-p  added the comment:

Hi, I'm always curious about others experiences : why would you need 
cross-platform building for any of the officially supported platforms ?

Also on some random unsupported platforms that require cross-compilation like 
maybe android, wasm or other uncommon posix, cmake is maybe not yet fully 
ready. So it may be easier to hack the old system if not alternative is present.

--
nosy: +pmpp

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



[issue40818] Run sys.__interactivehook__ for asyncio REPLs

2020-05-29 Thread pmp-p


Change by pmp-p :


--
nosy: +pmpp

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



[issue41111] Convert a few stdlib extensions to the limited C API

2020-07-05 Thread pmp-p


Change by pmp-p :


--
nosy: +pmpp

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



[issue22239] asyncio: nested event loop

2020-07-07 Thread pmp-p


Change by pmp-p :


--
nosy: +pmpp

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



[issue33129] Add kwarg-only option to dataclass

2020-07-22 Thread pmp-p


Change by pmp-p :


--
nosy: +pmpp

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



[issue41440] os.cpu_count doesn't work on VxWorks RTOS

2020-08-03 Thread pmp-p


Change by pmp-p :


--
nosy: +pmpp

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



[issue14916] PyRun_InteractiveLoop fails to run interactively when using a Linux pty that's not tied to stdin/stdout

2020-09-09 Thread pmp-p


pmp-p  added the comment:

all PyRun_InteractiveOne* functions are also affected
it is really annoying when implementing repl behaviour when embedding( use 
cases :  pyodide, android, wasi )

But I think the correct patch is : 
-char *newtok = PyOS_Readline(stdin, stdout, tok->prompt);
+char *newtok = PyOS_Readline(tok->fp? tok->fp : stdin, stdout, 
tok->prompt);

--
nosy: +pmpp

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



[issue14916] PyRun_InteractiveLoop fails to run interactively when using a Linux pty that's not tied to stdin/stdout

2020-09-10 Thread pmp-p


Change by pmp-p :


--
versions: +Python 3.6, Python 3.7, Python 3.8, Python 3.9 -Python 2.6, Python 
2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5

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



[issue14916] PyRun_InteractiveLoop fails to run interactively when using a Linux pty that's not tied to stdin/stdout

2020-09-10 Thread pmp-p


Change by pmp-p :


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

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



[issue41770] Import module doesn't updated

2020-09-11 Thread pmp-p


pmp-p  added the comment:

Hi, you just need to call del sys.modules['xxx'] and have a look at 
https://docs.python.org/3.7/library/importlib.html#importlib.invalidate_caches 

before importing again

--
nosy: +pmpp

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



[issue41770] Import module doesn't updated

2020-09-11 Thread pmp-p


Change by pmp-p :


--
nosy:  -pmpp

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



[issue14527] How to link with a non-system libffi?

2020-09-14 Thread pmp-p


Change by pmp-p :


--
nosy: +pmpp

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



[issue35243] readline timeout too long for async gfx use

2020-09-14 Thread pmp-p


Change by pmp-p :


--
versions: +Python 3.10, Python 3.9

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



[issue19915] int.bit_at(n) - Accessing a single bit in O(1)

2020-09-19 Thread pmp-p


Change by pmp-p :


--
nosy: +pmpp

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



[issue32682] test_zlib improve version parsing

2020-09-22 Thread pmp-p


Change by pmp-p :


--
pull_requests: +21399
pull_request: https://github.com/python/cpython/pull/22361

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



[issue14527] How to link with a non-system libffi?

2020-09-28 Thread pmp-p


Change by pmp-p :


--
nosy:  -pmpp

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



[issue14527] How to link with a non-system libffi?

2020-09-28 Thread pmp-p


Change by pmp-p :


--
nosy: +pmpp

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



[issue36125] Cannot cross-compile to more featureful but same tune

2020-09-29 Thread pmp-p


Change by pmp-p :


--
nosy: +pmpp

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



[issue41972] bytes.find consistently hangs in a particular scenario

2020-10-07 Thread pmp-p


Change by pmp-p :


--
nosy: +pmpp

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



[issue42266] LOAD_ATTR cache does not fully replicate PyObject_GetAttr behavior

2020-11-04 Thread pmp-p


Change by pmp-p :


--
nosy: +pmpp

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



[issue8041] No documentation for Py_TPFLAGS_HAVE_STACKLESS_EXTENSION or Py_TPFLAGS_HAVE_VERSION_TAG.

2020-11-08 Thread pmp-p


Change by pmp-p :


--
nosy: +pmpp

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



[issue32682] test_zlib improve version parsing

2020-11-08 Thread pmp-p


Change by pmp-p :


--
status: closed -> pending

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



[issue27917] Choose platform triplets for android builds

2020-11-18 Thread pmp-p


Change by pmp-p :


--
nosy: +pmpp

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



[issue14527] How to link with a non-system libffi?

2020-11-22 Thread pmp-p


pmp-p  added the comment:

I think the actual PR20451 with its proper use of pkgconfig could close 
https://bugs.python.org/issue31710 ( fixing at once android and wasm/wasi 
compilation )

--

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



[issue28468] Add platform.freedesktop_osrelease()

2020-11-24 Thread pmp-p


pmp-p  added the comment:

-1

android and aosp, termux are also linux distributions without /etc/os-release

the only thing reliable there is probably 
sysconfig.get_config_vars('MULTIARCH') when properly used.

--
nosy: +pmpp

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



[issue31525] require sqlite3_prepare_v2

2019-04-23 Thread Charles P


Change by Charles P :


--
pull_requests: +12852

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



[issue36768] distutils.util.convert_path mangles windows paths with forward slashes

2019-05-01 Thread Charles P


New submission from Charles P :

https://github.com/python/cpython/blob/master/Lib/distutils/util.py#L106-L131

Due to the split('/') and os.path.join(), this function converts an absolute 
path of the form "C:/foobar" into a relative "C:foobar", which is likely to be 
entirely different

Usecase:

pip install --prefix=/home/charles/python foobar

within an MSYS2 terminal automagically converts the path to 
C:/Users/charles/python for some reason or another, but it's not exactly 
uncommon for users to use forward slashes on Windows regardless

I'm not entirely sure what the correct fix would be here, or even if it should 
be fixed at a higher level - in setuptools or pip

--
components: Distutils
messages: 341197
nosy: LordAro, dstufft, eric.araujo
priority: normal
severity: normal
status: open
title: distutils.util.convert_path mangles windows paths with forward slashes
type: behavior
versions: Python 3.7

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



[issue11122] bdist_rpm should use rpmbuild, not rpm

2018-04-10 Thread Stanislav P

Stanislav P  added the comment:

can this patch be sped up?
i am running into this issue with the latest python version
the patch was submitted 7 years ago

i don't see any workaround.

--
nosy: +stanp
versions: +Python 3.5, Python 3.6, Python 3.7, Python 3.8

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



[issue11122] bdist_rpm should use rpmbuild, not rpm

2018-04-11 Thread Stanislav P

Stanislav P  added the comment:

i am using this on redhat enterprise  and mac. both running python 3.5
both running latest rpm. if you can make a pr it would great.

--

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



[issue11122] bdist_rpm should use rpmbuild, not rpm

2018-04-11 Thread Stanislav P

Stanislav P  added the comment:

the use case is being able to publish python package as rpm using setup.py on 
mac.

--

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



[issue13424] Add examples for open’s new opener argument

2012-11-03 Thread Guillaume P

Guillaume P added the comment:

Here is a proposed patch to the documentation.

--
keywords: +patch
nosy: +guillaumep
Added file: http://bugs.python.org/file27866/13424.patch

___
Python tracker 
<http://bugs.python.org/issue13424>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22639] test "test_bad_address" fails on Python 3.4.2 under Linux Mint 13 Maya

2014-10-14 Thread Steve P

New submission from Steve P:

Looking in past bug reports, I suspect the test itself is problematic. When I 
paste the (erroneous) URL the tests is using into Firefox, I get a page back 
from my ISP with "Sorry, the website sadflkjsasf.i.nvali.d cannot be found"

Here's the output of the test:

@chimp:~/Downloads/Python-3.4.2 $ ./python -m test -v test_bad_address
== CPython 3.4.2 (default, Oct 14 2014, 15:34:15) [GCC 4.6.3]
==   Linux-3.2.0-23-generic-i686-with-debian-wheezy-sid little-endian
==   hash algorithm: siphash24 32bit
==   /home/sp/Downloads/Python-3.4.2/build/test_python_11906
Testing with flags: sys.flags(debug=0, inspect=0, interactive=0, optimize=0, 
dont_write_bytecode=0, no_user_site=0, no_site=0, ignore_environment=0, 
verbose=0, bytes_warning=0, quiet=0, hash_randomization=1, isolated=0)
[1/1] test_bad_address
test test_bad_address crashed -- Traceback (most recent call last):
  File "/home/sp/Downloads/Python-3.4.2/Lib/test/regrtest.py", line 1271, in 
runtest_inner
the_module = importlib.import_module(abstest)
  File "/home/sp/Downloads/Python-3.4.2/Lib/importlib/__init__.py", line 109, 
in import_module
return _bootstrap._gcd_import(name[level:], package, level)
  File "", line 2254, in _gcd_import
  File "", line 2237, in _find_and_load
  File "", line 2224, in _find_and_load_unlocked
ImportError: No module named 'test.test_bad_address'

1 test failed:
test_bad_address

--
components: Tests
messages: 229386
nosy: Steve.P
priority: normal
severity: normal
status: open
title: test "test_bad_address" fails on Python 3.4.2 under Linux Mint 13 Maya
type: crash
versions: Python 3.4

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



[issue22639] test "test_bad_address" fails on Python 3.4.2 under Linux Mint 13 Maya

2014-10-14 Thread Steve P

Steve P added the comment:

I got "test_bad_address" from what was reported using "make test".  Perhaps
at I read the log wrong, but it was clear I got a failure.  At any rate,
here's what I get with the correct test name:

sp@chip:~/Downloads/Python-3.4.2 $ ./python -m test -v -u network
> test_urllib2_localnet
> == CPython 3.4.2 (default, Oct 14 2014, 15:34:15) [GCC 4.6.3]
> ==   Linux-3.2.0-23-generic-i686-with-debian-wheezy-sid little-endian
> ==   hash algorithm: siphash24 32bit
> ==   /home/sp/Downloads/Python-3.4.2/build/test_python_16076
> Testing with flags: sys.flags(debug=0, inspect=0, interactive=0,
> optimize=0, dont_write_bytecode=0, no_user_site=0, no_site=0,
> ignore_environment=0, verbose=0, bytes_warning=0, quiet=0,
> hash_randomization=1, isolated=0)
> [1/1] test_urllib2_localnet
> test_basic_auth_httperror (test.test_urllib2_localnet.BasicAuthTests) ...
> ok
> test_basic_auth_success (test.test_urllib2_localnet.BasicAuthTests) ... ok
> test_proxy_qop_auth_int_works_or_throws_urlerror
> (test.test_urllib2_localnet.ProxyAuthTests) ... ok
> test_proxy_qop_auth_works (test.test_urllib2_localnet.ProxyAuthTests) ...
> ok
> test_proxy_with_bad_password_raises_httperror
> (test.test_urllib2_localnet.ProxyAuthTests) ... ok
> test_proxy_with_no_password_raises_httperror
> (test.test_urllib2_localnet.ProxyAuthTests) ... ok
> test_200 (test.test_urllib2_localnet.TestUrlopen) ... ok
> test_200_with_parameters (test.test_urllib2_localnet.TestUrlopen) ... ok
> test_404 (test.test_urllib2_localnet.TestUrlopen) ... ok
> test_bad_address (test.test_urllib2_localnet.TestUrlopen) ... FAIL
> test_basic (test.test_urllib2_localnet.TestUrlopen) ... ok
> test_chunked (test.test_urllib2_localnet.TestUrlopen) ... ok
> test_geturl (test.test_urllib2_localnet.TestUrlopen) ... ok
> test_https (test.test_urllib2_localnet.TestUrlopen) ... stopping HTTPS
> server
> joining HTTPS thread
> ok
> test_https_sni (test.test_urllib2_localnet.TestUrlopen) ... stopping HTTPS
> server
> joining HTTPS thread
> ok
> test_https_with_cadefault (test.test_urllib2_localnet.TestUrlopen) ... Got
> an error:
> [SSL: TLSV1_ALERT_UNKNOWN_CA] tlsv1 alert unknown ca (_ssl.c:600)
> stopping HTTPS server
> joining HTTPS thread
> ok
> test_https_with_cafile (test.test_urllib2_localnet.TestUrlopen) ... Got an
> error:
> [SSL: TLSV1_ALERT_UNKNOWN_CA] tlsv1 alert unknown ca (_ssl.c:600)
> stopping HTTPS server
> joining HTTPS thread
> stopping HTTPS server
> joining HTTPS thread
> ok
> test_info (test.test_urllib2_localnet.TestUrlopen) ... ok
> test_iteration (test.test_urllib2_localnet.TestUrlopen) ... ok
> test_line_iteration (test.test_urllib2_localnet.TestUrlopen) ... ok
> test_redirection (test.test_urllib2_localnet.TestUrlopen) ... ok
> test_sending_headers (test.test_urllib2_localnet.TestUrlopen) ... ok
>
> ==
> FAIL: test_bad_address (test.test_urllib2_localnet.TestUrlopen)
> --
> Traceback (most recent call last):
>   File
> "/home/sp/Downloads/Python-3.4.2/Lib/test/test_urllib2_localnet.py", line
> 655, in test_bad_address
> "http://sadflkjsasf.i.nvali.d./";)
> AssertionError: OSError not raised by urlopen
>
> --
> Ran 22 tests in 5.260s
>
> FAILED (failures=1)
> test test_urllib2_localnet failed
> 1 test failed:
> test_urllib2_localnet
>

On Tue, Oct 14, 2014 at 4:56 PM, Ned Deily  wrote:

>
> Ned Deily added the comment:
>
> I'm not sure what you are trying to do but there is no test module named
> test_bad_address in the standard library, which is why you get that error.
> Doing a quick search of Lib/test shows three different cases of
> test_bad_address: in the test_ipaddress, test_urllib2_localnet, and
> test_urllibnet modules.  If you want to just run those tests, you'd need to
> specify the module names.  Plus two of them require network access so
> you'll need to enable the "network" test resource.  Try something like:
>
> ./python -m test -v -u network test_ipaddress test_urllib2_localnet
> test_urllibnet
>
> --
> nosy: +ned.deily
>
> ___
> Python tracker 
> <http://bugs.python.org/issue22639>
> ___
>

--

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



[issue22639] test "test_bad_address" fails on Python 3.4.2 under Linux Mint 13 Maya

2014-10-15 Thread Steve P

Steve P added the comment:

I saw that issue, or one like it.  I was very tempted to not report but 
the README says if there are any test failures, there is a problem.  (I 
suppose it could mean there is a problem with my ISP, not python.)   The 
dilemma is that we want to be able to count on a clean pass of all tests 
even in the face of the misbehaving ISP (I believe someone in the 
discussion said there may be more of such in the future).

At the very least, if we are accepting a failure in the test suite as 
"ok", the README should say something to that effect.

On 10/14/2014 09:32 PM, Ned Deily wrote:
> Ned Deily added the comment:
>
> Thanks for the additional information.  It appears this is a duplicate of 
> Issue17564 with the root cause being the ISP not properly rejecting an 
> undefined host name as expected by the test case.  See the discussion there 
> for more information.
>
> --
> resolution:  -> duplicate
> stage:  -> resolved
> status: open -> closed
> superseder:  -> test_urllib2_localnet fails
> type: crash ->
>
> ___
> Python tracker 
> <http://bugs.python.org/issue22639>
> ___

--

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



[issue22647] test_readline failed on ScientificLinux 6.5

2014-10-15 Thread Steve P

New submission from Steve P:

"make test" after clean build got one failure. This was under Python 3.4.2 
newly downloaded. Here is the log:

./python -m test -v test_readline
== CPython 3.4.2 (default, Oct 15 2014, 11:08:11) [GCC 4.4.7 20120313 (Red Hat 
4.4.7-4)]
==   Linux-2.6.32-431.29.2.el6.x86_64-x86_64-with-redhat-6.5-Carbon 
little-endian
==   hash algorithm: siphash24 64bit
==   /home/pothiers/Downloads/Python-3.4.2/build/test_python_19950
Testing with flags: sys.flags(debug=0, inspect=0, interactive=0, optimize=0, 
dont_write_bytecode=0, no_user_site=0, no_site=0, ignore_environment=0, 
verbose=0, bytes_warning=0, quiet=0, hash_randomization=1, isolated=0)
[1/1] test_readline
testHistoryUpdates (test.test_readline.TestHistoryManipulation) ... ok
test_init (test.test_readline.TestReadline) ... FAIL

==
FAIL: test_init (test.test_readline.TestReadline)
--
Traceback (most recent call last):
  File "/home/pothiers/Downloads/Python-3.4.2/Lib/test/test_readline.py", line 
53, in test_init
self.assertEqual(stdout, b'')
AssertionError: b'\x1b[?1034h' != b''

--
Ran 2 tests in 0.021s

FAILED (failures=1)
test test_readline failed
1 test failed:
test_readline

--
messages: 229493
nosy: Steve.P
priority: normal
severity: normal
status: open
title: test_readline failed on ScientificLinux 6.5
type: behavior
versions: Python 3.4

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



[issue23478] A list arg with default value inside function got appended each time the function is called

2015-02-18 Thread P Yap

New submission from P Yap:

I have a function (test) with a list variable APP and declared its default as 
an empty list [], while APP is not a global variable, if I execute the same 
function multiple times, each time the APP will get appended.  To workaround 
this problem, I need to do APP.pop() inside the function or explicitly called 
the function with an argument (test([])). del APP or reassign APP=[] inside the 
function does not resolve the problem

same thing happens if the function is defined as an method inside a class.

Here is a little test program for testing:

def test(APP=[]):
if len(APP) == 0:
APP.append('1abc')
print "APP=", APP
APP.append('2def')

class test1 (object):
def t1(self, abc=[]):
abc.append('abc')
print abc

if __name__ == '__main__':

print "class test"
t = test1()
i = 0
while i < 3:
t.t1()
i += 1

print "Test function::"
i = 0
while i < 3:
test()
i += 1

Here are the output:

class test
['abc']
['abc', 'abc']
['abc', 'abc', 'abc']

Test function::
APP= ['1abc']
APP= ['1abc', '2def']
APP= ['1abc', '2def', '2def']

--
components: Interpreter Core
messages: 236185
nosy: yappyta
priority: normal
severity: normal
status: open
title: A list arg with default value inside function got appended each time the 
function is called
type: behavior
versions: Python 2.7

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



[issue28552] Distutils fail if sys.executable is None

2016-10-28 Thread Alexander P

New submission from Alexander P:

For example, Jython 2.7. When we try to execute `jython-standalone -m pip`, 
distutils.sysconfig tries to parse sys.executable as a path and obviously fails:

Traceback (most recent call last):
  File "/home/ale/dev/3toj/jython-standalone-2.7.0.jar/Lib/runpy.py", line 
161, in _run_module_as_main
  File "/home/ale/dev/3toj/jython-standalone-2.7.0.jar/Lib/runpy.py", line 
72, in _run_code
  File 
"/home/ale/dev/3toj/jython-standalone-2.7.0.jar/Lib/ensurepip/__main__.py", 
line 4, in 
  File 
"/home/ale/dev/3toj/jython-standalone-2.7.0.jar/Lib/ensurepip/__init__.py", 
line 220, in _main
  File 
"/home/ale/dev/3toj/jython-standalone-2.7.0.jar/Lib/ensurepip/__init__.py", 
line 123, in bootstrap
  File 
"/home/ale/dev/3toj/jython-standalone-2.7.0.jar/Lib/ensurepip/__init__.py", 
line 45, in _run_pip
  File "/tmp/tmp9QnVEm/pip-1.6-py2.py3-none-any.whl/pip/__init__.py", line 
10, in 
  File "/tmp/tmp9QnVEm/pip-1.6-py2.py3-none-any.whl/pip/util.py", line 13, 
in 
  File 
"/tmp/tmp9QnVEm/pip-1.6-py2.py3-none-any.whl/pip/backwardcompat/__init__.py", 
line 115, in 
  File 
"/home/ale/dev/3toj/jython-standalone-2.7.0.jar/Lib/distutils/sysconfig.py", 
line 28, in 
  File "/home/ale/dev/3toj/jython-standalone-2.7.0.jar/Lib/posixpath.py", 
line 367, in realpath
  File "/home/ale/dev/3toj/jython-standalone-2.7.0.jar/Lib/posixpath.py", 
line 373, in _joinrealpath
  File "/home/ale/dev/3toj/jython-standalone-2.7.0.jar/Lib/posixpath.py", 
line 61, in isabs
AttributeError: 'NoneType' object has no attribute 'startswith'

--
components: Distutils
messages: 279633
nosy: dstufft, eric.araujo, iamale
priority: normal
severity: normal
status: open
title: Distutils fail if sys.executable is None
type: behavior

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



[issue28552] Distutils fail if sys.executable is None

2016-10-29 Thread Alexander P

Alexander P added the comment:

Well, project_base (which is what sys.executable is used for) is used only 
during build (i. e. python_build is True), if I understand it correctly. 
Normally, sys.prefix and sys.exec_prefix are used for all the paths.

Also, project_base can be explicitly set using _PYTHON_PROJECT_BASE environ 
variable, in which case we still don't need sys.executable (but it still would 
fail without one right now).

--

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



[issue44938] Expose PyErr_ChainExceptions in the stable API

2021-12-10 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

related: https://www.python.org/dev/peps/pep-0490/ (rejected pep to auto-chain 
from C API calls)

I don't come across it often, but I did just review some code at work today 
where the chain might have been nice (though not a big deal).

--
nosy: +gregory.p.smith

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



[issue31370] Remove support for threads-less builds

2021-12-10 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

https://web.dev/webassembly-threads/ suggests otherwise.

--

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



[issue37584] Multiple test failures with OSError: [Errno 84] Invalid or incomplete multibyte or wide character on ZFS with utf8only=on

2021-12-12 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

Confirmed.

Repro: Do an ubuntu 20.04 install and choose "experimental zfs" support during 
install - https://ubuntu.com/blog/zfs-focus-on-ubuntu-20-04-lts-whats-new).  On 
such a zfs filesystem, the following tests from a ./python -m test.regrtest run 
fail in 3.10:

11 tests failed:
test_cmd_line_script test_httpservers test_imp test_import
test_ntpath test_os test_posixpath test_socket test_unicode_file
test_unicode_file_functions test_zipimport

Move over to a tmpfs and all but test_httpservers now pass.  test_httpservers 
tries to create such a path on /tmp

==
ERROR: test_undecodable_filename 
(test.test_httpservers.SimpleHTTPServerTestCase)
--
Traceback (most recent call last):
  File "/home/greg/test/cpython/Lib/test/test_httpservers.py", line 400, in 
test_undecodable_filename
with open(os.path.join(self.tempdir, filename), 'wb') as f:
OSError: [Errno 84] Invalid or incomplete multibyte or wide character: 
'/tmp/tmpnt9ch98x/@test_124227_tmp\udce7w\udcf0.txt'


I expect any filesystem mounted to reject non-UTF8 pathnames to cause similar 
failures.  Our test suite needs to detect this environment and skip these tests 
there.

--
nosy: +gregory.p.smith
versions: +Python 3.10, Python 3.11 -Python 3.7, Python 3.8

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



[issue46056] Cannot use virtual environment on Windows 10 in corporate security settings

2021-12-14 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

While the discussion is interesting for some who are trying to work around 
security policy mechanisms, we can't control what policies people enforce upon 
themselves that make their machines useless for software development.  Marking 
as not a bug.

The normal thing to do is to obtain an exemption to policies from the corporate 
security org managing your machine(s) because you have a business need for it.

If you have specific implementation changes that would make life easier, file 
specific issues for those to be addressed.  (ex: PEP 582 is pretty specific - 
and there is a package manager https://pdm.fming.dev/ that supports it)

--
nosy: +gregory.p.smith
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

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



[issue46077] Include sha256 hashes of release downloads in announcement communications

2021-12-14 Thread Gregory P. Smith


New submission from Gregory P. Smith :

The announcement email list 
(https://mail.python.org/archives/list/python-announce-l...@python.org/) and 
other places we make announcements beyond just the release pages like 
https://www.python.org/downloads/release/python-3101/ should include a list of 
sha256 hashes of the release binaries in the announcement text.

This serves as an alternative confirmation that nothing has changed as such 
announcements are widely distributed and archived by independent parties and 
individuals and can thus convey a level of trust that a hash listed on the 
downloads page cannot (where an attacker would simply modify both).

Yes there is a gpg signature on the downloads. I encourage people to use that.  
But this provides an alternate distributed mechanism to verify that nothing has 
changed at all since the release announcement.  Something a gpg signature 
cannot fully do (consider this protection against the possibility of new signed 
binary being put into its place by a compromised key/signer/builder/RM before 
anyone happens to notice and poke around).

A simple table of:

filename.tar.gz | sha256 hash
filename.msi | sha256 hash
filename.dmg | sha256 hash
...

At the end of the announcement email/post would suffice.

Less of an issue on source packages as those can be verified against the git 
repo. But it's nice for people to know if binaries change without an 
announcement and explanation and is easy for us to provide.

Bonus points if the release announcement email body itself is signed (if that 
is even feasible per our release signing GPG key management).

[context: see recent python-dev subject: Python release announcement format]

--
messages: 408579
nosy: gregory.p.smith
priority: deferred blocker
severity: normal
status: open
title: Include sha256 hashes of release downloads in announcement communications
versions: Python 3.10, Python 3.11, Python 3.9

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



[issue41222] POpen bufsize=0 ignored with universal_newlines=True

2021-12-21 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
nosy: +gregory.p.smith

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



[issue46167] Parse assert (x == y, "Descriptive text") as statement params instead of a tuple

2021-12-23 Thread Gregory P. Smith


New submission from Gregory P. Smith :

Now that we have a shiny new parser, can we finally get rid of this language 
wart:

assert thing, description  # works as intended

assert (thing, description)  # always True as non-empty tuples are Truthy

This most often happens when extending thing or description beyond a single 
line on assert statements as () are the natural way to do that and as it is 
with assert being a statement, knowing specifically where to place the ()s to 
not fall into the pit of snakes of unintentionally nerfing your assertion to be 
an always true tuple is hard for human authors.

This would obsolete the pylint error about tuple assertion and enable more 
natural assert use.

py.test framework users would presumably rejoice as well.


This parsing change would need a PEP.  I fail to see any obvious downsides 
though.

--
components: Parser
messages: 409101
nosy: gregory.p.smith, lys.nikolaou, pablogsal
priority: normal
severity: normal
status: open
title: Parse assert (x == y, "Descriptive text") as statement params instead of 
a tuple
versions: Python 3.11

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



[issue46167] Parse assert (x == y, "Descriptive text") as statement params instead of a tuple

2021-12-23 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

It's not about an advantage, it's about removing the problem of what edit to 
make when working on


assert 
thing_that_has_a_meaningful_name.methods_have_good_names(value_from_somewhere) 
== other_thing_that_is_meaningful, "Description of what the issue is if this 
fails for humans, as if the names weren't enough"

and making that fit within whatever line length limit your codebase has.

put () in the wrong place and it triggers the long standing Python wart or 
parsing as a tuple.

rather than warn about the syntax wart, we should just do the thing code 
authors want in the first place.

--

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



[issue46150] test_pathlib assumes "fakeuser" does not exist as user

2021-12-23 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
assignee:  -> gregory.p.smith
nosy: +gregory.p.smith

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



[issue46150] test_pathlib assumes "fakeuser" does not exist as user

2021-12-23 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
pull_requests: +28466
pull_request: https://github.com/python/cpython/pull/30244

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



[issue46150] test_pathlib assumes "fakeuser" does not exist as user

2021-12-24 Thread Gregory P. Smith


Gregory P. Smith  added the comment:


New changeset b8de8b7039cee47465b2af9950b0b9ed2d3f2903 by Nikita Sobolev in 
branch 'main':
bpo-46150: ensure `fakeuser` does not exist in `PosixPathTest.test_expanduser` 
(GH-30240)
https://github.com/python/cpython/commit/b8de8b7039cee47465b2af9950b0b9ed2d3f2903


--

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



[issue10202] ftplib doesn't check close status after sending file

2021-12-24 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

[pasting in my investigation that I replied with on a mailing list:]

The possible problem does appear real but it likely not frequently observed and 
is something most people reading the code wouldn't see as it's rather esoteric:

https://blog.netherlabs.nl/articles/2009/01/18/the-ultimate-so_linger-page-or-why-is-my-tcp-not-reliable
via 
https://stackoverflow.com/questions/8874021/close-socket-directly-after-send-unsafe
 describes the scenario.

So does this apply in Python?

Apparently.  Our socket module close() is simply calling close as expected.
 https://github.com/python/cpython/blob/main/Modules/socketmodule.c#L3132 ->
 https://github.com/python/cpython/blob/main/Modules/socketmodule.c#L443

Our ftplib code that implicitly calls close on the data connection when exiting 
the
 `with self.transfercmd(cmd, rest) as conn: ` context manager
https://github.com/python/cpython/blob/main/Lib/ftplib.py#L498`

Triggers a close() without a prior shutdown(socket.SHUT_RDWR) + read() -> EOF 
or timeout dance.

In most protocols this isn't a big deal. ftp being so old as to rely solely on 
the TCP connection itself is the outlier.

How often does this happen in practice?  I don't know.  I haven't heard of it 
happening, but how many people honestly use ftplib to send data between 
operating systems where a socket close triggering a TCP RST rather than FIN on 
the sender might be more likely in the past 20 years?  I suspect not many.  

The code can be improved to prevent it.  But I don't believe it'll be feasible 
to construct a real world not-mock-filled regression test that would fail 
without it.

Potential solution:
  Do the shutdown+recv EOF dance as the final step inside of the storbinary and 
storlines `with self.transfercmd as conn` blocks.

Technically speaking socket.socket.shutdown() is conditionally compiled but I 
don't know if any platforms lacking the socket shutdown API exist anymore (my 
guess is that conditional compilation for shutdown is a leftover from the 
1990s). If so, a "if hasattr(conn, 'shutdown'):" conditional before the added 
logic would suffice.

Looking at various ftp client source code (netkit ftp & netbsd ftp - both bsd 
derivatives) as well as a modern gonuts golang one I do not see them explicitly 
doing the shutdown dance.  (I didn't dive in to figure out if it is hidden 
within their flclose() or conn.Close() implementations as that'd be surprising)

--
nosy: +gregory.p.smith

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



[issue10202] ftplib doesn't check close status after sending file

2021-12-24 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.1, Python 
3.2

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



[issue10202] ftplib doesn't check close status after sending file

2021-12-24 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
stage: test needed -> needs patch

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



[issue46120] Add note to `typing.Union` that it is recommended to use `|` instead

2021-12-24 Thread Gregory P. Smith


Gregory P. Smith  added the comment:


New changeset 1b30660c3b40da557050948ac8635f2dc50c4ee2 by Nikita Sobolev in 
branch 'main':
bpo-46120: State that `|` is preferred over `Union` (GH-30222)
https://github.com/python/cpython/commit/1b30660c3b40da557050948ac8635f2dc50c4ee2


--
nosy: +gregory.p.smith

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



[issue46150] test_pathlib assumes "fakeuser" does not exist as user

2021-12-27 Thread Gregory P. Smith


Change by Gregory P. Smith :


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

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



[issue46339] PEG parser segfault from ast.literal_eval

2022-01-10 Thread Gregory P. Smith


New submission from Gregory P. Smith :

cpython/b$ ./python 
Python 3.11.0a3+ (heads/main-dirty:081a214008, Jan 11 2022, 02:48:22) [GCC 
11.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import ast
>>> ast.literal_eval('''F"""
... 
... 
... {6
... 0="""''')
Segmentation fault

this was discovered by oss-fuzz.

This may be a recent regression?  It didn't happen on my build from a few weeks 
ago.  worth testing on older versions.

--
assignee: pablogsal
components: Parser
messages: 410270
nosy: gregory.p.smith, lys.nikolaou, pablogsal
priority: normal
severity: normal
stage: needs patch
status: open
title: PEG parser segfault from ast.literal_eval
type: crash
versions: Python 3.11

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



[issue46349] inspect.getdoc() should append parent class method docs when encountering a local one line docstring

2022-01-11 Thread Gregory P. Smith


New submission from Gregory P. Smith :

Today `inspect.getdoc()` is quite simple. If a method has any docstring, it 
returns it.

There is one idiom where this is not very useful to our users.  A """See base 
class.""" docstring on a method.

Rather than having to repeat the canonical base class documentation in all 
methods or argue with tooling about not having a docstring in this common 
scenario, a single line docstring being used as a hint to just bring in the 
parent's docstring would be more helpful to the user.

Today's inspect.getdoc() could would turn from:
https://github.com/python/cpython/blob/main/Lib/inspect.py#L850

into something like:

```
...
if doc is None or (isinstance(doc, str) and '\n' not in doc.strip()):
  try:
  parent_doc = _finddoc(object)
  if doc is None:
  doc = parent_doc
  elif isinstance(parent_doc, str):
  doc = f'{doc}\nParent class MRO doc:\n{parent_doc}'
  except (AttributeError, TypeError):
  return doc
   ...
```

Why not just tell people to omit docstrings when they want parent docs?  
Because not all coding styles and linter tooling allows for this as they aim to 
enforce that documentation _is_ written.  Source analysis tooling and IDEs may 
not have a whole transitive dependency view of where the base classes even come 
from and are thus incapable of reliably analyzing whether a parent MRO method 
even exists or has a docstring.  This allows for trivial one line docstrings in 
that situation while still providing better information to the help() user.

This would add value to when using 
help(typical_subclass_of_abstract_thing.method) in notebooks.

--
components: Library (Lib)
messages: 410335
nosy: gregory.p.smith
priority: normal
severity: normal
stage: needs patch
status: open
title: inspect.getdoc() should append parent class method docs when 
encountering a local one line docstring
type: enhancement
versions: Python 3.11

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



[issue46349] inspect.getdoc() should append parent class method docs when encountering a local one line docstring

2022-01-11 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

>From the context of help(typical_subclass_of_abstract_thing.method), the user 
>isn't told what the base classes are or which one might have documentation.  
>So it could become an exercise in frustration.

and LOL yes the parameter name is silly but that's a separate module wide 
cleanup that could be done - inspect is full of public APIs that shadow object 
as a parameter name.  it is often quite old code.

--

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



[issue46347] memory leak in PyEval_EvalCodeEx

2022-01-11 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

when was the regression introduced?

I wouldn't necessarily rush an urgent release out unless this was just 
introduced in the 3.10.1 patch release.  Could it wait for 3.10.2 already 
scheduled for four weeks from now?

--
nosy: +gregory.p.smith

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



[issue27273] subprocess.run(cmd, input='text') should pass universal_newlines=True to Popen

2022-01-12 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

agreed.

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

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



[issue40255] Fixing Copy on Writes from reference counting

2022-01-14 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

[data] I finally dug up the old YouTube doc at work with their findings. Mostly 
just posting this here for future public reference if anyone wants. Nothing 
surprising.

When youtube experimented with a modified 2.7 adding "eternal refcounts" in 
2015, they saw a 3-5% CPU performance regression. (not the 10% I had in my mind)

Their version of this simply set a high bit on the refcount as the indicator 
and added the obvious conditional into the Py_INCREF/Py_DECREF macros.

Unsurprisingly in line with what others have since found. For their preforked 
server and decision of what to mark eternal before forking, it saved them 10% 
ram (fewer copy on writes). The -ram vs +cpu +maintenance cost tradeoff wound 
up not being worthwhile to them though. Their motivation for trying was 
entirely COW memory savings.

=== CPython 2.7 object.h modification they used:

```
+#ifdef GOOGLE_ETERNAL_REFCOUNT_SUPPORT
+
+#define PY_ETERNAL_REFCOUNT (PY_SSIZE_T_MAX / 2)
+
+#define Py_IS_ETERNAL(op) (   \
+  ((PyObject*)(op))->ob_refcnt >= PY_ETERNAL_REFCOUNT)
+
+#define Py_SET_ETERNAL(op)\
+  do {\
+  ((PyObject*)(op))->ob_refcnt = PY_ETERNAL_REFCOUNT; \
+  if (PyObject_IS_GC(op)) {   \
+PyObject_GC_UnTrack(op);  \
+  }   \
+  } while (0)
+
+#define Py_INCREF(op) (   \
+  Py_IS_ETERNAL(op)   \
+?  PY_ETERNAL_REFCOUNT\
+:  (_Py_INC_REFTOTAL  _Py_REF_DEBUG_COMMA \
+   ((PyObject*)(op))->ob_refcnt++)\
+  )
+
+#define Py_DECREF(op)   \
+do {\
+if (Py_IS_ETERNAL(op)) break;   \
+if (_Py_DEC_REFTOTAL  _Py_REF_DEBUG_COMMA   \
+--((PyObject*)(op))->ob_refcnt != 0)\
+_Py_CHECK_REFCNT(op)\
+else\
+_Py_Dealloc((PyObject *)(op));  \
+} while (0)
+
+#else
```

--

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



[issue46406] optimize int division

2022-01-16 Thread Gregory P. Smith


New submission from Gregory P. Smith :

Based on a python-dev thread, we've come up with faster int division code for 
CPython's bignums.

https://mail.python.org/archives/list/python-...@python.org/thread/ZICIMX5VFCX4IOFH5NUPVHCUJCQ4Q7QM/#NEUNFZU3TQU4CPTYZNF3WCN7DOJBBTK5

filing this issue for starters to attach a PR to.  details forthcoming.

--
messages: 410735
nosy: gregory.p.smith
priority: normal
severity: normal
stage: needs patch
status: open
title: optimize int division
type: performance
versions: Python 3.11

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



[issue46406] optimize int division

2022-01-16 Thread Gregory P. Smith


Change by Gregory P. Smith :


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

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



[issue46406] optimize int division

2022-01-16 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

The PR was directly inspired by Mark Dickinson's code in the email thread 
directly using __asm__ to get the instruction he wanted.  There is usually a 
way to make the compiler actually do what you intend.  This appears to be it.

Interestingly, experimenting with small code snippets rather than the entire 
longobject.c on gotbolt.org to check various compilers output does not always 
yield as nice of a result.  (clang 11+ showed promise there, but this change 
benefits gcc equally as well in real world CPython microbenchmark timeit 
tests).  https://godbolt.org/z/63eWPczjx was my playground code.

```
$ ./b-clang13/python -m timeit -n 150 -s 'x = 10**1000; r=x//10; assert r 
== 10**999, r' 'x//17'
150 loops, best of 5: 450 nsec per loop
$ ./b-clang13-new-basic-divrem1/python -m timeit -n 150 -s 'x = 10**1000; 
r=x//10; assert r == 10**999, r' 'x//17'
150 loops, best of 5: 375 nsec per loop
$ ./b-gcc9/python -m timeit -n 150 -s 'x = 10**1000; r=x//10; assert r == 
10**999, r' 'x//17'
150 loops, best of 5: 448 nsec per loop
$ ./b-gcc9-new-basic-divrem1/python -m timeit -n 150 -s 'x = 10**1000; 
r=x//10; assert r == 10**999, r' 'x//17'
150 loops, best of 5: 370 nsec per loop
```

That's on an AMD zen3 (x86_64).  Also tested with other divisors, 17 is not 
specialized by the compiler.  These were not --enable-optimizations builds, 
though the results remain similar on those for non-specialized values as x//10 
turns into when using -fprofile-values on gcc9.

Performance tests using other architectures forthcoming.

A pyperformance suite run on a benchmark-stable host is worthwhile. I don't 
actually expect this to show up as significant in most things there; we'll see.

The new code is not any more difficult to maintain than the previous code 
regardless.

--

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



[issue46406] optimize int division

2022-01-16 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
nosy: +mark.dickinson

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



[issue46406] optimize int division

2022-01-16 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

I tested my PR branch on 32-bit arm (raspbian bullseye) and the microbenchmark 
timing shows no change (within the noise across repeated runs).  Unsurprising 
as division is entirely different on 32-bit arm.

Raspbian uses armv6 for compatibility with the original rpi and rpi0.  armv6 
does not have an integer division instruction. (how RISCy of it)  But that 
doesn't make a difference in this code as the final 32-bit arm ISA, armv7-a, 
only has a 32:32 divider.  (armv8 aka aarch64 is 64-bit and uses a UDIV as one 
would expect)

anyways, that satisfies me that it isn't making anything worse elsewhere.

--

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



[issue45452] Support crash tolerance feature for gdbm module

2022-01-17 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

The gdbm module's purpose is effectively one of just exposing the underlying C 
library APIs to Python as you said.  

Consider this a +1 in favor of exposing the new APIs in the Python gdbm module.

I'm not concerned about anyone wanting these in older Python versions. It 
really requires a combination of modern software in order to use.  Running on a 
recent kernel version, using a non-default fancy filesystem, and linking 
against a recent gdbm library.  So being a new feature in 3.11 makes sense.  
Anyone satisfying all of the above is highly likely to already also use a 
recent CPython.

If anyone _really_ wants it for older things, they can maintain backport on 
PyPI.

--
nosy: +gregory.p.smith

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



[issue40120] Undefined C behavior going beyond end of struct via a [1] arrays.

2022-01-21 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

off the top of my head that might actually work as I _think_ "empty" things are 
required to consume an unused byte of size no matter what meaning sizeof 
shouldn't change?  Some testing and standards perusing for C99 is in order to 
confirm that though.

--

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



[issue39207] concurrent.futures.ProcessPoolExecutor does not properly reap jobs and spawns too many workers

2022-01-21 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

fyi - this appears to have caused https://bugs.python.org/issue46464

--
nosy: +gregory.p.smith

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



[issue46464] concurrent.futures.ProcessPoolExecutor can deadlock when tcmalloc is used

2022-01-21 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

For context, the fundamental problem is that os.fork() is unsafe to use in any 
process with threads.  concurrent/futures/process.py violates this.  So long as 
its design involves a thread, it can never be guaranteed not to deadlock.

POSIX forbids execution of most code after fork() has been called.  Returning 
to the CPython interpreter after os.fork() in the child process is never safe 
unless the parent process had no threads at fork time.

The change that triggered the issue moved from doing all of the os.fork() calls 
for the workers up front *before the thread was spawned* to doing them on 
demand after the thread was running.

The bugfix for this is simply a rollback to revert the bpo-39207 change. It was 
a performance enhancement, but it causes a new deadlock in code that didn't 
already have one when thread tuned malloc implementations are used.

The only way to safely launch worker processes on demand is to spawn a worker 
launcher process spawned prior to any thread creation that remains idle, with a 
sole job of spawn new worker processes for us. That sounds complicated. That'd 
be a feature. Lets go with the bugfix first.

--
assignee:  -> gregory.p.smith
keywords: +3.9regression
nosy: +gregory.p.smith
stage:  -> needs patch
type:  -> resource usage

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



[issue46493] Add an API to indicate if the process might have multiple threads

2022-01-23 Thread Gregory P. Smith


New submission from Gregory P. Smith :

It'd be handy to have a function to determine if there are multiple threads in 
the current process or not - at least on POSIXish systems.  This would be 
useful anytime a library is trying to use os.fork(), as fork() is not safe in a 
multi-threaded process.

Motivation: I want to _use_ this API to consider raising RuntimeWarnings in 
libraries that call fork() to highlight the problem to people attempting to use 
that code in multithreaded processes.

As POSIXy OSes don't usually have a simple API to get this information, one 
implementation such as this could make sense:

```
def is_process_multithreaded() -> bool:
"""Are there multiple threads in this process? OSError if no such OS API is 
available."""
threads = 0
ourself = str(os.gettid())
i_feel_seen = False
try:
# Linux, NetBSD, any others?
with os.scandir('/proc/self/task') as tasks:
for task_dir_entry in tasks:
# tid named subdirs should be the only thing that exists.
# We do a simple conformity check just in case.
if task_dir_entry.name.isdigit():
if task_dir_entry.name == ourself:
i_feel_seen = True
threads += 1
if i_feel_seen and threads > 1:
return True  # Multiple threads confirmed.
except EnvironmentError:
raise OSError('Unable to count threads on this platform.')
if i_feel_seen and threads == 1:
return False
else:
raise OSError(f'Unclear. Found {threads} in /proc/self/task and did not 
find ourself.')
```

macOS has mach darwin kernel APIs that can do this. Not well documented but 
they do work - 
https://stackoverflow.com/questions/21478229/how-to-count-number-of-alive-threads-in-ios

FreeBSD has APIs that can do this (see FreeBSD usr.bin/procstat/ source).

configure.ac checks and an extension module would be needed to integrate those.

My use case is not relevant to Windows (a platform unburdened by fork) but 
Windows APIs to answer the question exist if anyone has a reason to want this 
there as well - 
https://stackoverflow.com/questions/3749668/how-to-query-the-thread-count-of-a-process-using-the-regular-windows-c-c-apis

--
components: Library (Lib)
messages: 411420
nosy: gregory.p.smith
priority: normal
severity: normal
stage: needs patch
status: open
title: Add an API to indicate if the process might have multiple threads
type: enhancement
versions: Python 3.11

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



[issue5404] Cross-compiling CPython - need a buildbot

2022-01-23 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
title: Cross-compiling Python -> Cross-compiling CPython - need a buildbot
versions: +Python 3.11 -Python 3.4

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



  1   2   3   4   5   6   7   8   9   10   >