[issue40255] Fixing Copy on Writes from reference counting

2020-04-15 Thread Eddie Elizondo


Eddie Elizondo  added the comment:

After the added optimizations and assuming that running this more rigorously 
(i.e PGO + LTO + full cpu isolation + speed.python.org machine) also shows the 
PR as perf neutral, what are people's thoughts so far?

Would this be enough to consider adding this change by default?

Are there still any concerns regarding correctness? It seems like most of the 
questions raised so far have already been addressed

--

___
Python tracker 

___
___
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 Eddie Elizondo


Eddie Elizondo  added the comment:

Neil:
> The fastest would be to create an immortal block as part of the BSS 
> (uninitialized data).

That's an interesting idea, definitely worth exploring and we can probably get 
some perf win out of it. And yes, using the frozen modules is definitely a step 
forward and we can leverage that to move these instances into the rodata 
section of the binary.
 
> I had started doing an experiment with the arena approach before I noticed 
> Eddie's comment about it.  I would like to see his version.

What I had written up is slightly different from what you mentioned. I was 
mostly concerned about having a small object that we did not reach through the 
GC roots. If this small object would get a reference count bump, the whole 
arena would Copy on Write.

I added a commit to the PR with this Arena Immortalization so that you could 
take a look at the implementation: 
https://github.com/python/cpython/pull/19474/commits/b29c8ffd3faf99fc5c9885d2a4c6c3c6d5768c8c

The idea is to walk all the arena's pools to mark them as immortal by using a 
new word added to pool_header. This word would help us identify if the pool is 
immortal on every pyalloc and pydealloc.

I still get some tests breaking with this, I haven't tried to debug it though

--

___
Python tracker 

___
___
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 Eddie Elizondo


Eddie Elizondo  added the comment:

I was able to get an equal (maybe slightly better) performance by following the 
advice from Steve and Neil and skipping reference counting of instances that we 
know are immortal.

It seems that by getting performance parity, we should be able to ease most of 
the concerns raised so far.

I've updated the PR to now immortalize:
* All static types (i.e: PyType_Type, etc.)
* All small ints (-5 to 256)
* The following Singletons: PyTrue, PyFalse, PyNone
* And the heap after the runtime is initialized (in pymain_main)

A quick caveat, immortalizing the runtime heap caused ~6 or so tests to fail 
since they depend on shutdown behavior which this now changes. In the PR I 
commented out the call to `_PyGC_ImmortalizeHeap` in `pymain_main` to pass the 
CI. Ignoring these failing tests for now, these are the benchmarks numbers that 
I got from pyperformance:


Baseline (master branch):
unpack_sequence: Mean +- std dev: 76.0 ns +- 4.9 ns
richards: Mean +- std dev: 116 ms +- 8 ms
fannkuch: Mean +- std dev: 764 ms +- 24 ms
pidigits: Mean +- std dev: 261 ms +- 7 ms

Immortalizing known immortals objects (Latest PR)
unpack_sequence: Mean +- std dev: 74.7 ns +- 5.1 ns
richards: Mean +- std dev: 112 ms +- 5 ms
fannkuch: Mean +- std dev: 774 ms +- 24 ms
pidigits: Mean +- std dev: 262 ms +- 11 ms

Only adding immortal branch (The commit that Pablo benchmarked)
unpack_sequence: Mean +- std dev: 93.1 ns +- 5.7 ns
richards: Mean +- std dev: 124 ms +- 4 ms
fannkuch: Mean +- std dev: 861 ms +- 26 ms
pidigits: Mean +- std dev: 269 ms +- 7 ms


The performance of Immortal Objects by default seems to now be within error of 
the master branch.

--

___
Python tracker 

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



[issue40297] test_socket.CANTest is broken at HEAD on master

2020-04-15 Thread Karl Ding


Change by Karl Ding :


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

___
Python tracker 

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



[issue40297] test_socket.CANTest is broken at HEAD on master

2020-04-15 Thread Karl Ding


New submission from Karl Ding :

While working on https://bugs.python.org/issue40291, I was trying to run the 
SocketCAN tests to ensure that my changes weren't causing any regressions. 
However, I was seeing test failures at HEAD.

I'm running the tests like so:

# Kernel version
uname -r
# 5.4.23-1-MANJARO

# Load SocketCAN vcan kernel module
sudo modprobe vcan

# Start and set up a virtual SocketCAN interface
sudo ip link add dev vcan0 type vcan
sudo ip link set up vcan0

# Run the socket tests using locally built python
./python -m unittest -v test.test_socket.CANTest

After bisecting, I discovered that the test started failing back in 2017, with 
the introduction of the ISOTP protocol. 
https://github.com/python/cpython/pull/2956/files#diff-a47fd74731aeb547ad780900bb8e6953L1376-R1391

Here, the address family (the second tuple item) is explicitly removed:

diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
index bf8d19fe2f..beadecfad5 100644
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -1373,9 +1373,22 @@ makesockaddr(SOCKET_T sockfd, struct sockaddr *addr, 
size_t addrlen, int proto)
 ifname = ifr.ifr_name;
 }

-return Py_BuildValue("O&h", PyUnicode_DecodeFSDefault,
-ifname,
-a->can_family);
+switch (proto) {
+#ifdef CAN_ISOTP
+  case CAN_ISOTP:
+  {
+  return Py_BuildValue("O&kk", PyUnicode_DecodeFSDefault,
+  ifname,
+  a->can_addr.tp.rx_id,
+  a->can_addr.tp.tx_id);
+  }
+#endif
+  default:
+  {
+  return Py_BuildValue("O&", PyUnicode_DecodeFSDefault,
+ifname);
+  }
+}
 }
 #endif

This seems to be an intentional breakage, since the code in getsockaddrarg also 
operates on just the interface name, ignoring the address family.

if (!PyArg_ParseTuple(args,
  "O&;AF_CAN address must be a tuple "
  "(interface, )",
  PyUnicode_FSConverter, &interfaceName))

As such, I believe the test should have been updated, but was missed during the 
ISOTP changes. Can someone (a core member?) confirm that this is the correct 
approach?

Note: However, this also implies that the CANTest test was never being run 
(either via CI on PRs or on the Buildbot cluster) and instead was always 
skipped, since I would've expected this failure to show up right away...

--
components: Library (Lib)
messages: 366576
nosy: karlding
priority: normal
severity: normal
status: open
title: test_socket.CANTest is broken at HEAD on master
type: behavior
versions: Python 3.9

___
Python tracker 

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



[issue40295] doctest handling of multiline strings is broken

2020-04-15 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

By the way Filip, you were told on the Stackoverflow page that the output was 
correct and that you were not using doctest correctly. Serhiy also hinted to 
you that you should check the output in the REPL and you falsely claimed that 
it gave the expected output, but it doesn't:

py> multiline_output()
'First line\nSecond line\n'

which is nothing like the output you put in your doctest.

This is not a bug in doctest. The very first line of the doctest documentation 
says:

The doctest module searches for pieces of text that look like
interactive Python sessions

so this is expected and documented behaviour, not a bug.

--

___
Python tracker 

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



[issue40295] doctest handling of multiline strings is broken

2020-04-15 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

Have you tried calling multiline_output() in the REPL?

It does *not* show your expected output:

# expected
First line
Second line


but the string repr():

# actual
'First line\nSecond line\n'



