[issue41066] Update documentation for Pathlib

2020-08-13 Thread Antoine Pitrou


Change by Antoine Pitrou :


--
versions:  -Python 3.7

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



[issue41066] Update documentation for Pathlib

2020-08-13 Thread Antoine Pitrou


Change by Antoine Pitrou :


--
pull_requests: +20991
pull_request: https://github.com/python/cpython/pull/21864

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



[issue41066] Update documentation for Pathlib

2020-08-13 Thread Antoine Pitrou

Antoine Pitrou  added the comment:


New changeset 0eb9deb4a62e6d9daa82bc2f67d1075864ca8ece by Srinivas Reddy 
Thatiparthy (శ్రీనివాస్  రెడ్డి తాటిపర్తి) in branch 'master':
bpo-41066: Update the comparison section for os vs pathlib (GH-21261)
https://github.com/python/cpython/commit/0eb9deb4a62e6d9daa82bc2f67d1075864ca8ece


--

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



[issue30155] Add ability to get tzinfo from a datetime instance in C API

2020-07-20 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

> I'm going to rename this bug to focus only on issue #1. I think we can accept 
> a PR adding two new macros. I would suggest calling them:
> - PyDateTime_DATE_GET_TZINFO
> - PyDateTime_TIME_GET_TZINFO

+1 for this.

--
nosy: +pitrou

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



[issue39604] Document PyDateTimeAPI / PyDateTime_CAPI struct

2020-07-20 Thread Antoine Pitrou


Change by Antoine Pitrou :


--
stage:  -> needs patch
type:  -> behavior
versions: +Python 3.10

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



[issue41324] Add a minimal decimal capsule API

2020-07-17 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

I probably won't try it out explicitly (it's basically cumbersome for us to 
test with non-release Pythons, because of our dependencies to Numpy and 
Cython), but reviewing the API should be enough anyway.

--

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



[issue41208] An exploitable segmentation fault in marshal module

2020-07-05 Thread Antoine Pitrou


Change by Antoine Pitrou :


--
nosy: +serhiy.storchaka, vstinner

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



[issue40874] Update to libmpdec-2.5.0

2020-07-04 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

Thanks for the clarification.  I agree this does not seem to be a very big 
deal, if slightly annoying for the packager who will have to deal with it.

--

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



[issue40874] Update to libmpdec-2.5.0

2020-07-04 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

Hmm, I'm only taking notice of this comment thread now.

(sorry, but due to spam filtering issues I only receive bpo e-mail 
notifications intermittently... and that's despite having tried two separate 
e-mail providers which otherwise give me no problems :-/)

In any case, I would have had a hard time giving a competent opinion on this 
issue.  But I'm a bit saddened by how heated the discussion went.  Hopefully 
this is all over.

--

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



[issue41195] Interface to OpenSSL's security level

2020-07-04 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

No strong feelings on this, but the OpenSSL runtime is not always packaged by a 
Linux distribution.  (macOS, Windows and Anaconda come to mind)

If one wants to retain the setter facility, one could raise a RuntimeWarning if 
the user *lowers* the actual security level.

--
nosy: +pitrou

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



[issue29753] Ctypes Packing Bitfields Incorrectly - Linux

2020-06-29 Thread Antoine Pitrou


Change by Antoine Pitrou :


--
versions: +Python 3.8, Python 3.9 -Python 2.7, Python 3.4, Python 3.5, Python 
3.6

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



[issue41115] Codecs should raise precise UnicodeDecodeError or UnicodeEncodeError

2020-06-25 Thread Antoine Pitrou


New submission from Antoine Pitrou :

A number of codecs raise bare UnicodeError, rather than 
Unicode{Decode,Encode}Error. Example:

  File 
"/home/antoine/miniconda3/envs/pyarrow/lib/python3.7/encodings/utf_16.py", line 
67, in _buffer_decode
raise UnicodeError("UTF-16 stream does not start with BOM")

A more complete list can be found here:
https://gist.github.com/pitrou/60594b28d8e47edcdb97d9b15d5f9866

--
components: Library (Lib)
keywords: easy
messages: 372367
nosy: benjamin.peterson, ezio.melotti, lemburg, pitrou, serhiy.storchaka, 
vstinner
priority: normal
severity: normal
stage: needs patch
status: open
title: Codecs should raise precise UnicodeDecodeError or UnicodeEncodeError
type: behavior
versions: Python 3.7, Python 3.8, Python 3.9

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



