Commit Graph

14956 Commits

Author SHA1 Message Date
Barry Warsaw
370a29fe42 Added a zip() test where one of the arguments is an instance whose
class has no __getitem__().  This raises an AttributeError.
2000-10-01 04:28:43 +00:00
Fred Drake
cc4adf27f4 Add missing "s" from format string.
This closes SourceForge patch #101714.
2000-09-30 23:59:04 +00:00
Greg Ward
0bc5953e83 Added skeletal "Building Extensions: Tips and Tricks" section. This
is where all the FAQs about extension-building will be answered.
2000-09-30 21:06:40 +00:00
Greg Ward
1df6e7b1fc Reduced the 'bytecompile()' method to a one-line wrapper around
'util.byte_compile()'.  Currently just reproduces the existing functionality
-- doesn't use any of the fancy features in the new 'byte_compile()'.
2000-09-30 20:39:09 +00:00
Greg Ward
1297b5ce67 Added 'byte_compile(): an all-singing, all-dancing wrapper around the
standard 'py_compile.compile()' function.  Laundry list of features:
  - handles standard Distutils 'force', 'verbose', 'dry_run' flags
  - handles various levels of optimization: can compile directly in
    this interpreter process, or write a temporary script that is
    then executed by a new interpreter with the appropriate flags
  - can rewrite the source filename by stripping an optional prefix
    and preprending an optional base dir.