Change your doctest to either:


>>> multiline_output()
'First line\\nSecond line\\n'

(note that you must escape the backslashes) or:

>>> print(multiline_output())
First line
Second line



Note that the "" needs to be written literally, as described here:

https://docs.python.org/3/library/doctest.html#doctest.DONT_ACCEPT_BLANKLINE

--
nosy: +steven.daprano
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue40255] Fixing Copy on Writes from reference counting

2020-04-15 Thread Carl Meyer

Carl Meyer  added the comment:

Makes sense. Yes, caution is required about what code runs before fork, but 
forkserver’s solution for that would be a non-starter for us, since it would 
ensure that we can share no basically no memory at all between worker processes.

--

___
Python tracker 

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



[issue35967] Better platform.processor support

2020-04-15 Thread Jason R. Coombs


Jason R. Coombs  added the comment:


New changeset e72cbcb346cfcc1ed7741ed6baf1929764e1ee74 by Jason R. Coombs in 
branch 'master':
bpo-35967: Make test_platform.test_uname_processor more lenient to satisfy 
build bots. (GH-19544)
https://github.com/python/cpython/commit/e72cbcb346cfcc1ed7741ed6baf1929764e1ee74


--

___
Python tracker 

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



[issue40290] Add zscore to statistics.NormalDist

2020-04-15 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Trying out various names in code examples, zscore() was a clear winner over 
z_score().  Also, the name matches what is used in R and numpy.

--
title: Add z_score to statistics.NormalDist -> Add zscore to 
statistics.NormalDist

___
Python tracker 

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



[issue40290] Add z_score to statistics.NormalDist

2020-04-15 Thread Raymond Hettinger


Change by Raymond Hettinger :


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

___
Python tracker 

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



[issue22213] Make pyvenv style virtual environments easier to configure when embedding Python

2020-04-15 Thread Graham Dumpleton


Graham Dumpleton  added the comment:

For the record. Since virtualenv 20.0.0 (or there about) switched to the python 
-m venv style virtual environment structure, the C API for embedding when using 
a virtual environment is now completely broken on Windows. The same workaround 
used on UNIX doesn't work on Windows.

The only known workaround is in the initial Python code you load, to add:

import site
site.addsitedir('C:/some/path/to/pythonX.Y/Lib/site-packages')

to at least force it to use the site-packages directory from the virtual 
environment.

As to mod_wsgi, means that on Windows the WSGIPythonHome directive no longer 
works anymore and have to suggest that workaround instead.

--

___
Python tracker 

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



[issue40295] doctest handling of multiline strings is broken

2020-04-15 Thread Filip Rembiałkowski

Filip Rembiałkowski  added the comment:

Actually, the behavior does not depend on leading spaces, and test case can be 
isolated even further. Sample is attached [doctest-bugs-2.py].

--
Added file: https://bugs.python.org/file49066/doctest-bugs-2.py

___
Python tracker 

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



[issue23082] pathlib relative_to() can give confusing error message

2020-04-15 Thread Sadhana Srinivasan


Sadhana Srinivasan  added the comment:

I'll work on this. 

I tried to come up with a single error message but having two different error 
messages seems like a better idea to me. One for when the path isn't a subpath 
and one for when absolute and relative paths are mixed. Basically to explain 
this:

>>> Path("/Users/rotuna/Documents/cpython/Libs").relative_to(Path("./Libs"))
Traceback (most recent call last):
  File "", line 1, in 
  File "/Users/rotuna/Documents/cpython/Lib/pathlib.py", line 907, in 
relative_to
raise ValueError("{!r} is not a subpath of{!r}. NOTE: If this is not true, 
use absolute paths"
ValueError: '/Users/rotuna/Documents/cpython/Libs' does not start with 'Libs'

--
nosy: +rotuna

___
Python tracker 

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



[issue40295] doctest handling of multiline strings is broken

2020-04-15 Thread Filip Rembiałkowski

Filip Rembiałkowski  added the comment:

@Serhiy, Thank you for feedback. 

Yes the "testme" function (indeed trivial) works as expected - both in 
interactive Python interpreter and in script file. 

If you go to Lib/doctest.py, search for "string-identical" and debug my example 
there, you will see the problem is real.

I don't see an easy fix for the problem, I only suspect it's related to 
io.StringIO getvalue() method.

--

___
Python tracker 

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

___
___
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 Steve Dower


Steve Dower  added the comment:

> What problem do you have in mind that the fork server would solve?

My understanding is that the fork server solves the *general* problem of 
running arbitrary code before fork by making sure that only 
CPython/multiprocessing gets to run code before fork.

In this specific case where you're carefully running only forkable code at 
startup, it presumably won't help.

--

___
Python tracker 

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



[issue40260] modulefinder traceback regression starting on Windows

2020-04-15 Thread Steve Dower


Steve Dower  added the comment:

Sorry, misready. They're monkeypatching the API. It isn't documented, but it's 
also not clearly internal.

We don't have a strong need to change the meaning of that argument though, so 
best to leave it as it was and not break anyone.

--

___
Python tracker 

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



[issue40260] modulefinder traceback regression starting on Windows

2020-04-15 Thread Steve Dower


Steve Dower  added the comment:

The 3.8 behaviour is clearly broken, so backporting is fine. Also, 
io.open_code() is a security feature.

The core of the issue is that apparently load_module() is a public API, and the 
file_info parameter used to be a 3-tuple and is now a 2-tuple.

AFAICT, the fix should restore the 3-tuple everywhere and just ignore the mode 
parameter. The test should pass in a 3-tuple and make sure that it doesn't 
crash like this.

--

___
Python tracker 

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



[issue40270] activate (or include) json1 extension in sqlite

2020-04-15 Thread Zachary Ware


Zachary Ware  added the comment:

This has been done in the macOS installer since 
9625bf520e08828e36bc3b1d043af679eb5f993d, so this is now done.  I won't 
backport it due to the inevitable confusion over which patch version of which 
branch started including it on Windows; it's much easier to just say "3.9" :)

Thanks to Ammar for the patch!

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

___
Python tracker 

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



[issue40255] Fixing Copy on Writes from reference counting

2020-04-15 Thread Carl Meyer


Carl Meyer  added the comment:

> I would be interested to hear the answer to Antoine's question which is 
> basically: why not using the multiprocessing fork server?

Concretely, because for a long time we have used the uWSGI application server 
and it manages forking worker processes (among other things), and AFAIK nobody 
has yet proposed trying to replace that with something built around the 
multiprocessing module. I'm actually not aware of any popular Python WSGI 
application server built on top of the multiprocessing module (but some may 
exist).

What problem do you have in mind that the fork server would solve? How is it 
related to this issue? I looked at the docs and don't see that it does anything 
to help sharing Python objects' memory between forked processes without CoW.

--

___
Python tracker 

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



[issue40295] doctest handling of multiline strings is broken

2020-04-15 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Did you try to run the tested function in the interactive Python interpreter? 
Did you get what you expected?

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue40270] activate (or include) json1 extension in sqlite

2020-04-15 Thread Zachary Ware


Zachary Ware  added the comment:


New changeset 58d6f2ee3aeb699156d4784acccd2910d27982e7 by Ammar Askar in branch 
'master':
bpo-40270: Enable json extension in Windows sqlite extension (GH-19528)
https://github.com/python/cpython/commit/58d6f2ee3aeb699156d4784acccd2910d27982e7