[issue15655] PEP 384 Refactoring applied to json module

2020-06-22 Thread Antoine Pitrou


Change by Antoine Pitrou :


--
nosy:  -pitrou

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



[issue40895] weakref documentation contains cautions about dictionary mutation problems that have been solved in the implementation

2020-06-10 Thread Antoine Pitrou


Change by Antoine Pitrou :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
type:  -> behavior
versions: +Python 3.7, Python 3.8, Python 3.9

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



[issue40895] weakref documentation contains cautions about dictionary mutation problems that have been solved in the implementation

2020-06-10 Thread Antoine Pitrou


Change by Antoine Pitrou :


--
pull_requests: +19989
pull_request: https://github.com/python/cpython/pull/20793

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



[issue40895] weakref documentation contains cautions about dictionary mutation problems that have been solved in the implementation

2020-06-10 Thread Antoine Pitrou


Change by Antoine Pitrou :


--
nosy: +pitrou
nosy_count: 3.0 -> 4.0
pull_requests: +19988
pull_request: https://github.com/python/cpython/pull/20792

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



[issue22079] Ensure in PyType_Ready() that base class of static type is static

2020-05-12 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

The workaround that Cython had to added for this (temporarily enable 
Py_TPFLAGS_HEAPTYPE when calling PyType_Ready()) is fragile. It would be nice 
to rethink the approach here, or disable the check altogether.

(or perhaps, expose another C API function - such as PyType_ReadyEx() - that 
allows disabling the check)

--

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



[issue39435] pickle: inconsistent arguments pickle.py vs _pickle.c vs docs

2020-05-01 Thread Antoine Pitrou


Change by Antoine Pitrou :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.7, Python 3.8

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



[issue39435] pickle: inconsistent arguments pickle.py vs _pickle.c vs docs

2020-05-01 Thread Antoine Pitrou


Change by Antoine Pitrou :


--
pull_requests: +19162
pull_request: https://github.com/python/cpython/pull/19844

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



[issue39435] pickle: inconsistent arguments pickle.py vs _pickle.c vs docs

2020-05-01 Thread Antoine Pitrou


Change by Antoine Pitrou :


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

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



[issue32494] Use gdbm_count if possible

2020-05-01 Thread Antoine Pitrou


Antoine Pitrou  added the comment:


New changeset 8727664557cd44dcd00612ccba816942e8f885ab by Dong-hee Na in branch 
'master':
bpo-32494: Use gdbm_count for dbm_length if possible (GH-19814)
https://github.com/python/cpython/commit/8727664557cd44dcd00612ccba816942e8f885ab


--
nosy: +pitrou

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



[issue32494] Use gdbm_count if possible

2020-05-01 Thread Antoine Pitrou


Change by Antoine Pitrou :


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

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



[issue40399] IO streams locking can be broken after fork() with threads

2020-04-29 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

The TextIOWrapper uses an underlying BufferedWriter, which is thread-safe (and 
therefore has an internal lock).

--

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



[issue39995] test_concurrent_futures: ProcessPoolSpawnExecutorDeadlockTest.test_crash() fails with OSError: [Errno 9] Bad file descriptor

2020-04-29 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

I looked at the change and it seemed ok to me. Perhaps Thomas can give it a 
look too.

--
assignee: aeros -> vstinner

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



[issue39995] test_concurrent_futures: ProcessPoolSpawnExecutorDeadlockTest.test_crash() fails with OSError: [Errno 9] Bad file descriptor

2020-04-28 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

With the same traceback and error message?

--

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



[issue6721] Locks in the standard library should be sanitized on fork

2020-04-28 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

Related issue:
https://bugs.python.org/issue40399
"""
IO streams locking can be broken after fork() with threads
"""

--

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



[issue40399] IO streams locking can be broken after fork() with threads

2020-04-28 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

Well, as the documentation states, `QueueListener.start` """starts up a 
background thread to monitor the queue for LogRecords to process""" :-)

--

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



[issue40399] IO streams locking can be broken after fork() with threads

2020-04-28 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

I can reproduce on Ubuntu 18.04 with git master.

Here is a better example which clearly shows the issue:
https://gist.github.com/pitrou/d9784d5ec679059cd02fce4b38ea2fa6

