summaryrefslogtreecommitdiffstats
path: root/Modules
Commit message (Collapse)AuthorAgeFilesLines
...
| * | Issue #25092: Fix datetime.strftime() failure when errno was already set to ↵Steve Dower2015-09-221-0/+3
| | | | | | | | | | | | EINVAL.
| * | Merge 3.4 (datetime rounding)Victor Stinner2015-09-181-11/+63
| |\ \ | | |/
| | * Issue #23517: Fix rounding in fromtimestamp() and utcfromtimestamp() methodsVictor Stinner2015-09-181-8/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | of datetime.datetime: microseconds are now rounded to nearest with ties going to nearest even integer (ROUND_HALF_EVEN), instead of being rounding towards zero (ROUND_DOWN). It's important that these methods use the same rounding mode than datetime.timedelta to keep the property: (datetime(1970,1,1) + timedelta(seconds=t)) == datetime.utcfromtimestamp(t) It also the rounding mode used by round(float) for example. Add more unit tests on the rounding mode in test_datetime.
| * | Issue #25155: Add _PyTime_AsTimevalTime_t() functionVictor Stinner2015-09-181-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Windows, the tv_sec field of the timeval structure has the type C long, whereas it has the type C time_t on all other platforms. A C long has a size of 32 bits (signed inter, 1 bit for the sign, 31 bits for the value) which is not enough to store an Epoch timestamp after the year 2038. Add the _PyTime_AsTimevalTime_t() function written for datetime.datetime.now(): convert a _PyTime_t timestamp to a (secs, us) tuple where secs type is time_t. It allows to support dates after the year 2038 on Windows. Enhance also _PyTime_AsTimeval_impl() to detect overflow on the number of seconds when rounding the number of microseconds.
* | | Eliminate unnecessary variableRaymond Hettinger2015-09-221-2/+1
| | |
* | | Minor consistency improvements to negative value comparisons.Raymond Hettinger2015-09-221-9/+9
| | |
* | | Issue #25207, #14626: Fix my commit.Victor Stinner2015-09-211-3/+3
| | | | | | | | | | | | | | | It doesn't work to use #define XXX defined(YYY)" and then "#ifdef XXX" to check YYY.
* | | Issue #25207, #14626: Fix ICC compiler warnings in posixmodule.cVictor Stinner2015-09-211-3/+3
| | | | | | | | | | | | Replace "#if XXX" with #ifdef XXX".
* | | Add a fast path (no iterator creation) for a common case for repeating ↵Raymond Hettinger2015-09-191-4/+11
| | | | | | | | | | | | deques of size 1
* | | Hoist constant expression out of an inner loopRaymond Hettinger2015-09-191-2/+6
| | |
* | | Issue #25155: Add _PyTime_AsTimevalTime_t() functionVictor Stinner2015-09-181-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Windows, the tv_sec field of the timeval structure has the type C long, whereas it has the type C time_t on all other platforms. A C long has a size of 32 bits (signed inter, 1 bit for the sign, 31 bits for the value) which is not enough to store an Epoch timestamp after the year 2038. Add the _PyTime_AsTimevalTime_t() function written for datetime.datetime.now(): convert a _PyTime_t timestamp to a (secs, us) tuple where secs type is time_t. It allows to support dates after the year 2038 on Windows. Enhance also _PyTime_AsTimeval_impl() to detect overflow on the number of seconds when rounding the number of microseconds.
* | | Merge 3.5 (os.waitpid)Victor Stinner2015-09-151-2/+2
|\ \ \ | |/ /
| * | Issue #25118: Fix a regression of Python 3.5.0 in os.waitpid() on Windows.Victor Stinner2015-09-151-2/+2
| | | | | | | | | | | | Add an unit test on os.waitpid()
* | | Tighten inner-loop for deque_inplace_repeat().Raymond Hettinger2015-09-141-4/+6
| | |
* | | Add an exact type match fast path for deque_copy().Raymond Hettinger2015-09-131-0/+16
| | |
* | | Fix refcount.Raymond Hettinger2015-09-131-1/+4
| | |
* | | MergeKristján Valur Jónsson2015-09-121-2/+10
|\ \ \
| * \ \ Issue #25021: Merge 3.5 to defaultKristján Valur Jónsson2015-09-121-2/+10
| |\ \ \ | | |/ /
| | * | Issue #25021: Merge 3.4 to 3.5Kristján Valur Jónsson2015-09-121-2/+10
| | |\ \ | | | |/
| | | * Issue #25021: Merge from 3.3 to 3.4Kristján Valur Jónsson2015-09-121-2/+10
| | | |\
| | | | * Issue #25021: Correctly make sure that product.__setstate__ does not accessKristján Valur Jónsson2015-09-121-2/+10
| | | | | | | | | | | | | | | | | | | | invalid memory.
* | | | | In-line the append operations inside deque_inplace_repeat().Raymond Hettinger2015-09-121-4/+18
|/ / / /
* | | | Merge 3.5Victor Stinner2015-09-111-3/+1
|\ \ \ \ | |/ / /
| * | | Merge 3.4Victor Stinner2015-09-111-3/+1
| |\ \ \ | | |/ /
| | * | Issue #24684: socket.socket.getaddrinfo() now callsVictor Stinner2015-09-111-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | PyUnicode_AsEncodedString() instead of calling the encode() method of the host, to handle correctly custom string with an encode() method which doesn't return a byte string. The encoder of the IDNA codec is now called directly instead of calling the encode() method of the string.
| | * | Issue #25030: Do not document seek() as if it accepts keyword argumentsMartin Panter2015-09-111-1/+1
| | | | | | | | | | | | | | | | Patch from Shiyao Ma.
* | | | Fix test_time on platform with 32-bit time_t typeVictor Stinner2015-09-101-0/+1
| | | | | | | | | | | | | | | | Filter values which would overflow when converted to a C time_t type.
* | | | Simply deque repeat by reusing code in in-line repeat. Avoid unnecessary ↵Raymond Hettinger2015-09-101-30/+18
| | | | | | | | | | | | | | | | division.
* | | | Merge from 3.5.Larry Hastings2015-09-091-13/+7
|\ \ \ \ | |/ / /
| * | | Merge Python 3.5.0rc4 back to hg.python.org.Larry Hastings2015-09-091-13/+7
| |\ \ \
| | * | | Issue #25029: MemoryError in test_strptimeSteve Dower2015-09-091-13/+7
| | | | |
* | | | | Merge 3.5 into 3.6Martin Panter2015-09-091-3/+3
|\ \ \ \ \ | |/ / / /
| * | | | Merge 3.4 into 3.5Martin Panter2015-09-091-3/+3
| |\ \ \ \ | | | |/ / | | |/| |
| | * | | os.sendfile(headers=None, trailers=None) arguments are not actually acceptedMartin Panter2015-09-091-3/+3
| | | | | | | | | | | | | | | | | | | | Needs to be tested on a BSD.
* | | | | Issue #23738: Merge 3.5 into 3.6Martin Panter2015-09-092-10/+11
|\ \ \ \ \ | |/ / / /
| * | | | Issue #23738: Merge 3.4 into 3.5Martin Panter2015-09-092-10/+11
| |\ \ \ \ | | |/ / /
| | * | | Issue #23738: Document and test actual keyword parameter namesMartin Panter2015-09-091-8/+9
| | | | | | | | | | | | | | | | | | | | Also fix signature because os.utime(..., ns=None) is not allowed.
* | | | | Issue #23517: fromtimestamp() and utcfromtimestamp() methods ofVictor Stinner2015-09-082-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | datetime.datetime now round microseconds to nearest with ties going to nearest even integer (ROUND_HALF_EVEN), as round(float), instead of rounding towards -Infinity (ROUND_FLOOR). pytime API: replace _PyTime_ROUND_HALF_UP with _PyTime_ROUND_HALF_EVEN. Fix also _PyTime_Divide() for negative numbers. _PyTime_AsTimeval_impl() now reuses _PyTime_Divide() instead of reimplementing rounding modes.
* | | | | Revert change 0eb8c182131e:Victor Stinner2015-09-081-1/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | """Issue #23517: datetime.timedelta constructor now rounds microseconds to nearest with ties going away from zero (ROUND_HALF_UP), as Python 2 and Python older than 3.3, instead of rounding to nearest with ties going to nearest even integer (ROUND_HALF_EVEN).""" datetime.timedelta uses rounding mode ROUND_HALF_EVEN again.
* | | | | Issue #22241: Fix a compiler waringVictor Stinner2015-09-071-1/+1
| | | | |
* | | | | Raise more correct exception on overflow in setting buffer_size attribute ofSerhiy Storchaka2015-09-071-6/+7
|\ \ \ \ \ | |/ / / / | | | | | | | | | | expat parser.
| * | | | Raise more correct exception on overflow in setting buffer_size attribute ofSerhiy Storchaka2015-09-071-6/+7
| |\ \ \ \ | | |/ / / | | | | | | | | | | expat parser.
| | * | | Raise more correct exception on overflow in setting buffer_size attribute ofSerhiy Storchaka2015-09-071-6/+7
| | | | | | | | | | | | | | | | | | | | expat parser.
* | | | | Issue #25019: Fixed a crash caused by setting non-string key of expat parser.Serhiy Storchaka2015-09-071-1/+6
|\ \ \ \ \ | |/ / / / | | | | | | | | | | | | | | | Added additional tests for expat parser attributes. Based on patch by John Leitch.
| * | | | Issue #25019: Fixed a crash caused by setting non-string key of expat parser.Serhiy Storchaka2015-09-071-1/+6
| |\ \ \ \ | | |/ / / | | | | | | | | | | | | | | | Added additional tests for expat parser attributes. Based on patch by John Leitch.
| | * | | Issue #25019: Fixed a crash caused by setting non-string key of expat parser.Serhiy Storchaka2015-09-071-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | Added additional tests for expat parser attributes. Based on patch by John Leitch.
| | * | | Issue #24917: time_strftime() buffer over-read.Steve Dower2015-09-071-0/+2
| | | | |
* | | | | Merge from 3.5Steve Dower2015-09-072-6/+20
|\ \ \ \ \ | |/ / / /
| * | | | Merge from 3.5.0 branch.Steve Dower2015-09-072-6/+20
| |\ \ \ \ | | | |/ / | | |/| |
| | * | | Issue #24917: time_strftime() buffer over-read.Steve Dower2015-09-071-6/+10
| | | | |