than we actually use, and do actually use AR and SO.
Run ranlib on static libraries. (Should probably have a platform-check
so we don't run ranlib when it's not necessary, ie. on most modern
Unices.)
ihooks.ModuleLoader does not implement reload(mod) correctly:
If mod has already been loaded by ModuleLoader, it has
been returned from a cache. Added an additional parameter
to import_it() to force reloading.
a missing part of the previous checkin message:
Marc-Andre Lemburg:
Added encoding name attributes to wrapper classes which
allow applications to check the used encoding names.
The maxsplit functionality in .splitlines() was replaced by the keepends
functionality which allows keeping the line end markers together
with the string.
default list of files from () to None, and explicitly test for None
before defaulting to sys.argv[1:]. This means that if you pass in an
explicit empty list, it will read stdin instead of defaulting to
sys.argv[1:]. This fixes a buglet in the test script (when called
with options but without files, it chokes when it tries to interpret
the options as files).
Lawrence adds: "I suspect that this is a safe change, because I can't
imagine someone actively passing in an empty list when they want
sys.argv used."
I agree.
Instead of assuming that the number process ids of the threads is the
same as the process id of the controlling process, use a copy of the
dictionary and check for changes in the process ids of the threads
from the thread's process ids in the parent process. This makes the
test make more sense on systems which assign a new pid to each thread
(i.e., Linux).
This doesn't fix the other problems evident with this test on Linux.
* '...%s...' % u"abc" now coerces to Unicode just like
string methods. Care is taken not to reevaluate already formatted
arguments -- only the first Unicode object appearing in the
argument mapping is looked up twice. Added test cases for
this to test_unicode.py.
crashing when self.force not defined.
Revise 'copy_file()' and 'copy_tree()' docstrings accordingly.
Remove 'hasattr()' check for 'self.force' from 'make_file()'.
to all commands in the same way. Several Command methods now either expect
'self.force' to be defined, or check if it is defined and assume it's
false if not.
Added code to include source files from 'build_clib' command to default file
list -- currently this won't work, since 'build_clib' doesn't have a
'get_source_files()' method!
his copy of test_contains.py seems to be broken -- the lines he
deleted were already absent). Checkin messages:
New Unicode support for int(), float(), complex() and long().
- new APIs PyInt_FromUnicode() and PyLong_FromUnicode()
- added support for Unicode to PyFloat_FromString()
- new encoding API PyUnicode_EncodeDecimal() which converts
Unicode to a decimal char* string (used in the above new
APIs)
- shortcuts for calls like int(<int object>) and float(<float obj>)
- tests for all of the above
Unicode compares and contains checks:
- comparing Unicode and non-string types now works; TypeErrors
are masked, all other errors such as ValueError during
Unicode coercion are passed through (note that PyUnicode_Compare
does not implement the masking -- PyObject_Compare does this)
- contains now works for non-string types too; TypeErrors are
masked and 0 returned; all other errors are passed through
Better testing support for the standard codecs.
Misc minor enhancements, such as an alias dbcs for the mbcs codec.
Changes:
- PyLong_FromString() now applies the same error checks as
does PyInt_FromString(): trailing garbage is reported
as error and not longer silently ignored. The only characters
which may be trailing the digits are 'L' and 'l' -- these
are still silently ignored.
- string.ato?() now directly interface to int(), long() and
float(). The error strings are now a little different, but
the type still remains the same. These functions are now
ready to get declared obsolete ;-)
- PyNumber_Int() now also does a check for embedded NULL chars
in the input string; PyNumber_Long() already did this (and
still does)
Followed by:
Looks like I've gone a step too far there... (and test_contains.py
seem to have a bug too).
I've changed back to reporting all errors in PyUnicode_Contains()
and added a few more test cases to test_contains.py (plus corrected
the join() NameError).
This patch solves 2 problems of the os module.
1) Bug ID #50 (case-mismatch wiht "environ.get(..,..)" and "del environ[..]")
2) os.environ.update (dict) doesn't propagate changes to the 'real'
environment (i.e doesn't call putenv)
This patches also has minor changes specific for 1.6a
The string module isn't used anymore, instead the strings own methods are
used.
Unix From lines, change the UnixMailbox class so that _search_start()
positions the file *before* the Unix From line instead of after it;
change _search_end() to skip one line before looking for the next From
line. The rfc822.Message class automatically recognizes these Unix
From lines and squirrels them away in the 'unixfrom' instance variable.
- file_util.py: operations on single files
- dir_util.py: operations on whole directories or directory trees
- dep_util.py: simple timestamp-based dependency analysis
- archive_util.py: creation of archive (tar, zip, ...) files
The functions left in util.py are miscellany that don't fit in any of the
new files.
the Command class from core.py to cmd.py. No other code needs changing
though; distutils.core still provides the Command and Distribution classes,
although indirectly now.
HKEY_* and Reg* names once, rather than having near-duplicate code
in the two import attempts.
Also dropped the leading underscore on all the imported symbols,
as it's not appropriate (they're not local to this module).
* build to "Debug" or "Release" temp directory
* put linker turds (.lib and .exp files) in the build temp directory
* tack on "_d" to extensions built with debugging
* added 'get_ext_libname()' help in putting linker turds to temp dir
Also, moved the code that simplifies None to empty list for a bunch
of options to 'finalize_options()' instead of 'run()'.
Simplified 'Command.get_peer_option()' a tad -- just call 'find_peer()'
to get the peer command object.
Updated 'Command.copy_file()' to take a 'link' parameter, just like
'util.copy_file()' does now.
Added 'Command.make_archive()' to wrap 'util.make_archive()'.
Changes to 'copy_file()':
* added support for making hard links and symlinks
* noted that it silently clobbers existing files when copying, but
blows up if destination exists when linking -- hmmm...
* error message tweak
Added 'base_name' parameter to 'make_tarball()' and 'make_zipfile()'.
Added 'make_archive()' -- wrapper around 'make_tarball()' or
'make_zipfile()' to take care of the archive "root directory".
the command that actually creates "dumb" binary distributions, ie.
tarballs and zip files that you just unpack under <prefix> or <exec-prefix>.
Very limited, but it's a start.
Initial revision is pretty limited; it only knows how to generate "dumb"
binary distributions, i.e. a tarball on Unix and a zip file on Windows.
Also, due to limitations in the installation code, it only knows how to
distribute Python library code. But hey, it's a start.
provided by Distribution.
Cosmetic and error message tweaks.
Simplified 'make_release_tree()':
* extracted 'distutils.util.create_tree()'
* don't have to do hard-linking ourselves -- it's now handled by
'distutils.util.copy_file()' (although the detection of
whether hard linking is available still needs to be factored out)
Removed 'make_tarball()' and 'make_zipfile()' entirely -- their role
is now amply filled by 'distutils.util.make_archive()'.
Simplified 'make_distribution()':
* use Distribution's new 'get_full_name()' method
* use 'make_archive()' instead of if/elif/.../else on the archive format
If a non-tuple sequence is passed as the *arg, convert it to a tuple
before checking its length.
If named keyword arguments are used in combination with **kwargs, make
a copy of kwargs before inserting the new keys.