module name into consideration when determining whether a module is a
package or not. This prevents importing a module's __init__ module
directly and having it considered a package, which can lead to
duplicate sub-modules.
Thanks to Ronan Lamy for reporting the bug.
in struct tm, time.struct_time objects returned by time.gmtime(),
time.localtime() and time.strptime() functions now have tm_zone and
tm_gmtoff attributes. Original patch by Paul Boddie.
Fix also its value on Windows and Linux according to its documentation:
"adjustable" indicates if the clock *can be* adjusted, not if it is or was
adjusted.
In most cases, it is not possible to indicate if a clock is or was adjusted.
use. Make the get_entity 'method' a module function as it did not use 'self'.
Delete buggy _find_constructor function that is not needed, at least in 3.x.
Revise get_argspec so all tests pass. Add and fix NEWS entries.
open() and io.TextIOWrapper are now calling locale.getpreferredencoding(False)
instead of locale.getpreferredencoding() in text mode if the encoding is not
specified. Don't change temporary the locale encoding using locale.setlocale(),
use the current locale encoding instead of the user preferred encoding.
Explain also in open() documentation that locale.getpreferredencoding(False) is
called if the encoding is not specified.
when the path existed and had the S_ISGID mode bit set when it was
not explicitly asked for. This is no longer an exception as mkdir
cannot control if the OS sets that bit for it or not.
when the path existed and had the S_ISGID mode bit set when it was not
explicitly asked for. This is no longer an exception as mkdir cannot control
if the OS sets that bit for it or not.
This is a behavior change: before this leading and trailing spaces were
stripped from ASCII parts, now they are preserved. Without this fix we didn't
parse the examples in the RFC correctly, so I think breaking backward
compatibility here is justified.
Patch by Ralf Schlatterbeck.
* Formatting string, int, float and complex use the _PyUnicodeWriter API. It
avoids a temporary buffer in most cases.
* Add _PyUnicodeWriter_WriteStr() to restore the PyAccu optimization: just
keep a reference to the string if the output is only composed of one string
* Disable overallocation when formatting the last argument of str%args and
str.format(args)
* Overallocation allocates at least 100 characters: add min_length attribute
to the _PyUnicodeWriter structure
* Add new private functions: _PyUnicode_FastCopyCharacters(),
_PyUnicode_FastFill() and _PyUnicode_FromASCII()
The speed up is around 20% in average.
An issue in ctypes.c_longdouble, ctypes.c_double, and ctypes.c_float that
caused an incorrect exception to be returned in the case of overflow has been
fixed.
An issue in ctypes.c_longdouble, ctypes.c_double, and ctypes.c_float that
caused an incorrect exception to be returned in the case of overflow has been
fixed.
This commit also restores the news item for 167256 that it looks like
Terry inadvertently deleted. (Either that, or I don't understand
now merging works...which is equally possible.)
This patch also deprecates the MalformedHeaderDefect. My best guess is that
this defect was rendered obsolete by a refactoring of the parser, and the
corresponding defect for the new parser (which this patch introduces) was
overlooked.
smtpd now handles EHLO and has infrastructure for extended smtp command mode.
The SIZE extension is also implemented. In order to support parameters on
MAIL FROM, the RFC 5322 parser from the email package is used to parse the
address "token".
Logging subclasses things and overrides __init__, so it was necessary to
update those __init__ functions in the logging tests to make the logging tests
pass.
The original suggestion and patch were by Alberto Trevino. Juhana Jauhiainen
added the --size argument and SIZE parameter support. Michele Orrù improved
the patch and added more tests. Dan Boswell conditionalized various bits of
code on whether or not we are in HELO or EHLO mode, as well as some other
improvements and tests. I finalized the patch and added the address parsing.
Without this function people would be tempted to use the other date functions
in email.utils to compute an aware localtime, and those functions are not as
good for that purpose as this code. The code is Alexander Belopolsy's from
his proposed patch for issue 9527, with a fix (and additional tests) by Brian
K. Jones.