--

___
Python tracker 

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



[issue40296] help(list[int]) fails

2020-04-15 Thread Serhiy Storchaka


New submission from Serhiy Storchaka :

>>> help(list[int])
Traceback (most recent call last):
  File "", line 1, in 
  File "/home/serhiy/py/cpython/Lib/_sitebuiltins.py", line 103, in __call__
return pydoc.help(*args, **kwds)
  File "/home/serhiy/py/cpython/Lib/pydoc.py", line 1905, in __call__
self.help(request)
  File "/home/serhiy/py/cpython/Lib/pydoc.py", line 1964, in help
else: doc(request, 'Help on %s:', output=self._output)
  File "/home/serhiy/py/cpython/Lib/pydoc.py", line 1684, in doc
pager(render_doc(thing, title, forceload))
  File "/home/serhiy/py/cpython/Lib/pydoc.py", line 1677, in render_doc
return title % desc + '\n\n' + renderer.document(object, name)
  File "/home/serhiy/py/cpython/Lib/pydoc.py", line 381, in document
if inspect.isclass(object): return self.docclass(*args)
  File "/home/serhiy/py/cpython/Lib/pydoc.py", line 1251, in docclass
(str(cls.__name__) for cls in type.__subclasses__(object)
TypeError: descriptor '__subclasses__' for 'type' objects doesn't apply to a 
'types.GenericAlias' object

--
components: Library (Lib)
messages: 366558
nosy: gvanrossum, serhiy.storchaka
priority: normal
severity: normal
status: open
title: help(list[int]) fails
type: behavior
versions: Python 3.9

___
Python tracker 

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



[issue40257] Improve the use of __doc__ in pydoc

2020-04-15 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests: +18892
pull_request: https://github.com/python/cpython/pull/19546

___
Python tracker 

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



[issue40260] modulefinder traceback regression starting on Windows

2020-04-15 Thread Anthony Sottile


Anthony Sottile  added the comment:

(additionally, I'm not sure this should be backported to python3.8, especially 
with changed behaviour)

--

___
Python tracker 

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



[issue40260] modulefinder traceback regression starting on Windows

2020-04-15 Thread Anthony Sottile


Anthony Sottile  added the comment:

I'm admittedly a little unfamiliar with what it does as well -- I'm mostly 
repackaging debian sources for deadsnakes.  If I'm correct in my assumption, it 
is attempting to find a minimal set of modules to package into 
`python3-minimal` and ensure that that set is correct

here's my current version of the source: 
https://github.com/deadsnakes/python3.9-nightly/blob/3eb45671e2f1910a6f117580f1733e431cce8a6e/debian/pymindeps.py

--

___
Python tracker 

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



[issue40260] modulefinder traceback regression starting on Windows

2020-04-15 Thread Barry Alan Scott


Barry Alan Scott  added the comment:

Regarding test case. I will need to know what pymindeps is doing to be able to 
design a suitable test case.

--

___
Python tracker 

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



[issue40295] doctest handling of multiline strings is broken

2020-04-15 Thread Filip Rembiałkowski

New submission from Filip Rembiałkowski :

The doctest module does not compare multiline strings properly, as attached 
example proves. 

Tested on 2.7, 3.6 and 3.9.0a5+. (platform: Ubuntu 18.04).

Related: 
https://stackoverflow.com/questions/60956015/unexpected-errors-while-testing-python3-code-with-doctest

--
components: Library (Lib)
files: doctest-bugs.py
messages: 366554
nosy: Filip Rembiałkowski
priority: normal
severity: normal
status: open
title: doctest handling of multiline strings is broken
type: behavior
versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9
Added file: https://bugs.python.org/file49065/doctest-bugs.py

___
Python tracker 

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



[issue39953] Let's update ssl error codes

2020-04-15 Thread Michael Felt

Michael Felt  added the comment:

I did update, and saw that there was one more patch applied. 

I think that fixed the define issues, but there may be a new concern. Ran out 
of time to document it today. 

Will post tomorrow. 

Sent from my iPhone

> On 15 Apr 2020, at 17:53, SilentGhost  wrote:
> 
> 
> SilentGhost  added the comment:
> 
> Michael, could you try with the latest fix in 584a3cfda4?
> 
> --
> nosy: +SilentGhost
> 
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue40260] modulefinder traceback regression starting on Windows

2020-04-15 Thread Barry Alan Scott


Barry Alan Scott  added the comment:

I need to see the code of pymindeps to understand what you are doing and how to 
fix this. Can you post a URL to the source please?

Are you aware that load_module() changed in other ways that are required to fix 
the bug?

You may have to change yout pymindeps code anyway even with the mode restored 
to the tuple.

Steve: Do I need a new PR or just commit a fix to the same branch?

--

___
Python tracker 

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



[issue35967] Better platform.processor support

2020-04-15 Thread Jason R. Coombs


Jason R. Coombs  added the comment:

I'm hoping that PR 19544 fixes the issue.

--

___
Python tracker 

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



[issue40260] modulefinder traceback regression starting on Windows

2020-04-15 Thread Steve Dower


Steve Dower  added the comment:

Would be ideal to add a test that hits this case as well.

--

___
Python tracker 

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



[issue40260] modulefinder traceback regression starting on Windows

2020-04-15 Thread Steve Dower


Steve Dower  added the comment:

Go ahead and fix it against this one.

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

___
Python tracker 

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



[issue25680] Selector.select() hangs when there is nothing to select

2020-04-15 Thread Guido van Rossum


Guido van Rossum  added the comment:

How ironic, the other issue had to be closed manually. :-)

Reopening this one.

--
resolution: fixed -> 
status: closed -> open

___
Python tracker 

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



[issue40257] Improve the use of __doc__ in pydoc

2020-04-15 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset fbf2786c4c89430e2067016603078cf3500cfe94 by Serhiy Storchaka in 
branch 'master':
bpo-40257: Output object's own docstring in pydoc (GH-19479)
https://github.com/python/cpython/commit/fbf2786c4c89430e2067016603078cf3500cfe94


--

___
Python tracker 

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



[issue39247] dataclass defaults and property don't work together

2020-04-15 Thread Juan Arrivillaga


Juan Arrivillaga  added the comment:

But when would you want to have a descriptor as an instance attribute? 
Descriptors must be in the class dictionary to work:

https://docs.python.org/3/reference/datamodel.html#implementing-descriptors

I suppose, you could want some container class of descriptor objects, but that 
seems like an extremely narrow use-case, compared to the normal and common 
use-case of descriptors acting like descriptors. I think special-casing 
descriptors make sense because they act in a special way.

--

___
Python tracker 

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



[issue25680] Selector.select() hangs when there is nothing to select

2020-04-15 Thread Russell Davis


Russell Davis  added the comment:

I think this got auto-closed due to a link in the PR. Note that, per 
https://github.com/python/cpython/pull/19508#issuecomment-613317021, the 
behavior is still inconsistent on windows.

I think the solution there will have to be a call to sleep() when the list of 
fds is empty.

--

___
Python tracker 

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



[issue40260] modulefinder traceback regression starting on Windows

2020-04-15 Thread Anthony Sottile


Anthony Sottile  added the comment:

This patch has broken debian's builds due to use of modulefinder -- notably the 
type of `file_info` changed as a side-effect of this patch and is now causing:

../debian/pymindeps.py:29: DeprecationWarning: the imp module is deprecated in 
favour of importlib; see the module's documentation for alternative uses
  import imp
Traceback (most recent call last):
  File "../debian/pymindeps.py", line 185, in 
main(sys.argv[1:])
  File "../debian/pymindeps.py", line 178, in main
mf.run_script(arg)
  File "/tmp/code/Lib/modulefinder.py", line 163, in run_script
self.load_module('__main__', fp, pathname, stuff)
  File "../debian/pymindeps.py", line 91, in load_module
suffix, mode, type = file_info
ValueError: not enough values to unpack (expected 3, got 2)


This is breaking python3.8 and python3.9 (should I open a separate issue or is 
it ok to continue discussion here?)

--
nosy: +Anthony Sottile

___
Python tracker 

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



[issue35967] Better platform.processor support

2020-04-15 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

raspbian failure https://buildbot.python.org/all/#/builders/645/builds/31

--
nosy: +gregory.p.smith

___
Python tracker 

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



[issue35967] Better platform.processor support

2020-04-15 Thread Jason R. Coombs


Change by Jason R. Coombs :


--
pull_requests: +18891
pull_request: https://github.com/python/cpython/pull/19544

___
Python tracker 

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



[issue35967] Better platform.processor support

2020-04-15 Thread Jason R. Coombs


Jason R. Coombs  added the comment:

The aformentioned test broke tests in buildbots: 
https://buildbot.python.org/all/#builders/105/builds/779

--

___
Python tracker 

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



[issue29255] selects.KqueueSelector behaves incorrectly when no fds are registered

2020-04-15 Thread Guido van Rossum


Change by Guido van Rossum :


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

___
Python tracker 

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



[issue25680] Selector.select() hangs when there is nothing to select

2020-04-15 Thread Guido van Rossum


Guido van Rossum  added the comment:


New changeset ba1bcffe5cafc1bb0ac6fdf9ecef51e75e342707 by Russell Davis in 
branch 'master':
bpo-29255: Wait in KqueueSelector.select when no fds are registered (GH-19508)
https://github.com/python/cpython/commit/ba1bcffe5cafc1bb0ac6fdf9ecef51e75e342707


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

___
Python tracker 

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



[issue29255] selects.KqueueSelector behaves incorrectly when no fds are registered

2020-04-15 Thread Guido van Rossum


Guido van Rossum  added the comment:


New changeset ba1bcffe5cafc1bb0ac6fdf9ecef51e75e342707 by Russell Davis in 
branch 'master':
bpo-29255: Wait in KqueueSelector.select when no fds are registered (GH-19508)
https://github.com/python/cpython/commit/ba1bcffe5cafc1bb0ac6fdf9ecef51e75e342707


--
nosy: +gvanrossum

___
Python tracker 

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



[issue35967] Better platform.processor support

2020-04-15 Thread Jason R. Coombs


Change by Jason R. Coombs :


--
versions: +Python 3.9 -Python 3.8

___
Python tracker 

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



[issue39667] Update zipfile.Path with zipp 3.0

2020-04-15 Thread Jason R. Coombs


Jason R. Coombs  added the comment:

In the 3.8 backport, I retained API compatibility and backported only the 
performance improvement code.

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

___
Python tracker 

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



[issue39667] Update zipfile.Path with zipp 3.0

2020-04-15 Thread Jason R. Coombs


Jason R. Coombs  added the comment:


New changeset 3e72de9e08b03a15875f5b226c5f096e567dab42 by Miss Islington (bot) 
in branch '3.8':
[3.8] bpo-39667: Sync zipp 3.0 (GH-18540) (GH-18701)
https://github.com/python/cpython/commit/3e72de9e08b03a15875f5b226c5f096e567dab42


--

___
Python tracker 

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



[issue35967] Better platform.processor support

2020-04-15 Thread Jason R. Coombs


Jason R. Coombs  added the comment:


New changeset 4b4e90a51848578dc06341777a929a0be4f4757f by Jason R. Coombs in 
branch 'master':
bpo-35967: Baseline values for uname -p (GH-12824)
https://github.com/python/cpython/commit/4b4e90a51848578dc06341777a929a0be4f4757f


--

___
Python tracker 

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



[issue40267] Error message differs when an expression is in an fstring

2020-04-15 Thread Guido van Rossum


Change by Guido van Rossum :


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

___
Python tracker 

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



[issue40255] Fixing Copy on Writes from reference counting

2020-04-15 Thread Neil Schemenauer


Neil Schemenauer  added the comment:

Eddie mentions in the PR about using memory arenas to contain immortal objects. 
 I think it could be worth investigating further.  With the current PR, the 
immortal status is dependent on the value of the refcnt field of the object.  
Using immortal arenas might be faster because you can check if an object is 
immortal just based on its address (no data dependency on refcnt value).  

The fastest would be to create an immortal block as part of the BSS 
(uninitialized data).  Then, within incref/decref you use the location and size 
of the immortal arena (compile time constants) to test if the object is 
immortal.  Maybe could just check if the high bits of an object address match a 
constant mask (if immortal region is aligned and is power of 2 in size).  
Slightly slower but more flexible would be to make the immortal arena size and 
location global variables.  That way, you can set the size of the region on 
startup.  Also would be more flexible in terms of ABI compatibility.  That 
would introduce one or two global loads within incref/decref but those values 
would almost certainly be in L1 cache.

Even more flexible would be to use a memory map to mark which arenas are 
immortal.  See my radix tree implementation for obmalloc:

https://bugs.python.org/issue37448

I would guess the radix tree lookups are too expensive to put in incref/decref. 
 Should probably test that though.

I had started doing an experiment with the arena approach before I noticed 
Eddie's comment about it.  I would like to see his version.  Here is a sketch 
of mine (not working yet):

- change new_arena() to initially allocate from an "immortal memory" region.  
There are multiple ways to allocate that (BSS/uninitialized data, 
aligned_alloc(), etc).

- add a _PyMem_enable_immortal() call to switch obmalloc from using immortal 
arenas to regular ones.  Need to mess with some obmalloc data structures to 
switch arenas (usedpools, usable_arenas, unused_arena_objects).

- change incref/decref to check if immortal status has been enabled and if 
object address falls within immortal region.  If so, incref/decref don't do 
anything.

By default, the immortal arenas could be enabled on Python startup.  Call 
_PyMem_enable_immortal after startup but before running user code.  There could 
be a command-line option to disable the automatic call to 
_PyMem_enable_immortal() so that users like Instagram can do their pre-fork 
initialization before calling it.

Next step down the rabbit-hole could be to use something like Jeethu Rao's 
frozen module serializer and dump out all of the startup objects and put them 
into the BSS:

 https://bugs.python.org/issue34690

--

___
Python tracker 

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



[issue40267] Error message differs when an expression is in an fstring

2020-04-15 Thread Guido van Rossum


Guido van Rossum  added the comment:


New changeset 9a4b38f66b3e674db94e07980e1cacb39e388c73 by Lysandros Nikolaou in 
branch 'master':
bpo-40267: Fix message when last input character produces a SyntaxError 
(GH-19521)
https://github.com/python/cpython/commit/9a4b38f66b3e674db94e07980e1cacb39e388c73


