[issue40774] "Important" block in documentation of asyncio.create_subprocess_shell() not indented correctly

2020-05-25 Thread Stephan Hohe


New submission from Stephan Hohe :

The [documentation][1] for asyncio.create_subprocess_shell() contains an 
"important" block about quoting special characters. This block and the 
following deprecation note belong to this specific function, but are not 
correctly indented and shown at module level.

 [1]: 
https://docs.python.org/3.10/library/asyncio-subprocess.html#asyncio.create_subprocess_shell

--
assignee: docs@python
components: Documentation
messages: 369930
nosy: docs@python, sth
priority: normal
severity: normal
status: open
title: "Important" block in documentation of asyncio.create_subprocess_shell() 
not indented correctly
versions: Python 3.10, Python 3.7, Python 3.8, Python 3.9

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



[issue40774] "Important" block in documentation of asyncio.create_subprocess_shell() not indented correctly

2020-05-25 Thread Stephan Hohe


Change by Stephan Hohe :


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

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



[issue35621] asyncio.create_subprocess_exec() only works with main event loop

2018-12-30 Thread Stephan Hohe


New submission from Stephan Hohe :

`asyncio.create_subprocess_exec()` accepts a `loop` parameter, but doesn't use 
it to watch the child process. Instead uses 
`get_event_loop_policy().get_child_watcher()`, which doesn't doesn't know about 
`loop` but tries to use the current default event loop.

This fails if there is no current event loop or if that loop isn't running:

```
import asyncio

async def action(loop):
proc = await asyncio.create_subprocess_exec('echo', loop=loop)
await proc.wait()

loop = asyncio.new_event_loop()
loop.run_until_complete(action(loop))
loop.close()
```

This crashes because the main event loop never was created:

Traceback (most recent call last):
  File "sample.py", line 8, in 
loop.run_until_complete(action(loop))
  File "/home/sth/devel/cpython.vanilla/Lib/asyncio/base_events.py", line 589, 
in run_until_complete
return future.result()
  File "sample.py", line 4, in action
proc = await asyncio.create_subprocess_exec('echo', loop=loop)
  File "/home/sth/devel/cpython.vanilla/Lib/asyncio/subprocess.py", line 213, 
