Commit Graph

1455 Commits

Author SHA1 Message Date
Serhiy Storchaka 9b855de8d2 Issue #14323: Expanded the number of digits in the coefficients for the
RGB -- YIQ conversions so that they match the FCC NTSC versions.
2013-08-06 11:51:23 +03:00
Victor Stinner 8580dab513 Hum, VMS code is still present 2013-08-04 10:32:26 +02:00
Victor Stinner f3fd13b5dd Complete What's New in Python 3.4 2013-08-04 10:30:57 +02:00
Antoine Pitrou a68cbfa556 Issue #18589: fix hyperlinking of type slots (tp_*) 2013-08-01 21:14:43 +02:00
Antoine Pitrou 39668f57f4 Issue #18589: fix hyperlinking of type slots (tp_*) 2013-08-01 21:12:45 +02:00
R David Murray c91d5eea10 #17616: wave.open now supports the 'with' statement.
Feature and tests by ClClaudiu.Popa, I added the doc changes.
2013-07-31 13:46:08 -04:00
Antoine Pitrou 796564c27b Issue #18112: PEP 442 implementation (safe object finalization). 2013-07-30 19:59:21 +02:00
Nick Coghlan e8c45d6d0e Close #13266: Add inspect.unwrap
Initial patch by Daniel Urban and Aaron Iles
2013-07-28 20:00:01 +10:00
R David Murray 4d35e75ca0 #17818: aifc.getparams now returns a namedtuple.
Patch by Claudiu Popa.
2013-07-25 16:12:01 -04:00
Nick Coghlan 24c05bc154 Close issue 17482: don't overwrite __wrapped__ 2013-07-15 21:13:08 +10:00
Victor Stinner 0507bf56f0 Issue #3329: Implement the PEP 445
Add new enum:

* PyMemAllocatorDomain

Add new structures:

* PyMemAllocator
* PyObjectArenaAllocator

Add new functions:

* PyMem_RawMalloc(), PyMem_RawRealloc(), PyMem_RawFree()
* PyMem_GetAllocator(), PyMem_SetAllocator()
* PyObject_GetArenaAllocator(), PyObject_SetArenaAllocator()
* PyMem_SetupDebugHooks()

Changes:

* PyMem_Malloc()/PyObject_Realloc() now always call malloc()/realloc(), instead
  of calling PyObject_Malloc()/PyObject_Realloc() in debug mode.
* PyObject_Malloc()/PyObject_Realloc() now falls back to
  PyMem_Malloc()/PyMem_Realloc() for allocations larger than 512 bytes.
* Redesign debug checks on memory block allocators as hooks, instead of using C
  macros
