Guido van Rossum [Tue, 25 Aug 1998 16:07:15 +0000 (16:07 +0000)]
Patch by Mark Hammond to support 64-bit ints on MS platforms.
The MS compiler doesn't call it 'long long', it uses __int64,
so a new #define, LONG_LONG, has been added and all occurrences
of 'long long' are replaced with it.
2-digit years are now converted using rules that are (according to
Fredrik Lundh) recommended by POSIX or X/Open: 0-68 mean 2000-2068,
69-99 mean 1969-1999.
2-digit years are now only accepted if time.accept2dyear is set to a
nonzero integer; if it is zero or not an integer or absent, only year
values >= 1900 are accepted. Year values 100-1899 and negative year
values are never accepted.
The initial value of time.accept2dyear depends on the environment
variable PYTHONY2K: if PYTHONY2K is set and non-empty,
time.accept2dyear is initialized to 0; if PYTHONY2K is empty or not
set, time.accept2dyear is initialized to 0.
Guido van Rossum [Tue, 25 Aug 1998 14:06:55 +0000 (14:06 +0000)]
New version, with contributions from Sjoerd Mullender and Mark Hammond.
Sjoerd writes:
This version of freeze creates one file per Python module, instead of
one humongous file for all Python modules.
bkfile: new module to used to write files with backups. No new file
is produced if the new contents is identical to the old.
New option "-x excluded-module" for modulefinder test program.
New option "-i filename" for freeze main program to include a list of
options in place of the -i option.
Guido van Rossum [Tue, 25 Aug 1998 12:29:08 +0000 (12:29 +0000)]
There was still something wrong. The original NOTTESTS are replaced
by the new '-x' arguments, losing the previous items. Thus,
test_support, test_b1 & test_b2 are executed (and warnings issued).
(Discovered by Vladimir Marangozov.)
Guido van Rossum [Mon, 24 Aug 1998 14:15:44 +0000 (14:15 +0000)]
Ted Horst writes in psa-members@python.org:
This is a patch that Bill Bummgarner did for 1.4 that hasn't made its
way into the distribution yet. This is important if you want to use
the ObjC module.
The .subn() method wasn't setting _num_regs, which is used by the .groups()
method, so .groups() didn't work inside the replacement function
called by re.sub. One-line fix: set self._num_regs inside subn().
Barry Warsaw [Thu, 20 Aug 1998 21:51:27 +0000 (21:51 +0000)]
(py-shell-map): New variable contains the keymap used in *Python*
shell buffers.
(py-shell): Moved the require of comint to the top level. Also
use-local-map py-shell-map instead of hacking on the comint-mode-map.
This eliminates breakage of other comint-mode buffers (e.g. shell).
Barry Warsaw [Thu, 20 Aug 1998 19:44:51 +0000 (19:44 +0000)]
(py-process-filter): Deleted this function. In order to fix
interactions with newer Emacsen, I've rewritten the way all the
process filters work in the *Python* buffer. We use more of the
comint infrastructure, specifically the default process filter. This
means that scrolling is now handled by the default comint variables
including comint-scroll-to-bottom-on-output. Note that this is
somewhat experimental change!
(py-comint-output-filter-function): Moved to here from the obsolete
py-process-filter function, the logic to pop and exec the next queued
file waiting to be executed.
(py-execute-file): Don't bind comint-scroll-to-bottom-on-output to t,
and save the excursion when inserting the "working on" message. This
lets the standard comint scrolling variables as set by the user,
continue to work.
(python-mode, py-shell, py-describe-mode): Remove description of
py-scroll-process-buffer. Also in py-shell, make
comint-output-filter-functions buffer-local, and add
py-comint-output-filter-function to this hook (instead of setting the
process filter).
(py-scroll-process-buffer): Deleted this variable. See comint
variables including comint-scroll-to-bottom-on-output.
(py-execute-region): When exec files are being queued, push the next
temp file on the end of the list.
(py-submit-bug-report): Removed reporting of py-scroll-process-buffer.
Jack Jansen [Thu, 20 Aug 1998 15:48:52 +0000 (15:48 +0000)]
All libraries have now been moved to their new location, with their new names.
As everything is also under CVS this should greatly simplify the work to be done
when a new version of one of the libraries we use is released.
Added an example that uses signal.alarm() to time out an os.open() that
takes too long. This example relies on the fact that raising an
exception in a signal handler causes the exception to be re-raised
when the main line of the program resumes execution. Is this guaranteed
in CPython, or is this something that just happens to work by accident?
Fred Drake [Tue, 18 Aug 1998 17:43:08 +0000 (17:43 +0000)]
Raise the right exception (ValueError) for attempted I/O on closed StringIO
objects; this makes the emulation of file objects a bit better, and the
exceptions explain things a bit better.
Jack Jansen [Tue, 18 Aug 1998 14:35:56 +0000 (14:35 +0000)]
I give in (after all these years): renaming config.c to macconfig.c to forestall
the continuous name conflicts which cause the wrong config.c to be found.
Barry Warsaw [Tue, 18 Aug 1998 02:00:44 +0000 (02:00 +0000)]
(imenu-example--create-python-index-engine): Fix nesting breakage when
a method definition has args that span multiple lines; be sure to go
to the beginning of the method definition -- but watch out for the
match-data!
Jeremy Hylton [Thu, 13 Aug 1998 23:13:52 +0000 (23:13 +0000)]
Enter Jim Fulton's latest version. He writes:
I had to make a slight diddle to work with Python 1.4, which
we and some of our customers are still using. :(
I've also made a few minor enhancements:
- You can now both get and set the memo using a 'memo'
attribute. This is handy for certain advanced applications
that we have.
- Added a 'binary' attribute to get and set the binary
mode for a pickler.
- Added a somewhat experimental 'fast' attribute. When this
is set, objects are not placed in the memo during pickling.
This should lead to faster pickling and smaller pickles in
cases where:
o you *know* there are no circular references, and
o either you've:
- preloaded the memo with class information
by pickling classes in non-fast mode or by
manipilating the memo directly, or
Fred Drake [Thu, 13 Aug 1998 22:03:46 +0000 (22:03 +0000)]
Do the magic to use the new buttons (with shorter names!) instead of the old
ones. Get the <IMG> width & height right. New design for the navigation
bars, including the document title as well as the navigation links/buttons.
Jeremy Hylton [Thu, 13 Aug 1998 19:57:46 +0000 (19:57 +0000)]
Change interface to sendmail: if the destination address is a string
instead of a list, turn it into a list containing that string. This
avoids an apparently common newbie mistake -- passing in a single
string for the destination and have it treated as a sequence of
characters.
Guido van Rossum [Thu, 13 Aug 1998 16:44:44 +0000 (16:44 +0000)]
Better error messages when a sequence is indexed with a non-integer.
Previously, this said "unsubscriptable object"; in 1.5.1, the reverse
problem existed, where None[''] would complain about a non-integer
index. This fix does the right thing in all cases (for get, set and
del item).
Fred Drake [Wed, 12 Aug 1998 17:08:37 +0000 (17:08 +0000)]
Massive cleanup: Use Makefiles in subdirs properly, move most of the
detailed build rules to the subdirs. Allow pretty much every useful target
to be built directly from the top dir (no change in output location).
Fred Drake [Wed, 12 Aug 1998 17:06:03 +0000 (17:06 +0000)]
Re-written to actually perform the conversion instead of using a sub-make
with the parent Makefile. Will also force the auxillary files to be
created if they need to be.
Fred Drake [Wed, 12 Aug 1998 16:16:49 +0000 (16:16 +0000)]
New makefile which only contains the source dependencies specific to each
document. The main Makefile will only contain rules and "system" dependencies.
Jeremy Hylton [Tue, 11 Aug 1998 19:52:51 +0000 (19:52 +0000)]
Two fixes to find_class:
1. Only DECREF the class's module when the module is retrieved via
PyImport_Import. If it is retrieved from the modules dictionary with
PyDict_GetItem, it is using a borrowed reference.
2. If the module doesn't define the desired class, raise the same
SystemError that pickle.py does instead of returning an AttributeError
(which is cryptic at best).
Also, fix the PyArg_ParseTuple in cpm_loads (the externally visible
loads) function: Use "S" instead of "O" because cStringIO will croak
with a "bad arguments to internal function" if passed anything other
than a string.
Fred Drake [Tue, 11 Aug 1998 18:52:33 +0000 (18:52 +0000)]
Ok, blank.pbm is free to go.
The rest of these are new or replaced. The buttons are now all the same
width. They have the transparency set right. They still need the attention
of a designer. But they work, and we have a real button for the Modules
Index.
Guido van Rossum [Tue, 11 Aug 1998 18:01:32 +0000 (18:01 +0000)]
Use repr() on the filename in EnvironmentError.__str__(). This
displays funny characters, like spaces or control characters, more
clearly (one of my pet peeves in error messages). Also only suppress
the filename if it is None; display it if it is '', since that would
be a genuine (illegal) filename passed in!