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.
newlines at the start or end. Fiddle test_popen2 and popen2._test() to
tolerate this. Also change all "assert"s in these tests to raise
explicit exceptions, so that python -O doesn't render them useless.
Also, in case of error, make the msg display the reprs of what we
wrote and what we read, so we can tell exactly why it's failing.
Fix import support to work with import as variant of Python 2.0. The
grammar for import changed, requiring changes in transformer and code
generator, even to handle compilation of imports with as.
Python test suite. Specifically,
- import time instead of strop in test_b1
- test for ClassType of exceptions using isinstance instead of
equality in test_exceptions
- remove __builtins__ from dir() output in test_pkg
test_pkg output needs to be regenerated.
#101187, which some modifications. Specifically,
ntransfercmd(), transfercmd(), and retrbinary() all grow an optional
`rest' argument, which if not None, is used as the argument to an FTP
REST comman dbefore the socket is returned. Differences from the SF
patch:
- always compare against None with `is' or `is not' instead of == or !=
- no parens around conditional
- RFC 959 defines the argument to REST is a string containing any
ASCII characters in the range [33..126]. Therefore, we use the %s
format character instead of %f or %d as suggested in the patch's
comments. Note that we do /not/ sanity checkthe contents of the
rest argument (but we'll document this in the library reference
manual).
unbuffered (by setting the class variable rbufsize to 0), because we
(may) need to pass the file descriptor to the subprocess running the
CGI script positioned after the headers.
and wfile class variables (that the instance can also override).
Change the default for rfile to buffered, because that seems to make a
big difference in performance on some platforms.
An anti-patch is needed to revert the effect in CGIHTTPServer.py which
I'll check in momentarily.
* ensure the "dist" directory exists
* raise exception if using for modules containing compiled extensions
on a non-win32 platform.
* don't create an .ini file anymore (it was just for debugging)
fairly tight control, and the '_setup_stop_after' and '_setup_distribution'
globals to provide the tight control.
This isn't entirely reliable yet: it dies horribly with a NameError on the
example PIL setup script in examples/pil_setup.py (at least with Python
1.5.2; untested with current Python). There's some strangeness going
on with execfile(), but I don't understand it and don't have time
to track it down right now.
Since the application never gets to see the namespace abbreviation
used in the XML document, but some applications may need to know them,
we provide this method.
according to the MS docs it enables exception-handling, and (according
to Alex Martelli <aleaxit@yahoo.com>) is needed to compile without
getting warnings from standard C++ library headers. Apparently
it doesn't cause any problems with C code, so I haven't bothered
conditionalizing the use of /GX.
* deletes cache
* adds firstweekday and setfirstweekday functions that allow user to control
which day of the week is first when displaying calendars
* adds month, week, calendar functions that return their results instead of
printing them
* adds symbolic constants MONDAY, ..., SUNDAY so users need not remember the
ordinal values of the weekdays
In test_poll1(), unregister file descriptors as they're closed,
and also close the read end of the pipe
In test_poll2(), make the code assume less about the combinations of flag
bits that will be returned
Changed 'core.setup()' so it sets them to reasonable defaults.
Tweaked how the "usage" string is generated: 'core' now provides
'gen_usage()', which is used instead of 'USAGE'.
Modified "build_py" and "sdist" commands to refer to
'self.distribution.script_name' rather than 'sys.argv[0]'.
subtle breakage on Windows (the test is skipped here, but the TestSkipped
exception wasn't recognized as such, because of duplicate copies of
test_support got loaded; so the test looks like a failure under Windows
instead of a skip).
Repaired the import, but
THIS TEST *WILL* FAIL ON OTHER SYSTEMS NOW!
Again due to the duplicate copies of test_support, the checked-in
"expected output" file actually contains verbose-mode output. I can't
generate the *correct* non-verbose output on my system. So, somebody
please do that.
The known bug (bogus error message when an empty file is
extracted) is fixed.
Other changes:
- The target-compile and target-optimize flags of bdist_wininst
are gone. It is no longer possible to compile the python
files during installation.
- The zlib module is no longer required or used by bdist_wininst.
- I moved the decompression/extraction code into a separate
file (extract.c).
- The installer stub is now compressed by UPX (see
http://upx.tsx.org/). This reduces the size of the exe
(and thus the overhead of the final installer program)
from 40 kB to 16 kB.
- The installer displays a more uptodate user wizard-like
user interface, also containing a graphic: Just's Python Powered logo.
(I could not convince myself to use one of the BeOpen logos).
- The installation progress bar now moves correctly.
rfc822 (Addresslist) modules. Also a preliminary testcase for augmented
assignment, which should actually be merged with the test_class testcase I
added last week.
so that a subclass can override it.
This partly addresses Bug #112634 -- but the documentation is still
wrong, since it suggests that you can set self.version *after* calling
the base class __init__. In fact it must be done *before*.
I'll fix that too.
Add the EXTENDED_ARG opcode to the virtual machine, allowing 32-bit
arguments to opcodes instead of being forced to stick to the 16-bit
limit. This is especially useful for machine-generated code, which
can be too long for the SET_LINENO parameter to fit into 16 bits.
This closes the implementation portion of SourceForge patch #100893.
Patch description
-----------------
This addresses four issues:
(1) usernames and passwords in urls with special characters are now
decoded properly. i.e. http://foo%2C:bar@www.whatever.com/
(2) Basic Auth support has been added to HTTPS, like it was in HTTP.
(3) Version 1.92 sent the POSTed data, but did not deal with errors
(HTTP responses other than 200) properly. HTTPS now behaves the
same way HTTP does.
(4) made URL-checking beahve the same way with HTTPS as it does with
HTTP (changed == to !=).
docs changes are needed (only reference to winreg I could find
was in libwinreg.tex, which is documenting _winreg, and merely
mentions that a higher-level winreg module *may* appear someday;
that's still true).
os.name == "nt". This makes test_popen2 pass under Win98SE.
HOWEVER, the Win98 "more" invents a leading newline out
of thin air, and I'm not sure that the other Windows flavors
of "more" also do that.
So, somebody please try under other Windows flavors!
name as n'. By doing some twists and turns, "as" is not a reserved word.
There is a slight change in semantics for 'from module import name' (it will
now honour the 'global' keyword) but only in cases that are explicitly
undocumented.
is no __getslice__ available. Also does the same for C extension types.
Includes rudimentary documentation (it could use a cross reference to the
section on slice objects, I couldn't figure out how to do that) and a test
suite for all Python __hooks__ I could think of, including the new
behaviour.
socket.py is used for all platforms, and it defines the additional
classes and alternate socket() function for Windows and BeOS systems.
The plat-*/socket.py files are no longer needed, since there is a
shared socket.py.
make_fqdn() is provided, but I decided to call it getfqdn() to be
consistent with the other names in the socket module. Since it is
really a "get" operation and does not create a new name, this is
the right name to give it.
Move the docstring here from the _socket module.
'helo' and 'ehlo' message, and exports the 'make_fqdn' function. This
function should be moved to socket.py, if that module ever gets a Python
wrapper.
Minor updates for BeOS R5.
Use of OSError in test.test_fork1 changed to TestSkipped, with corresponding
change in BeOS/README (by Fred).
This closes SourceForge patch #100978.
* use self.debug_print() for debug messages
* uses now copy.copy() to copy lists
* added 'shared_lib_extension=".dll"', ... , this is necessary if you
want use the compiler class outside of the standard distutils build
process.
* changed result type of check_config_h() from int to string
- fix tab space issues (SF patch #101167 by Neil Schemenauer)
- fix co_flags for classes to include CO_NEWLOCALS (SF patch #101145 by Neil)
- fix for merger of UNPACK_LIST and UNPACK_TUPLE into UNPACK_SEQUENCE,
(SF patch #101168 by, well, Neil :)
- Adjust bytecode MAGIC to current bytecode.
TODO: teach compile.py about list comprehensions.
did the same anyway.
I'm not sure what to do with Tools/compiler/compiler/* -- that isn't part of
distutils, is it ? Should it try to be compatible with old bytecode version ?
function (together with other locale aware ones) should into a new collation
support module. See python-dev for a discussion of this removal.
Note: This patch should also be applied to the 1.6 branch.
(this should fix Sjoerd's xmllib problem)
-- added skip field to INFO header
-- changed compiler to generate charset INFO header
-- changed trace messages to support post-mortem analysis
participates in the "--root" hack, ie. it also has a new root directory
hacked on at the very last minute (essential if the .pth file is to be
included in an RPM or other smart installer!).
at all (my computer doesn't have a Sound Blaster), this doesn't mean
there's a bug in linuxaudiodev. The only error the test suite skips
is currently ImportError -- so that's what we raise. If you see a problem
with this patch, say so and I'll retract. If you think raising an ImportError
sucks, you're right -- but I ain't gonna buy a SB and I sure ain't gonna
let the test-suite fail on my machine.