2000-09-30 20:37:56 +00:00
Greg Ward
4752769d08 Various docstring tweaks.
Fixed 'subst_vars()' so it actually blows up like the docstring claims
  (and fixed the docstring not to claim it handles ${var}, which it
  doesn't).
2000-09-30 18:49:14 +00:00
Greg Ward
b8b263b92f Reformat docstrings. 2000-09-30 18:40:42 +00:00
Greg Ward
cb1f4c4d33 Standardized whitespace around function calls. 2000-09-30 18:27:54 +00:00
Greg Ward
963cd2d85d Andrew Kuchling: changed so the '_path_created' dictionary is keyed on
absolute pathnames; this lets it keep working in the face of chdir'ing
around.
2000-09-30 17:47:17 +00:00
Greg Ward
3e6d43801b Fixed 'run()' so it doesn't call 'bytecompile()' if 'install()' returned None. 2000-09-30 17:35:26 +00:00
Greg Ward
e564278bfd Expect a tuple (dest_name, copied) from 'copy_file()'. 2000-09-30 17:34:50 +00:00
Marc-André Lemburg
ff50ad53a9 Fix header file usage so that NULL is defined. NULL is needed by
unicodedata_db.h.
2000-09-30 17:34:31 +00:00
Greg Ward
3a5a2bd486 Changed 'build_module()' so it returns the result of 'copy_file()'
on the module file -- could be useful for subclasses overriding it.
2000-09-30 17:33:05 +00:00
Greg Ward
0d4a853109 Changed 'copy_file()' so it returns a tuple (dest_name, copied) -- hopefully,
this will please everyone (as if that's possible).
2000-09-30 17:29:35 +00:00
Greg Ward
ec84c21ce2 In 'get_platform()', handle so-called POSIX systems that don't have
'uname()' -- specifically NeXTSTEP.
2000-09-30 17:09:39 +00:00
Greg Ward
64d855adca Changed to use the 'sub-commands' machinery:
- added 'sub_commands' class attr
  - added 'has_*()' predicates referenced by the sub-command list
  - rewrote 'run()' so it's a trivial loop over relevant sub-commands
2000-09-30 17:08:12 +00:00
Greg Ward
70b1fd1a99 Moved some things around for better organization. 2000-09-30 17:05:37 +00:00
Martin v. Löwis
d15a9427e8 Fixed spelling of module; closes bug 115712. 2000-09-30 17:04:40 +00:00
Martin v. Löwis
efffd28c2c Add mimetools testcase. 2000-09-30 17:03:19 +00:00
Martin v. Löwis
25d1692434 Return after writing 7bit or 8bit encodings. Closes bug 115712 2000-09-30 16:52:45 +00:00
Martin v. Löwis
af484d5a0c Mention in the module's doc string that other functions of the socket API
appear as methods on socket objects.
2000-09-30 11:34:30 +00:00
Fred Drake
58295dedf7 Replace to XXX notes to add references with real references. 2000-09-30 00:11:45 +00:00
Fred Drake
5db246d1fa Always use the same name for the exception defined in this module!
Error reported via email by Pete Shinners <pete@visionart.com>.

Fixed some indentation inconsistencies.
2000-09-29 20:44:48 +00:00
Fred Drake
a77254a724 PyModule_AddStringConstant(): Make this static since it isn't used
elsewhere in 1.5.2.
2000-09-29 19:23:29 +00:00
Martin v. Löwis
c0718eba21 Remove unused VERSION #define.
Add PyModule_AddStringConstant and PyModule_AddObject if version <2.0,
to allow to share this file with PyXML.
2000-09-29 19:05:48 +00:00
Martin v. Löwis
3f0969f100 Use string functions instead of methods to allow sharing this module with PyXML 2000-09-29 19:00:40 +00:00
Martin v. Löwis
491ded78cc Remove dependency from saxutils when loading xmlreader 2000-09-29 18:59:50 +00:00
Fred Drake
9f11cf8811 Capitalized an "if" that should have been -- noted by Grant Griffin
<grant.griffin@honeywell.com>.
2000-09-29 17:54:40 +00:00
Fred Drake
0b5fb2bfc8 Add a paragraph about an optimization bug in SGI compilers which affects
complex objects, and explain how to build so that Objects/complexobject.c
is compiled without optimization.

Closing SourceForge bug #110695 as "Won't Fix".
2000-09-29 17:45:05 +00:00
Fred Drake
ffe58ca6ef Reversely --> Conversely
This closes SourceForge bug #115673.
2000-09-29 17:31:54 +00:00
Fred Drake
45888ffbd4 Added a missing "is" -- noted by Grant Griffin
<grant.griffin@honeywell.com>.
2000-09-29 17:09:11 +00:00
Fred Drake
31b761e326 Spelling: internalization --> internationalization
Fixed displays of the interactive prompt in running text.
These close SourceForge bug #115658.

Also:

Updated discussion of tuple unpacking to reflect the general ability
to unpack any sequence type.  Explained that it is possible to create
tuples which contain mutable values, and noted in the dictionary
section that such tuples cannot be used as keys.

Noted that .pyc and .pyo files can be run directly when provided as
the script parameter to the interpreter, and slightly clarified
comments about using modules with only the byte compiled code.

Removed some XXX comments that are no longer relevant.
Removed commented-out paragraph about __private names being experimental.

Adjusted markup for consistency in some places.
2000-09-29 15:17:36 +00:00
Thomas Heller
1dbe9d5247 Removed the extra_dirs and path_file metadata options.
They are unneeded: All this stuff is already done by the
install command which is run by bdist_wininst.

One bug has been fixed:
The root of the fake install tree is install.install_purelib,
not install.install_lib!
They are different if the extra_path option is used in
the setup function.

Rebuild after the changes to wininst.exe.
2000-09-29 11:36:55 +00:00
Fred Drake
4ce4f2eedd os.startfile() documentation, based on text from Tim Peters. 2000-09-29 04:15:19 +00:00
Tim Peters
42c83afd14 The 2.0b2 change to write .pyc files in exclusive mode (if possible)
unintentionally caused them to get written in text mode under Windows.
As a result, when .pyc files were later read-- in binary mode --the
magic number was always wrong (note that .pyc magic numbers deliberately
include \r and \n characters, so this was "good" breakage, 100% across
all .pyc files, not random corruption in a subset).  Fixed that.
2000-09-29 04:03:10 +00:00
Fred Drake
3cc7e4d083 Update list of extension modules that may be interesting to enable on
most modern Unix flavors.

The age of this portion of the README was noted in SourceForge bug #115625.
2000-09-29 00:30:05 +00:00
Fred Drake
8179a9de6b Clarify that the Tk interface is not enabled by default when building
from sources, not in general.

This closes SourceForge bug #115608.
2000-09-28 23:28:30 +00:00
Andrew M. Kuchling
36d97ebd58 Add #ifdef's for platforms that don't have the constants POLLRDNORM and
friends.  (Modified version of patch #101682 from Neil Schemenauer)
2000-09-28 21:33:44 +00:00
Fred Drake
0cdfc92a19 Fix typo: config.stat --> config.status 2000-09-28 20:53:39 +00:00
Fred Drake
329796d634 Consistency nits, untabify. 2000-09-28 20:41:16 +00:00
Fred Drake
8a9db99760 Updated documentation relating to the various flavors of popen[234]()
for Windows & Unix.
2000-09-28 20:27:51 +00:00
Thomas Heller
18b9b93df3 Removed the implib_dir instance variable because it is unused.
Removed get_ext_libname() because it is unused.

Fixed get_libraries() to append an '_d' to the python debug
import library. If MSVC is used, do not add 'pythonxx.lib' to
the list of libraries, because this is handled better
by a pragma in config.h.

This should fix bug #115595, but it needs some more testing.
2000-09-28 19:28:35 +00:00
Fred Drake
20af3172ce popen4(): Added for Unix.
Fixed a typo in a docstring.
2000-09-28 19:10:56 +00:00
Fred Drake
d75e63a865 popen4(), class Popen4: popen4() support for Unix.
popen2(), popen3():  Reversed order of bufsize and mode parameters to
                     comply with what was here before (Python 1.5.2).

class Popen3:  Factored the __init__() into a more basic initializer and
               a helper method, to allow some re-use by the Popen4 class.
               Use os.dup2() instead of os.dup() to create the proper
               file descriptors in the child process.

This closes SourceForge bug #115330 and partially closes #115353.
2000-09-28 19:07:53 +00:00
Fred Drake
38cb9f1f17 Convert all entries on sys.path to absolute paths, and also update the
__file__ attributes of already-imported modules to be absolute.  This helps
robustify the interpreter against os.chdir() calls from the application.

Only remove setdefaultencoding() from sys if it exists; if this module is
run as a script (since there is a _test() function that gets run), it broke
because the script attempts to remove it again after the import of site
has already done so.  This allows the module to be run as a script again.

makepath():  New function, standardizes all pathname normalization in one
             place.
2000-09-28 16:52:36 +00:00
Fred Drake
b4e460ac4b Avoid import of string module; it is only needed for expandvars().
Never assume that os.sep is for the module-specific platform; use the
right separator character directly.
Fix some minor style consistency nits.
2000-09-28 16:25:20 +00:00
Fred Drake
c0ab93ef6f Minor style nits. 2000-09-28 16:22:52 +00:00
Fred Drake
22fb839f0c Remove imports of string when string methods will do. 2000-09-28 15:04:39 +00:00
Fred Drake
b64c2239b0 Minor ANSIfication: lib_python no longer needs to be initialized
dynamically to support K&R C since we are requiring an ANSI compiler.
2000-09-28 14:32:29 +00:00
Fred Drake
44774c9429 Add regex and regsub to the list of undocumented obsolete modules. 2000-09-28 05:31:39 +00:00