summaryrefslogtreecommitdiffstats
path: root/Include
Commit message (Collapse)AuthorAgeFilesLines
* Issue #15767: Touch up ModuleNotFoundError usage by import.Brett Cannon2013-06-131-0/+3
| | | | | | | | | | | | | 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.
* Issue #15767: Introduce ModuleNotFoundError, a subclass ofBrett Cannon2013-06-121-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Issue #17931: Resolve confusion on Windows between pids and process handles.Richard Oudkerk2013-06-051-0/+13
|
* Close #17931: Fix PyLong_FromPid() on Windows 64-bit: processes are identifiedVictor Stinner2013-06-041-4/+0
| | | | by their HANDLE which is a pointer (and not a long, which is smaller).
* Issue #9369: The types of `char*` arguments of PyObject_CallFunction() andSerhiy Storchaka2013-05-291-9/+14
| | | | | PyObject_CallMethod() now changed to `const char*`. Based on patches by Jörg Müller and Lars Buitinck.
* don't expand the operand to Py_XINCREF/XDECREF/CLEAR/DECREF multiple times ↵Benjamin Peterson2013-05-271-14/+20
| | | | | | (closes #17206) A patch from Illia Polosukhin.
* Issue #13612: handle unknown encodings without a buffer overflow.Eli Bendersky2013-05-251-1/+3
|\ | | | | | | | | | | | | This affects pyexpat and _elementtree. PyExpat_CAPI now exposes a new function - DefaultUnknownEncodingHandler. Based on a patch by Serhiy Storchaka.
| * Issue #13612: handle unknown encodings without a buffer overflow.Eli Bendersky2013-05-251-1/+3
| | | | | | | | | | | | | | This affects pyexpat and _elementtree. PyExpat_CAPI now exposes a new function - DefaultUnknownEncodingHandler. Based on a patch by Serhiy Storchaka.
* | Issue #16986: ElementTree now correctly parses a string input not only whenSerhiy Storchaka2013-05-221-0/+1
|\ \ | |/ | | | | an internal XML encoding is UTF-8 or US-ASCII.
| * Issue #16986: ElementTree now correctly parses a string input not only whenSerhiy Storchaka2013-05-221-0/+1
| | | | | | | | an internal XML encoding is UTF-8 or US-ASCII.
| * post-release update.Georg Brandl2013-05-151-1/+1
| |
| * bump to 3.3.2Georg Brandl2013-05-121-2/+2
| |
* | Issue #17937: Try harder to collect cyclic garbage at shutdown.Antoine Pitrou2013-05-181-0/+4
| |
* | rather than passing locals to the class body, just execute the class body in ↵Benjamin Peterson2013-05-161-1/+0
| | | | | | | | the proper environment
* | hide the __class__ closure from the class body (#12370)Benjamin Peterson2013-05-151-0/+3
| |
* | Backout c89febab4648 following private feedback by Guido.Antoine Pitrou2013-05-142-10/+0
| | | | | | | | (Issue #17807: Generators can now be finalized even when they are part of a reference cycle)
* | remove support GCC PyArg_ParseTuple format patch, last seen in 2006Benjamin Peterson2013-05-132-10/+1
| |
* | Issue #17912: Use a doubly linked-list for thread states.Charles-Francois Natali2013-05-081-0/+1
| |
* | Issue #17807: Generators can now be finalized even when they are part of a ↵Antoine Pitrou2013-05-082-0/+10
| | | | | | | | reference cycle.
* | Issue #1545463: At shutdown, defer finalization of codec modules so that ↵Antoine Pitrou2013-05-081-0/+6
| | | | | | | | | | | | stderr remains usable. (should fix Windows buildbot failures on test_gc)
* | Issue #1545463: Global variables caught in reference cycles are now ↵Antoine Pitrou2013-05-061-0/+1
| | | | | | | | garbage-collected at shutdown.
* | Issue #17094: Clear stale thread states after fork().Antoine Pitrou2013-05-051-0/+1
| | | | | | | | | | | | | | Note that this is a potentially disruptive change since it may release some system resources which would otherwise remain perpetually alive (e.g. database connections kept in thread-local storage).
* | Issue #17408: Avoid using an obsolete instance of the copyreg module when ↵Antoine Pitrou2013-05-041-0/+1
|\ \ | |/ | | | | the interpreter is shutdown and then started again.
| * Issue #17408: Avoid using an obsolete instance of the copyreg module when ↵Antoine Pitrou2013-05-041-0/+1
| | | | | | | | the interpreter is shutdown and then started again.
| * Post-release update for 3.3.1Georg Brandl2013-04-061-1/+1
| |
| * Bump to 3.3.1.v3.3.1Georg Brandl2013-04-061-3/+3
| |
| * Bump to 3.3.1rc1.Georg Brandl2013-03-231-4/+4
| |
* | Closes #17892: Fix the name of _PyObject_CallMethodObjIdArgsAlexandre Vassalotti2013-05-021-2/+1
| |
* | check local class namespace before reaching for cells (closes #17853)Benjamin Peterson2013-04-301-0/+1
| |
* | fix typo in a commentVictor Stinner2013-04-181-1/+1
| |
* | Close #17694: Add minimum length to _PyUnicodeWriterVictor Stinner2013-04-171-7/+13
| | | | | | | | | | | | | | | | | | | | | | | | * Add also min_char attribute to _PyUnicodeWriter structure (currently unused) * _PyUnicodeWriter_Init() has no more argument (except the writer itself): min_length and overallocate must be set explicitly * In error handlers, only enable overallocation if the replacement string is longer than 1 character * CJK decoders don't use overallocation anymore * Set min_length, instead of preallocating memory using _PyUnicodeWriter_Prepare(), in many decoders * _PyUnicode_DecodeUnicodeInternal() checks for integer overflow
* | Close #17693: Rewrite CJK decoders to use the _PyUnicodeWriter API instead ofVictor Stinner2013-04-111-0/+7
| | | | | | | | | | | | the legacy Py_UNICODE API. Add also a new _PyUnicodeWriter_WriteChar() function.
* | Add _PyUnicodeWriter_WriteSubstring() functionVictor Stinner2013-04-021-0/+9
| | | | | | | | | | | | | | | | | | Write a function to enable more optimizations: * If the substring is the whole string and overallocation is disabled, just keep a reference to the string, don't copy characters * Avoid a call to the expensive _PyUnicode_FindMaxChar() function when possible
* | Issue #17522: Add the PyGILState_Check() API.Kristján Valur Jónsson2013-03-231-0/+5
| |
* | Issue #16475: Support object instancing, recursion and interned stringsKristján Valur Jónsson2013-03-201-1/+1
| | | | | | | | in marshal
* | unify some ast.argument's attrs; change Attribute column offset (closes #16795)Benjamin Peterson2013-03-181-10/+9
| | | | | | | | Patch from Sven Brauch.
* | make some freezing related stuff constBenjamin Peterson2013-03-131-3/+3
| |
* | Issue #17047: remove doubled words added in 3.4,Terry Jan Reedy2013-03-111-1/+1
| | | | | | | | as reported by Serhiy Storchaka and Matthew Barnett.
* | Add PyDict_SetDefault. (closes #17327)Benjamin Peterson2013-03-081-0/+2
| | | | | | | | Patch by Stefan Behnel and I.
* | Issue #1783: Remove declarations of nonexistent private variables.Serhiy Storchaka2013-02-011-4/+0
|\ \ | |/
| * Issue #1783: Remove declarations of nonexistent private variables.Serhiy Storchaka2013-02-011-4/+0
| |\
| | * Issue #1783: Remove declarations of nonexistent private variables.Serhiy Storchaka2013-02-011-4/+0
| | |
| * | Issue #15989: Fix several occurrences of integer overflowSerhiy Storchaka2013-01-191-0/+3
| |\ \ | | |/ | | | | | | | | | | | | when result of PyLong_AsLong() narrowed to int without checks. This is a backport of changesets 13e2e44db99d and 525407d89277.
| | * Issue #15989: Fix several occurrences of integer overflowSerhiy Storchaka2013-01-191-0/+3
| | | | | | | | | | | | | | | | | | when result of PyLong_AsLong() narrowed to int without checks. This is a backport of changesets 13e2e44db99d and 525407d89277.
* | | Issue #15989: Fix several occurrences of integer overflowSerhiy Storchaka2013-01-141-0/+3
| | | | | | | | | | | | when result of PyLong_AsLong() narrowed to int without checks.
* | | Issue #16881: Fix Py_ARRAY_LENGTH macro for GCC < 3.1.Christian Heimes2013-01-061-2/+5
|\ \ \ | |/ /
| * | Issue #16881: Fix Py_ARRAY_LENGTH macro for GCC < 3.1.Christian Heimes2013-01-061-2/+5
| | |
* | | Revert back PyCFunction_New macro. Keep PyCFunction_NewEx usage in python ↵Andrew Svetlov2012-12-261-1/+1
| | | | | | | | | | | | core modules (#15422)
* | | Issue #15422: get rid of PyCFunction_New macroAndrew Svetlov2012-12-251-1/+1
| | |
* | | Fix the internals of our hash functions to used unsigned values during hashGregory P. Smith2012-12-111-1/+1
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | computation as the overflow behavior of signed integers is undefined. NOTE: This change is smaller compared to 3.2 as much of this cleanup had already been done. I added the comment that my change in 3.2 added so that the code would match up. Otherwise this just adds or synchronizes appropriate UL designations on some constants to be pedantic. In practice we require compiling everything with -fwrapv which forces overflow to be defined as twos compliment but this keeps the code cleaner for checkers or in the case where someone has compiled it without -fwrapv or their compiler's equivalent. We could work to get rid of the -fwrapv requirement in 3.4 but that requires more planning. Found by Clang trunk's Undefined Behavior Sanitizer (UBSan). Cleanup only - no functionality or hash values change.