2013-07-07 02:05:46 +02:00
Brett Cannon 679ecb565b Issue #15767: back out 8a0ed9f63c6e, finishing the removal of
ModuleNotFoundError.
2013-07-04 17:51:50 -04:00
Brett Cannon 82da8886cc Issue #15767: Revert 3a50025f1900 for ModuleNotFoundError 2013-07-04 17:48:16 -04:00
R David Murray 9a2f139ba0 #18111: Add What's New entry for max/min default. 2013-06-28 13:31:19 -04:00
R David Murray 5707d508e1 #11390: convert doctest CLI to argparse and add -o and -f options.
This provides a way to specify arbitrary doctest options when using
the CLI interface to process test files, just as one can when calling
testmod or testfile programmatically.
2013-06-23 14:24:13 -04:00
Christian Heimes c77d9f38c2 Issue #11016: Add C implementation of the stat module as _stat 2013-06-22 21:05:02 +02:00
Christian Heimes 70833a8b1f ... also TLSv1.1 and TLSv1.2 2013-06-22 19:34:17 +02:00
Christian Heimes 24cd4cfc58 Add my SSL module patches to whatsnew 3.4 2013-06-22 19:31:58 +02:00
Victor Stinner 854ffcb6f3 whatsnew/3.4: mention functools.singledispatch, PEP 443 2013-06-21 00:36:30 +02:00
Victor Stinner 84e33c8431 whatsnew/3.4: mention the new enum module, PEP 435 2013-06-21 00:31:55 +02:00
Brett Cannon f4375ef4d4 importlib.abc.SourceLoader.get_source() was re-raising SyntaxError and
UnicodeDecodeError as ImportError. That was over-reaching the point of
raising ImportError in get_source() (which is to signal the source
code was not found when it should have). Conflating the two exceptions
with ImportError could lead to masking errors with the source which
should be known outside of whether there was an error simply getting
the source to begin with.
2013-06-16 18:05:54 -04:00
Brett Cannon e4f41deccf Issue #17177: The imp module is pending deprecation.
To make sure there is no issue with code that is both Python 2 and 3
compatible, there are no plans to remove the module any sooner than
Python 4 (unless the community moves to Python 3 solidly before then).
2013-06-16 13:13:40 -04:00
Andrew Kuchling 0d0813a816 Fix typo; clarify that the methods were removed entirely 2013-06-15 13:29:09 -04:00
Brett Cannon 82b3d6ae93 Move something to the right section of What's New 2013-06-14 22:37:11 -04:00
Brett Cannon 33915eba7c Issue #17222: Raise FileExistsError when py_compile.compile would
overwrite a symlink or non-regular file with a regular file.
2013-06-14 18:33:00 -04:00
Brett Cannon 8f5ac5106e Issue #15767: Touch up ModuleNotFoundError usage by import.
Forgot to raise ModuleNotFoundError when None is found in sys.modules.
This led to introducing the C function PyErr_SetImportErrorSubclass()
to make setting ModuleNotFoundError easier.

Also updated the reference docs to mention ModuleNotFoundError
appropriately. Updated the docs for ModuleNotFoundError to mention the
None in sys.modules case.

Lastly, it was noticed that PyErr_SetImportError() was not setting an
exception when returning None in one case. That issue is now fixed.
2013-06-12 23:29:18 -04:00
Brett Cannon b1611e2772 Issue #15767: Introduce ModuleNotFoundError, a subclass of
ImportError.

The exception is raised by import when a module could not be found.
Technically this is defined as no viable loader could be found for the
specified module. This includes ``from ... import`` statements so that
the module usage is consistent for all situations where import
couldn't find what was requested.

This should allow for the common idiom of::

  try:
    import something
  except ImportError:
    pass

to be updated to using ModuleNotFoundError and not accidentally mask
ImportError messages that should propagate (e.g. issues with a
loader).

This work was driven by the fact that the ``from ... import``
statement needed to be able to tell the difference between an
ImportError that simply couldn't find a module (and thus silence the
exception so that ceval can raise it) and an ImportError that
represented an actual problem.
2013-06-12 16:59:46 -04:00
Brett Cannon 3e0651b5fa Issue #18065: For frozen packages set __path__ to [].
Previously __path__ was set to [__name__], but that could lead to bad
results if someone managed to circumvent the frozen importer and
somehow ended up with a finder that thought __name__ was a legit
directory/location.
2013-05-31 23:18:39 -04:00
Brett Cannon 0dbb4c7f13 Issues #18088, 18089: Introduce
importlib.abc.Loader.init_module_attrs() and implement
importlib.abc.InspectLoader.load_module().

The importlib.abc.Loader.init_module_attrs() method sets the various
attributes on the module being loaded. It is done unconditionally to
support reloading. Typically people used
importlib.util.module_for_loader, but since that's a decorator there
was no way to override it's actions, so init_module_attrs() came into
existence to allow for overriding. This is also why module_for_loader
is now pending deprecation (having its other use replaced by
importlib.util.module_to_load).

