Commit Graph

2031 Commits

Author SHA1 Message Date
Georg Brandl
3694401ad2 Post-release updates. 2012-08-25 21:33:08 +02:00
Georg Brandl
4ab4ec258c Bump to 3.3.0rc1. 2012-08-25 12:16:37 +02:00
Georg Brandl
a026db907f Post-release updates. 2012-08-12 16:58:55 +02:00
Georg Brandl
1b94ab79a9 Bump to 3.3b2. 2012-08-11 08:49:20 +02:00
Brett Cannon
522267e784 Issue #15610: The PyImport_ImportModuleEx macro now calls
PyImport_ImportModuleLevel() with a 'level' of 0 instead of -1 as the
latter is no longer a valid value.

Also added a versionchanged note for PyImport_ImportModuleLevel() just
in case people don't make the connection between changes to
__import__() and this C function.
2012-08-10 18:55:08 -04:00
Benjamin Peterson
1a1367b821 use char instead of int to please T_BOOL (closes #15597) 2012-08-08 17:22:50 -07:00
Jesus Cea
88ca04e6a8 MERGE: Closes #15512: Correct __sizeof__ support for parser 2012-08-03 14:29:26 +02:00
Jesus Cea
e9c5318967 Closes #15512: Correct __sizeof__ support for parser 2012-08-03 14:28:37 +02:00
Stefan Krah
7d12d9df13 Issue #12834: Fix PyBuffer_ToContiguous() for non-contiguous arrays. 2012-07-28 12:25:55 +02:00
Georg Brandl
d08cec6d62 Bump version to 3.3.0b1. 2012-06-26 09:43:40 +02:00
Martin v. Löwis
75aeaa9b18 Issue #11626: Add _SizeT functions to stable ABI. 2012-06-24 00:00:30 +02:00
Martin v. Löwis
9c56409d33 Issue #15146: Add PyType_FromSpecWithBases. Patch by Robin Schreiber. 2012-06-23 23:20:45 +02:00
David Malcolm
49526f48fc Issue #14785: Add sys._debugmallocstats() to help debug low-level memory allocation issues 2012-06-22 14:55:41 -04:00
Martin v. Löwis
7800f75827 Issue #15042: Add PyState_AddModule and PyState_RemoveModule.
Add version  guard for Py_LIMITED_API additions.
Issue #15081: Document PyState_FindModule.
Patch by Robin Schreiber.
2012-06-22 12:20:55 +02:00
Antoine Pitrou
e67f48ce5e Issue #14928: Fix importlib bootstrap issues by using a custom executable (Modules/_freeze_importlib) to build Python/importlib.h. 2012-06-19 22:29:35 +02:00
Nick Coghlan
c40bc09942 Issue #13783: the PEP 380 implementation no longer expands the public C API 2012-06-17 15:15:49 +10:00
Antoine Pitrou
27f6a3b0bf Issue #15026: utf-16 encoding is now significantly faster (up to 10x).
Patch by Serhiy Storchaka.
2012-06-15 22:15:23 +02:00
Victor Stinner
2b89fdf7eb PEP 418: Rename adjusted attribute to adjustable in time.get_clock_info() result
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.
2012-06-12 22:46:37 +02:00
Victor Stinner
d7b7c7472b Issue #14993: Use standard "unsigned char" instead of a unsigned char bitfield 2012-06-04 22:52:12 +02:00
Barry Warsaw
c58c392da7 Trunk merge. 2012-06-04 09:41:48 -04:00
Benjamin Peterson
ca75b00069 __GNUC__ does not imply gcc version is present, so just check for version (closes #14994) 2012-06-03 18:15:15 -07:00
Barry Warsaw
409da157d7 Eric Snow's implementation of PEP 421.
Issue 14673: Add sys.implementation
2012-06-03 16:18:47 -04:00
Eli Bendersky
0813168e94 Issue #14090: fix some minor C API problems in default branch (3.3) 2012-06-03 08:07:47 +03:00
Eli Bendersky
2b6b73e7e1 Issue #14007: implement doctype() method calling in XMLParser of _elementtree.
Includes exposing a doctype handler from expat through pyexpat.
2012-06-01 11:32:34 +03:00
Georg Brandl
8e0ed333b9 Post-release update. 2012-05-31 22:41:51 +02:00
Georg Brandl
f0397b9953 Bump version to 3.3.0a4. 2012-05-30 22:04:31 +02:00
Victor Stinner
d3f0882dfb Issue #14744: Use the new _PyUnicodeWriter internal API to speed up str%args and str.format(args)
* 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.
2012-05-29 12:57:52 +02:00
Richard Oudkerk
3e0a1eb889 Issue #14930: Make memoryview objects weakrefable. 2012-05-28 21:35:09 +01:00
Eli Bendersky
e1f107e981 s/tabs/spaces, and clean trailing whitespace 2012-05-23 07:09:08 +03:00
Martin v. Löwis
cc10a37ef0 Widen ASDL sequences to Py_ssize_t lengths to better match PEP 353. 2012-05-15 14:45:03 +02:00
Benjamin Peterson
d5a1c44455 PEP 415: Implement suppression of __context__ display with an exception attribute
This replaces the original PEP 409 implementation. See #14133.
2012-05-14 22:09:31 -07:00
Georg Brandl
85a2394467 Post-3.3a3 bump. 2012-05-06 11:20:09 +02: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
Georg Brandl
ab0ef20663 Bump to 3.3.0a3. 2012-05-01 09:35:18 +02:00
Brett Cannon
62228dbd6c Issues #13959, 14647: Re-implement imp.reload() in Lib/imp.py.
Thanks to Eric Snow for the patch.
2012-04-29 14:38:11 -04:00
Mark Dickinson
e383e82e04 Issue #14521: Make result of float('nan') and float('-nan') more consistent across platforms. Further, don't rely on Py_HUGE_VAL for float('inf'). 2012-04-29 15:31:56 +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
Victor Stinner
d0880d57b0 Simplify and optimize formatlong()
* Remove _PyBytes_FormatLong(): inline it into formatlong()
 * the input type is always a long, so remove the code for bool
 * don't duplicate the string if the length does not change
 * Use PyUnicode_DATA() instead of _PyUnicode_AsString()
2012-04-27 23:40:13 +02:00
Martin v. Loewis
4f2f3b6217 Account for shared keys in type's __sizeof__ (#13903). 2012-04-24 19:13:57 +02:00
Victor Stinner
ece58deb9f Close #14648: Compute correctly maxchar in str.format() for substrin 2012-04-23 23:36:38 +02:00
Benjamin Peterson
7d95e40721 Implement PEP 412: Key-sharing dictionaries (closes #13903)
Patch from Mark Shannon.
2012-04-23 11:24:50 -04: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
Brian Curtin
09b86d1196 Fix #14600. Correct reference handling and naming of ImportError convenience function 2012-04-17 16:57:09 -05:00
Mark Dickinson
b0f00476a0 Issue #13889: Merge fix from 3.2. 2012-04-15 15:12:37 +01:00
Mark Dickinson
18e3d81f96 Issue #13889: On MSVC builds, set FPU control word at runtime for all string <-> float conversions. Patch by Samuel Iseli and Stefan Krah. 2012-04-15 15:10:56 +01:00
Brett Cannon
fd0741555b Issue #2377: Make importlib the implementation of __import__().
importlib._bootstrap is now frozen into Python/importlib.h and stored
as _frozen_importlib in sys.modules. Py_Initialize() loads the frozen
code along with sys and imp and then uses _frozen_importlib._install()
to set builtins.__import__() w/ _frozen_importlib.__import__().
2012-04-14 14:10:13 -04:00
Benjamin Peterson
633b32a7fa put PyImportErrorObject with its brothers 2012-04-12 21:50:35 -04:00
Brett Cannon
79ec55e980 Issue #1559549: Add 'name' and 'path' attributes to ImportError.
Currently import does not use these attributes as they are planned
for use by importlib (which will be another commit).

Thanks to Filip Gruszczyński for the initial patch and Brian Curtin
for refining it.
2012-04-12 20:24:54 -04:00