Brett Cannon
fc9ca274b8
Plug a refleak.
14 years ago
Brett Cannon
49f8d8b016
Handle importing pkg.mod by executing
__import__('mod', {'__packaging__': 'pkg', level=1) w/o properly (and
thus not segfaulting).
14 years ago
Brett Cannon
59f9c3affc
Rebuild importlib.h to incorporate added comments.
14 years ago
Brian Curtin
e6b299faf5
Fix Windows build
14 years ago
Brett Cannon
740fce0e38
Undo a C99 idiom.
14 years ago
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__().
14 years ago
Benjamin Peterson
3bf01757b6
move outside WITH_THREAD conditional
14 years ago
Benjamin Peterson
43162b8a02
take linkage def outside of WITH_THREAD conditional ( closes #14569 )
14 years ago
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.
14 years ago
Kristján Valur Jónsson
31668b8f7a
Issue #14288 : Serialization support for builtin iterators.
14 years ago
Benjamin Peterson
80d50428ce
fix parse_syntax_error to clean up its resources
14 years ago
Brett Cannon
368b4b7405
Guard an LLTRACE variable to silence an unused variable warning.
14 years ago
Victor Stinner
3c1e48176e
Issue #14383 : Add _PyDict_GetItemId() and _PyDict_SetItemId() functions
These functions simplify the usage of static constant Unicode strings.
Generalize the usage of _Py_Identifier in ceval.c and typeobject.c.
14 years ago
Kristján Valur Jónsson
c5d47d5ac3
Fix typo when "PyObject*" was changed to "identifier"
14 years ago
Benjamin Peterson
9faf5ee750
this should technicaly be identifier
14 years ago
Benjamin Peterson
ab79c71f39
check for NULL
14 years ago
Benjamin Peterson
a4e4e35783
check by equality for __future__ not identity ( closes #14378 )
14 years ago
Benjamin Peterson
302e7902c8
use identifier api
14 years ago
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.
14 years ago
Gregory P. Smith
c809f98143
Fixes Issue #14331 : Use significantly less stack space when importing modules by
allocating path buffers on the heap instead of the stack.
14 years ago
Benjamin Peterson
01feaecbfa
plug memory leak ( closes #14325 )
14 years ago
Benjamin Peterson
eb74918685
kill capsule names that we don't need anymore
14 years ago
Benjamin Peterson
f7c132158d
use memory macros
14 years ago
Benjamin Peterson
7ed67270a8
check result of PyMem_New
14 years ago
Benjamin Peterson
f53d20f2cd
in 72556ff86828, I should have updated the magic as well as the comment ( #14230 )
14 years ago
Jean-Paul Calderone
c961b4abaa
Issue #14325 : Stop using python lists, capsules, and the garbage collector to deal with PyArg_Parse* cleanup.
14 years ago
Benjamin Peterson
abdb5528c0
fix comment
14 years ago
Benjamin Peterson
2afe6aeae8
perform yield from delegation by repeating YIELD_FROM opcode ( closes #14230 )
This allows generators that are using yield from to be seen by debuggers. It
also kills the f_yieldfrom field on frame objects.
Patch mostly from Mark Shannon with a few tweaks by me.
14 years ago
Benjamin Peterson
1767e0274b
free AST's dict
14 years ago
Matthias Klose
0f4c16e29c
- rename configure.in to configure.ac
- change references from configure.in to configure.ac
14 years ago
Ned Deily
7ca97d5208
Issue #14184 : Increase the default stack size for secondary threads on
Mac OS X to prevent interpreter crashes when compiled on 10.7.
14 years ago
Victor Stinner
bd273c1ec3
Issue #14180 : Fix an invalid rounding when compiler optimization are enabled
Use volatile keyword to disable localy unsafe float optimizations.
14 years ago
Victor Stinner
3a31dd407a
Issue #14180 : Remove commented code
14 years ago
Victor Stinner
5d272cc6a2
Close #14180 : Factorize code to convert a number of seconds to time_t, timeval or timespec
time.ctime(), gmtime(), time.localtime(), datetime.date.fromtimestamp(),
datetime.datetime.fromtimestamp() and datetime.datetime.utcfromtimestamp() now
raises an OverflowError, instead of a ValueError, if the timestamp does not fit
in time_t.
datetime.datetime.fromtimestamp() and datetime.datetime.utcfromtimestamp() now
round microseconds towards zero instead of rounding to nearest with ties going
away from zero.
14 years ago
Victor Stinner
45e50de1f5
Try to fix compilation of Python-ast.c on Visual Studio 2008
14 years ago
Benjamin Peterson
3f3584695e
kill this disabled code
14 years ago
Benjamin Peterson
bc4665ebcb
use correct naming convention
14 years ago
Benjamin Peterson
7e0dbfbbde
give the AST class a __dict__
14 years ago
Georg Brandl
f125bf5f94
Update copyright years and version name.
14 years ago
Armin Ronacher
6ecf77b3f8
Basic support for PEP 414 without docs or tests.
14 years ago
Antoine Pitrou
4a90ef0363
Issue #14177 : marshal.loads() now raises TypeError when given an unicode string.
Patch by Guilherme Gonçalves.
14 years ago
Victor Stinner
643cd68ea4
Issue #13964 : signal.sigtimedwait() timeout is now a float instead of a tuple
Add a private API to convert an int or float to a C timespec structure.
14 years ago
Antoine Pitrou
1c13f84f55
Simplify code in marshal.c.
14 years ago
Antoine Pitrou
679e9d36f7
Issue #14172 : Fix reference leak when marshalling a buffer-like object (other than a bytes object).
14 years ago
Brett Cannon
efb00c0cc1
Issue #14153 Create _Py_device_encoding() to prevent _io from having to import
the os module.
14 years ago
Nick Coghlan
ab7bf2143e
Close issue #6210 : Implement PEP 409
14 years ago
Victor Stinner
90f50d4df9
Issue #13706 : Fix format(float, "n") for locale with non-ASCII decimal point (e.g. ps_aF)
14 years ago
Victor Stinner
41a863cb81
Issue #13706 : Fix format(int, "n") for locale with non-ASCII thousands separator
* Decode thousands separator and decimal point using PyUnicode_DecodeLocale()
(from the locale encoding), instead of decoding them implicitly from latin1
* Remove _PyUnicode_InsertThousandsGroupingLocale(), it was not used
* Change _PyUnicode_InsertThousandsGrouping() API to return the maximum
character if unicode is NULL
* Replace MIN/MAX macros by Py_MIN/Py_MAX
* stringlib/undef.h undefines STRINGLIB_IS_UNICODE
* stringlib/localeutil.h only supports Unicode
14 years ago
Antoine Pitrou
4f22a8d739
Issue #14084 : Fix a file descriptor leak when importing a module with a bad encoding.
14 years ago
Antoine Pitrou
7214612443
In find_module(), do not silence fileno() and dup() errors.
14 years ago