After a few runs, you'll see that the child Process hangs when trying to flush 
the standard streams:
Timeout (0:00:01)!
Thread 0x7efbff6c0080 (most recent call first):
  File "/home/antoine/cpython/default/Lib/multiprocessing/util.py", line 435 in 
_flush_std_streams
  File "/home/antoine/cpython/default/Lib/multiprocessing/process.py", line 335 
in _bootstrap
  File "/home/antoine/cpython/default/Lib/multiprocessing/popen_fork.py", line 
71 in _launch
  File "/home/antoine/cpython/default/Lib/multiprocessing/popen_fork.py", line 
19 in __init__
  File "/home/antoine/cpython/default/Lib/multiprocessing/context.py", line 276 
in _Popen
  File "/home/antoine/cpython/default/Lib/multiprocessing/context.py", line 224 
in _Popen
  File "/home/antoine/cpython/default/Lib/multiprocessing/process.py", line 121 
in start
  File "/home/antoine/cpython/default/bpo40399.py", line 25 in 
Child process failed!


@Delgan, mixing processes and threads is problematic with the default settings. 
 See here:
https://docs.python.org/3/library/multiprocessing.html#contexts-and-start-methods

"""Note that safely forking a multithreaded process is problematic."""

If you call `multiprocessing.set_start_method("forkserver")` at the start of 
your program, the problem will disappear.

--
nosy: +pitrou, vstinner
title: Program hangs if process created right after adding object to a Queue -> 
IO streams locking can be broken after fork() with threads
versions: +Python 3.9

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



[issue39995] test_concurrent_futures: ProcessPoolSpawnExecutorDeadlockTest.test_crash() fails with OSError: [Errno 9] Bad file descriptor

2020-04-28 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

How about the following (untested):

diff --git a/Lib/concurrent/futures/process.py 
b/Lib/concurrent/futures/process.py
index 8e9b69a8f0..c0c2eb3032 100644
--- a/Lib/concurrent/futures/process.py
+++ b/Lib/concurrent/futures/process.py
@@ -66,23 +66,29 @@ _global_shutdown = False
 
 class _ThreadWakeup:
 def __init__(self):
-self._closed = False
 self._reader, self._writer = mp.Pipe(duplex=False)
 
 def close(self):
-if not self._closed:
-self._closed = True
-self._writer.close()
-self._reader.close()
+r, w = self._reader, self._writer
+self._reader = self._writer = None
+if r is not None:
+r.close()
+w.close()
 
 def wakeup(self):
-if not self._closed:
+try:
 self._writer.send_bytes(b"")
+except AttributeError:
+# Closed
+pass
 
 def clear(self):
-if not self._closed:
+try:
 while self._reader.poll():
 self._reader.recv_bytes()
+except AttributeError:
+# Closed
+pass
 
 
 def _python_exit():

--

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



[issue40061] Possible refleak in _asynciomodule.c future_add_done_callback()

2020-04-28 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

You're right that a Py_DECREF is missing there.  However, it seems unlikely 
that this is triggering the test failure, because `PyList_New(1)` will 
practically never fail in normal conditions (and even making it deliberately 
fail would be quite difficult).

--
nosy: +pitrou

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



[issue40402] Race condition in multiprocessing/connection.py: broken handle

2020-04-27 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

I don't know if a try..except block is the best solution, but feel free to 
submit a PR and we can iterate on that :-)

--
stage:  -> needs patch

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



[issue37790] subprocess.Popen() is extremely slow (with close_fds=True which is the default) on Illumos

2020-04-24 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

I think we would accept a PR since it would probably be trivial, but someone 
has to submit it :-)

--

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



[issue40346] Add random.BaseRandom to ease implementation of subclasses

2020-04-23 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

If I believe what Victor wrote about:
"""
The implementation of random.Random, random.SystemRandom and
random.Random subclasses are not affected by this change.
"""

then I don't understand how the API is changed.  IIUC, users subclassing 
random.Random won't see a difference.  However, users now can subclass 
BaseRandom which makes it easier to obtain a full-featured random generator 
class.

However, if we want to think about a new subclassing API, it may be worth 
looking at the recent Numpy changes. Numpy added a new random generator API 
recently, with a design based on composition rather than inheritance (and also 
they switched from Mersenne Twister to another underlying PRNG!):
https://numpy.org/doc/stable/reference/random/index.html

