Eric S. Raymond [Mon, 20 Aug 2001 13:16:30 +0000 (13:16 +0000)]
Clean up some argument profiles, enrich the docstring.
Jack Jansen [Mon, 20 Aug 2001 10:20:27 +0000 (10:20 +0000)]
Oops, this file shouldn't have been removed.
Jack Jansen [Sun, 19 Aug 2001 22:32:57 +0000 (22:32 +0000)]
The destination folder is now :Lib:lib-dynload
Jack Jansen [Sun, 19 Aug 2001 22:32:27 +0000 (22:32 +0000)]
PATCHLEVEL is outdated, use PY_VERSION.
Jack Jansen [Sun, 19 Aug 2001 22:30:31 +0000 (22:30 +0000)]
Step 1 in packaging the toolbox modules and making MacPython more
like normal Python. toolbox modules are now in the Carbon package
in :Mac:Lib, with a workaround flat namespace in :Mac:Lib:lib-compat.
Other dynamic modules are in :Lib:lib-dynload. :Mac:Lib:lib-toolbox and
:Mac:Plugins are gone.
Jack Jansen [Sun, 19 Aug 2001 22:29:57 +0000 (22:29 +0000)]
Dynamic modules are now put in :Lib:lib-dynload by default. For the toolbox modules this is overridden to put them in :Mac:Lib:Carbon.
Jack Jansen [Sun, 19 Aug 2001 22:28:32 +0000 (22:28 +0000)]
Compatibility modules. lib-compat is on the default sys.path for MacPython 2.2, and each of these modules imports * from its namesake in the Carbon package.
Jack Jansen [Sun, 19 Aug 2001 22:20:55 +0000 (22:20 +0000)]
Moved to either :Mac:Lib (WASTEconst and files that weren't generated) or to the Carbon package.
Jack Jansen [Sun, 19 Aug 2001 22:13:00 +0000 (22:13 +0000)]
The modules with toolbox constants.
Jack Jansen [Sun, 19 Aug 2001 22:07:59 +0000 (22:07 +0000)]
Carbon is now a package encapsulating all the toolbox modules. Carbon is not
the best of names right now (because QuickTime, for instance, is part of
its own framekwork in OSX terminology, and because all these modules also
work on pre-Carbon MacOS) but in a year or so it will be:-).
Jack Jansen [Sun, 19 Aug 2001 22:05:33 +0000 (22:05 +0000)]
Moved here form lib-toolbox, for lack of a better place to go.
Jack Jansen [Sun, 19 Aug 2001 22:05:06 +0000 (22:05 +0000)]
Moved here from lib-toolbox, where they should never have been in the first place (all the other stuff there wa generated with bgen).
Jack Jansen [Sun, 19 Aug 2001 22:02:56 +0000 (22:02 +0000)]
Step 1 in packaging the toolbox modules and making MacPython more
like normal Python. toolbox modules are now in the Carbon package
in :Mac:Lib, with a workaround flat namespace in :Mac:Lib:lib-compat.
Other dynamic modules are in :Lib:lib-dynload. :Mac:Lib:lib-toolbox and
:Mac:Plugins are gone.
Jack Jansen [Sun, 19 Aug 2001 22:00:20 +0000 (22:00 +0000)]
Temporarily disabled the import hook. It breaks with the package-based
Carbon and its workaround.
Jack Jansen [Sun, 19 Aug 2001 21:18:04 +0000 (21:18 +0000)]
Removed NEXT-NOTES, the NeXT is no longer supported.
Jack Jansen [Sun, 19 Aug 2001 21:17:03 +0000 (21:17 +0000)]
Removed NeXT notes (replacing them with a line saying NeXT is no
longer supported) and updated MacOSX notes.
Jack Jansen [Sun, 19 Aug 2001 20:28:39 +0000 (20:28 +0000)]
Got rid of all the plugin xml files: they are generated, and
they were only in the repository for people building MacPython from
CVS (the .cmp project files are in a MacPython source
distribution). The process to regenerate them is now easier (and
documented!) so these shouldn't be needed anymore.
And eventually they should all be built by setup.py anyway.
Skip Montanaro [Sun, 19 Aug 2001 05:53:47 +0000 (05:53 +0000)]
of course I muffed it separating the notes code from the initial_value
code. grrr...
Guido van Rossum [Sun, 19 Aug 2001 05:29:25 +0000 (05:29 +0000)]
Avoid total dependency on the new module. This addresses the problem
reported by Greg Ball on python-dev.
Skip Montanaro [Sun, 19 Aug 2001 04:25:24 +0000 (04:25 +0000)]
add debug calls to self._note for the Semaphore class. This closes bug
443614. I will submit a new feature request and patch to threading.py and
libthreading.tex to address the bounded semaphore issue.
Tim Peters [Sun, 19 Aug 2001 01:38:03 +0000 (01:38 +0000)]
Improve Windows time.clock() blurb; was missing return type and unit.
Tim Peters [Sun, 19 Aug 2001 00:56:28 +0000 (00:56 +0000)]
Windows fiddling for 2.2a2: bump build number; update copyright and
company info in resource files; change installer strings to match.
This belongs in the release branch too, of course.
Guido van Rossum [Sat, 18 Aug 2001 21:22:07 +0000 (21:22 +0000)]
SF patch #452239 by Gordon McMillan, to fix SF bug #451547.
This patch attempts to do to cPickle what Guido did
for pickle.py v 1.50. That is: save_global tries
importing the module, and fetching the name from the
module. If that fails, or the returned object is not
the same one we started with, it raises a
PicklingError. (All this so pickling a lambda will
fail at save time, rather than load time).
Guido van Rossum [Sat, 18 Aug 2001 21:08:22 +0000 (21:08 +0000)]
Add dependencies for Python/thread.c on all of the header files that
it may depend on. It's really annoying that thread.o doesn't get
rebuilt when the .h file is changed! :-)
The dependency is on *all* the Python/thread_*.h files -- that should
be sufficient and rarely cause unneeded recompilations.
Guido van Rossum [Sat, 18 Aug 2001 21:00:39 +0000 (21:00 +0000)]
Inspired by Greg Stein's proposed simplification of the _closesocket
class, I came up with an even simpler solution: raise the error in
__getattr__().
Tim Peters [Sat, 18 Aug 2001 20:18:49 +0000 (20:18 +0000)]
Expose the CO_xxx flags via the "new" module (re-solving a problem "the
right way"). Fiddle __future__.py to use them.
Jeremy's pyassem.py may also want to use them (by-hand duplication of
magic numbers is brittle), but leaving that to his judgment.
Beef up __future__'s test to verify the exported feature names appear
correct.
Skip Montanaro [Sat, 18 Aug 2001 18:52:10 +0000 (18:52 +0000)]
added warnings about security risk of using tmpnam and tempnam
Guido van Rossum [Sat, 18 Aug 2001 17:43:36 +0000 (17:43 +0000)]
Fix SF bug #443600:
Change to get/set/del slice operations so that if the object doesn't
support slicing, *or* if either of the slice arguments is not an int
or long, we construct a slice object and call the get/set/del item
operation instead. This makes it possible to design classes that
support slice arguments of non-integral types.
Eric S. Raymond [Sat, 18 Aug 2001 09:24:38 +0000 (09:24 +0000)]
Framework code for compilerlike scripts.
Greg Stein [Sat, 18 Aug 2001 09:20:23 +0000 (09:20 +0000)]
Resolve patch #449367.
For the HTTPS class (when available), ensure that the x509 certificate data
gets passed through to the HTTPSConnection class. Create a new
HTTPS.__init__ to do this, and refactor the HTTP.__init__ into a new _setup
method for both init's to call.
Note: this is solved differently from the patch, which advocated a new
**x509 parameter on the base HTTPConnection class. But that would open
HTTPConnection to arbitrary (ignored) parameters, so was not as desirable.
Ka-Ping Yee [Sat, 18 Aug 2001 04:06:54 +0000 (04:06 +0000)]
Add some fairly important file extensions: bmp css doc mid midi mp2 mp3 xls.
Entries taken from the standard Debian mime.types file.
Ka-Ping Yee [Sat, 18 Aug 2001 04:04:50 +0000 (04:04 +0000)]
Initial check-in of cgitb.
A few enhancements are pending, but this should work reliably.
Guido van Rossum [Sat, 18 Aug 2001 01:23:20 +0000 (01:23 +0000)]
When the socket is closed, don't just assign 0 to self._sock.
This breaks software that excepts a socket.error but not an
AttributeError.
Jeremy Hylton [Sat, 18 Aug 2001 00:24:46 +0000 (00:24 +0000)]
Add a little introductory text.
Change several sections to subsections (part of the manual -> howto
transformation).
Flesh out discussion of assignment nodes (and delete statements).
Add an example of manipulating AST objects at a >>> prompt
Jeremy Hylton [Sat, 18 Aug 2001 00:14:37 +0000 (00:14 +0000)]
Generate correct reprs for Mul, Add, etc.
Jeremy Hylton [Sat, 18 Aug 2001 00:07:46 +0000 (00:07 +0000)]
Track removal of doc string from Module().nodes[0]
Jeremy Hylton [Sat, 18 Aug 2001 00:07:14 +0000 (00:07 +0000)]
Add Yield() node
Tim Peters [Sat, 18 Aug 2001 00:05:50 +0000 (00:05 +0000)]
Remove the horrid generators hack from doctest.py. This relies on a
somewhat less horrid hack <wink>: if a module does
from __future__ import X
then the module dict D is left in a state such that (viewing X as a
string)
D[X] is getattr(__future__, X)
So by examining D for all the names of future features, and making that
test for each, we can make a darned good guess as to which future-features
were imported by the module. The appropriate flags are then sucked out
of the __future__ module, and passed on to compile()'s new optional
arguments (PEP 264).
Also gave doctest a meaningful __all__, removed the history of changes
(CVS serves that purpose now), and removed the __version__ vrbl (similarly;
before CVS, it was a reasonable clue, but not anymore).
Jeremy Hylton [Sat, 18 Aug 2001 00:04:31 +0000 (00:04 +0000)]
Add Yield() statement handler
Fix Module() handler to avoid including the doc string in the AST
Tim Peters [Fri, 17 Aug 2001 23:04:59 +0000 (23:04 +0000)]
Fix for bug [#452230] future division isn't propagated.
builtin_eval wasn't merging in the compiler flags from the current frame;
I suppose we never noticed this before because future division is the
first future-feature that can affect expressions (nested_scopes and
generators had only statement-level effects).
Jack Jansen [Fri, 17 Aug 2001 22:37:02 +0000 (22:37 +0000)]
The OSX framework Headers symlink pointed the wrong way. Fixed.
Bill Fancher found this one.
Tim Peters [Fri, 17 Aug 2001 22:11:27 +0000 (22:11 +0000)]
A fiddled version of the rest of Michael Hudson's SF patch
#449043 supporting __future__ in simulated shells
which implements PEP 264.
Martin v. Löwis [Fri, 17 Aug 2001 22:08:34 +0000 (22:08 +0000)]
Use raw-unicode-escape for the tests that require it.
Guido van Rossum [Fri, 17 Aug 2001 21:57:47 +0000 (21:57 +0000)]
Address SF bug #442813. The sequence getitem wrappers should do
interpretation of negative indices, since neither the sq_*item slots
nor the slot_ wrappers do this. (Slices are a different story, there
the size wrapping is done too early.)
Guido van Rossum [Fri, 17 Aug 2001 21:27:53 +0000 (21:27 +0000)]
Add test for weak references.
Guido van Rossum [Fri, 17 Aug 2001 21:21:04 +0000 (21:21 +0000)]
Add note on type/class unification.
Tim Peters [Fri, 17 Aug 2001 20:47:47 +0000 (20:47 +0000)]
ceval, PyEval_MergeCompilerFlags: wasn't merging in the
CO_FUTURE_DIVISION flag. Redid this to use Jeremy's PyCF_MASK #define
instead, so we dont have to remember to fiddle individual feature names
here again.
pythonrun.h: Also #define a PyCF_MASK_OBSOLETE mask. This isn't used
yet, but will be as part of the PEP 264 implementation (compile() mustn't
raise an error just because old code uses a flag name that's become
obsolete; a warning may be appropriate, but not an error; so compile() has
to know about obsolete flags too, but nobody is going to remember to
update compile() with individual obsolete flag names across releases either
-- i.e., this is the flip side of PyEval_MergeCompilerFlags's oversight).
Guido van Rossum [Fri, 17 Aug 2001 20:32:36 +0000 (20:32 +0000)]
Weak reference support, closing SF bug #451773.
Classes that don't use __slots__ have a __weakref__ member added in
the same way as __dict__ is added (i.e. only if the base didn't
already have one). Classes using __slots__ can enable weak
referenceability by adding '__weakref__' to the __slots__ list.
Renamed the __weaklistoffset__ class member to __weakrefoffset__ --
it's not always a list, it seems. (Is tp_weaklistoffset a historical
misnomer, or do I misunderstand this?)
Barry Warsaw [Fri, 17 Aug 2001 20:01:06 +0000 (20:01 +0000)]
Document that uu.decode() will always raise a uu.Error if out_file
isn't given, and the file in the uu header already exists. Also add a
description of the uu.Error exception class.
Barry Warsaw [Fri, 17 Aug 2001 20:00:11 +0000 (20:00 +0000)]
Test that uu.py will not override an existing file if out_file isn't
given and the path is gleaned from the uu header.
Barry Warsaw [Fri, 17 Aug 2001 19:59:34 +0000 (19:59 +0000)]
decode(): Raise a uu.Error if no out_file is given but the file
specified in the uu header already exists. No additional
workaround is provided since out_file=pathname is a deprecated
interface, so it is better to simply pass a file-like object into
out_file anyway. This closes SF bug #438083.
Use isinstance() tests instead of type comparisons.
Tim Peters [Fri, 17 Aug 2001 19:49:02 +0000 (19:49 +0000)]
A self-contained piece of Michael Hudson's patch
#449043 supporting __future__ in simulated shells
in support of PEP 264.
Much has changed from the patch version:
+ Repaired bad hex constant for nested_scopes.
+ Defined symbolic CO_xxx names so global search will find these uses.
+ Made the exported list of feature names explicit, instead of abusing
__all__ for this purpose (and redefined __all__ accordingly).
+ Added gross .compiler_flag verification to test___future__.py, and
reworked it a little to make use of the newly exported explicit list
of feature names.
Guido van Rossum [Fri, 17 Aug 2001 18:49:52 +0000 (18:49 +0000)]
Address SF #451547. The approach is a bit draconian: any object that
is pickled as a global must now exist by the name under which it is
pickled, otherwise the pickling fails. Previously, such things would
fail on unpickling, or unpickle as the wrong global object. I'm
hoping that this won't break existing code that is playing tricks with
this.
I need a volunteer to do this for cPickle too.
Martin v. Löwis [Fri, 17 Aug 2001 18:39:25 +0000 (18:39 +0000)]
Patch #445762: Support --disable-unicode
- Do not compile unicodeobject, unicodectype, and unicodedata if Unicode is disabled
- check for Py_USING_UNICODE in all places that use Unicode functions
- disables unicode literals, and the builtin functions
- add the types.StringTypes list
- remove Unicode literals from most tests.
Guido van Rossum [Fri, 17 Aug 2001 17:36:00 +0000 (17:36 +0000)]
Another contributor's patch got accepted.
Guido van Rossum [Fri, 17 Aug 2001 17:24:29 +0000 (17:24 +0000)]
Change the 227 response parser to use a more liberal regular
expression. This is needed for certain servers that (in violation of
the standard) don't return the parentheses in the response.
This fixes SF bug #441712 by Henrik Weber (not exactly using his
patch).
Fred Drake [Fri, 17 Aug 2001 17:20:44 +0000 (17:20 +0000)]
Make sure that ampersand escaping is still performed on the contents of
local module tables (the lists of modules documented within a chapter,
inserted at the beginning of the chapter). If this is not done here,
the text is not part of the resulting documents when latex2html does the
processing normally.
This fixes a little bit more of SF bug #451556.
Guido van Rossum [Fri, 17 Aug 2001 16:47:50 +0000 (16:47 +0000)]
type_new(): look for __dynamic__ at the module level (after looking in
the class dict). Anything but a nonnegative int in either place is
*ignored* (before, a non-Boolean was an error). The default is still
static -- in a comparative test, Jeremy's Tools/compiler package ran
twice as slow (compiling itself) using dynamic as the default. (The
static version, which requires a few tweaks to avoid modifying class
variables, runs at about the same speed as the classic version.)
slot_tp_descr_get(): this also needed fallback behavior.
slot_tp_getattro(): remove a debug fprintf() call.
Guido van Rossum [Fri, 17 Aug 2001 15:32:31 +0000 (15:32 +0000)]
Strip trailing whitespace, including two lines containing only one or
more tabs that XEmacs Makefile mode found suspicious.
Guido van Rossum [Fri, 17 Aug 2001 14:05:27 +0000 (14:05 +0000)]
- Get rid of obsolete #define PATCHLEVEL.
- Change PY_VERSION (but not the numeric versions) to "2.2a1+".
Guido van Rossum [Fri, 17 Aug 2001 13:59:27 +0000 (13:59 +0000)]
Fix core dump in repr() of instancemethod whose class==NULL.
Guido van Rossum [Fri, 17 Aug 2001 13:58:31 +0000 (13:58 +0000)]
classic(),metods(): add tests to verify that a bound method without a
class has a correct repr().
Guido van Rossum [Fri, 17 Aug 2001 13:43:27 +0000 (13:43 +0000)]
instance_getattr2(): rewritten to remove unnecessary stuff and
streamlined a bit.
instancemethod_descr_get(): don't bind an unbound method of a class
that's not a base class of the argument class.
Guido van Rossum [Fri, 17 Aug 2001 13:40:47 +0000 (13:40 +0000)]
classic(), methods(): add another test relating to unbound methods:
when an unbound method of class A is stored as a class variable of
class B, and class B is *not* a subclass of class A, that method
should *not* get bound to B instances.
Guido van Rossum [Fri, 17 Aug 2001 12:07:34 +0000 (12:07 +0000)]
Instance methods: allow a NULL value for im_class.
Guido van Rossum [Fri, 17 Aug 2001 11:55:58 +0000 (11:55 +0000)]
Add early binding of methods to the 2nd metaclass example.
Guido van Rossum [Fri, 17 Aug 2001 11:43:17 +0000 (11:43 +0000)]
metaclass(): add tests for metaclasses written in Python: one that
subclasses type, one that doesn't (the latter isn't fully functional
yet).
Guido van Rossum [Fri, 17 Aug 2001 11:18:38 +0000 (11:18 +0000)]
type_new(): only defer to the winning metatype if it's different from
the metatype passed in as an argument. This prevents infinite
recursion when a metatype written in Python calls type.__new__() as a
"super" call.
Also tweaked some comments.
Tim Peters [Thu, 16 Aug 2001 21:59:46 +0000 (21:59 +0000)]
Stop adding 3 to FD_SETSIZE -- it makes no sense. If it turns out it
actually does <wink>, perhaps an Insure run will catch it.
Also removed senseless Windows comment.
Fred Drake [Thu, 16 Aug 2001 21:56:24 +0000 (21:56 +0000)]
fix_font(): Instead of using a long if/elsif cluster, use a bloody
dictionary. Added some entries to the dictionary to fix part of
SF bug #451556.
Fred Drake [Thu, 16 Aug 2001 21:25:24 +0000 (21:25 +0000)]
Fix typo reported by Joonas Paalasmaa: dada-->data
Fred Drake [Thu, 16 Aug 2001 21:21:28 +0000 (21:21 +0000)]
Re-write the description of the os.spawn*() functions, and cover the
whole family instead of just two.
This closes SF bug #451630.
Barry Warsaw [Thu, 16 Aug 2001 20:42:38 +0000 (20:42 +0000)]
Added a test for module repr truncation when the package name is
really long. Closes SF bug #437984.
Guido van Rossum [Thu, 16 Aug 2001 20:41:56 +0000 (20:41 +0000)]
classobject.c:instancemethod_descr_get(): when a bound method is
assigned to a class variable and then accessed via an instance, it
should not be rebound.
test_descr.py:methods(): test for the condition above.
Barry Warsaw [Thu, 16 Aug 2001 20:39:24 +0000 (20:39 +0000)]
module_repr(): Instead of fixing the maximum buf size to 400,
calculate it on the fly. This way even modules with long package
names get an accurate repr instead of a truncated one. The extra
malloc/free cost shouldn't be a problem in a repr function.
Closes SF bug #437984
Jack Jansen [Thu, 16 Aug 2001 20:39:17 +0000 (20:39 +0000)]
If genpluginprojects is called from fullbuild we set the Python source directory to be the same as fullbuild uses (in stead of using the default sys.prefix). This fixes an issue Mark Day raised that you can't use fullbuild with one Python installation to build another one.
Barry Warsaw [Thu, 16 Aug 2001 20:33:48 +0000 (20:33 +0000)]
init_sre(): Plug a little leak reported by Insure.
Andrew M. Kuchling [Thu, 16 Aug 2001 20:30:18 +0000 (20:30 +0000)]
Link readline module with ncurses in preference to termcap. [Bug ##441580]
Remove pointless comment
Andrew M. Kuchling [Thu, 16 Aug 2001 20:17:41 +0000 (20:17 +0000)]
[Patch #441691] preprocess() method for Borland C compiler.
I have no way of testing this.
Tim Peters [Thu, 16 Aug 2001 19:50:51 +0000 (19:50 +0000)]
test_descr started breaking in yet another way in the same place.
Guido van Rossum [Thu, 16 Aug 2001 18:52:43 +0000 (18:52 +0000)]
Fix object_repr() to include the module (using the same rules as
type_repr() for when to show or not to show it).
Fred Drake [Thu, 16 Aug 2001 18:36:59 +0000 (18:36 +0000)]
New unit test for the mimetypes module, to avoid future regressions.
Fred Drake [Thu, 16 Aug 2001 18:14:38 +0000 (18:14 +0000)]
Another egregious error that copied the encodings info over the suffix
info. Caught by the tests that I'm writing now.
Martin v. Löwis [Thu, 16 Aug 2001 17:06:44 +0000 (17:06 +0000)]
Use (c)StringIO for collecting bytes. Fixes bug #451622.
Tim Peters [Thu, 16 Aug 2001 16:56:16 +0000 (16:56 +0000)]
Repair some accidents causing Windows failures:
+ test_compare. While None compares less than anything else, it's not
always the case that None has the smallest id().
+ test_descr. The output of %p (pointer) formats varies across platforms.
In particular, on Windows it doesn't produce a leading "0x".
Barry Warsaw [Thu, 16 Aug 2001 16:55:10 +0000 (16:55 +0000)]
Fixed a couple of minor formatting nits where lines were > 79 columns wide.
Barry Warsaw [Thu, 16 Aug 2001 16:52:59 +0000 (16:52 +0000)]
select_select(): Closing bug #448351 the easy way, i.e. by changing
the "#ifdef MS_WINDOWS" to "#ifdef SELECT_USES_HEAP" and by
setting SELECT_USES_HEAP when FD_SETSIZE > 1024.
The indirection seems useful since this subtly changes the path
that "normal" Windows programs take (where Timmie sez FD_SETSIZE =
512). If that's a problem for Windows, he has only one place to
change.
Fred Drake [Thu, 16 Aug 2001 15:54:28 +0000 (15:54 +0000)]
Bad bug: the MimeTypes.readfp() was supposed to take a file object as a
parameter, but did not. This was found because it can create failures
elsewhere based on the presence of mime.types files in some common locations
the module searches by default.
(I will be writing a test for this module shortly!)
Guido van Rossum [Thu, 16 Aug 2001 15:42:49 +0000 (15:42 +0000)]
I should add that the previous checkin also added a slight
optimization for dynamic classes. If __getattr__ is not found as an
attribute on the type, slot_tp_getattro replaces itself with
PyObject_GenericGetAttr. This means you can't add a __getattr__
method to a class after the fact -- but you can still *change* a
__getattr__ method into a different one.
(A similar restriction exists for classic classes.)
Just van Rossum [Thu, 16 Aug 2001 15:16:19 +0000 (15:16 +0000)]
Long time overdue: change sys.path defaults so that people will
have to do "from PIL import Image" instead of "import Image".
Fred Drake [Thu, 16 Aug 2001 14:11:30 +0000 (14:11 +0000)]
Use METH_O where possible (two functions). This does not lead to real
performance changes since the affected functions are not expected to be
used frequently, but reduces the volume of code.
Jack Jansen [Thu, 16 Aug 2001 14:10:56 +0000 (14:10 +0000)]
Updated to the current state of things (long overdue).
Jack Jansen [Thu, 16 Aug 2001 14:10:08 +0000 (14:10 +0000)]
Removed expat from the access paths, it isn't needed.
Andrew M. Kuchling [Thu, 16 Aug 2001 14:08:02 +0000 (14:08 +0000)]
[Patch #444854 from twburton]
Add executable extension, needed to get the program name right on Win32
Andrew M. Kuchling [Thu, 16 Aug 2001 13:56:40 +0000 (13:56 +0000)]
[Patch #442530 from twburton]
Provide include_dirs argument to all calls to ._preprocess and ._compile
Fix typo: pattern.search(pattern) should be pattern.search(line)
Martin v. Löwis [Thu, 16 Aug 2001 13:15:00 +0000 (13:15 +0000)]
Patch #427190: Implement and use METH_NOARGS and METH_O.
Guido van Rossum [Thu, 16 Aug 2001 09:18:56 +0000 (09:18 +0000)]
Fix SF bug #442501: calculate __module__ properly.
- type_module(), type_name(): if tp_name contains one or more period,
the part before the last period is __module__, the part after that
is __name__. Otherwise, for non-heap types, __module__ is
"__builtin__". For heap types, __module__ is looked up in
tp_defined.
- type_new(): heap types have their __module__ set from
globals().__name__; a pre-existing __module__ in their dict is not
overridden. This is not inherited.
- type_repr(): if __module__ exists and is not "__builtin__", it is
included in the string representation (just as it already is for
classes). For example <type '__main__.C'>.
Guido van Rossum [Thu, 16 Aug 2001 09:10:42 +0000 (09:10 +0000)]
Change the type names to xxsublist.<name>.
Guido van Rossum [Thu, 16 Aug 2001 08:32:39 +0000 (08:32 +0000)]
The change of type(None).__name__ from 'None' to 'NoneType' broke this
test in a trivial way. Fixed.
Guido van Rossum [Thu, 16 Aug 2001 08:27:33 +0000 (08:27 +0000)]
Subtle change to make None.__class__ work:
- descrobject.c:descr_check(): only believe None means the same as
NULL if the type given is None's type.
- typeobject.c:wrap_descr_get(): don't "conventiently" default an
absent type to the type of the object argument. Let the called
function figure it out.