All of this allowed for importlib.abc.InspectLoader.load_module() to
be implemented. At this point you can now implement a loader with
nothing more than get_code() (which only requires get_source();
package support requires is_package()). Thanks to init_module_attrs()
the implementation of load_module() is basically a context manager
containing 2 methods calls, a call to exec(), and a return statement.
2013-05-31 18:56:47 -04:00
Brett Cannon 028d51236a Update What's New for importlib.util.module_to_load name change 2013-05-31 18:02:11 -04:00
Brett Cannon 3dc48d6f69 Issue #18070: importlib.util.module_for_loader() now sets __loader__
and __package__ unconditionally in order to do the right thing for
reloading.
2013-05-28 18:35:54 -04:00
Nick Coghlan b39fd0c9b8 Issue #11816: multiple improvements to the dis module
* get_instructions generator
* ability to redirect output to a file
* Bytecode and Instruction abstractions

Patch by Nick Coghlan, Ryan Kelly and Thomas Kluyver.
2013-05-06 23:59:20 +10:00
Brett Cannon 4c14b5de1c #17115,17116: Have modules initialize the __package__ and __loader__
attributes to None.

The long-term goal is for people to be able to rely on these
attributes existing and checking for None to see if they have been
set. Since import itself sets these attributes when a loader does not
the only instances when the attributes are None are from someone
overloading __import__() and not using a loader or someone creating a
module from scratch.

This patch also unifies module initialization. Before you could have
different attributes with default values depending on how the module
object was created. Now the only way to not get the same default set
of attributes is to circumvent initialization by calling
ModuleType.__new__() directly.
2013-05-04 13:56:58 -04:00
R David Murray 8a34596bbe #2118: IOError is deprecated, use OSError. 2013-04-14 06:46:35 -04:00
R David Murray 8e37d5df95 #2118: Make SMTPException a subclass of IOError.
Initial patch by Ned Jackson Lovely.
2013-04-13 14:49:48 -04:00
R David Murray 671cd3290b #17487: wave.getparams now returns a namedtuple.
Patch by Claudiu Popa.
2013-04-10 12:31:43 -04:00
Brett Cannon 777622b6ca What's new entry for issue #17093 2013-04-09 17:03:10 -04:00
R David Murray 9c7dfbf720 Merge #17623: fix whatsnew typo
Patch by Thomas Heller.
2013-04-03 06:17:30 -04:00
R David Murray 03b2a1ce51 #17623: fix whatsnew typo
Patch by Thomas Heller.
2013-04-03 06:16:14 -04:00
Antoine Pitrou 2463e5fee4 Issue #16692: The ssl module now supports TLS 1.1 and TLS 1.2. Initial patch by Michele Orrù. 2013-03-28 22:24:43 +01:00
Georg Brandl 1bab7134a8 Merge with 3.3. 2013-03-28 13:28:55 +01:00
Georg Brandl 44ea77bd81 Closes #4159: add LaTeX tabular column specifications to tables that otherwise are cut off or have overlapping text. 2013-03-28 13:28:44 +01:00
Kristjan Valur Jonsson a1e8244afa Issue #16475: Add a whatsnew entry for 3.4 2013-03-26 13:56:14 +00:00
Terry Jan Reedy 2b6c26ebe3 Issue #13248: NEWS and What's New items 2013-03-21 19:36:26 -04:00
doko@ubuntu.com 6d3d0fe0b2 - Issue #16754: Fix the incorrect shared library extension on linux. Introduce
two makefile macros SHLIB_SUFFIX and EXT_SUFFIX. SO now has the value of
  SHLIB_SUFFIX again (as in 2.x and 3.1). The SO macro is removed in 3.4.
2013-03-21 13:39:52 -07:00
doko@ubuntu.com 1621d77fc8 - Issue #16754: Fix the incorrect shared library extension on linux. Introduce
two makefile macros SHLIB_SUFFIX and EXT_SUFFIX. SO now has the value of
  SHLIB_SUFFIX again (as in 2.x and 3.1). The SO macro is removed in 3.4.