--

___
Python tracker 

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



[issue40293] Tag libffi build and sources in cpython-source-deps for 3.9.0b1

2020-04-15 Thread Steve Dower


Steve Dower  added the comment:

When we make a beta release, you can have a release artifact. Until then, if 
you're building against the master branch, you can use the dependency's 
"master" branch.

I've renamed the issue so it can serve as a reminder to tag whatever version we 
use for beta 1.

--
title: cpython-source-deps project missing release for libffi commits -> Tag 
libffi build and sources in cpython-source-deps for 3.9.0b1
versions: +Python 3.9

___
Python tracker 

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



[issue25680] Selector.select() hangs when there is nothing to select

2020-04-15 Thread Russell Davis


Russell Davis  added the comment:

@gvanrossum PR is ready for review: https://github.com/python/cpython/pull/19508

--

___
Python tracker 

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



[issue40294] Use-after-free crash if multiple interpreters import asyncio module

2020-04-15 Thread STINNER Victor


STINNER Victor  added the comment:

_asyncio should be ported to multiphase initialization (PEP 489) and its types 
converted to PyType_FromSpec() rather than using statically allocated types. 
See bpo-1635741.

--
nosy: +vstinner

___
Python tracker 

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



[issue40294] Use-after-free crash if multiple interpreters import asyncio module

2020-04-15 Thread Jeffrey Quesnelle


Change by Jeffrey Quesnelle :


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

___
Python tracker 

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



[issue40294] Use-after-free crash if multiple interpreters import asyncio module

2020-04-15 Thread Jeffrey Quesnelle


New submission from Jeffrey Quesnelle :

Starting with Python 3.8 (GH-16598), the `_asyncio` module's C initialization 
is guarded behind a static variable. If the module is initialized a second time 
and this variable is set, the resources from the first initialization are used. 
However, when the module is freed and the corresponding resources released, the 
static variable is not cleared. If the module is subsequently initialized 
again, it will incorrectly believe it has already been initialized and use the 
previously freed resources, resulting in a crash.

This scenario is actually fairly easy to encounter in the presence of multiple 
interpreters whose lifetime is shorter than that of the whole program. 
Essentially, if any interpreter loads `asyncio` and then is freed with 
`Py_EndInterpreter`, any new interpreter that loads `asyncio` will crash. Since 
`asyncio` is a built-in module, it is loaded as a consequence of a wide variety 
of libraries.

I ran into this in my project because I use multiple interpreters to isolate 
user scripts, and I started to encounter crashes when switching to Python 3.8.

I've attached a simple reproduction program. I've personally tested that this 
runs without crashing in 3.6 and 3.7 (but I suspect it works down to 3.4 when 
`asyncio` was introduced).

--
components: C API
files: main.c
messages: 366531
nosy: jquesnelle
priority: normal
severity: normal
status: open
title: Use-after-free crash if multiple interpreters import asyncio module
type: crash
versions: Python 3.8, Python 3.9
Added file: https://bugs.python.org/file49064/main.c

___
Python tracker 

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



[issue40249] __import__ doesn't honour globals

2020-04-15 Thread Brett Cannon


Brett Cannon  added the comment:

Algorithm is documented as part of the language reference: 
https://docs.python.org/3/reference/import.html

--

___
Python tracker 

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



[issue40170] [C API] Make PyTypeObject structure an opaque structure in the public C API

2020-04-15 Thread hai shi


hai shi  added the comment:

> It never prevented anyone to use a function of the C API :-)
Got it. If possible someone uses it, I will try to add a function to repalce 
it(MAYBE udpate this docs too;) )

--

___
Python tracker 

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



[issue40293] cpython-source-deps project missing release for libffi commits

2020-04-15 Thread Gregory Szorc


Gregory Szorc  added the comment:

I don't like utilizing the dynamic archive links like 
https://github.com/python/cpython-source-deps/archive/libffi.zip (even if you 
pin the commit) because GitHub does not guarantee the file content is 
deterministic over time. I perform SHA-256 validation of all dependencies I 
download from the Internet. And if I rely on the /archive/ URLs, all it takes 
is GitHub updating some library that subtly changes the tar/zip structure and 
my hashes are invalidated.

Release artifacts are immutable and don't have this problem.

As it stands, I will likely `git clone` and check out the commit I need. 
Although I would prefer a release artifact.

--

___
Python tracker 

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



[issue39953] Let's update ssl error codes

2020-04-15 Thread SilentGhost


SilentGhost  added the comment:

Michael, could you try with the latest fix in 584a3cfda4?

--
nosy: +SilentGhost

___
Python tracker 

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



[issue40170] [C API] Make PyTypeObject structure an opaque structure in the public C API

2020-04-15 Thread hai shi


Change by hai shi :


--
pull_requests: +18889
pull_request: https://github.com/python/cpython/pull/19541

___
Python tracker 

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



[issue40293] cpython-source-deps project missing release for libffi commits

2020-04-15 Thread Steve Dower


Steve Dower  added the comment:

To save the clicks, here's the URL that will get the latest sources from the 
libffi branch: https://github.com/python/cpython-source-deps/archive/libffi.zip

--

___
Python tracker 

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



[issue40293] cpython-source-deps project missing release for libffi commits

2020-04-15 Thread Steve Dower


Steve Dower  added the comment:

In master, we build against the latest build out of that repo, which comes from 
the libffi branch (not the 3.3.0 RC).

In 3.8 (and 3.7? I forget) we use the 3.3.0 RC build. There's no later release 
from libffi (last I checked), and no important fixes since then (only ARM64 
support, which we contributed).

We'll probably tag for 3.9.0b1 and retarget the master branch to take that one, 
so that we can control updates that go into that release. But right now there 
isn't anything we want to tag right now (and GitHub generates the tarball 
itself, so we don't have to upload anything - you can get the branch tip 
through the "Download" button on the front page).

--

___
Python tracker 

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



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

2020-04-15 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

All Random methods give the same result independently of endianess and bitness 
of the platform.

> I don't think that these two implementations give the same result on big and 
> little endian.

The second one does.

--

___
Python tracker 

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



[issue40293] cpython-source-deps project missing release for libffi commits

2020-04-15 Thread Gregory Szorc


New submission from Gregory Szorc :

The https://github.com/python/cpython-source-deps project is missing a source 
archive release for commits to libffi needed to support building on Windows.

The latest release of libffi is version libffi-3.3.0-rc0-r1, which corresponds 
to 
https://github.com/python/cpython-source-deps/commit/8ba2b2c38744420a235e3e7f419cce2591aaf331.

There have been a few commits since that release: 
https://github.com/python/cpython-source-deps/compare/8ba2b2c38744420a235e3e7f419cce2591aaf331...libffi

Most notable is 
https://github.com/python/cpython-source-deps/commit/ed22026f39b37f892ded95d7b30e77dfb5126334
 because without this commit, the source is not buildable on Windows using 
MSVC, at least not with the  prepare_ffi.bat script in CPython's Git 
repository. (Build fails due to issues with FFI_BUILDING_DLL).

Would it be possible to cut a new tag and upload a source tarball for libffi?

--
components: Build, Windows
messages: 366523
nosy: indygreg, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: cpython-source-deps project missing release for libffi commits
type: enhancement

___
Python tracker 

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



[issue40170] [C API] Make PyTypeObject structure an opaque structure in the public C API

