[issue33239] tempfile module: functions with the 'buffering' option are incorrectly documented

2020-09-13 Thread Vinay Sajip


Change by Vinay Sajip :


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



[issue33239] tempfile module: functions with the 'buffering' option are incorrectly documented

2020-09-13 Thread Vinay Sajip


Vinay Sajip  added the comment:


New changeset c978be283db768743d995f04414c65439a632bdd by Miss Islington (bot) 
in branch '3.9':
bpo-33239: Fix default value of 'buffering' parameter in docs of tempfile.* 
functions (GH-21763) (GH-5)
https://github.com/python/cpython/commit/c978be283db768743d995f04414c65439a632bdd


--

___
Python tracker 

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



[issue33239] tempfile module: functions with the 'buffering' option are incorrectly documented

2020-09-13 Thread Vinay Sajip


Change by Vinay Sajip :


--
versions:  -Python 3.7

___
Python tracker 

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



[issue33239] tempfile module: functions with the 'buffering' option are incorrectly documented

2020-09-13 Thread Vinay Sajip


Vinay Sajip  added the comment:


New changeset bf50b0e80a8a0d651af2f953b662eeadd27c7c93 by Miss Islington (bot) 
in branch '3.8':
bpo-33239: Fix default value of 'buffering' parameter in docs of tempfile.* 
functions (GH-21763) (GH-6)
https://github.com/python/cpython/commit/bf50b0e80a8a0d651af2f953b662eeadd27c7c93


--
nosy: +vinay.sajip

___
Python tracker 

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



[issue33239] tempfile module: functions with the 'buffering' option are incorrectly documented

2020-09-13 Thread Vinay Sajip


Change by Vinay Sajip :


--
versions: +Python 3.10, Python 3.9 -Python 3.4, Python 3.5, Python 3.6

___
Python tracker 

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



[issue33239] tempfile module: functions with the 'buffering' option are incorrectly documented

2020-09-13 Thread miss-islington


Change by miss-islington :


--
pull_requests: +21280
pull_request: https://github.com/python/cpython/pull/5

___
Python tracker 

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



[issue33239] tempfile module: functions with the 'buffering' option are incorrectly documented

2020-09-13 Thread miss-islington


Change by miss-islington :


--
pull_requests: +21281
pull_request: https://github.com/python/cpython/pull/6

___
Python tracker 

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



[issue33239] tempfile module: functions with the 'buffering' option are incorrectly documented

2020-09-13 Thread miss-islington


miss-islington  added the comment:


New changeset b48389d95093c3f912549add8da339edc164bf0d by Sergey Fedoseev in 
branch 'master':
bpo-33239: Fix default value of 'buffering' parameter in docs of tempfile.* 
functions (GH-21763)
https://github.com/python/cpython/commit/b48389d95093c3f912549add8da339edc164bf0d


--
nosy: +miss-islington

___
Python tracker 

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



[issue33239] tempfile module: functions with the 'buffering' option are incorrectly documented

2020-09-13 Thread Sergey Fedoseev


Change by Sergey Fedoseev :


--
nosy: +sir-sigurd
nosy_count: 4.0 -> 5.0
pull_requests: +21279
pull_request: https://github.com/python/cpython/pull/21763

___
Python tracker 

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



[issue33239] tempfile module: functions with the 'buffering' option are incorrectly documented

2018-09-13 Thread Antti Haapala


Antti Haapala  added the comment:

This week we were bit by this in production. I foolishly thought that the  docs 
would give me correct default values... It is worse that it didn't actually 
occur until we went over the limit.

--
nosy: +ztane

___
Python tracker 

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



[issue33239] tempfile module: functions with the 'buffering' option are incorrectly documented

2018-04-08 Thread Martin Falatic

Martin Falatic  added the comment:

The correction of `buffering=None` --> `buffering=-1` for the defaults 
definitely needs to happen.

A reference to `open()` is already present in the 3.x documentation: 
"buffering, encoding and newline are interpreted as for open()."

Given that the `open()` reference already suffices for `encoding` and 
`newline`, it ought to suffice for `buffering` as well. No extra text beyond 
that should be necessary (I originally thought that might be good to add, but 
looking at this now it's clear if you add more to describe `buffering` you'll 
need to add it for the other two options, and it's all duplicative. Fixing the 
defaults should suffice.)

--

___
Python tracker 

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



[issue33239] tempfile module: functions with the 'buffering' option are incorrectly documented

2018-04-08 Thread Akshay Sharma

Change by Akshay Sharma :


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

___
Python tracker 

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



[issue33239] tempfile module: functions with the 'buffering' option are incorrectly documented

2018-04-08 Thread Akshay Sharma

Akshay Sharma  added the comment:

Hi, will it be good to link the cross-reference for 
`open`(https://docs.python.org/3/library/functions.html#open) in the 
documentation?

I think specifically mentioning the usage of the  `buffering` is a better way.

--
nosy: +Akshay Sharma

___
Python tracker 

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



[issue33239] tempfile module: functions with the 'buffering' option are incorrectly documented

2018-04-07 Thread Martin Falatic

New submission from Martin Falatic :

The documentation for the tempfile module in Python 3.x for the `buffering` 
option is incorrect:

https://docs.python.org/3/library/tempfile.html

TemporaryFile, NamedTemporaryFile, and SpooledTemporaryFile all take the 
`buffering` option, which in turn appears to correlate to the Python 2.7 option 
`bufsize`, which was and continues to be an integer (per the source).

In the 3.x documentation the default signature for TemporaryFile, 
NamedTemporaryFile, and SpooledTemporaryFile includes `buffering=None`. 
Actually specifying None as a default for this will cause an exception 
(`TypeError: an integer is required (got type NoneType)`).

There is a cross-reference in the 3.x tempfile docs to `open` 
(https://docs.python.org/3/library/functions.html#open) which in turn shows the 
correct signature to use for `buffering`. Additionally, the source code is 
clearly documented 
(https://github.com/python/cpython/blob/master/Lib/tempfile.py)

A good correction would be to ensure `buffering=-1` is documented as the 
default for the three functions in tempfile, with an additional note explicitly 
stating that -1 == no buffering, and the existing `open` cross-reference 
retained.

--
assignee: docs@python
components: Documentation
messages: 315072
nosy: MartyMacGyver, docs@python
priority: normal
severity: normal
status: open
title: tempfile module: functions with the 'buffering' option are incorrectly 
documented
versions: Python 3.4, Python 3.5, Python 3.6, 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