The earlier code assumed "protocol=host;protocol=host;..." or "host",
but Windows may also use "protocol=host" (just one entry), as well as
"protocol://host". This code needs some more work, so I'll leave the
bug open for now.
subset of Win32 ShellExecute's functionality. Guido wants this because
IDLE's Help -> Docs function currently crashes his machine because of a
conflict between his version of Norton AntiVirus (6.10.20) and MS's
_popen. Docs for startfile are being mailed to Fred (or just read the
docstring -- it tells the whole story).
Changed webbrowser.py to use os.startfile instead of os.popen on Windows.
Changed IDLE's EditorWindow.py to pass an absolute path for the docs
(hardcoding ShellExecute's "directory" arg to "." as used to be done let
IDLE work, but made the startfile command exceedingly obscure for other
uses -- the MS docs are terrible, of course, & still not sure I
understand it).
Note that Windows Python must link with shell32.lib now! That's where
ShellExecute lives.
'convert_paths()' method to convert them all to the local syntax (backslash
or colon or whatever) at the appropriate time.
Added SCHEME_KEYS to get rid of one hard-coded list of attributes (in
'select_scheme()').
Default 'install_path_file' to true, and never set it false (it's just
there in case some outsider somewhere wants to disable installation of the
.pth file for whatever reason).
Toned down the warning emitted when 'install_path_file' is false, since we
no longer know why it might be false.
Added 'warn_dir' flag to suppress warning when installing to a directory
not in sys.path (again, we never set this false -- it's there for outsiders
to use, specifically the "bdist_*" commands).
Pulled the loop of 'change_root()' calls out to new method 'change_roots()'.
Comment updates/deletions/additions.
flag is true, is set to a StringIO object that silently collects all
debug messages. This is triggered by the Node._debug=1 statement at
the top of test_minidom.py. After the tests, we better delete that
StringIO object to avoid wasting memory. We also reset the _debug
flag. (Note that this is an undetectable memory leak, and the memory
doesn't get collected by the cycle-gc either, because it's all
reachable -- it's just useless.)
Add support for parsing already-opened files. Make sure the parse()
method closes exactly those files that it opens.
Modified by FLD for better conformance to the Python style guide.
This closes SourceForge patch #101512.
Note a curious extension to the std C rules: x, X and o formatting can never produce
a sign character in C, so the '+' and ' ' flags are meaningless for them. But
unbounded ints *can* produce a sign character under these conversions (no fixed-
width bitstring is wide enough to hold all negative values in 2's-comp form). So
these flags become meaningful in Python when formatting a Python long which is too
big to fit in a C long. This required shuffling around existing code, which hacked
x and X conversions to death when both the '#' and '0' flags were specified: the
hacks weren't strong enough to deal with the simultaneous possibility of the ' ' or
'+' flags too, since signs were always meaningless before for x and X conversions.
Isomorphic shuffling was required in unicodeobject.c.
Also added dozens of non-trivial new unbounded-int test cases to test_format.py.
resource files. The gist of the patch is to treat ".rc" and ".mc"
files as source files; ".mc" files are compiled to ".rc" and then
".res", and ".rc" files are compiled to ".res". Wish I knew what
all these things stood for...
which implements the automatic conversion from Unicode to a string
object using the default encoding.
The new API is then put to use to have eval() and exec accept
Unicode objects as code parameter. This closes bugs #110924
and #113890.
As side-effect, the traditional C APIs PyString_Size() and
PyString_AsString() will also accept Unicode objects as
parameters.
style conventions. (Ping has checkin privileges but apparently
ignores them at the moment.)
Ping improves a few doc strings and fixes style violations like foo ( bar ).
An addition of my own: rearrange the printing of various items in
test() so that the (long) environment comes at the end. This avoids
having to scroll if you want to see the current directory or command
line arguments.
interface consistent: The client is responsible for closing the
socket, regardless of the amount of data received.
Restore suport for set_debuglevel call.
default encoding ("ascii") is changed. This safes quite a few cycles
during startup since the first call to .setdefaultencoding() will
initialize the codec registry and the encodings package.
See python-dev for a discussion (Subject: "[Python-Dev] [comp.lang.python] sys.setdefaultencoding (2.0b1)").
in a string (gives you something to do with the dictionary returned
by 'parse_makefile()').
Pulled the regexes in 'parse_makefile()' out -- they're now globals,
as 'expand_makefile_vars()' needs (two of) them.
Cosmetic tweaks to 'parse_makefile()'.
easier for people porting Makefile.pre.in-based extensions to Distutils.
Also loosened argument-checking in Extension constructor to make life
easier for 'read_setup_file()'.
reverse() didn't work at all due to bad arg check.
Fixed that.
Added Brad Chapman to ACKS file, as the proud new owner of two
implicitly copyrighted lines of Python source code <wink>.
Repaired buffer_info's total lack of arg-checking.
Replaced memmove by memcpy in reverse() guts, as memmove is
often slower and the memory areas are guaranteed disjoint.
Replaced poke-and-hope unchecked decl of tmp buffer size by
assert-checked larger tmp buffer.
Got rid of inconsistent spaces before open paren in docstrings.
Added reverse() sanity tests to test_array.py.
are completely skipped, rather than being treated as blank lines
(and then subject to the 'skip_blanks' flag). This allows us
to process old-style Setup files, which rely on
hello \\
# boo!
there
coming out as "hello there".
Dropped the 'collapse_ws' option and replaced it with 'collapse_join' --
it's *much* faster (no 're.sub()') and this is the reason I really added
'collapse_ws', ie. to remove leading whitespace from a line being joined
to the previous line.
(eg. "bdist_dumb", to generate both ZIP and tar archives in the same
run), tell all but the last run to keep temp files -- this just gets
rid of the need to pseudo-install the same files multiple times.
the command's sub-commands as well (off by default). This is essential if
we want to be be able to run (eg.) "install" twice in one run, as happens
when generating multiple built distributions in one run.
families" -- eg. install and its brood, build and its brood, and so forth.
Specifically: added the 'sub_commands' class attribute (empty list, sub-
classes must override it) and a comment describing it, and the
'get_sub_commands()' method.
Strings are unpickled by calling eval on the string's repr. This
change makes pickle work like cPickle; it checks if the pickled
string is safe to eval and raises ValueError if it is not.
test suite modifications:
Verify that pickle catches a variety of insecure string pickles
Make test_pickle and test_cpickle use exactly the same test suite
Add test for pickling recursive object
of globals from sysconfig.
Added 'prefix' and 'exec_prefix' to the list of variables that can be
expanded in installation directories (preserving the stupid old names
of 'sys_prefix' and 'sys_exec_prefix, though).
all that work when someone asks for a "configuration variable" from the
Makefile. Details:
- added 'get_config_vars()': responsible for calling one of the
'_init_*()' functions to figure things out for this platform,
and to provide an interface to the resulting dictionary
- added 'get_config_var()' as a simple interface to the dictionary
loaded by 'get_config_vars()'
- changed the '_init_*()' functions so they load the global dictionary
'_config_vars', rather than spewing their findings all over
the module namespace
- don't delete the '_init_*()' functions when done importing
- adjusted 'customize_compiler()' to the new regime
character according to RFC 2396. Add some text to quote doc string
that explains the quoting rules better.
This closes SF Bug #114427.
Add _fast_quote operation that uses a dictionary instead of a list
when the standard set of safe characters is used.
mailbox.py (from the CVS tree) doesn't work with qmail Maildirs:
Filenames are completed when the directories are scanned, and
the directory name is prepended again in the next() method.
Another suggestion: Change the print statement in the _test()
driver to show two more date characters (probably the length
has increased due to the recent Y2K hype ;). Now it shows the
complete date, including the seconds -- at least for me. (I've
also made the sender field left justified, in case it is ever
shorter than the field width).
used to create the distribution and the creation date.
Takes care of the extra_path argument to the setup function,
installs the modules into <prefix>/extra_path and creates
a -pth file (like install_lib does).
Paid more attention to the comments on the report; Martin suggested just
not having a __del__() method, which makes more sense in this case. So
I have removed it.
This closes SourceForge bug #113850. Again.
The posixfile __del__ method attempts to close the file (_file_) it
contains. However, if the open() method fails, then _file_ is never
assigned.
This closes SourceForge bug #113850.
distutils/command/bdist_wininst.py:
- the windows installer is again able to compile after installing
the files. Note: The default has changed, the packager has to
give --no-target-compile/--no-target-optimize to NOT compile
on the target system. (Another note: install_lib's --compile
--optimize options have the same semantics to switch off
the compilation. Shouldn't the names change?)
- All references to specific python versions are gone.
- A small bug:
raise DistutilsPlatformError ("...")
instead of
raise DistutilsPlatformError, ("...")
- When bdist_wininst creates an installer for one specific python
version, this is reflected in the name:
Distutils-0.9.2.win32-py15.exe instead of
Distutils-0.9.2.win32.exe
- bdist_wininst, when run as script, reads the wininst.exe file
and rewrites itself. Previously this was done by hand.
misc/install.c
- All the changes needed for compilation
- Deleted a lot of debug/dead code
waste an hour tracking down an illusion; repaired it; writing/reading non-
printable characters (except \t\r\n) into/outof text-mode files ain't
defined x-platform, and at least some Windows text editors do surprising
things in their presence.
Also added a by-hand "build humber" to the Windows build, in an approximation
of Python's inexplicable BUILD-number Unix scheme. I'll try to remember to
increment it each time I make a Windows installer available. It's starting
at 2, cuz I've put 2 installers out so far (both with BUILD #0).
This was a funny one! The test very subtly relied on 1.5.2's
behavior of treating "\x%" as "\x%", i.e. ignoring that was an
\x escape that didn't make sense. But /F implemented PEP 223,
which causes 2.0 to raise an exception on the bad escape.
Fixed by merely making the 3 such strings of this kind into
raw strings.