[issue34446] ambiguous _max_size parameter in SpooledTemporaryFile

2019-07-07 Thread Andrew Scheller

Andrew Scheller  added the comment:

I agree that this is ambiguous behaviour. The docs at 
https://docs.python.org/3/library/tempfile.html#tempfile.SpooledTemporaryFile 
say "This function operates exactly as TemporaryFile() does, except that data 
is spooled in memory until the file size exceeds max_size, or until the file’s 
fileno() method is called, at which point the contents are written to disk and 
operation proceeds as with TemporaryFile().", and as the default value for 
max_size is 0, that would imply to me that _any_ data written to a 
SpooledTemporaryFile (constructed with a max_size of 0) would instantly get 
(internally) converted to a TemporaryFile.

Whereas looking at the code 
https://github.com/python/cpython/blob/master/Lib/tempfile.py#L650 it seems a 
max_size of 0 means "don't rollover". Perhaps it would have made sense to have 
SpooledTemporaryFile default to a max_size of None (and use that to mean "never 
rollover") ?

So as well as the inconsistency between rollover behaviour in the 
write()/writelines() methods and the truncate() method (when max_size is 0) 
that jcc2220 pointed out, I believe there's also a documentation issue here in 
that it's not clear what a max_size of 0 is /supposed/ to do.

--
assignee:  -> docs@python
components: +Documentation
nosy: +docs@python, lurchman
versions: +Python 2.7, Python 3.5, Python 3.6, Python 3.8, Python 3.9

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



[issue32870] Documentation typo (2.x only) for deque.remove

2018-02-18 Thread Andrew Scheller

Change by Andrew Scheller <launch...@loowis.durge.org>:


--
type:  -> enhancement

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



[issue32870] Documentation typo (2.x only) for deque.remove

2018-02-18 Thread Andrew Scheller

Andrew Scheller <launch...@loowis.durge.org> added the comment:

Looks like https://bugs.python.org/issue24269 is where this got fixed for the 
3.x documentation ;-)

--

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




[issue32870] Documentation typo (2.x only) for deque.remove

2018-02-18 Thread Andrew Scheller

New submission from Andrew Scheller <launch...@loowis.durge.org>:

https://docs.python.org/2/library/collections.html#collections.deque.remove 
says "Removed the first occurrence of value."
I believe the "Removed" should be changed to just "Remove" ?

(this has already been fixed in the 3.x documentation 
https://docs.python.org/3/library/collections.html#collections.deque.remove )

--
assignee: docs@python
components: Documentation
messages: 312319
nosy: docs@python, lurchman
priority: normal
severity: normal
status: open
title: Documentation typo (2.x only) for deque.remove
versions: Python 2.7

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



[issue25519] Minor difflib documentation bug

2015-10-30 Thread Andrew Scheller

New submission from Andrew Scheller:

In the documentation for difflib.HtmlDiff.__init__ there's a couple of 
references to ``ndiff()``. I believe these should be modified to :func:`ndiff` 
(as used elsewhere in the difflib documentation) so that they get nicely 
hyperlinked in the HTML documentation.

See e.g. 
https://docs.python.org/2/library/difflib.html#difflib.HtmlDiff.__init__ and 
https://docs.python.org/3/library/difflib.html#difflib.HtmlDiff.__init__
where 'ndiff()' isn't hyperlinked, and 
https://docs.python.org/3/library/difflib.html#difflib.restore where 'ndiff()' 
*is* hyperlinked.

--
assignee: docs@python
components: Documentation
messages: 253743
nosy: docs@python, lurchman
priority: normal
severity: normal
status: open
title: Minor difflib documentation bug
type: enhancement
versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5, Python 3.6

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



[issue21198] Minor tarfile documentation bug

2014-04-14 Thread Andrew Scheller

Andrew Scheller added the comment:

Éric - appears to be only Doc/library/tarfile.rst that is affected.

Matt - looks like your simple patch contains a lot more than you intended?!

--

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



[issue21221] Minor struct_time documentation bug

2014-04-14 Thread Andrew Scheller

New submission from Andrew Scheller:

The documentation for time.struct_time (in Doc/library/time.rst) explains 
tm_isdst as 0, 1 or -1; see below but then doesn't really go into further 
detail below, other than to say A -1 argument as the daylight savings flag, 
passed to mktime() will usually result in the correct daylight savings state to 
be filled in..

In Modules/timemodule.c there's a section which says:
{tm_isdst, 1 if summer time is in effect, 0 if not, and -1 if unknown},

IMHO it would be nice if this more accurate info was also present in the HTML 
documentation.

--
assignee: docs@python
components: Documentation
messages: 216158
nosy: docs@python, lurchman
priority: normal
severity: normal
status: open
title: Minor struct_time documentation bug
type: enhancement
versions: Python 2.7, Python 3.4, Python 3.5

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



[issue21198] Minor tarfile documentation bug

2014-04-10 Thread Andrew Scheller

New submission from Andrew Scheller:

I've just noticed that the documentation for TarInfo.type says
To determine the type of a TarInfo object more conveniently, use the is_*() 
methods below.

However none of the methods mentioned actually contain an underscore, so I 
believe the documentation should be updated to ...use the is*() methods below.

(for comparison, the documentation for stat.S_IFMT correctly talks about is*() 
functions)

--
assignee: docs@python
components: Documentation
messages: 215892
nosy: docs@python, lurchman
priority: normal
severity: normal
status: open
title: Minor tarfile documentation bug
type: enhancement
versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5

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



[issue15636] base64.decodebytes is only available in Python3.1+

2012-08-13 Thread Andrew Scheller

New submission from Andrew Scheller:

According to the documentation ( 
http://docs.python.org/py3k/library/base64.html#base64.decodebytes ) both the 
decodebytes and the deprecated decodestring methods are available in the base64 
module in Python3.x
However in Python3.0 (I'm testing with version 3.0.1 built from source) the 
base64 module only has the decodestring method, it doesn't have decodebytes. 
IMHO the documentation should be updated to reflect this.

It looks like decodebytes was added to Python3.1 by 
http://bugs.python.org/issue3613

--
assignee: docs@python
components: Documentation
messages: 168080
nosy: docs@python, lurchman
priority: normal
severity: normal
status: open
title: base64.decodebytes is only available in Python3.1+
type: enhancement
versions: Python 3.1, Python 3.2, Python 3.3, Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15636
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com