--

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



[issue40358] pathlib's relative_to should behave like os.path.relpath

2020-04-22 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

The current behaviour is by design.  I would not mind adding an option to 
control it, though.

If you are new to Python development and want to submit a patch or PR, I 
recommend reading the Developer's Guide:
https://devguide.python.org/

--

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



[issue40346] Redesign random.Random class inheritance

2020-04-20 Thread Antoine Pitrou


Change by Antoine Pitrou :


--
keywords: +patch
nosy: +pitrou
nosy_count: 1.0 -> 2.0
pull_requests: +18957
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/19539

___
Python tracker 
<https://bugs.python.org/issue40346>
___
___
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.

2020-04-20 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

Another possibility yet would be:

typedef struct {
PyObject_VAR_HEAD
Py_hash_t ob_shash;
char ob_sval;
} PyBytesObject;

#define PyBytes_AS_STRING(op) (assert(PyBytes_Check(op)), \
&(((PyBytesObject *)(op))->ob_sval))

Not sure whether that would be UB...

--
nosy: +pitrou

___
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



[issue40330] ShareableList size guard incorrect for str data

2020-04-20 Thread Antoine Pitrou


Change by Antoine Pitrou :


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

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



[issue40330] ShareableList size guard incorrect for str data

2020-04-20 Thread Antoine Pitrou


Antoine Pitrou  added the comment:


New changeset 887ff8e37e238fbce18c647e588283904f38ab24 by Antoine Pitrou in 
branch '3.8':
[3.8] bpo-40330: Fix utf-8 size check in ShareableList (GH-19606) (GH-19625)
https://github.com/python/cpython/commit/887ff8e37e238fbce18c647e588283904f38ab24


--

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



[issue40330] ShareableList size guard incorrect for str data

2020-04-20 Thread Antoine Pitrou


Change by Antoine Pitrou :


--
pull_requests: +18953
pull_request: https://github.com/python/cpython/pull/19625

___
Python tracker 
<https://bugs.python.org/issue40330>
___
___
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

2020-04-20 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

Wow.  I see, thank you.

--

___
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



[issue40255] Fixing Copy on Writes from reference counting

2020-04-20 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

> We also have the real world app that is Instagram.

I don't think Instagram is a single app. What is Python used for at Instagram?

--

___
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



[issue40255] Fixing Copy on Writes from reference counting

2020-04-20 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

> Benchmarking already showed that the branching version is faster.

But micro-benchmarks may tell you things which are not true in the real-world 
(for example an easily-predicted branch).

--

___
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



[issue40148] Add PurePath.with_stem()

2020-04-19 Thread Antoine Pitrou


Change by Antoine Pitrou :


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

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



[issue40148] Add PurePath.with_stem()

2020-04-19 Thread Antoine Pitrou


Antoine Pitrou  added the comment:


New changeset 8aea4b3605059e243f1827d9328d6fc8d698c0a7 by Tim Hoffmann in 
branch 'master':
bpo-40148: Add PurePath.with_stem() (GH-19295)
https://github.com/python/cpython/commit/8aea4b3605059e243f1827d9328d6fc8d698c0a7


--

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



[issue40330] ShareableList size guard incorrect for str data

2020-04-19 Thread Antoine Pitrou


Change by Antoine Pitrou :


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

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



[issue38891] ShareableList read and write access is O(N), should be O(1)

2020-04-19 Thread Antoine Pitrou


Change by Antoine Pitrou :


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

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



[issue38891] ShareableList read and write access is O(N), should be O(1)

2020-04-19 Thread Antoine Pitrou


Antoine Pitrou  added the comment:


New changeset c8f1715283ec51822fb37a702bf253cbac1af276 by Thomas Krennwallner 
in branch 'master':
bpo-38891: avoid quadratic item access performance of ShareableList (GH-18996)
https://github.com/python/cpython/commit/c8f1715283ec51822fb37a702bf253cbac1af276


--
nosy: +pitrou

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



[issue40330] ShareableList size guard incorrect for str data

2020-04-19 Thread Antoine Pitrou


New submission from Antoine Pitrou :

The size check is done before encoding to utf-8...

--

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



[issue40330] ShareableList size guard incorrect for str data

