Antoine Pitrou
1cfe7d9a84
Issue #14775 : Fix a potential quadratic dict build-up due to the garbage collector repeatedly trying to untrack dicts.
...
Additional comments by Tim Silk.
2012-05-28 22:23:42 +02:00
Antoine Pitrou
e1ad3dac3d
Issue #14775 : Fix a potential quadratic dict build-up due to the garbage collector repeatedly trying to untrack dicts.
...
Additional comments by Tim Silk.
2012-05-28 22:22:34 +02:00
Meador Inge
d102e04e4a
Issue #9041 : raised exception is misleading
...
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.
2012-05-28 14:47:53 -05:00
Meador Inge
031e25b0f7
Issue #9041 : raised exception is misleading
...
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.
2012-05-28 14:21:16 -05:00
Richard Oudkerk
26cdf1fe5b
Make multiprocessing's shared memory use memoryview instead of raw pointer
2012-05-26 22:09:59 +01:00
Vinay Sajip
7ded1f0f69
Implemented PEP 405 (Python virtual environments).
2012-05-26 03:45:29 +01:00
Benjamin Peterson
9242c1378f
capitialize utime statuses
2012-05-25 10:26:47 -07:00
Benjamin Peterson
46c214d893
capitialize enum members
2012-05-25 10:22:29 -07:00
Hynek Schlawack
9866d96e48
#4841 : Fix FileIO constructor to honor closefd when called repeatedly
...
Patch by Victor Stinner.
2012-05-25 10:27:43 +02:00
Hynek Schlawack
2cc7156515
#4841 : Fix FileIO constructor to honor closefd when called repeatedly
...
Patch by Victor Stinner.
2012-05-25 10:05:53 +02:00
Benjamin Peterson
18eac4a1d6
use PyDict_Contains
2012-05-25 00:24:42 -07:00
Benjamin Peterson
a6a7a1accf
return NULL on error
2012-05-25 00:22:04 -07:00
Benjamin Peterson
2d12e1458f
actually return the result
2012-05-25 00:19:40 -07:00
Benjamin Peterson
5ed7bd79df
simplify and rewrite the zipimport part of 702009f3c0b1 a bit
2012-05-24 22:54:15 -07:00
Benjamin Peterson
209e04c201
plug ref leak
2012-05-24 22:35:39 -07:00
Eric V. Smith
984b11f88f
issue 14660: Implement PEP 420, namespace packages.
2012-05-24 20:21:04 -04:00
Eli Bendersky
b20df95827
Issue #14849 : setup Element data members to be assignable in subclasses
2012-05-20 06:33:29 +03:00
Stefan Krah
5d953184a6
Issue #14779 : Get sizeof(void *) directly rather than relying on sysconfig.
2012-05-16 20:41:56 +02:00
Stefan Krah
e34a209584
Fix Visual Studio warning.
2012-05-16 20:20:03 +02:00
Stefan Krah
696d10f1bb
Changes in _mpd_qexp():
...
-----------------------
1) Reduce the number of iterations in the Horner scheme for operands with
a negative adjusted exponent. Previously the number was overestimated
quite generously.
2) The function _mpd_get_exp_iterations() now has an ACL2 proof and
is rewritten accordingly.
3) The proof relies on abs(op) > 9 * 10**(-prec-1), so operands without
that property are now handled by the new function _mpd_qexp_check_one().
4) The error analysis for the evaluation of the truncated Taylor series
in Hull&Abrham's paper relies on the fact that the reduced operand
'r' has fewer than context.prec digits.
Since the operands may have more than context.prec digits, a new ACL2
proof covers the case that r.digits > context.prec. To facilitate the
proof, the Horner step now uses fma instead of rounding twice in
multiply/add.
Changes in mpd_qexp():
----------------------
1) Fix a bound in the correct rounding loop that was too optimistic. In
practice results were always correctly rounded, because it is unlikely
that the error in _mpd_qexp() ever reaches the theoretical maximum.
2012-05-16 20:10:21 +02:00
Antoine Pitrou
b7d033db78
Issue #14829 : Fix bisect and range() indexing with large indices (>= 2 ** 32) under 64-bit Windows.
...
(untested, because of Windows build issues under 3.x)
2012-05-16 14:39:36 +02:00
Antoine Pitrou
a103b96a80
Issue #14829 : Fix bisect and range() indexing with large indices (>= 2 ** 32) under 64-bit Windows.
2012-05-16 14:37:54 +02:00
Antoine Pitrou
e7672d38dc
Issue #14732 : The _csv module now uses PEP 3121 module initialization.
...
Patch by Robin Schreiber.
2012-05-16 11:33:08 +02:00
Martin v. Löwis
33cac8578b
Add safecase to silence Win64 warning.
2012-05-15 14:34:58 +02:00
Martin v. Löwis
d1b7f3993a
Silence VS 2010 warning on loss of precision (_int64 -> _int32).
...
This is safe because the actual value is already range-checked.
2012-05-15 14:06:21 +02:00
Brian Curtin
401f9f3d32
Fix #13210 . Port the Windows build from VS2008 to VS2010.
2012-05-13 11:19:23 -05:00
Ross Lagerwall
4d688e3275
Remove uninitialized compiler warning.
2012-05-12 08:30:33 +02:00
Mark Dickinson
943cab2fec
Issue #14741 : Merge fix from 3.2.
2012-05-07 17:25:14 +01:00
Mark Dickinson
da029fb293
Issue #14741 : Fix missing support for ellipsis in parser module.
2012-05-07 17:24:04 +01:00
Mark Dickinson
72f6095d4f
Issue #14697 : Merge fix from 3.2.
2012-05-07 16:36:33 +01:00
Mark Dickinson
11c1dee183
Issue #14697 : Fix missing parser module support for set displays and set comprehensions.
2012-05-07 16:34:34 +01:00
Mark Dickinson
cf360b9209
Issue #14701 : Add missing support for 'raise ... from' in parser module.
2012-05-07 12:01:27 +01:00
Mark Dickinson
9fad160411
Issue #14701 : Merge fix from 3.2.
2012-05-07 12:03:11 +01:00
Nadeem Vawda
486a0451f3
Fix buildbot failures in test_lzma.
2012-05-07 00:40:57 +02:00
Nadeem Vawda
bc459bb484
Rename lzma.check_is_supported() to is_check_supported() to avoid grammatical confusion.
2012-05-06 23:01:51 +02:00
Nadeem Vawda
f55b329edc
Add lzma.{encode,decode}_filter_properties().
2012-05-06 23:01:27 +02:00
Nadeem Vawda
54c74ece28
Fix formatting of preset values for exception messages in _lzmamodule.c.
2012-05-06 13:35:47 +02:00
Benjamin Peterson
eaa5eeef57
Backed out changeset 709850f1ec67
2012-05-05 21:22:14 -04:00
Larry Hastings
cfe6f2af3c
Update Misc/NEWS for issues #14127 and #14705 . (And, technically, #10148.)
2012-05-05 17:39:09 -07:00
Larry Hastings
faf91e75ab
Issue #14705 : Add 'p' format character to PyArg_ParseTuple* for bool support.
2012-05-05 16:54:29 -07:00
Stefan Krah
6b03f2ce45
Fix typo in exception message.
2012-05-05 22:37:05 +02:00
Richard Oudkerk
7ef909cdd7
Fix for issue 14725 for 3.2 branch
2012-05-05 20:41:23 +01:00
Richard Oudkerk
fdb8dcf675
Fix for Issue 14725 for 3.3 branch.
2012-05-05 19:45:37 +01:00
Benjamin Peterson
fbd85a0fbf
initialization not needed
2012-05-04 11:06:09 -04:00
Richard Oudkerk
f072b45e34
Fix for fatal errors in os.*utime*()
...
The address of an object was being decreffed instead of the object.
2012-05-04 12:01:31 +01:00
Larry Hastings
b333640aba
Issue #14127 : Fix two bugs with the Windows implementation.
2012-05-04 02:31:57 -07:00
Benjamin Peterson
9bd9d74996
what is a invalid tuple?
2012-05-04 01:42:41 -04:00
Benjamin Peterson
b399ab2c5c
clean up converted path on error
2012-05-04 01:31:13 -04:00
Benjamin Peterson
3e2e368f3b
avoid unitialized memory
2012-05-04 01:14:03 -04:00
Benjamin Peterson
35a8f0dee5
check correct variable for error
2012-05-04 01:10:59 -04:00
Larry Hastings
76ad59b7e8
Issue #14127 : Add ns= parameter to utime, futimes, and lutimes.
...
Removed futimens as it is now redundant.
Changed shutil.copystat to use st_atime_ns and st_mtime_ns from os.stat
and ns= parameter to utime--it once again preserves exact metadata on Linux!
2012-05-03 00:30:07 -07:00
Benjamin Peterson
49a69e4d48
strip is_ prefixes on clock_info fields
2012-05-01 09:38:34 -04:00
Richard Oudkerk
3e268aac3b
Mark multiprocessing files with "Licensed to PSF under a Contributor Agreement"
...
instead of BSD licence.
2012-04-30 12:13:55 +01:00
Mark Dickinson
57404891a0
Issue #14696 : Merge from 3.2
2012-04-29 22:20:01 +01:00
Mark Dickinson
407b3bd89b
Issue #14696 : Fix parser module to understand 'nonlocal' declarations.
2012-04-29 22:18:31 +01:00
Mark Dickinson
b63fd2a408
Issue #9154 : Merge fix from 3.2.
2012-04-29 18:35:56 +01:00
Mark Dickinson
ea7e9f9a83
Issue #9154 : Fix parser module to understand function annotations.
2012-04-29 18:34:40 +01:00
Victor Stinner
ec89539ccc
Issue #14428 , #14397 : Implement the PEP 418
...
* Rename time.steady() to time.monotonic()
* On Windows, time.monotonic() uses GetTickCount/GetTickCount64() instead of
QueryPerformanceCounter()
* time.monotonic() uses CLOCK_HIGHRES if available
* Add time.get_clock_info(), time.perf_counter() and time.process_time()
functions
2012-04-29 02:41:27 +02:00
Brett Cannon
aa93642a35
Issue #14605 : Use None in sys.path_importer_cache to represent no
...
finder instead of using some (now non-existent) implicit finder.
2012-04-27 15:30:58 -04:00
Brett Cannon
ce418b448f
Issue #14605 : Stop having implicit entries for sys.meta_path.
...
ImportWarning is raised if sys.meta_path is found to be empty.
2012-04-27 14:01:58 -04:00
Victor Stinner
8f825060f1
Check newly created consistency using _PyUnicode_CheckConsistency(str, 1)
...
* In debug mode, fill the string data with invalid characters
* Simplify also reference counting in PyCodec_BackslashReplaceErrors()
and PyCodec_XMLCharRefReplaceError()
2012-04-27 13:55:39 +02:00
Jesus Cea
990eff0776
Backing out 86dc014cdd74. Not ready yet
2012-04-26 17:05:31 +02:00
Jesus Cea
2b47f0a23f
Close #10142 : Support for SEEK_HOLE/SEEK_DATA
2012-04-26 16:39:35 +02:00
Antoine Pitrou
5438ed1572
Issue #4892 : multiprocessing Connections can now be transferred over multiprocessing Connections.
...
Patch by Richard Oudkerk (sbt).
2012-04-24 22:56:57 +02:00
Jesus Cea
1d642d2af1
Closes Issue #14661 : posix module: add O_EXEC, O_SEARCH, O_TTY_INIT (I add some Solaris constants too)
2012-04-24 20:59:17 +02:00
Jesus Cea
cf381206fc
Issue #14661 : posix module: add O_EXEC, O_SEARCH, O_TTY_INIT
2012-04-24 20:44:40 +02:00
Stefan Krah
9d3a5aeabe
Defensive programming: mpd_isspecial(r) already implies mpd_isspecial(q), but
...
this is more readable.
2012-04-20 21:00:31 +02:00
Stefan Krah
3c23a87e58
The divmod function for large numbers now has an ACL2 proof. Related changes:
...
1) Rename _mpd_qbarrett_divmod into _mpd_base_ndivmod: The function is
only marginally related to either Barrett's algorithm or to the version
in Hasselstrom's paper.
2) In places where the proof assumes exact operations, use new versions of
add/sub/multiply that set NaN/Invalid_operation if this condition is
not met. According to the proof this cannot happen, so this should be
regarded as an extra safety net.
3) Raise Division_impossible for operands with a number of digits greater
than MPD_MAX_PREC. This facilitates the audit of the function and can
practically only occur in the 32-bit version under conditions where
a MemoryError is already imminent.
4) Use _mpd_qmul() in places where the result can exceed MPD_MAX_PREC in
a well defined manner.
5) Test for mpd_isspecial(qq) in a place where the addition of one
can theoretically trigger a Malloc_error.
6) Remove redundant code in _mpd_qdivmod().
7) Add many comments.
2012-04-20 19:59:20 +02:00
Larry Hastings
6fe20b3aee
Issue #14127 : Add st_{cma}time_ns fields to os.stat() result object.
2012-04-19 15:07:49 -07:00
Martin v. Löwis
aa2efcb0bc
Issue #14098 : New functions PyErr_GetExcInfo and PyErr_SetExcInfo.
...
Patch by Stefan Behnel.
2012-04-19 14:33:43 +02:00
Antoine Pitrou
23bba4ca39
Issue #11750 : The Windows API functions scattered in the _subprocess and
...
_multiprocessing.win32 modules now live in a single module "_winapi".
Patch by sbt.
2012-04-18 20:51:15 +02:00
Stefan Krah
c51b7fd65b
1) Simplify comment -- one has to read the complete proof (available in ACL2)
...
in order to understand the algorithm anyway.
2) v->exp == -v->digits may be assumed.
3) Fix comment (v always shares data with a).
2012-04-18 19:27:32 +02:00
Stefan Krah
5d0d2e2b04
Explain the strategy to avoid huge alignment shifts in _mpd_qadd() in detail.
2012-04-18 18:59:56 +02:00
Stefan Krah
ed4b21ff4f
Cosmetic change: initialize digits to 1 (redundant).
2012-04-18 18:45:22 +02:00
Stefan Krah
bc771e9b19
Remove redundant finalization of the result.
2012-04-18 18:25:37 +02:00
Stefan Krah
aecaf0b663
Fix comments and whitespace.
2012-04-18 18:08:20 +02:00
Stefan Krah
6369f77d20
Support mythical ones' complement machines.
2012-04-18 17:57:56 +02:00
Stefan Krah
140893cbaa
The previous code is correct, but hard to verify: The libmpdec documentation
...
rightfully states that an mpd_t with a coefficient flagged as MPD_CONST_DATA
must not be in the position of the result operand. In this particular case
several assumptions guarantee that a resize will never occur in all possible
code paths, which was the reason for using MPD_CONST_DATA and saving an
instruction by omitting the initialization of tmp.alloc.
For readability, tmp is now flagged as MPD_STATIC_DATA and tmp.alloc
is initialized.
2012-04-18 17:48:34 +02:00
Antoine Pitrou
a3f4457b17
Speed up reading of small files. This avoids multiple C read() calls on pyc files.
2012-04-17 13:50:58 +02:00
Brett Cannon
6f44d66bc4
Issue #13959 : Rename imp to _imp and add Lib/imp.py and begin
...
rewriting functionality in pure Python.
To start, imp.new_module() has been rewritten in pure Python, put into
importlib (privately) and then publicly exposed in imp.
2012-04-15 16:08:47 -04:00
Mark Dickinson
da4210f77d
Issue #13496 : Merge from 3.2
2012-04-15 16:32:04 +01:00
Mark Dickinson
a13b109bc0
Issue 13496: Fix bisect.bisect overflow bug for large collections.
2012-04-15 16:30:35 +01:00
Kristján Valur Jónsson
69c635266e
Issue #10576 : Add a progress callback to gcmodule
2012-04-15 11:41:32 +00:00
Victor Stinner
b8d016955a
Fix clock_gettime/getres/settime: PyArg_ParseTuple() expects an int
...
Only use a single #ifdef for the 3 functions.
2012-04-13 23:44:05 +02:00
Stefan Krah
ec766a6179
1) Remove claim of an input invariant that is only true for static mpd_t.
...
Resizing is used _inside_ libmpdec functions, and it is permitted to
change x->alloc several times while setting x->len at the end of the
function. Therefore, for dynamic mpd_t x->alloc can _temporarily_ drop
below x->len. Of course the final result always has x->len <= x->alloc.
For static mpd_t this cannot happen, since resizing to a smaller
coefficient is a no-op.
2) Remove micro optimization in mpd_switch_to_dyn(): Previously only the
valid initialized part of the existing coefficient up to x->len was
copied to the new dynamic memory area. Now copying does the same as
realloc() and the entire old memory area is copied.
The rationale for this change is that it is no longer needed to memorize
the explanation given in 1).
2012-04-10 23:11:54 +02:00
Stefan Krah
7b544ca08d
Fix stale comment.
2012-04-10 23:08:29 +02:00
Stefan Krah
cc74b6ab14
Issue #14478 : Cache the hash of a Decimal in the C version.
2012-04-10 16:27:58 +02:00
Stefan Krah
e37f8b29fc
Issue #14520 : Add __sizeof__() method to the Decimal object.
2012-04-09 21:27:20 +02:00
Stefan Krah
f69aef747a
Resize the coefficient to MPD_MINALLOC also if the requested size is below
...
MPD_MINALLOC. Previously the resize was skipped as a micro optimization.
2012-04-09 20:47:57 +02:00
Stefan Krah
dd159ce606
Speed up _decimal by 30-40% for numerical workloads by improving the cache
...
locality for regularly sized coefficients.
2012-04-09 20:24:57 +02:00
Stefan Krah
94ef3e4c1d
Use the MPD() accessor macro.
2012-04-09 19:20:46 +02:00
Kristján Valur Jónsson
e638513856
Remove unused variable from gcmodule.c. The code no longer tests for the
...
presence of a __del__ attribute on objects, rather it uses the tp_del slot.
2012-04-08 13:56:25 +00:00
Brett Cannon
8798ad3e1e
struct timeval.tv_usec is 4 bytes on 64-bit OS X as it should be, but
...
is defined as an int while everyone else expects a long regardless of
length.
2012-04-07 14:59:29 -04:00
Stefan Krah
1bcb138cf2
Merge.
2012-04-07 16:10:04 +02:00
Stefan Krah
dc36efa368
1) Fix comment.
...
2) Assert that the source operand is not special. Prevent resulting assert
failure (harmless) by initializing flags before calling mpd_qshiftr_inplace.
3) Save a couple of instructions (mpd_zerocoeff already sets digits and len).
Reorder initialization to match the order in the mpd_t struct.
2012-04-07 15:57:59 +02:00
Kristján Valur Jónsson
10f383a937
Issue #14310 : inter-process socket duplication for windows
2012-04-07 11:23:31 +00:00
Ross Lagerwall
0f9eec19ee
Don't Py_DECREF NULL variable in io.IncrementalNewlineDecoder.
...
Found with Clang's Static Analyzer.
2012-04-07 07:09:57 +02:00
Stefan Krah
4771cca817
Whitespace.
2012-04-05 16:15:25 +02:00
Stefan Krah
871b96bd5a
Reduce array size.
2012-04-05 16:07:22 +02:00
Stefan Krah
a6169484c2
Formatting.
2012-04-05 15:48:59 +02:00
Stefan Krah
ff3eca0cc3
Allow printing a leading '-' and the maximum number of exponent digits
...
rather than raising RuntimeError (allocated space is sufficient for the
additional character).
2012-04-05 15:46:19 +02:00
Stefan Krah
0774e9b9f5
Raise InvalidOperation if exponents of zeros are clamped during exact
...
conversion in the Decimal constructor. Exact here refers to the
representation and not to the value (clamping does not change the value).
2012-04-05 15:21:58 +02:00
Eli Bendersky
828efdea56
Replace bootstrap imports with real C API calls.
2012-04-05 05:40:58 +03:00
Antoine Pitrou
a701388de1
Rename _PyIter_GetBuiltin to _PyObject_GetBuiltin, and do not include it in the stable ABI.
2012-04-05 00:04:20 +02:00
Eli Bendersky
08b852970e
Fix Windows compilation errors
2012-04-04 15:55:07 +03:00
Eli Bendersky
ebf37a2ffb
Fixes and enhancements to _elementtree:
...
* Fixed refleak problems when GC collection is run (see messages in
issue #14065 )
* Added weakref support to Element objects
2012-04-03 22:02:37 +03:00
Kristján Valur Jónsson
31668b8f7a
Issue #14288 : Serialization support for builtin iterators.
2012-04-03 10:49:41 +00:00
Victor Stinner
30d79471bb
Expose clock_settime() as time.clock_settime()
2012-04-03 00:45:07 +02:00
Victor Stinner
1470f35bc6
Add time.CLOCK_HIGHRES constant, needed on Solaris
2012-04-03 00:31:17 +02:00
Stefan Krah
91c0274bc4
Improve comments.
2012-04-02 20:51:08 +02:00
Benjamin Peterson
dba1b40b60
merge 3.2
2012-04-02 11:28:49 -04:00
Benjamin Peterson
e900096dc4
prevent writing to stderr from messing up the exception state ( closes #14474 )
2012-04-02 11:15:17 -04:00
Stefan Krah
5100171d81
Clear the context flags if a context is initialized from the DefaultContext.
2012-04-02 15:02:21 +02:00
Stefan Krah
41e031004b
Fix Overflow exception in the bignum factorial benchmark that is due to
...
the recent change of the default value for context.Emax.
2012-04-01 23:25:34 +02:00
Antoine Pitrou
9a54a260de
Issue #14300 : Under Windows, sockets created using socket.dup() now allow overlapped I/O.
...
Patch by sbt.
2012-04-01 01:14:39 +02:00
Antoine Pitrou
6211b88161
Issue #14437 : Fix building the _io module under Cygwin.
2012-03-31 23:50:31 +02:00
Andrew Svetlov
9e892bbf28
fix issue #5136 : deprecate old unused functions from tkinter.
...
These functions are not documnted, so no documentation update.
2012-03-31 19:36:39 +03:00
Kristján Valur Jónsson
310052c1f0
Fix warning when compiling socketmodule.c with VS2010
...
VS2010 defineds the old errno constants in addition to the WSA* ones.
2012-03-31 13:35:00 +00:00
Eli Bendersky
0192ba33b4
Issue #14065 : Added cyclic GC support to ET.Element
2012-03-30 16:38:33 +03:00
Stefan Krah
1e25755006
Merge.
2012-03-30 14:19:21 +02:00
Stefan Krah
0e41981cd5
Use abort() rather than exit() to appease tools like rpmlint. abort() is used
...
in libmpdec to prevent undefined behavior if an invalid context is used. This
cannot occur for the _decimal module since user input for the context is
validated.
2012-03-30 14:12:20 +02:00
R David Murray
eac0939ddd
#14416 : conditionally add LOG_AUTHPRIV facility and LOG_ODELAY to syslog.
...
Unlike the other facilities, we don't use a fallback for AUTHPRIV if it
doesn't exist. Because it is intended for logging sensitive log messages, it
is better that a program trying to log such messages fail than that it log
them insecurely.
Initial patch by Federico Reghenzani.
2012-03-29 07:15:45 -04:00
Victor Stinner
ad95c2d25c
time.time() now uses clock_gettime(CLOCK_REALTIME) if available
...
clock_gettime(CLOCK_REALTIME) has a better resolution than gettimeofday().
time.time() falls back on gettimeofday() (and then on other functions) on
error.
2012-03-28 02:54:15 +02:00
Victor Stinner
74eb6c0e8b
Document the fact that mach_timebase_info() cannot fail
...
And call mach_absolute_time() after mach_timebase_info().
2012-03-28 02:50:46 +02:00
Stefan Krah
650365b163
Issue #11826 : Fix memory leak in atexitmodule.
2012-03-27 11:49:21 +02:00
Victor Stinner
8486076dd5
Fix time.steady(strict=True): don't use CLOCK_REALTIME
2012-03-26 22:53:14 +02:00
Victor Stinner
70b2e1e7d9
Issue #14368 : _PyTime_gettimeofday() cannot fail
...
floattime() must not raise an error if the current time is 1970.1.1 at 00:00.
2012-03-26 22:08:02 +02:00
Stefan Krah
16ecb9dea0
Issue #3367 : Merge fix from 3.2.
2012-03-26 15:11:22 +02:00
Stefan Krah
0f6ce8d9df
Issue #3367 : NULL-terminate argv[] copies to prevent an invalid access
...
in sys_update_path().
2012-03-26 15:05:22 +02:00
Stefan Krah
fe17b2bc77
Raise MemoryError instead of InvalidOperation/MallocError for compatibility
...
with decimal.py. The standard specifies InsufficientStorage (MallocError) as
a sub-condition of InvalidOperation. This allows a calculation to continue
with NaN results when allocation fails.
2012-03-25 18:59:21 +02:00
Charles-François Natali
55bce63ea0
Issue #14154 : Reimplement the bigmem test memory watchdog as a subprocess.
2012-03-24 10:06:23 +01:00
Stefan Krah
c64150bcac
Fix formatting after removing tabs.
2012-03-23 16:34:41 +01:00
Stefan Krah
cd9e1d0205
Whitespace.
2012-03-23 16:22:05 +01:00
Stefan Krah
b6405efd1b
Use the same exception hierarchy as decimal.py. FloatOperation now also
...
inherits from TypeError. Cleanup in module initialization to make repeated
import failures robust.
2012-03-23 14:46:48 +01:00
Eli Bendersky
396e8fcf36
Issue #13782 : streamline argument type-checking in ET.Element
...
append, extend and insert now consistently type-check their argument in both
the C and Python implementations, and raise TypeError for non-Element
argument.
Added tests
2012-03-23 14:24:20 +02:00
Antoine Pitrou
d0acb411ef
Issue #14387 : Do not include accu.h from Python.h.
2012-03-22 14:42:18 +01:00
Antoine Pitrou
d5d17eb653
Issue #14204 : The ssl module now has support for the Next Protocol Negotiation extension, if available in the underlying OpenSSL library.
...
Patch by Colin Marc.
2012-03-22 00:23:03 +01:00
Stefan Krah
7cc5521d40
Whitespace.
2012-03-21 20:21:20 +01:00
Stefan Krah
1919b7e72b
Issue #7652 : Integrate the decimal floating point libmpdec library to speed
...
up the decimal module. Performance gains of the new C implementation are
between 12x and 80x, depending on the application.
2012-03-21 18:25:23 +01:00
Larry Hastings
83a9f48699
Issue #14328 : Add keyword-only parameters to PyArg_ParseTupleAndKeywords.
...
They're optional-only for now (unlike in pure Python) but that's all
I needed. The syntax can easily be relaxed if we want to support
required keyword-only arguments for extension types in the future.
2012-03-20 20:06:16 +00:00
Ross Lagerwall
71faefc37e
Issue #14359 : Only use O_CLOEXEC in _posixmodule.c if it is defined.
...
Based on patch from Hervé Coatanhay.
2012-03-19 06:08:43 +02:00
Ross Lagerwall
5802fdf31f
Issue 14359: Only use O_CLOEXEC in _posixmodule.c if it is defined.
...
Based on patch from Hervé Coatanhay.
2012-03-18 15:55:10 +02:00
Benjamin Peterson
e80b29b5b6
cleanup Ellipsis and NotImplemented strings after we're done
2012-03-16 18:45:31 -05:00
Benjamin Peterson
2dbda07a17
fix condition ( #14296 )
2012-03-16 10:12:55 -05:00
Eli Bendersky
5b77d81314
Issue #14207 : the ParseError exception raised by _elementtree was made
...
consistent to the one raised by the Python module (the 'code' attribute
was added).
In addition, the exception is now documented.
Added a test to check that ParseError has the required attributes, and
threw away the equivalent doctest which is no longer required.
2012-03-16 08:20:05 +02:00
Eli Bendersky
f996e775ea
Closes Issue #14246 : _elementtree parser will now handle io.StringIO
2012-03-16 05:53:30 +02:00
Benjamin Peterson
7b51b8de38
try to fix compilation on glibc's with cpu sets ( #14296 )
2012-03-14 22:28:25 -05:00
Gregory P. Smith
c362cbda97
Fixes Issue 14234: fix for the previous commit, keep compilation when
...
using --with-system-expat working when the system expat does not have
salted hash support.
2012-03-14 18:11:46 -07:00
Gregory P. Smith
2522771e47
Fixes Issue 14234: fix for the previous commit, keep compilation when
...
using --with-system-expat working when the system expat does not have
salted hash support.
2012-03-14 18:10:37 -07:00
Victor Stinner
071eca3f5c
Issue #10278 : Add an optional strict argument to time.steady(), False by default
2012-03-15 01:17:09 +01:00