2020-04-15 Thread STINNER Victor


STINNER Victor  added the comment:

> Looks like this macro not recorded in docs.

It never prevented anyone to use a function of the C API :-)

--

___
Python tracker 

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



[issue40170] [C API] Make PyTypeObject structure an opaque structure in the public C API

2020-04-15 Thread hai shi


hai shi  added the comment:

> Py_TRASHCAN_BEGIN() access directly PyTypeObject.tp_dealloc

Looks like this macro not recorded in docs. Do we need using function to 
replace this macro?

--

___
Python tracker 

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

___
___
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 STINNER Victor


STINNER Victor  added the comment:

Carl:
> A lot of the "big data" in question here is simply lots of Python 
> module/class/code objects resulting from importing lots of Python modules.
>
> And yes, this "pre-fork" model is extremely common for serving Python web 
> applications; it is the way most Python web application servers work. (...)

I would be interested to hear the answer to Antoine's question which is 
basically: why not using the multiprocessing fork server?

--

___
Python tracker 

___
___
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 Carl Meyer


Carl Meyer  added the comment:

> Is it a common use case to load big data and then fork to use preloaded data?

A lot of the "big data" in question here is simply lots of Python 
module/class/code objects resulting from importing lots of Python modules.

And yes, this "pre-fork" model is extremely common for serving Python web 
applications; it is the way most Python web application servers work. We 
already have an example in this thread of another large Python web application 
(YouTube) that had similar needs and considered a similar approach.

--

___
Python tracker 

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



[issue40288] atexit module should not be loaded more than once per interpreter

2020-04-15 Thread Dong-hee Na


Dong-hee Na  added the comment:

I will take a look :)

--

___
Python tracker 

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



[issue40268] Reorganize pycore_pystate.h header

2020-04-15 Thread STINNER Victor


STINNER Victor  added the comment:

> It exposes too many internals whereas most consumers only need basic 
> functions like _PyThreadState_GET().

That's basically done: pycore_pystate.h no longer defines PyInterpreterState 
structure. pycore_interp.h must now be included explicitly. It's now included 
by the following files:

* Modules/gcmodule.c
* Modules/_io/textio.c
* Modules/main.c
* Modules/_threadmodule.c
* Objects/codeobject.c
* Objects/interpreteridobject.c
* Objects/longobject.c
* Objects/moduleobject.c
* Objects/unicodeobject.c
* Parser/listnode.c
* Python/codecs.c
* Python/dynload_shlib.c
* Python/import.c
* Python/initconfig.c
* Python/pythonrun.c
* Python/_warnings.c

I also pushed many cleanup changes. I think that it's now enough, I close the 
issue ;-)

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

___
Python tracker 

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



[issue39953] Let's update ssl error codes

2020-04-15 Thread Michael Felt


Michael Felt  added the comment:

And when I use a standard OpenSSL library (on AIX):

building '_ssl' extension
gcc -pthread -Wno-unused-result -Wsign-compare -g -Og -Wall -std=c99 -Wextra 
-Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers 
-Werror=implicit-function-declaration -fvisibility=hidden -I./Include/internal 
-I/opt/freeware/include -I./Include -I. 
-I/home/aixtools/python/cpython-master/Include 
-I/home/aixtools/python/cpython-master -c 
/home/aixtools/python/cpython-master/Modules/_ssl.c -o 
build/temp.aix-7200-1543-32-3.9-pydebug/home/aixtools/python/cpython-master/Modules/_ssl.o
Modules/ld_so_aix gcc -pthread -bI:Modules/python.exp 
build/temp.aix-7200-1543-32-3.9-pydebug/home/aixtools/python/cpython-master/Modules/_ssl.o
 -L/opt/freeware/lib -lssl -lcrypto -o 
build/lib.aix-7200-1543-32-3.9-pydebug/_ssl.so
ld: 0711-317 ERROR: Undefined symbol: .SSL_SESSION_get_ticket_lifetime_hint
ld: 0711-317 ERROR: Undefined symbol: .SSL_SESSION_has_ticket
ld: 0711-317 ERROR: Undefined symbol: .SSL_session_reused
ld: 0711-317 ERROR: Undefined symbol: .COMP_get_type
ld: 0711-317 ERROR: Undefined symbol: .SSL_is_init_finished
ld: 0711-317 ERROR: Undefined symbol: .SSL_CTX_get_options
ld: 0711-317 ERROR: Undefined symbol: .SSL_CTX_clear_options
ld: 0711-317 ERROR: Undefined symbol: .SSL_CTX_set_options
ld: 0711-317 ERROR: Undefined symbol: .SSL_CIPHER_is_aead
ld: 0711-317 ERROR: Undefined symbol: .SSL_CIPHER_get_cipher_nid
ld: 0711-317 ERROR: Undefined symbol: .SSL_CIPHER_get_digest_nid
ld: 0711-317 ERROR: Undefined symbol: .SSL_CIPHER_get_kx_nid
ld: 0711-317 ERROR: Undefined symbol: .SSL_CIPHER_get_auth_nid
ld: 0711-317 ERROR: Undefined symbol: .X509_STORE_get0_objects
ld: 0711-317 ERROR: Undefined symbol: .X509_OBJECT_get0_X509
ld: 0711-317 ERROR: Undefined symbol: .OPENSSL_sk_num
ld: 0711-317 ERROR: Undefined symbol: .OPENSSL_sk_value
ld: 0711-317 ERROR: Undefined symbol: .X509_OBJECT_get_type
ld: 0711-317 ERROR: Undefined symbol: .X509_NAME_ENTRY_set
ld: 0711-317 ERROR: Undefined symbol: .SSL_CTX_get_default_passwd_cb
ld: 0711-317 ERROR: Undefined symbol: .SSL_CTX_get_default_passwd_cb_userdata
ld: 0711-317 ERROR: Undefined symbol: .OpenSSL_version_num
ld: 0711-317 ERROR: Undefined symbol: .TLS_method
ld: 0711-317 ERROR: Undefined symbol: .TLS_client_method
ld: 0711-317 ERROR: Undefined symbol: .TLS_server_method
ld: 0711-317 ERROR: Undefined symbol: .BIO_up_ref
ld: 0711-317 ERROR: Undefined symbol: .OPENSSL_sk_pop_free
ld: 0711-317 ERROR: Undefined symbol: .X509_get_version
ld: 0711-317 ERROR: Undefined symbol: .X509_getm_notBefore
ld: 0711-317 ERROR: Undefined symbol: .X509_getm_notAfter
ld: 0711-317 ERROR: Undefined symbol: .OpenSSL_version
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.

$ lslpp -L | grep openssl
  aixtools.openssl.rte  1.0.2.16C Faixtools openssl 27-Aug-2018
  openssl.base 1.0.1.515CEFOpen Secure Socket Layer
  openssl.man.en_US1.0.1.515C FOpen Secure Socket Layer
  openssl  1.1.0g-1withsslv2C RSecure Sockets Layer and
  openssl-devel1.1.0g-1withsslv2C RSecure Sockets Layer and

+++ FYI +++
IBM AIX used some strange version numbers: 1.0.1.515 is actually an OpenSSL 
1.0.2 ABI version.

The "aixtools" fileset is 1.0.2p (p == 16th character of alphabet).