2020-04-19 Thread Antoine Pitrou


Change by Antoine Pitrou :


--
assignee: pitrou
components: Library (Lib)
nosy: pitrou
priority: normal
severity: normal
stage: needs patch
status: open
title: ShareableList size guard incorrect for str data
type: behavior
versions: Python 3.7, Python 3.8, Python 3.9

___
Python tracker 
<https://bugs.python.org/issue40330>
___
___
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

2020-04-19 Thread Antoine Pitrou


Change by Antoine Pitrou :


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

___
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



[issue39285] PurePath.match indicates case-sensitive nature and presents a case-insensitive example

2020-04-19 Thread Antoine Pitrou


Change by Antoine Pitrou :


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

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



[issue38891] ShareableList read and write access is O(N), should be O(1)

2020-04-18 Thread Antoine Pitrou


Change by Antoine Pitrou :


--
versions: +Python 3.9 -Python 3.8

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



[issue35306] OSError [WinError 123] when testing if pathlib.Path('*') (asterisks) exists

2020-04-17 Thread Antoine Pitrou


Change by Antoine Pitrou :


--
versions: +Python 3.9

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



[issue33898] pathlib issues with Windows device paths

2020-04-17 Thread Antoine Pitrou


Change by Antoine Pitrou :


--
versions: +Python 3.9

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



[issue39894] `pathlib.Path.samefile()` calls `os.stat()` without using accessor

2020-04-17 Thread Antoine Pitrou


Change by Antoine Pitrou :


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

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



[issue39894] `pathlib.Path.samefile()` calls `os.stat()` without using accessor

2020-04-17 Thread Antoine Pitrou


Antoine Pitrou  added the comment:


New changeset 5b1d9184bb0e34391637c06bc7651fb6de8a6240 by Barney Gale in branch 
'master':
bpo-39894: Route calls from pathlib.Path.samefile() to os.stat() via the path 
accessor (GH-18836)
https://github.com/python/cpython/commit/5b1d9184bb0e34391637c06bc7651fb6de8a6240


--
nosy: +pitrou

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



[issue39897] `pathlib.Path.is_mount()` calls `Path(self.parent)` and therefore misbehaves in `Path` subclasses

2020-04-17 Thread Antoine Pitrou


Change by Antoine Pitrou :


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

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



[issue39897] `pathlib.Path.is_mount()` calls `Path(self.parent)` and therefore misbehaves in `Path` subclasses

2020-04-17 Thread Antoine Pitrou


Antoine Pitrou  added the comment:


New changeset c746c4f353510a17683a49ed7f90ffaae664ff7b by Barney Gale in branch 
'master':
bpo-39897: Remove needless `Path(self.parent)` call, which makes `is_mount()` 
misbehave in `Path` subclasses. (GH-18839)
https://github.com/python/cpython/commit/c746c4f353510a17683a49ed7f90ffaae664ff7b


--
nosy: +pitrou

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



[issue40282] random.getrandbits(0) should succeed

2020-04-17 Thread Antoine Pitrou


Change by Antoine Pitrou :


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

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



[issue40282] random.getrandbits(0) should succeed

2020-04-17 Thread Antoine Pitrou


Antoine Pitrou  added the comment:


New changeset 75a3378810bab03949ad9f653f78d933bdf3879c by Antoine Pitrou in 
branch 'master':
bpo-40282: Allow random.getrandbits(0) (GH-19539)
https://github.com/python/cpython/commit/75a3378810bab03949ad9f653f78d933bdf3879c


--

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



[issue39901] `pathlib.Path.owner()` and `group()` use `pwd` and `grp` modules directly

2020-04-17 Thread Antoine Pitrou


Change by Antoine Pitrou :


--
nosy:  -pitrou
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
type:  -> enhancement

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



[issue39901] `pathlib.Path.owner()` and `group()` use `pwd` and `grp` modules directly

2020-04-17 Thread Antoine Pitrou


Antoine Pitrou  added the comment:


New changeset 22386bb4ef740ee92d34c87b8cb90d681423a853 by Barney Gale in branch 
'master':
bpo-39901: Move `pathlib.Path.owner()` and `group()` implementations into the 
path accessor. (GH-18844)
https://github.com/python/cpython/commit/22386bb4ef740ee92d34c87b8cb90d681423a853


--
nosy: +pitrou

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