2013-03-21 13:31:41 -07:00
doko@ubuntu.com d5537d071c - Issue #16754: Fix the incorrect shared library extension on linux. Introduce
two makefile macros SHLIB_SUFFIX and EXT_SUFFIX. SO now has the value of
  SHLIB_SUFFIX again (as in 2.x and 3.1). The SO macro is removed in 3.4.
2013-03-21 13:21:49 -07:00
Chris Jerdonek 7d2fad1be2 Merge from 3.3: link to "yield from" examples in yield documentation. 2012-12-23 15:35:23 -08:00
Chris Jerdonek 2654b86e88 Link to "yield from" examples in yield documentation.
This commit also simplifies the more advanced "yield from" example and removes
unused function parameters.
2012-12-23 15:31:57 -08:00
R David Murray 5a9d706123 #16522: Add FAIL_FAST flag to doctest.
Patch by me, most of the work (doc and tests) by Daniel Urban.
2012-11-21 15:09:21 -05:00
Ezio Melotti 25bbe5e0bc #16157: merge with 3.3. 2012-11-17 19:30:48 +02:00
Ezio Melotti fa7aeecbca #16157: fix links in the whatsnew files. 2012-11-17 19:29:12 +02:00
Victor Stinner e64322e034 Close #14625: Rewrite the UTF-32 decoder. It is now 3x to 4x faster
Patch written by Serhiy Storchaka.
2012-10-30 23:12:47 +01:00
Georg Brandl 3b80d34c55 Remove confusing "Release" and "Date" markers from whatsnews. Merge with 3.3. 2012-10-28 13:37:54 +01:00
Georg Brandl ff65a10418 Remove confusing "Release" and "Date" markers from whatsnews. Merge with 3.2. 2012-10-28 13:37:18 +01:00
Georg Brandl 75f0020d29 Remove confusing "Release" and "Date" markers from whatsnews. 2012-10-28 13:35:56 +01:00
Ezio Melotti 777d0c5c21 Merge PEP name fix with 3.3. 2012-10-21 07:37:25 +03:00
Ezio Melotti 8cd45bd48d Fix PEP name. 2012-10-21 07:36:58 +03:00
Ezio Melotti 13b1547e1b Merge punctuation fixes with 3.3. 2012-10-20 22:54:12 +03:00
Ezio Melotti 76e7ea5b4c Fix punctuation. 2012-10-20 22:53:47 +03:00
Ezio Melotti 022b6d2fa5 Merge "seealso" change with 3.3. 2012-10-20 16:27:51 +03:00
Ezio Melotti 36e01df18e Move note about the implementation in the "seealso". 2012-10-20 16:26:18 +03:00
R David Murray 4d289a2a4d Merge: A couple more whatsnew updates. 2012-10-16 21:54:12 -04:00
R David Murray e54c718572 A couple more whatsnew updates. 2012-10-16 21:52:24 -04:00
Ezio Melotti 6ca07a221a Merge typo fix. 2012-10-16 21:51:06 +03:00
Ezio Melotti ad626807a6 Fix typo. 2012-10-16 21:50:33 +03:00
Benjamin Peterson 143d034ecd merge 3.2 2012-10-12 12:04:32 -04:00
Ezio Melotti 5c3283e43a Merge __next__ method link fixes with 3.3. 2012-10-12 13:46:37 +03:00
Ezio Melotti 1dd7c30419 Merge __next__ method link fixes with 3.2. 2012-10-12 13:45:38 +03:00
Ezio Melotti 7fa822275b Fix links to the __next__ method. 2012-10-12 13:42:08 +03:00
R David Murray 96e936712f Merge: More whatsnew updates, move some doc NEWS items into the doc section. 2012-10-06 23:21:01 -04:00
R David Murray f4c2757d78 More whatsnew updates, move some doc NEWS items into the doc section. 2012-10-06 23:19:17 -04:00
R David Murray fb4dc080eb Merge: starmap/starmap_async for whatsnew, and fix multiprocessing Pool markup. 2012-10-06 22:27:31 -04:00
R David Murray ace5162294 starmap/starmap_async for whatsnew, and fix multiprocessing Pool markup. 2012-10-06 22:26:52 -04:00
R David Murray 7ecc5ba7be Merge: More whatsnew updates. Also move a C-API NEWS item out of library section. 2012-10-06 22:10:42 -04:00
R David Murray fd740967ba More whatsnew updates. Also move a C-API NEWS item out of library section. 2012-10-06 22:08:08 -04:00
R David Murray e24728bb9e merge #9957: document that SpooledTemporaryFile.truncate now accepts a size arg 2012-10-06 18:33:08 -04:00
R David Murray ca76ea16ad #9957: document that SpooledTemporaryFile.truncate now accepts a size arg 2012-10-06 18:32:39 -04:00
R David Murray 435ee1fcd2 More whatsnew updates. 2012-10-06 18:20:08 -04:00
R David Murray 1e218c98df More whatsnew updates. 2012-10-06 18:18:55 -04:00
R David Murray 3dc23d4bf2 Merge: whatsnew updates for smtplib and collections.Counter. 2012-10-06 16:30:46 -04:00
R David Murray a21e51570d whatsnew updates for smtplib and collections.Counter. 2012-10-06 16:29:14 -04:00
R David Murray 5bab0789f8 Merge: Fix typos. 2012-10-06 16:06:41 -04:00
R David Murray 344174dc77 Fix typos. 2012-10-06 16:06:16 -04:00
R David Murray d9c6ab48a0 merge #10968: commit threading doc changes and corresponding whatsnew entry.
It is unfortunate that the '_' names were not kept as aliases, and that RLock
was not also converted to a class, but it is now too late to change either of
those things for 3.3.
2012-10-06 14:38:17 -04:00
R David Murray ef4d286770 #10968: commit threading doc changes and corresponding whatsnew entry.
It is unfortunate that the '_' names were not kept as aliases, and that RLock
was not also converted to a class, but it is now too late to change either of
those things for 3.3.
2012-10-06 14:35:35 -04:00
Christian Heimes 4a0270d82b Issue #16113: integrade SHA-3 (Keccak) patch from http://hg.python.org/sandbox/cheimes 2012-10-06 02:23:36 +02:00
Benjamin Peterson 88f3b23fdb 3.3 -> 3.4 (closes #16130) 2012-10-04 12:45:10 -04:00
Jesus Cea 279ed3cc55 MERGE: Whatsnew typo 2012-10-04 02:59:09 +02:00
Jesus Cea b6bb3ad567 Whatsnew typo 2012-10-04 02:58:48 +02:00
Jesus Cea ce3e0dd999 MERGE: whatsnew 2012-10-04 02:51:44 +02:00
Jesus Cea aa26488711 whatsnew 2012-10-04 02:51:22 +02:00
R David Murray 8155ff4dc0 More whatsnew updates. 2012-10-02 18:26:31 -04:00
R David Murray 3430fb803e More whatsnew updates. 2012-10-02 18:24:56 -04:00
R David Murray 814a13dc30 Merge: Add multiprocessing.Process.sentinel to whatsnew, mention SSLFakeFile removal. 2012-10-02 10:19:48 -04:00
R David Murray 994ce1a3c1 Add multiprocessing.Process.sentinel to whatsnew, mention SSLFakeFile removal. 2012-10-02 10:19:08 -04:00
Georg Brandl 450dbcf421 merge with 3.3. 2012-10-02 10:16:26 +02:00
Georg Brandl dc704c6751 In this case it is not useful to hide "threading". 2012-10-02 10:16:19 +02:00
R David Murray 6c617163a3 Merge: Add threading.get_ident to whatsnew. 2012-10-01 22:10:53 -04:00
R David Murray 0bbfd6b817 Add threading.get_ident to whatsnew. 2012-10-01 22:10:15 -04:00