Fred Drake [Mon, 23 Dec 2002 19:03:00 +0000 (19:03 +0000)]
Add in the datetime docs now that they pass LaTeX. Still ugly, but that can
be fixed.
Fred Drake [Mon, 23 Dec 2002 18:58:06 +0000 (18:58 +0000)]
Lots of markup changes. This is still pretty sad, but passes LaTeX
and is mostly readable.
Fred Drake [Mon, 23 Dec 2002 18:52:19 +0000 (18:52 +0000)]
Move the examples of concrete tzinfo classes to a separate file, so the
verbatim environment does not bollux page breaking.
Tony Lownds [Mon, 23 Dec 2002 18:36:14 +0000 (18:36 +0000)]
Make this script execute using pythonw
Tony Lownds [Mon, 23 Dec 2002 18:12:41 +0000 (18:12 +0000)]
Revert to revision 1.3; Mac OS X has a platform specific startup script, macosx_main.py
Tony Lownds [Mon, 23 Dec 2002 18:11:28 +0000 (18:11 +0000)]
Move boolcheck to PyShell
Fred Drake [Mon, 23 Dec 2002 16:53:59 +0000 (16:53 +0000)]
Added docs for (draft) pkgutil module.
Guido van Rossum [Mon, 23 Dec 2002 16:51:42 +0000 (16:51 +0000)]
Oops. Roll back that last change. It wasn't ready for release. :-(
Tim Peters [Mon, 23 Dec 2002 16:50:58 +0000 (16:50 +0000)]
Don't rebind True and False.
Guido van Rossum [Mon, 23 Dec 2002 16:35:23 +0000 (16:35 +0000)]
Add warning for assignment to None, True and False. This is patch
549213 by Jeremy (checking in for him since he's away and busy).
Guido van Rossum [Mon, 23 Dec 2002 16:30:00 +0000 (16:30 +0000)]
Last week we discussed adding this module to the standard library.
Here's a draft. I have no immediate use for it, but I'd like this to
be available for experimentation. I may withdraw it or change it
radically up to and including the release of Python 2.3b1.
Tim Peters [Mon, 23 Dec 2002 16:17:39 +0000 (16:17 +0000)]
call_utc_tzinfo_method(): Got rid of the label and the gotos.
Andrew M. Kuchling [Mon, 23 Dec 2002 12:50:50 +0000 (12:50 +0000)]
Bump version number
Jack Jansen [Mon, 23 Dec 2002 11:25:49 +0000 (11:25 +0000)]
Got rid of Mac/Relnotes, and started on mac-specific release notes in NEWS.
Kurt B. Kaiser [Mon, 23 Dec 2002 03:35:27 +0000 (03:35 +0000)]
Alt-H was conflicting with the Help menu on Windows.
Let's try Alt-2....
Kurt B. Kaiser [Mon, 23 Dec 2002 03:31:49 +0000 (03:31 +0000)]
M MANIFEST.in
M PyShell.py
M idlever.py
M setup.py
1. Update MANIFEST.in to include all non-pure Python files
2. PyShell and idlever reflect Rev 0.9a0
3. setup.py modified to install IDLE as a collection of modules with
a .pth file living at the idlelib level in site-packages. This was
done to make it easier to run from the source directory prior to
installing IDLE. This approach may change back to the package
technique depending on what happens with the Mac installation
development.
Tim Peters [Sun, 22 Dec 2002 20:58:42 +0000 (20:58 +0000)]
I give up: unless I write my own strftime by hand, datetime just can't
be trusted with years before 1900, so now we raise ValueError if a date or
datetime or datetimetz .strftime() method is called with a year before
1900.
Tim Peters [Sun, 22 Dec 2002 20:34:46 +0000 (20:34 +0000)]
Python's strftime implementation does strange things with the year,
such that the datetime tests failed if the envar PYTHON2K was set.
This is an utter mess, and the datetime module's strftime functions
inherit it. I suspect that, regardless of the PYTHON2K setting, and
regardless of platform limitations, the datetime strftime wrappers
will end up delivering nonsense results (or bogus exceptions) for
any year before 1900. I should probably just refuse to accept years
earlier than that -- else we'll have to implement strftime() by hand.
Tim Peters [Sun, 22 Dec 2002 18:10:22 +0000 (18:10 +0000)]
classify_object(): Renamed more meaningfully, to classify_utcoffset().
Also changed logic so that instances of user-defined subclasses of date,
time, and datetime are called OFFSET_NAIVE instead of OFFSET_UNKNOWN.
Tim Peters [Sun, 22 Dec 2002 03:43:39 +0000 (03:43 +0000)]
Implemented a Wiki suggestion:
{timetz,datetimetz}.{utcoffset,dst}() now return a timedelta (or None)
instead of an int (or None).
tzinfo.{utcoffset,dst)() can now return a timedelta (or an int, or None).
Curiously, this was much easier to do in the C implementation than in the
Python implementation (which lives in the Zope3 code tree) -- the C code
already had lots of hair to extract C ints from offset objects, and used
C ints internally.
Kurt B. Kaiser [Sun, 22 Dec 2002 01:48:28 +0000 (01:48 +0000)]
Add configuration for packaging.
Kurt B. Kaiser [Sat, 21 Dec 2002 21:39:11 +0000 (21:39 +0000)]
When IDLE is installed and run from a startup script, the script's
directory becomes sys.path[0]. What is wanted is the directory from which
IDLE was called.
Insert the current working directory in the path if it isn't there
already.
Kurt B. Kaiser [Sat, 21 Dec 2002 21:03:06 +0000 (21:03 +0000)]
M PyShell.py
M idle
M setup.py
To be able to run from the source directory or from an installed version
of IDLE, and also to allow the subprocess to find run(), Python needs to
have the idlelib package on its path.
1. Modify setup.py to supply a .pth file living at same level as idlelib
2. Move boolcheck to PyShell.py
3. Remove boolcheck and path setting code from the "idle" script
Martin v. Löwis [Sat, 21 Dec 2002 18:34:06 +0000 (18:34 +0000)]
Use wcscoll for _locale.strcoll if available.
Tim Peters [Sat, 21 Dec 2002 17:44:07 +0000 (17:44 +0000)]
Added test to ensure that non-string result from dst() raises TypeError.
Tim Peters [Sat, 21 Dec 2002 05:04:42 +0000 (05:04 +0000)]
Changes sufficient so that pickles written by the Python implementation
can be read by the C implementation. I don't really understand this.
Kurt B. Kaiser [Fri, 20 Dec 2002 22:40:30 +0000 (22:40 +0000)]
Update the setup file:
1. Make it easier to change the package and script installation names.
2. Update the text files transferred to include the .def and new .txt
files.
3. Update the description and long description, change email to
python-dev, update the url to point at sourceforge.
4. Rename the build and install classes for clarity.
Thomas Heller [Fri, 20 Dec 2002 20:13:35 +0000 (20:13 +0000)]
Fix an error message in the _winreg module. The error message referred
to a constant in the 'win32con' module, but this constant is also
defined in the _winreg module itself.
Bugfix candidate.
Kurt B. Kaiser [Fri, 20 Dec 2002 19:37:09 +0000 (19:37 +0000)]
Remove debugging statement checked in by accident, ah, carelessness.
Kurt B. Kaiser [Fri, 20 Dec 2002 17:18:03 +0000 (17:18 +0000)]
"'foo' in str" not implemented in Python 2.2, only single character lookup
Tim Peters [Fri, 20 Dec 2002 17:15:39 +0000 (17:15 +0000)]
Fixed longstanding bug in the description of strftime's %W code.
Tony Lownds [Fri, 20 Dec 2002 04:26:00 +0000 (04:26 +0000)]
*** empty log message ***
Tony Lownds [Fri, 20 Dec 2002 04:24:43 +0000 (04:24 +0000)]
Update way a subprocess is launched for Mac OS X.
Another applet mechanism has been developed for Python on Mac OS X and
trying to use the -c "__import__('run').main()" trick is just not working.
macosx_main.py is a new file which should be used as the startup file for
Mac OS X applet bundles. This startup file understands a -p option, which
when seen will start run.main(). When running as an applet, this seems like
the best approach.
Guido van Rossum [Fri, 20 Dec 2002 01:54:21 +0000 (01:54 +0000)]
Fix what I believe is a bug: when removing all previous handlers,
should copy the handlers list because it's being modified by the loop.
Tim Peters [Fri, 20 Dec 2002 01:31:27 +0000 (01:31 +0000)]
format_utcoffset(): The natural type of the buflen arg is size_t, so
used that.
wrap_strftime(): Removed the most irritating uses of buf.
TestDate.test_ordinal_conversions(): The C implementation is fast enough
that we can afford to check the endpoints of every year. Also added
tm_yday tests at the endpoints.
Kurt B. Kaiser [Fri, 20 Dec 2002 01:22:01 +0000 (01:22 +0000)]
Panel Bar on the Bottom is Probably More Common
Kurt B. Kaiser [Fri, 20 Dec 2002 01:19:47 +0000 (01:19 +0000)]
Updated.
Jack Jansen [Thu, 19 Dec 2002 23:34:40 +0000 (23:34 +0000)]
Always use self->ob_type->tp_free when freeing an object.
Jack Jansen [Thu, 19 Dec 2002 23:27:58 +0000 (23:27 +0000)]
The extension module macfs has been replaced by a pure Python version.
Jack Jansen [Thu, 19 Dec 2002 23:26:58 +0000 (23:26 +0000)]
Added the last missing bits of functionality, and fixed a nasty bug where we
could overwrite memory.
Jack Jansen [Thu, 19 Dec 2002 23:26:07 +0000 (23:26 +0000)]
A replacement for the macfs extension module, implemented with normal
(generated) Carbon module functionality.
Not 100% complete yet, but at least the IDE doesn't crash on startup.
Jack Jansen [Thu, 19 Dec 2002 23:24:37 +0000 (23:24 +0000)]
Gone: the constants have been moved to macfs.py (which, upon import, also
poses as MACFS for backward compatibility).
Jack Jansen [Thu, 19 Dec 2002 21:24:35 +0000 (21:24 +0000)]
Regenerated with inheritance-aware xxxx_Check() macros.
Jack Jansen [Thu, 19 Dec 2002 20:37:32 +0000 (20:37 +0000)]
Always output an inheritance-aware version of the xxxx_Check() macro. Also
fixed that macro to actually work:-)
Martin v. Löwis [Thu, 19 Dec 2002 19:03:31 +0000 (19:03 +0000)]
Fix if-then-else-fi structure.
Neal Norwitz [Thu, 19 Dec 2002 18:16:57 +0000 (18:16 +0000)]
Fix bug introduced by SF patch #643835, Set Next Statement for Python debuggers
blockstack_top could be 0 when blockstack[blockstack_top-1]
was referenced (ie blockstack[-1]) which crashed on hpux.
Patch & fix by Richie Hindle
Martin v. Löwis [Thu, 19 Dec 2002 16:21:49 +0000 (16:21 +0000)]
Unsupport --without-universal-newlines.
Neal Norwitz [Thu, 19 Dec 2002 15:24:11 +0000 (15:24 +0000)]
Update/correct comment
Neal Norwitz [Thu, 19 Dec 2002 15:12:26 +0000 (15:12 +0000)]
Provide mechanism to deprecate functions, types, and struct members.
It would be nice to support other compilers besides gcc.
Kurt B. Kaiser [Thu, 19 Dec 2002 03:25:34 +0000 (03:25 +0000)]
If Edit window has not been saved, offer to save if user tries to Run or
Check the module.
Neal Norwitz [Thu, 19 Dec 2002 02:30:56 +0000 (02:30 +0000)]
Fix another long vs int mismatch. test_datetime now passes on alpha
Tim Peters [Thu, 19 Dec 2002 01:44:38 +0000 (01:44 +0000)]
Fixed typo in string.
Neal Norwitz [Thu, 19 Dec 2002 00:42:03 +0000 (00:42 +0000)]
Fix crash on alphas due to mismatch between 'l' format and int variables.
Neal Norwitz [Wed, 18 Dec 2002 23:33:35 +0000 (23:33 +0000)]
Undefine MIN and MAX before defining
Some systems (HPUX at least) already define MIN/MAX for us
Neal Norwitz [Wed, 18 Dec 2002 23:20:39 +0000 (23:20 +0000)]
SF # 654974, fix unchecked return values in structseq
Check return values after memory allocation.
Also use Py_True instead of PyInt_FromLong(1) for bool value.
Backport candidate.
Jack Jansen [Wed, 18 Dec 2002 23:17:26 +0000 (23:17 +0000)]
- Added rawdata initializers
- Added support for optional FSSpecs and FSRefs to the Alias routines.
NewAlias and friends are still functions, though, not methods.
Tim Peters [Wed, 18 Dec 2002 20:19:21 +0000 (20:19 +0000)]
delta_str(): Purged last uses of sprintf (in favor of PyOS_snprintf).
Raymond Hettinger [Wed, 18 Dec 2002 16:13:16 +0000 (16:13 +0000)]
Expand log() tests to include long integers.
Andrew M. Kuchling [Wed, 18 Dec 2002 14:59:11 +0000 (14:59 +0000)]
Check in current, unfinished, draft of datetime docs
(Fred, don't bother to add to lib.tex or to proofread this yet.)
Fred Drake [Wed, 18 Dec 2002 02:07:14 +0000 (02:07 +0000)]
Fix some small markup nits.
Neal Norwitz [Wed, 18 Dec 2002 01:20:29 +0000 (01:20 +0000)]
Fix typo spotted by Richie Hindle
Neal Norwitz [Wed, 18 Dec 2002 01:18:44 +0000 (01:18 +0000)]
SF # 654960, remove unnecessary static variable
The static variable (implicit) was not necessary.
The c_globals can be None or True now.
Jack Jansen [Tue, 17 Dec 2002 23:29:27 +0000 (23:29 +0000)]
Fixed silly typo.
Added comment (to myself) on what still needs to be done.
Jack Jansen [Tue, 17 Dec 2002 23:28:24 +0000 (23:28 +0000)]
This module will shortly replace the builtin module macfs. It is not
complete yet, but it should work. It will be finished (and renamed)
shortly.
Greg Ward [Tue, 17 Dec 2002 23:27:41 +0000 (23:27 +0000)]
Two more typo fixes.
Jack Jansen [Tue, 17 Dec 2002 22:22:57 +0000 (22:22 +0000)]
Include Finder.h too in the list of header files to parse: the finder
constants have tradiationally been in MACFS.py.
Jack Jansen [Tue, 17 Dec 2002 22:21:57 +0000 (22:21 +0000)]
This now contains constants from Files.h, Aliases.h and Finder.h.
Jack Jansen [Tue, 17 Dec 2002 22:10:46 +0000 (22:10 +0000)]
- Added as_pathname and as_tuple methods
- Added access to the "data" attribute
- Fixed the FSRef tp_init routine to accept pathnames on OSX
- Changed the FSSpec tp_repr to return something resembling what
macfs returns.
Jack Jansen [Tue, 17 Dec 2002 22:08:48 +0000 (22:08 +0000)]
Added an optional longname argument to Module, which gives the full,
externally visible name of the module. This is so that type names can be
shown as "Carbon.File.FSSpec" even though the real name of the module is
"_File".
Kurt B. Kaiser [Tue, 17 Dec 2002 21:16:12 +0000 (21:16 +0000)]
M ColorDelegator.py
M PyShell.py
M ScriptBinding.py
1. Update ScriptBinding.py to highlight a syntax error in the Edit window,
and place the cursor on the error. Add a syntax check to the
Run Script event instead of waiting until the script tries to run and
raises a syntax error in the shell, forcing the user to navigate back
to the Edit window to fix it.
2. Modify tag_config's appropriately in PyShell.py and ColorDelegator.py
3. Some minor clean-up in ScriptBinding.py
Jack Jansen [Tue, 17 Dec 2002 20:57:24 +0000 (20:57 +0000)]
"time_second" is apparently a #define on MacOSX. Renamed the (static)
routine to py_time_second.
Andrew M. Kuchling [Tue, 17 Dec 2002 18:59:51 +0000 (18:59 +0000)]
No point in warning about needing re module; remove helpful message
Andrew M. Kuchling [Tue, 17 Dec 2002 18:56:26 +0000 (18:56 +0000)]
Fix comment typo
Greg Ward [Tue, 17 Dec 2002 18:14:21 +0000 (18:14 +0000)]
Typo fix.
Gustavo Niemeyer [Tue, 17 Dec 2002 17:48:00 +0000 (17:48 +0000)]
* Objects/fileobject.c
(file_read): Replaced assertion with mixed sign operation by a simple
comment (thank you Raymond). The algorithm is clear enough in that point.
Michael W. Hudson [Tue, 17 Dec 2002 16:47:17 +0000 (16:47 +0000)]
This is J. Lewis Muir's patch:
[ 629278 ] install lib-dynload .so files mode 555
fixing
[ 583206 ] lib-dynload/*.so wrong permissions
[ 425007 ] Python 2.1 installs shared libs with mode 0700
Phew.
Michael W. Hudson [Tue, 17 Dec 2002 16:15:34 +0000 (16:15 +0000)]
This is Richie Hindle's patch
[ 643835 ] Set Next Statement for Python debuggers
with a few tweaks by me: adding an unsigned or two, mentioning that
not all jumps are allowed in the doc for pdb, adding a NEWS item and
a note to whatsnew, and AuCTeX doing something cosmetic to libpdb.tex.
Neal Norwitz [Tue, 17 Dec 2002 01:56:47 +0000 (01:56 +0000)]
Update doc for getboolean() to match code (ie, returning True/False)
Convert remaining uses of 1/0 to True/False
Neal Norwitz [Tue, 17 Dec 2002 01:24:11 +0000 (01:24 +0000)]
Add markup for base parameter
Neal Norwitz [Tue, 17 Dec 2002 01:08:06 +0000 (01:08 +0000)]
Fix SF # 641111, Undocumented side effect of eval
Try to clear up confusion about the current globals being copied
into a globals dict passed to eval(). This wording (more or less)
was suggested in bug report. It should probably be made clearer.
Backport candidate.
Neal Norwitz [Tue, 17 Dec 2002 01:02:57 +0000 (01:02 +0000)]
Fix SF #642742, property() builtin not documented
Added doc for functions new to 2.2: classmethod property staticmethod super
Taken from docstrings. Could use review.
Hope there wasn't a reason why these shouldn't have been added.
Backport candidate.
Neal Norwitz [Tue, 17 Dec 2002 00:40:38 +0000 (00:40 +0000)]
Fix SF # 626275, missing DECREF's in embedding example
Tested w/valgrind, all paths except the return on PyInt_AsLong() failure
I think I got all of these right.
Backport candidate.
Kurt B. Kaiser [Mon, 16 Dec 2002 22:25:10 +0000 (22:25 +0000)]
In Shell:
1. If a tab is entered at the prompt, allow it to be backspaced away.
2. Eliminate the beep when hitting <enter> at the prompt.
Tim Peters [Mon, 16 Dec 2002 21:12:37 +0000 (21:12 +0000)]
Made this a little more compatible w/ the sandbox version, which is
still needed to test the Python implementatino.
Tim Peters [Mon, 16 Dec 2002 20:57:22 +0000 (20:57 +0000)]
Blurb about new datetime module.
Guido van Rossum [Mon, 16 Dec 2002 20:34:55 +0000 (20:34 +0000)]
Fix GCC warnings. It turns out two out of three pointed to real bugs!
Guido van Rossum [Mon, 16 Dec 2002 20:31:57 +0000 (20:31 +0000)]
Build the datetime module for *n*x.
Tim Peters [Mon, 16 Dec 2002 20:18:38 +0000 (20:18 +0000)]
datetime escapes the sandbox. The Windows build is all set. I leave it
to others to argue about how to build it on other platforms (on Windows
it's in its own DLL).
Gustavo Niemeyer [Mon, 16 Dec 2002 18:12:53 +0000 (18:12 +0000)]
Fixed bug
[#521782] unreliable file.read() error handling
* Objects/fileobject.c
(file_read): Clear errors before leaving the loop in all situations,
and also check if some data was read before exiting the loop with an
EWOULDBLOCK exception.
* Doc/lib/libstdtypes.tex
* Objects/fileobject.c
Document that sometimes a read() operation can return less data than
what the user asked, if running in non-blocking mode.
* Misc/NEWS
Document the fix.
Gustavo Niemeyer [Mon, 16 Dec 2002 14:09:22 +0000 (14:09 +0000)]
Use "dictionary literals" instead of "dictionaries", as suggested by Just.
Gustavo Niemeyer [Mon, 16 Dec 2002 13:54:02 +0000 (13:54 +0000)]
Fixing bug
[#448679] Left to right
* Python/compile.c
(com_dictmaker): Reordered evaluation of dictionaries to follow strict
LTR evaluation.
* Lib/compiler/pycodegen.py
(CodeGenerator.visitDict): Reordered evaluation of dictionaries to
follow strict LTR evaluation.
* Doc/ref/ref5.tex
Documented the general LTR evaluation order idea.
* Misc/NEWS
Documented change in evaluation order of dictionaries.
Jack Jansen [Mon, 16 Dec 2002 13:16:25 +0000 (13:16 +0000)]
Got rid of old (non-carbon-ppc and even cfm68k) file extensions for
extension modules.
Gustavo Niemeyer [Mon, 16 Dec 2002 13:11:57 +0000 (13:11 +0000)]
Applying patch
[#636769] Fix for major rexec bugs
* Lib/rexec.py
(FileBase): Added 'xreadlines' and '__iter__' to allowed file methods.
(FileWrapper.__init__): Removed unnecessary self.f variable, which gave
direct access to the file object.
(RExec): Added 'xreadlines' and '_weakref' to allowed modules.
(RExec.r_open): Convert string subclasses to a real string classes
before doing comparisons with mode parameter.
* Lib/ihooks.py
(BasicModuleImporter.import_module/reload/unload): Convert the module
name to a real string before working with it.
(ModuleImporter.import_module/import_it/reload): Convert the module
name to a real strings before working with it.
* Misc/NEWS
Document the change.
Kurt B. Kaiser [Mon, 16 Dec 2002 02:07:11 +0000 (02:07 +0000)]
M EditorWindow.py
M PyShell.py
Idlefork SF Bug 440383 - IDLE goes into beep loop
Fix loop in EditorWindow.newline_and_indent_event() and
in addition fix submission of >>> prompt to PyParse.Parser
Eliminate extra attribute EditorWindow.auto_indent
Andrew M. Kuchling [Sun, 15 Dec 2002 20:17:38 +0000 (20:17 +0000)]
Rewrite to produce a complete sentence
Jack Jansen [Sun, 15 Dec 2002 19:55:07 +0000 (19:55 +0000)]
Combined alias and file into a single module. This is the only reasonable
way to get various alias creation routines as methods of FSSpec or FSRef
objects (which is the logical thing, from a Python POV). Also started on
the code that will contain all the macfs functionality, so macfs can
becode a Python module, to be used mainly for backward compatibility.
Just van Rossum [Sun, 15 Dec 2002 13:45:32 +0000 (13:45 +0000)]
Fixed potential crash: v can be NULL here, so use Py_XDECREF rather than Py_DECREF
Just van Rossum [Sun, 15 Dec 2002 13:14:22 +0000 (13:14 +0000)]
typo fix.
Raymond Hettinger [Sat, 14 Dec 2002 20:20:45 +0000 (20:20 +0000)]
Added missing markup.
Replaced British spelling of 'behaviour' with 'behavior'.
Noted the new optional argument in math.log(x [,base]).
Raymond Hettinger [Sat, 14 Dec 2002 19:51:34 +0000 (19:51 +0000)]
Apply SF patch 652930: Add optional base argument to math.log(x[, base]).