[issue40281] Add pathlib.PurePath.as_uri()

2020-04-17 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

Hmm, it looks like I lost my head from 10 years ago :-S

Sorry for the noise, everyone.

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

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



[issue40302] Add _Py_bswap32() function to pyport.h

2020-04-16 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

Isn't pyport.h a public header?  IMHO you should put in a private header and 
make it an inline function there.

Here is for example what we do in Arrow:
https://github.com/apache/arrow/blob/master/cpp/src/arrow/util/bit_util.h#L48

--
nosy: +pitrou

___
Python tracker 
<https://bugs.python.org/issue40302>
___
___
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

2020-04-15 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

Steve is right.

--

___
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



[issue40255] Fixing Copy on Writes from reference counting

2020-04-15 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

I'll note that this "extremely common" model can break as soon as you have 
hidden worker threads somewhere (this can happen in a third-party library).

For example, the libhdfs library is not fork-safe.

--

___
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



[issue40282] random.getrandbits(0) should succeed

2020-04-15 Thread Antoine Pitrou


Change by Antoine Pitrou :


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

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



[issue40286] Add getrandbytes() method to random.Random

2020-04-15 Thread Antoine Pitrou


Change by Antoine Pitrou :


--
nosy: +mark.dickinson

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



[issue40282] random.getrandbits(0) should succeed

2020-04-14 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

I agree I don't *need* it per se.  However, I suspect that for non-exports it 
would be easier than
`getrandbits(nbytes * 8).to_bytes(nbytes, 'endian')`.

As for `secrets.token_bytes()`, it's not really adequate for regular 
pseudo-random data generation when you want to use a fixed seed.  And I'm not 
sure what its performance characteristics are when you pass a large size.

--

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



[issue40282] random.getrandbits(0) should succeed

2020-04-14 Thread Antoine Pitrou


Change by Antoine Pitrou :


--
components: +Library (Lib)

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



[issue40282] random.getrandbits(0) should succeed

2020-04-14 Thread Antoine Pitrou


Change by Antoine Pitrou :


--
stage:  -> needs patch

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



[issue40282] random.getrandbits(0) should succeed

2020-04-14 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

About a hypothetical getrandbytes(), probably 90% of my uses of getrandbits() 
have been to generate random bytestrings.

--

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



[issue36780] Interpreter exit blocks waiting for futures of shut-down ThreadPoolExecutors

2020-04-14 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

I think there's a misunderstanding: "wait_at_exit" will make the *executor* 
forget about the threads, but Python itself still knows about them, and it 
waits for them to end at interpreter shutdown.

These threads were daemon threads in 3.8, so your patch indeed works there, but 
we've made them non-daemon in 3.9, for two reasons:
1) daemon threads are fragile and can crash the interpreter at shutdown
2) they are not supported on subinterpreters

--

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



[issue36780] Interpreter exit blocks waiting for futures of shut-down ThreadPoolExecutors

2020-04-14 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

I don't think there's much ThreadPoolExecutor can do.  If you drop the 
references to the threads, they still exist and they still be waited upon at 
interpreter exit.

The solution is for you to avoid having hanging threads.  In the particular 
case of TCP connections, I'd recommend using a dedicated framework such as 
asyncio (or Twisted, Tornado, etc.) instead of home-baked networking code.

Also, note that Python sockets have a feature called *timeouts*.

--

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



[issue36780] Interpreter exit blocks waiting for futures of shut-down ThreadPoolExecutors

2020-04-14 Thread Antoine Pitrou


Change by Antoine Pitrou :


--
nosy: +aeros

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



[issue40282] random.getrandbits(0) should succeed

2020-04-14 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

I think you know the answer to your question ;-)

--

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



[issue40282] random.getrandbits(0) should succeed

2020-04-14 Thread Antoine Pitrou


New submission from Antoine Pitrou :

When creating variable-sized random binary strings with random.getrandbits(), 
you currently have to special case when the number of bytes is 0, because 
otherwise getrandbits() raises:

  ValueError: number of bits must be greater than zero

It seems like it wouldn't hurt to simply return 0 in that case.

The actual snippet looks something like:

  random.getrandombits(nbytes * 8).to_bytes(nbytes, 'little')

--
messages: 366392
nosy: mark.dickinson, pitrou, rhettinger, steven.daprano
priority: normal
severity: normal
status: open
title: random.getrandbits(0) should succeed
type: enhancement
versions: Python 3.9

