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

2020-05-02 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 531d1e541284bfd7944f8c66a5e8c3c3234afaff by Serhiy Storchaka in 
branch 'master':
bpo-39435: Make the first argument of pickle.loads() positional-only. (GH-19846)
https://github.com/python/cpython/commit/531d1e541284bfd7944f8c66a5e8c3c3234afaff


--

___
Python tracker 

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


Change by Serhiy Storchaka :


--
pull_requests: +19164
pull_request: https://github.com/python/cpython/pull/19846

___
Python tracker 

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

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


miss-islington  added the comment:


New changeset e05828055e5165cc7268ea3bea33adc502e054a1 by Antoine Pitrou in 
branch '3.8':
[3.8] bpo-39435: Fix docs for pickle.loads (GH-18160) (GH-19843)
https://github.com/python/cpython/commit/e05828055e5165cc7268ea3bea33adc502e054a1


--

___
Python tracker 

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


miss-islington  added the comment:


New changeset 3859b1ac1d7014f8ff673962d94a01a408546e24 by Antoine Pitrou in 
branch '3.7':
[3.7] bpo-39435: Fix docs for pickle.loads (GH-18160). (GH-19844)
https://github.com/python/cpython/commit/3859b1ac1d7014f8ff673962d94a01a408546e24


--

___
Python tracker 

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

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

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


miss-islington  added the comment:


New changeset 289842ae820f99908d3a345f1f3b6d4e5b4b97fc by Shantanu in branch 
'master':
bpo-39435: Fix docs for pickle.loads (GH-18160)
https://github.com/python/cpython/commit/289842ae820f99908d3a345f1f3b6d4e5b4b97fc


--
nosy: +miss-islington

___
Python tracker 

___
___
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-03-14 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
type:  -> enhancement
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



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

2020-03-14 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

In pickle.py the name of the first parameter is "s" (it was "str" in 2.7), not 
"data". And in the module docstring it is "string". So we have two options:

1. Make the first parameter positional-only. This is not breaking change 
because the documentation and two implementations had four different names, so 
there was no official way to pass it by keyword.

2. Make it positional-and-keyword parameter officially. All implementations, 
documentation and docstrings should be synchronized.

What is more preferable? Do we need to pass the first argument to 
pickle.loads() by keyword?

After resolving this issue we may want to revise other modules which have the 
loads() function.

--
nosy: +serhiy.storchaka

___
Python tracker 

___
___
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-01-25 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

Reopening because it seems my reading of the doc was wrong (took a backslash 
for a regular slash :-o).

--
resolution: not a bug -> 
stage: resolved -> 
status: closed -> open

___
Python tracker 

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



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

2020-01-24 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

As mentioned on the attached PR, the first argument is positional, so it 
doesn't matter that the name in the docs is not the same as the name in the 
code.

The name "bytes_object" makes it clear which type of object is accepted, which 
makes it a better fit IMHO than "data".  Therefore, I'm going to close this 
issue.

--
resolution:  -> not a bug
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



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

2020-01-23 Thread Roundup Robot


Change by Roundup Robot :


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

___
Python tracker 

___
___
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-01-23 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +pitrou

___
Python tracker 

___
___
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-01-23 Thread Guido Imperiale


New submission from Guido Imperiale :

(1)
In the documentation for loads(), the name for the first argument of loads is 
'bytes_object'. The actual signature, both in pickle.py and _pickle.c, it is 
instead 'data'.

(2)
In the documentation and in pickle.py, the default value for the 'buffers' 
parameter is None. However, in _pickle.c, it is an empty tuple (); this is also 
reflected by running the interpreter:

In [1]: inspect.signature(pickle.loads).parameters['buffers']   


 
Out[1]: 

Thanks to @hauntsaninja for spotting these in 
https://github.com/python/typeshed/pull/3636

--
assignee: docs@python
components: Documentation, Library (Lib)
messages: 360569
nosy: crusaderky, docs@python
priority: normal
severity: normal
status: open
title: pickle: inconsistent arguments pickle.py vs _pickle.c vs docs
versions: Python 3.8

___
Python tracker 

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