cpython/Python
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
..
Python-ast.c bump Python-ast.c 2013-03-18 23:40:53 -07:00
_warnings.c Finally fix all test_capi refleaks 2012-01-18 21:45:15 +01:00
asdl.c Widen ASDL sequences to Py_ssize_t lengths to better match PEP 353. 2012-05-15 14:45:03 +02:00
ast.c move declaration to top of block 2013-03-18 10:59:41 -07:00
bltinmodule.c properly lookup the __round__ special method (closes #17722) 2013-04-13 17:19:01 -04:00
ceval.c check local class namespace before reaching for cells (closes #17853) 2013-04-30 09:41:40 -04:00
ceval_gil.h Issue #15038: Optimize python Locks on Windows 2012-06-18 20:30:44 +00:00
codecs.c Issue #15422: get rid of PyCFunction_New macro 2012-12-25 13:32:35 +02:00
compile.c check local class namespace before reaching for cells (closes #17853) 2013-04-30 09:41:40 -04:00
condvar.h Issue #15038 : Fixing the condition broadcast and docs. 2013-03-19 20:18:37 -07:00
dtoa.c 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
dup2.c Merged revisions 85236 via svnmerge from 2010-10-05 22:18:29 +00:00
dynamic_annotations.c Make (most of) Python's tests pass under Thread Sanitizer. 2010-05-03 19:29:34 +00:00
dynload_aix.c Issue #17173: Remove uses of locale-dependent C functions (isalpha() etc.) in the interpreter. 2013-02-09 23:14:42 +01:00
dynload_dl.c Issue #13959: Re-implement imp.get_suffixes() in Lib/imp.py. 2012-05-04 15:20:40 -04:00
dynload_hpux.c Issue #13959: Re-implement imp.get_suffixes() in Lib/imp.py. 2012-05-04 15:20:40 -04:00
dynload_next.c Issue #13959: Re-implement imp.get_suffixes() in Lib/imp.py. 2012-05-04 15:20:40 -04:00
dynload_shlib.c #16135: Removal of OS/2 support (I) 2012-10-05 01:04:27 +02:00
dynload_stub.c Issue #13959: Re-implement imp.get_suffixes() in Lib/imp.py. 2012-05-04 15:20:40 -04:00
dynload_win.c Fixes issue4653 - Correctly specify the buffer size to FormatMessageW and 2013-03-23 16:05:36 -07:00
errors.c Issue #16719: Get rid of WindowsError. Use OSError instead 2012-12-19 14:33:35 +02:00
fileutils.c thinko 2013-01-15 13:24:12 -08:00
formatter_unicode.c Close #16757: Avoid calling the expensive _PyUnicode_FindMaxChar() function 2013-04-03 02:02:33 +02:00
frozen.c make some freezing related stuff const 2013-03-13 14:06:39 -05:00
frozenmain.c Recorded merge of revisions 81032 via svnmerge from 2010-05-09 16:14:21 +00:00
future.c C89 compliance 2013-03-16 15:38:28 -07:00
getargs.c Issue #17170: speed up PyArg_ParseTuple[AndKeywords] a bit. 2013-02-17 01:04:57 +01:00
getcompiler.c
getcopyright.c bring Python into 2013 2012-12-31 21:37:21 -06:00
getcwd.c Recorded merge of revisions 81032 via svnmerge from 2010-05-09 16:14:21 +00:00
getopt.c #16306: report only the first unknown option and add more tests. Patch by Serhiy Storchaka. 2012-11-23 18:48:32 +02:00
getplatform.c
getversion.c Merged revisions 83352,83355-83358,83362,83366,83368-83369 via svnmerge from 2010-08-01 19:17:57 +00:00
graminit.c Backed out changeset 521232b05b97 2013-03-20 00:39:41 -05:00
import.c Closes #17892: Fix the name of _PyObject_CallMethodObjIdArgs 2013-05-02 10:44:04 -07:00
importdl.c Issue #14599: Generalize a test for ImportError.path and add support 2012-04-20 15:22:50 -04:00
importdl.h #16135: Removal of OS/2 support (I) 2012-10-05 01:04:27 +02:00
importlib.h #17115,17116: Have modules initialize the __package__ and __loader__ 2013-05-04 13:56:58 -04:00
makeopcodetargets.py excise the remains of STOP_CODE, which hasn't done anything useful for years 2011-07-17 22:49:50 -05:00
marshal.c Issue #15480: Remove the deprecated and unused TYPE_INT64 code from marshal. 2013-04-13 22:41:09 +02:00
modsupport.c modsupport.c reuses Py_UNICODE_strlen() 2011-09-29 04:01:43 +02:00
mysnprintf.c Recorded merge of revisions 81032 via svnmerge from 2010-05-09 16:14:21 +00:00
mystrtoul.c Issue #17173: Remove uses of locale-dependent C functions (isalpha() etc.) in the interpreter. 2013-02-09 23:11:27 +01:00
opcode_targets.h check local class namespace before reaching for cells (closes #17853) 2013-04-30 09:41:40 -04:00
peephole.c create NameConstant AST class for None, True, and False literals (closes #16619) 2012-12-06 17:41:04 -05:00
pyarena.c remove unnecessary clearing of list 2013-01-19 14:58:38 -05:00
pyctype.c Include files missed in r72044. 2009-04-27 20:54:42 +00:00
pyfpe.c
pymath.c Recorded merge of revisions 81032 via svnmerge from 2010-05-09 16:14:21 +00:00
pystate.c Issue #17522: Add the PyGILState_Check() API. 2013-03-23 03:36:16 -07:00
pystrcmp.c Recorded merge of revisions 81032 via svnmerge from 2010-05-09 16:14:21 +00:00
pystrtod.c 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
pythonrun.c #17115,17116: Have modules initialize the __package__ and __loader__ 2013-05-04 13:56:58 -04:00
pytime.c PEP 418: Rename adjusted attribute to adjustable in time.get_clock_info() result 2012-06-12 22:46:37 +02:00
random.c Drop support for Windows 2000; allow any XP API (but not Vista+). 2013-01-25 14:06:18 +01:00
sigcheck.c
strdup.c
structmember.c Fix null pointer dereferencing in structmember.c PyMember_SetOne() for T_CHAR. _PyUnicode_AsStringAndSize() can return NULL without touching the len argument. Also remove unnecessary PyUnicode_Check(), _PyUnicode_AsStringAndSize() performance the test again. CID 486815 2012-09-11 17:30:53 +02:00
symtable.c unify some ast.argument's attrs; change Attribute column offset (closes #16795) 2013-03-18 10:48:58 -07:00
sysmodule.c Issue #13390: New function :func:`sys.getallocatedblocks()` returns the number of memory blocks currently allocated. 2012-12-09 14:28:26 +01:00
thread.c #16135: Removal of OS/2 support (I) 2012-10-05 01:04:27 +02:00
thread_foobar.h Recorded merge of revisions 81032 via svnmerge from 2010-05-09 16:14:21 +00:00
thread_nt.h Replace WaitForSingleObject with WaitForSingleObjectEx, 2013-01-25 14:25:48 +01:00
thread_pth.h Issue #11495: OSF support is eliminated. It was deprecated in Python 3.2 2011-03-14 17:36:54 +01:00
thread_pthread.h Issue #16588: Silence unused-but-set warnings in Python/thread_pthread.h 2012-12-02 08:38:42 +01:00
traceback.c Issue #15463: the faulthandler module truncates strings to 500 characters, 2012-07-30 13:08:58 +02:00