in create_subprocess_exec
transport, protocol = await loop.subprocess_exec(
  File "/home/sth/devel/cpython.vanilla/Lib/asyncio/base_events.py", line 1542, 
in subprocess_exec
transport = await self._make_subprocess_transport(
  File "/home/sth/devel/cpython.vanilla/Lib/asyncio/unix_events.py", line 193, 
in _make_subprocess_transport
watcher.add_child_handler(transp.get_pid(),
  File "/home/sth/devel/cpython.vanilla/Lib/asyncio/unix_events.py", line 924, 
in add_child_handler
raise RuntimeError(
RuntimeError: Cannot add child handler, the child watcher does not have a loop 
attached


If we do have a current event loop, for example by calling 
`asyncio.get_event_loop()` before creating out own loop, then we don't get an 
error, but the program hangs indefinitely since that loop isn't running.

Expected behavior would be that the loop given to create_subprocess_exec() is 
used to watch the child process.

--
components: asyncio
messages: 332771
nosy: asvetlov, sth, yselivanov
priority: normal
severity: normal
status: open
title: asyncio.create_subprocess_exec() only works with main event loop
type: behavior
versions: Python 3.6, Python 3.7, Python 3.8

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



[issue35623] Segfault in test_bigmem.ListTest.test_sort

2018-12-30 Thread Stephan Hohe


New submission from Stephan Hohe :

When running test_bigmem with -M 30G the interpreter crashes in 
list_sort_impl() in  Objects/listobject.c:2290 due to an integer overflow in 
`i`.

--
components: Interpreter Core
messages: 332780
nosy: sth
priority: normal
severity: normal
status: open
title: Segfault in test_bigmem.ListTest.test_sort
type: crash
versions: Python 3.7, Python 3.8

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



[issue35623] Segfault in test_bigmem.ListTest.test_sort

2018-12-30 Thread Stephan Hohe


Change by Stephan Hohe :


--
keywords: +patch, patch
pull_requests: +10727, 10728
stage:  -> patch review

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



[issue35623] Segfault in test_bigmem.ListTest.test_sort

2018-12-30 Thread Stephan Hohe


Change by Stephan Hohe :


--
keywords: +patch
pull_requests: +10727
stage:  -> patch review

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



[issue35623] Segfault in test_bigmem.ListTest.test_sort

2018-12-30 Thread Stephan Hohe


Change by Stephan Hohe :


--
keywords: +patch, patch, patch
pull_requests: +10727, 10728, 10729
stage:  -> patch review

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



[issue35623] Segfault in test_bigmem.ListTest.test_sort

2018-12-30 Thread Stephan Hohe


Stephan Hohe  added the comment:

Actually the segfault is in Objects/listobject.c:2301 in that test since it 
doesn't use tuples. But the takeaway is the same: `i` overflows to a negative 
number and causes an invalid memory access.

--

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



[issue36251] Invalid format specifiers in MatchObject and StdPrinter repr

2019-03-09 Thread Stephan Hohe


New submission from Stephan Hohe :

match_repr() and stdprinter_repr() contain calls to PyUnicode_FromFormat() with 
format specifiers that don't match the arguments.

See the upcoming pull request for details.

--
components: Interpreter Core, Regular Expressions
messages: 337574
nosy: ezio.melotti, mrabarnett, sth
priority: normal
severity: normal
status: open
title: Invalid format specifiers in MatchObject and StdPrinter repr
versions: Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8

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



[issue36251] Invalid format specifiers in MatchObject and StdPrinter repr

2019-03-09 Thread Stephan Hohe


Change by Stephan Hohe :


--
keywords: +patch
pull_requests: +12240
stage:  -> patch review

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



[issue36285] Integer overflow in array.array.remove()

2019-03-13 Thread Stephan Hohe


New submission from Stephan Hohe :

The array module's `array.remove(x)` iterates over the array, searching for 
`x`. If the array contains >=2G elements this can overflow the `int` loop 
variable.

`array__array_reconstructor_impl()` also contains loops with `int` variables 
that likely have the similar problems.

Changing the loop variables to `Py_ssize_t` fixes the problem. For details see 
the PR.

--
components: Extension Modules
messages: 337889
nosy: sth
priority: normal
severity: normal
status: open
title: Integer overflow in array.array.remove()
type: crash
versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8

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



[issue36285] Integer overflow in array.array.remove()

2019-03-13 Thread Stephan Hohe


Change by Stephan Hohe :


--
keywords: +patch
pull_requests: +12291
stage:  -> patch review

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



[issue32797] Tracebacks from Cython modules no longer work

2018-05-01 Thread Stephan Hohe

Stephan Hohe  added the comment:

How does CPython display the source for tracebacks in Cython modules? It seems 
to work there as long as the Cython .pyx files are somewhere in the import path.

--
nosy: +sth

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



[issue32797] Tracebacks from Cython modules no longer work

2018-05-01 Thread Stephan Hohe

Stephan Hohe  added the comment:

Yes, I tried the Python 3.5 that comes with my system as well as the latest 
checkout from github. Both show source code lines in tracebacks for me.

I used a rather simple test setup, just two directories with .so and .pyx which 
I added to sys.path (any order seems to work). I haven't checked a proper 
install of an extension module via pip/...

--

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



[issue32797] Tracebacks from Cython modules no longer work

2018-05-01 Thread Stephan Hohe

Stephan Hohe  added the comment:

> Do you mean the "python" command-line program?

Yes, that's what I used.

>  That uses a different algorithm:

I see, it only works for top-level modules. You're right, that's not a real 
solution.

--

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



[issue27300] tempfile.TemporaryFile(): missing errors=... argument

2018-05-02 Thread Stephan Hohe

Change by Stephan Hohe :


--
pull_requests: +6390
status: pending -> open

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