___
Python tracker 
<https://bugs.python.org/issue40282>
___
___
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

2020-04-14 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

As a separate discussion, I would be interested to know whether the original 
use case (Eddie's) could be satisfied differently.  It probably doesn't belong 
to this issue, though.

(Eddie, if you want to discuss this, feel free to e-mail me privately. I think 
Davin Potts - co-maintainer of multiprocessing who recently added some 
facilities around shared memory - might be interested as well.)

--

___
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



[issue40255] Fixing Copy on Writes from reference counting

2020-04-14 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

> I run the pyperformance test suite with PGO + LTO + full cpu isolation in the 
> speed.python.org machine and these were the results:

Be mindful that synthetic benchmarks are probably a gentle case for branch 
prediction.  Real-world performance on irregular workloads might be worse still 
(or perhaps better, who knows :-)).

--

___
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



[issue40281] Add pathlib.PurePath.as_uri()

2020-04-14 Thread Antoine Pitrou


New submission from Antoine Pitrou :

"file" scheme URIs are normalized:
https://tools.ietf.org/html/rfc8089

Therefore it would be possible to provide a PurePath method that returns a 
"file" scheme URI corresponding to the given path.

--
components: Library (Lib)
messages: 366384
nosy: pitrou
priority: normal
severity: normal
status: open
title: Add pathlib.PurePath.as_uri()
type: enhancement
versions: Python 3.9

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



[issue40281] Add pathlib.PurePath.as_uri()

2020-04-14 Thread Antoine Pitrou


Change by Antoine Pitrou :


--
nosy: +barneygale

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



[issue39682] pathlib.Path objects can be used as context managers

2020-04-01 Thread Antoine Pitrou


Change by Antoine Pitrou :


--
versions: +Python 3.9 -Python 3.8

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



[issue39682] pathlib.Path objects can be used as context managers

2020-04-01 Thread Antoine Pitrou


Antoine Pitrou  added the comment:


New changeset 2e6d8b0ccdb6e0d9e98a9a7f9c9edfdf1311 by Barney Gale in branch 
'master':
bpo-39682: make `pathlib.Path` immutable by removing (undocumented) support for 
"closing" a path by using it as a context manager (GH-18846)
https://github.com/python/cpython/commit/2e6d8b0ccdb6e0d9e98a9a7f9c9edfdf1311


--

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



[issue39682] pathlib.Path objects can be used as context managers

2020-04-01 Thread Antoine Pitrou


Change by Antoine Pitrou :


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

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



[issue39812] Avoid daemon threads in concurrent.futures

2020-03-27 Thread Antoine Pitrou


Change by Antoine Pitrou :


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

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



[issue39812] Avoid daemon threads in concurrent.futures

2020-03-27 Thread Antoine Pitrou


Antoine Pitrou  added the comment:


New changeset b61b818d916942aad1f8f3e33181801c4a1ed14b by Kyle Stanley in 
branch 'master':
bpo-39812: Remove daemon threads in concurrent.futures (GH-19149)
https://github.com/python/cpython/commit/b61b818d916942aad1f8f3e33181801c4a1ed14b


--

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



[issue39850] multiprocessing.connection.Listener fails to close with null byte in AF_UNIX socket name.

2020-03-08 Thread Antoine Pitrou


Change by Antoine Pitrou :


--
nosy: +pitrou

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



[issue39850] multiprocessing.connection.Listener fails to close with null byte in AF_UNIX socket name.

2020-03-08 Thread Antoine Pitrou


Change by Antoine Pitrou :


--
stage:  -> needs patch
type: crash -> behavior
versions: +Python 3.7, Python 3.8, Python 3.9 -Python 3.6

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



[issue39682] pathlib.Path objects can be used as context managers

2020-03-03 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

Note you could simply remove the "closed" flag and the context manager live. 
That way, you don't have to deprecate anything.

--

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



[issue39682] pathlib.Path objects can be used as context managers

2020-03-02 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

As with the Accessor abstraction, the original idea was to support Path objects 
backed by a directory file descriptor (for use with openat() and friends).  
That idea was abandoned but it looks like the context manager stayed.  It's 
certainly not useful currently.

--

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