In any case - the test for X509_VERIFY_PARAM_set1_host() has been passing.

--

___
Python tracker 

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



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

2020-04-15 Thread STINNER Victor


STINNER Victor  added the comment:

The performance of the new method is not my first motivation.

My first motivation is to avoid consumers of the random to write a wrong 
implementation which would be biased. It's too easy to write biased functions 
without notifying.

Moreover, it seems like we can do something to get reproducible behavior on 
different architectures (different endianness) which would also be a nice 
feature.

For example, in bpo-13396, Amaury found this two functions in the wild:

* struct.pack("Q", random.getrandbits(64))
* sha1(str(random.getrandbits(8*20))).digest()

As I wrote, users are creative to workaround missing features :-) I don't think 
that these two implementations give the same result on big and little endian.

--

___
Python tracker 

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



[issue39953] Let's update ssl error codes

2020-04-15 Thread Michael Felt


Michael Felt  added the comment:

Also checking with gcc: get the following messages:

Failed to build these modules:
_ssl

Could not build the ssl module!
Python requires an OpenSSL 1.0.2 or 1.1 compatible libssl with 
X509_VERIFY_PARAM_set1_host().
LibreSSL 2.6.4 and earlier do not provide the necessary APIs, 
https://github.com/libressl-portable/portable/issues/381

messages:
building '_ssl' extension
gcc -pthread -Wno-unused-result -Wsign-compare -g -Og -Wall -std=c99 -Wextra 
-Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers 
-Werror=implicit-function-declaration -fvisibility=hidden -I./Include/internal 
-I/opt/aixtools/include -I./Include -I. 
-I/home/aixtools/python/cpython-master/Include 
-I/home/aixtools/python/cpython-master -c 
/home/aixtools/python/cpython-master/Modules/_ssl.c -o 
build/temp.aix-7200-1543-32-3.9-pydebug/home/aixtools/python/cpython-master/Modules/_ssl.o
In file included from /home/aixtools/python/cpython-master/Modules/_ssl.c:136:0:
/home/aixtools/python/cpython-master/Modules/_ssl_data.h:650:28: error: 
'ERR_LIB_ASYNC' undeclared here (not in a function); did you mean 
'ERR_LIB_ASN1'?
 {"FAILED_TO_SET_POOL", ERR_LIB_ASYNC, 101},
^
ERR_LIB_ASN1
/home/aixtools/python/cpython-master/Modules/_ssl_data.h:1510:29: error: 
'ERR_LIB_CT' undeclared here (not in a function); did you mean 'ERR_LIB_CMS'?
 {"BASE64_DECODE_ERROR", ERR_LIB_CT, 108},
 ^~
 ERR_LIB_CMS
/home/aixtools/python/cpython-master/Modules/_ssl_data.h:2650:24: error: 
'ERR_LIB_KDF' undeclared here (not in a function); did you mean 'ERR_LIB_BUF'?
 {"INVALID_DIGEST", ERR_LIB_KDF, 100},
^~~
ERR_LIB_BUF

--

___
Python tracker 

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



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

2020-04-15 Thread STINNER Victor


STINNER Victor  added the comment:

I updated my PR to rename the method to randbytes().

--
title: Add getrandbytes() method to random.Random -> Add randbytes() method to 
random.Random

___
Python tracker 

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



[issue39953] Let's update ssl error codes

2020-04-15 Thread Michael Felt


Michael Felt  added the comment:

Do I need to open a new issue?

This breaks building _ssl on AIX.

building '_ssl' extension
xlc_r -O -I./Include/internal -I/opt/aixtools/include -I./Include -I. 
-I/home/aixtools/python/cpython-master/Include 
-I/home/aixtools/python/cpython-master -c 
/home/aixtools/python/cpython-master/Modules/_ssl.c -o 
build/temp.aix-7200-1543-32-3.9-pydebug/home/aixtools/python/cpython-master/Modules/_ssl.o
"/home/aixtools/python/cpython-master/Modules/_ssl_data.h", line 650.28: 
1506-045 (S) Undeclared identifier ERR_LIB_ASYNC.
"/home/aixtools/python/cpython-master/Modules/_ssl_data.h", line 1510.29: 
1506-045 (S) Undeclared identifier ERR_LIB_CT.
"/home/aixtools/python/cpython-master/Modules/_ssl_data.h", line 2650.24: 
1506-045 (S) Undeclared identifier ERR_LIB_KDF.
"/home/aixtools/python/cpython-master/Modules/_ssl.c", line 579.17: 1506-196 
(W) Initialization between types "void*" and "struct _object*(*)(struct 
{...}*)" is not allowed.



commit 909b87d2bb3d6330d39c48e43f7f50f4d086cc41
Author: Benjamin Peterson 
Date:   Sun Apr 12 13:59:31 2020 -0500

closes bpo-39953: Generate ifdefs around library code definitions. 
(GH-19490)

commit 3e0dd3730b5eff7e9ae6fb921aa77cd26efc9e3a
Author: Benjamin Peterson 
Date:   Sat Apr 11 15:36:12 2020 -0500

closes bpo-39953: Update OpenSSL error codes table. (GH-19082)

I updated the error codes using the OpenSSL 1.1.1f source tree.

commit 173ad83b074b3bf0c9e86eb8bd101c2841f74297
Author: Antoine Pitrou 
Date:   Sun Jan 18 17:39:32 2015 +0100

Issue #23248: Update ssl error codes from latest OpenSSL git master.

commit f7338f65fb8bdb85c52dc54d06d003a82a06bbb3
Author: Antoine Pitrou 
Date:   Fri Jun 22 21:12:59 2012 +0200

Add forgotten files for #14837.
$

--
nosy: +Michael.Felt

___
Python tracker 

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



[issue40268] Reorganize pycore_pystate.h header

2020-04-15 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 5eca75df031d3cbe577c75dd87734b48c787e7f6 by Victor Stinner in 
branch 'master':
bpo-40268: Reformat posixmodule.c includes (GH-19536)
https://github.com/python/cpython/commit/5eca75df031d3cbe577c75dd87734b48c787e7f6


--

___
Python tracker 

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



[issue36207] robotsparser deny all with some rules

2020-04-15 Thread asca


asca  added the comment:

I thought it was going to work but apparently when I try 
https://www.actusite.fr/robots.txt, it doesn't

--
nosy: +artasca

___
Python tracker 

___
___
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 STINNER Victor


STINNER Victor  added the comment:

I like "from random import randbytes" name. I concur that "from random import 
bytes" overrides bytes() builtin type and so can likely cause troubles.

--

___
Python tracker 

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



[issue40244] AIX: build: _PyObject_GC_TRACK Asstertion failure

2020-04-15 Thread Batuhan Taskaya


Batuhan Taskaya  added the comment:

> No. I do not think it is the real problem either. And I do not know
compiler behavior well enough. Actually, considering the setting is
still -O0 (aka no optimization) I am surprised it has any effect. if I
understood correctly "no return" is intended to help the optimizer make
"informed" decisions.

Does removing all no returns change anything for you? (It didn't change 
anything for me, if I did it correctly)
find ./ -name "*.c" -type f -exec perl -pi -e 's/_Py_NO_RETURN//g' '{}' \;

--

___
Python tracker 

___
___
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 Serhiy Storchaka


Serhiy Storchaka  added the comment:

Maybe randbytes()?

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue40292] Memory leak when defining a new class inside a loop

2020-04-15 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

It is not a leak. It is expected behavior when you call 
gc.set_debug(gc.DEBUG_SAVEALL).

--
nosy: +serhiy.storchaka
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue40292] Memory leak when defining a new class inside a loop

2020-04-15 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Python2.7 gives similar results with:

class A(object):
pass

--
nosy: +rhettinger

___
Python tracker 

___
___
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 Raymond Hettinger


Raymond Hettinger  added the comment:

I concur that bytes() isn't a good name, but am still concerned that the 
proposed name is a bad API decision.

--

___
Python tracker 

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



[issue40244] AIX: build: _PyObject_GC_TRACK Asstertion failure

2020-04-15 Thread Michael Felt


Michael Felt  added the comment:

On 14/04/2020 19:28, Michael Felt wrote:
> Michael Felt  added the comment:
>
> On 14/04/2020 14:54, Batuhan Taskaya wrote:
>> Batuhan Taskaya  added the comment:
>>
>>> With the print statements - it does not crash:
>> I think this isn't directly relevant with prints but about re-compiling? 
>> (just guessing).
> I only recompiled the one .c file. With that one file re-compiled -
> wqith fprintf statements it succeeds, restore the original .c file (git
> checkout -- Objects/whatever.c; make - it fails.
>
> Tomorrow I'll search for the option(s) needed to get (complete) assembly
> code listing and try to see (and understand) the difference between what
> xlc-v13 and xlc-v16 makes. And, what I shall also test - is to recompile
> only this one file using xlc-v13 and see if the make then proceeds normally.
>
>
Many pages of output - and I confess - I do have some difficulty reading
code every now and then.

As the "bug" wherever it may be is related, I am guessing, to compiler
optimization and how to deal with routines with "no return".

Trying to understand the listings - I ran across:

./Include/object.h:typedef void (*destructor)(PyObject *);

Could the error be related to compilers confusing a routine with no
return, versus a routine returning a pointer to a "void"?

recall the code:

static void
gen_dealloc(PyGenObject *gen)

Comments?

Michael

> As Victor commented earlier - very much looking like a compiler bug.
> That said, still do not know what to say/write to software support as a
> complaint.
>
>> --
>>
>> ___
>> Python tracker 
>> 
>> ___
>>
> --
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

___
___
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 Vedran Čačić

Vedran Čačić  added the comment:

I think that the "module owner";-P must decide whether the `random` module 
should follow the C-namespacing or not. Of course, I'm in the "not" camp, so I 
believe those two "rand..." functions (randrange is completely redundant with 
random.choice(range)) should be supplemented with random.int and random.float. 
And then random.bytes will be completely natural. And people might be gently 
nudged into the right direction when using Python module namespaces.

--

___
Python tracker 

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



[issue40284] Add mapping methods to types.SimpleNamespace

2020-04-15 Thread Vedran Čačić

Vedran Čačić  added the comment:

I think there is a teaching moment here. I think it's important that no object 
in Python standard library conflates "item namespace" with "attr namespace". 
(Maybe that isn't true because of some specialized objects, but surely general 
ones such as SimpleNamespace shouldn't commit that mistake.)

On the other hand, we do have json in standard library, and JSON is primarily 
based on JavaScript Object Notation (yes, I know it's been extended to fit more 
languages, but still, its primal DNA shows). And the conflating of attributes 
and items is so natural in JS (a['b']===a.b) that it took them more than a 
decate to realize that separating Map from Object might be a good idea. :-)

So, maybe we should also have something like JSNamespace in stdlib (presumably 
in json module). But SimpleNamespace shouldn't be it. As Guido once said, a 
bucket has a handle, and it contains sand, but it doesn't contain a handle.

--
nosy: +veky

___
Python tracker 

___
___
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 Raymond Hettinger


Raymond Hettinger  added the comment:

Do you have another name suggestion that doesn't have a parallelism problem 
with the existing name?   The names getrandbytes() and getrandbits() suggest a 
parallelism that is incorrect.

--

___
Python tracker 

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



[issue40276] Make member objects inspectable.

2020-04-15 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Good point.  I'll withdraw this.

--
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



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

2020-04-15 Thread Vedran Čačić

Vedran Čačić  added the comment:

> I suggest just random.bytes(n), the same as numpy.

The problem with this is that people who `from random import *` (some schools 
insist on this, probably because most functions they need already start with 
`rand`) will shadow builtin `bytes`. Not that those schools do anything with 
`bytes`, but still, it might be inconvenient.

(The metaproblem is of course that some functions already do the "poor man's 
namespacing" in C-style by starting with `rand`, and some don't. I'm always for 
user control of namespacing, but I'm just saying that it doesn't correspond to 
how many beginners use `random` module.)

--
nosy: +veky

___
Python tracker 

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



[issue40292] Memory leak when defining a new class inside a loop

2020-04-15 Thread pavlos kallis


New submission from pavlos kallis :

Running the script, memory starts to leak and garbage count increases.

Running the same script in python 2.7 does not cause the memory leak.

--
components: C API
files: memory_leak.py
messages: 366495
nosy: pavlos kallis
priority: normal
severity: normal
status: open
title: Memory leak when defining a new class inside a loop
type: resource usage
versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9
Added file: https://bugs.python.org/file49062/memory_leak.py

___
Python tracker 

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



[issue40170] [C API] Make PyTypeObject structure an opaque structure in the public C API

2020-04-15 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

Something else that probably needs attention with the TypeSpec API is 
subclassing type in an extension when that subclass adds fields to the type 
object.

I use this in PyObjC to (dynamically) create types that have some additional 
data.  I could probably work around this issue by adding a level of indirection 
(basically storing the extra data in a WeakKeyDictionary), but haven't looked 
into this yet.

--
nosy: +ronaldoussoren

___
Python tracker 

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



[issue39573] [C API] Make PyObject an opaque structure in the limited C API

2020-04-15 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

The incompatibility mentioned in msg366473 is probably fixable by treating the 
PyObject header the same as the GC head structure. With some care this could 
mostly maintain binary compatibility by inserting some unused fields in 
PyObject_HEAD instead of the PyObject header when an extension targets a stable 
ABI version that has the PyObject header in-line.

This issue seems to be comparible to the "fragile instance variable" issue 
fixed in Objective-C 2.0, see 
.  
That was fixed by adding a level of indirection when accessing member variables.

Something like that is probably necessary to be able to subclass builtin types 
(other than object itself) in an extension.

--
nosy: +ronaldoussoren

___
Python tracker 

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



[issue40287] SpooledTemporaryFile.seek returns None

2020-04-15 Thread Inada Naoki


Change by Inada Naoki :


--
keywords: +patch
nosy: +inada.naoki
nosy_count: 1.0 -> 2.0
pull_requests: +1
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/19540

___
Python tracker 

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

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



[issue40276] Make member objects inspectable.

2020-04-15 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

What should this return?

>>> class A:
...   __slots__ = ['x', 'y', 'z']
...
>>> class B(A):
...   __slots__ = ['g','i']
...


>>> B.x.offset

--
nosy: +pablogsal

___
Python tracker 

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

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



[issue28002] ast.unparse can't roundtrip some f-strings

2020-04-15 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
nosy: +pablogsal

___
Python tracker 

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



  1   2   >