[issue39778] collections.OrderedDict and weakref.ref raises "refcount is too small" assertion

2020-03-02 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

Yes, I don't think other weakref-supporting objects traverse the weakreflist in 
their tp_traverse.

--
nosy: +pitrou

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



[issue39825] EXT_SUFFIX inconsistent between sysconfig and distutils.sysconfig (Windows)

2020-03-02 Thread Antoine Pitrou


New submission from Antoine Pitrou :

On Windows, Python 3.7.6 and 3.8.1:
```
>>> import sysconfig
>>> sysconfig.get_config_var('EXT_SUFFIX')
'.pyd'
>>> from distutils import sysconfig
>>> sysconfig.get_config_var('EXT_SUFFIX')
'.cp38-win_amd64.pyd'
```

The sysconfig answer is probably wrong (the ABI-qualified extension 
'.cp38-win_amd64.pyd' should be preferred).

--
components: Distutils, Library (Lib)
messages: 363171
nosy: dstufft, eric.araujo, paul.moore, pitrou, steve.dower, tarek, tim.golden, 
zach.ware
priority: normal
severity: normal
stage: needs patch
status: open
title: EXT_SUFFIX inconsistent between sysconfig and distutils.sysconfig 
(Windows)
type: behavior
versions: Python 3.7, Python 3.8, Python 3.9

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



[issue37266] Daemon threads must be forbidden in subinterpreters

2020-03-02 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

Ok, I opened issue39812

--

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



[issue15012] test issue

2020-03-01 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

Unfortunately, I didn't receive the notification :-(

--

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



[issue39678] RFC improve readability of _queue_management_worker for ProcessPoolExecutor

2020-03-01 Thread Antoine Pitrou


Antoine Pitrou  added the comment:


New changeset 0e89076247580ba0e570c4816f0e5628a7e36e83 by Thomas Moreau in 
branch 'master':
bpo-39678: refactor queue manager thread (GH-18551)
https://github.com/python/cpython/commit/0e89076247580ba0e570c4816f0e5628a7e36e83


--

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



[issue39678] RFC improve readability of _queue_management_worker for ProcessPoolExecutor

2020-03-01 Thread Antoine Pitrou


Change by Antoine Pitrou :


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

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



[issue15012] test issue

2020-03-01 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

Could someone please post a dummy reply to this issue? I'm hoping to fix e-mail 
notifications for me.

--

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



[issue15012] test issue

2020-03-01 Thread Antoine Pitrou


Change by Antoine Pitrou :


--
nosy: +pitrou

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



[issue39812] Avoid daemon threads in concurrent.futures

2020-03-01 Thread Antoine Pitrou


New submission from Antoine Pitrou :

Since issue37266 (which forbid daemon threads in subinterpreters), we probably 
want to forego daemon threads in concurrent.futures.  This means we also need a 
way to run an atexit-like hook before non-daemon threads are joined on 
(sub)interpreter shutdown.

See discussion below:
https://bugs.python.org/issue37266#msg362890

--
components: Library (Lib)
messages: 363059
nosy: aeros, pitrou, tomMoral
priority: normal
severity: normal
stage: needs patch
status: open
title: Avoid daemon threads in concurrent.futures
type: behavior
versions: Python 3.9

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



[issue39763] distutils.spawn should use subprocess (hang in parallel builds on QNX)

2020-03-01 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

@Elad:

> I'm not convinced that a multi-threaded fork()+exec() from C would be any 
> better, unless the Python code goes to great lengths to avoid any 
> non-async-signal-safe operations between the fork() and the exec().

That's exactly what the C code in the C subprocess module for POSIX does, 
though:

https://github.com/python/cpython/blob/master/Modules/_posixsubprocess.c#L828-L854

That's why I hope that using subprocess instead of a fork()+exec() sequence 
naively coded in pure Python would solve the issue.

@Guido:

> I can sort of see why you consider the small example a red herring, since it 
> mixes threads and fork

Perhaps "red herring" was the wrong expression.  What I mean is that it's no 
surprise that fork()+exec() sequence written in pure Python would be unsafe in 
multi-thread settings.  The solution, though, is not to avoid threads or try to 
workaround the issue in ThreadPoolExecutor, but rather to avoid doing 
fork()+exec() in pure Python.

--

___
Python tracker 
<https://bugs.python.org/issue39763>
___
___
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   >