Jeremy Hylton [Thu, 10 Feb 2000 00:43:22 +0000 (00:43 +0000)]
add remove method to set
Greg Ward [Wed, 9 Feb 2000 02:20:14 +0000 (02:20 +0000)]
Added 'debug' option, and changed compile/link calls to use it.
Greg Ward [Wed, 9 Feb 2000 02:19:49 +0000 (02:19 +0000)]
Added 'debug' option (just there for 'build_ext' and 'build_lib' commands
to fallback to if the user doesn't set it for those commands.
Greg Ward [Wed, 9 Feb 2000 02:18:39 +0000 (02:18 +0000)]
Added 'debug' flags to compile and link methods, and added dummy code for
someone who knows Windows/MSVC++ to come along and add the right flags.
Comment noting that 'link_static_lib()' signature is inconsistent with
the other compiler classes (uh-oh!)
Greg Ward [Wed, 9 Feb 2000 02:17:00 +0000 (02:17 +0000)]
Added 'debug' flags to compile and link methods, and modified code to add
'-g' flag to compiler/linker command lines when it's true.
Greg Ward [Wed, 9 Feb 2000 02:16:14 +0000 (02:16 +0000)]
Added 'debug' flag to compile and link method signatures.
Doc fix: several paragraphs under 'link_static_lib()' moved to
'link_shared_lib()', where they belong.
Jeremy Hylton [Tue, 8 Feb 2000 21:15:48 +0000 (21:15 +0000)]
add optional verbose arg to walk function. it overrides the global
VERBOSE setting for the ASTVisitor
add getopt handling for one or more -v args
rename ForwardRef to StackRef, because it isn't necessarily directional
CodeGenerator:
* add assertStackEmpty method. prints warning if stack is not empty
when it should be
* define methods for AssName, UNARY_*, For
PythonVMCode:
* fix mix up between hasjrel and hasjabs for address calculation
Jeremy Hylton [Tue, 8 Feb 2000 21:06:19 +0000 (21:06 +0000)]
make all unary operators have a single child node called expr
Jeremy Hylton [Tue, 8 Feb 2000 19:58:33 +0000 (19:58 +0000)]
add spaces to comparison names is not and not in to match dis
Jeremy Hylton [Tue, 8 Feb 2000 19:01:29 +0000 (19:01 +0000)]
now produces valid pyc files for a least a trivial subset of the
language.
CodeGenerator:
* modify to track stack depth
* add emit method that call's PythonVMCode's makeCodeObject
* thread filenames through in hackish way
* set flags for code objects for modules and functions
XXX the docs for the flags seem out of date and/or incomplete
PythonVMCode:
* add doc string describing the elements of a real code object
LineAddrTable:
* creates an lnotab (no quite correctly though)
Jeremy Hylton [Tue, 8 Feb 2000 18:57:51 +0000 (18:57 +0000)]
constants from transformer
Jeremy Hylton [Tue, 8 Feb 2000 18:57:32 +0000 (18:57 +0000)]
move constants out of transformer so that they can be shared with ast
add varargs and kwargs attributes to Function nodes
Fred Drake [Tue, 8 Feb 2000 15:55:42 +0000 (15:55 +0000)]
get_config_h_filename(): Support NT as well as Posix systems.
_init_nt(): Use get_config_h_filename() instead of figuring out the
name directly.
g['SO'] should be set to '.pyd'.
Adjust some minor coding nits.
Greg Ward [Tue, 8 Feb 2000 02:39:44 +0000 (02:39 +0000)]
Revised version (thank to Thomas Heller and Robin Becker) that tries a lot
harder to find the MSVC compiler (mainly by using the registry).
Greg Ward [Tue, 8 Feb 2000 02:37:15 +0000 (02:37 +0000)]
Ditch .def file kludge for (much smaller) /export option kludge.
Fred Drake [Mon, 7 Feb 2000 17:19:41 +0000 (17:19 +0000)]
Protect against core dumps in gdbm: don't allow access by key once the
database is closed. Raise gdbm.error instead.
Bug report #198 submitted by Barry Haddow <bhaddow@orbism.com>.
Fred Drake [Mon, 7 Feb 2000 17:15:48 +0000 (17:15 +0000)]
Added test case for accessing gsbm database by key after it's closed;
it should raise gdbm.error.
Guido van Rossum [Mon, 7 Feb 2000 15:29:43 +0000 (15:29 +0000)]
Same patch (also by Mark Hammond) for this straggler project file as
for the other projects, to move the x86 project names back to what
they were.
Greg Ward [Sat, 5 Feb 2000 02:24:52 +0000 (02:24 +0000)]
Added 'libraries' option for use by the 'build_lib' command.
Typo fix.
Greg Ward [Sat, 5 Feb 2000 02:24:16 +0000 (02:24 +0000)]
Run the 'build_lib' command before building extensions, if necessary.
Greg Ward [Sat, 5 Feb 2000 02:23:59 +0000 (02:23 +0000)]
New command to build C (and C++, hopefully) libraries needed by extensions
in the current distribution: motivated by PIL's libImaging.
Greg Ward [Sat, 5 Feb 2000 02:23:16 +0000 (02:23 +0000)]
Tweaked various comments, docstrings, and error messages.
Fred Drake [Fri, 4 Feb 2000 20:33:49 +0000 (20:33 +0000)]
Patch from Paul Sokolovsky <Paul.Sokolovsky@technologist.com>:
Attached is patch (against 1.5.2 release) to allow some modules
to be buildable as pyd's (usual &PyType_Type stuff).
Jeremy Hylton [Fri, 4 Feb 2000 19:37:35 +0000 (19:37 +0000)]
rapid evolution towards producing real .pyc files (even though I don't
handle most of the language syntax yet)
create NestedCodeGenerator used to generator the separate code object
that needs to be passed as an argument to MAKE_FUNCTION when a def
stmt is found (probably useful for class too)
change CodeGenerator.visitFunction to use the NestedCG
add CompiledModule class to handle creation of .pyc (pretty minimal
for now)
add makeCodeObject method to PythonVMCode that replaces symbolic names
with indexes into slots of the code code. the design of this
class will probably need to be revised.
Guido van Rossum [Fri, 4 Feb 2000 17:47:55 +0000 (17:47 +0000)]
Added a simple test program to disassemble a file, invoked as __main__.
Guido van Rossum [Fri, 4 Feb 2000 15:39:30 +0000 (15:39 +0000)]
Actually, the previous batch's comment should have been different;
*this* set of patches is Ka-Ping's final sweep:
The attached patches update the standard library so that all modules
have docstrings beginning with one-line summaries.
A new docstring was added to formatter. The docstring for os.py
was updated to mention nt, os2, ce in addition to posix, dos, mac.
Guido van Rossum [Fri, 4 Feb 2000 15:28:42 +0000 (15:28 +0000)]
The third and final doc-string sweep by Ka-Ping Yee.
The attached patches update the standard library so that all modules
have docstrings beginning with one-line summaries.
A new docstring was added to formatter. The docstring for os.py
was updated to mention nt, os2, ce in addition to posix, dos, mac.
Guido van Rossum [Fri, 4 Feb 2000 15:10:34 +0000 (15:10 +0000)]
More trivial comment -> docstring transformations by Ka-Ping Yee,
who writes:
Here is batch 2, as a big collection of CVS context diffs.
Along with moving comments into docstrings, i've added a
couple of missing docstrings and attempted to make sure more
module docstrings begin with a one-line summary.
I did not add docstrings to the methods in profile.py for
fear of upsetting any careful optimizations there, though
i did move class documentation into class docstrings.
The convention i'm using is to leave credits/version/copyright
type of stuff in # comments, and move the rest of the descriptive
stuff about module usage into module docstrings. Hope this is
okay.
Jeremy Hylton [Fri, 4 Feb 2000 00:28:21 +0000 (00:28 +0000)]
checking in initial weekend's work
compile.py: ASTVisitor framework plus bits of a code generator that
should be bug-for-buf compatible with compile.c
misc.py: Set and Stack helpers
test.py: a bit of simple sample code that compile.py will work on
Jeremy Hylton [Fri, 4 Feb 2000 00:25:34 +0000 (00:25 +0000)]
make p2c a package
Jeremy Hylton [Fri, 4 Feb 2000 00:25:23 +0000 (00:25 +0000)]
three files from the p2c cvs tree. the message here indicates the
revision number the p2c cvs tree.
COPYRIGHT: 1.1
ast.py: 1.3
transformer.py: 1.11
Greg Ward [Thu, 3 Feb 2000 23:07:54 +0000 (23:07 +0000)]
Improved an error message.
Announce when we start building each extension (better feedback).
Greg Ward [Thu, 3 Feb 2000 23:07:19 +0000 (23:07 +0000)]
Changed 'compile()' method to compile files one-at-a-time -- gives better
feedback and, theoretically, the opportunity to set compiler flags
on a per-file basis.
Guido van Rossum [Thu, 3 Feb 2000 17:19:35 +0000 (17:19 +0000)]
Mark Hammond renames the x86 projects back to what they were named
before the patch by Trent Mick. Since he now also works for
ActiveState, I suppose he overrides Trent. :-)
Fred Drake [Thu, 3 Feb 2000 15:27:26 +0000 (15:27 +0000)]
The dircmp module is now obsolete.
Fred Drake [Thu, 3 Feb 2000 15:26:16 +0000 (15:26 +0000)]
These modules are now declared obsolete.
Guido van Rossum [Thu, 3 Feb 2000 13:50:24 +0000 (13:50 +0000)]
According to Harri Pasanen, the Solaris+gcc test for LINKFORSHARED
needed an adaptation for the latest gcc -- we need to grep stderr as
well as stdout for the magic string BFD. (Does anybody know what BFD
means?)
Guido van Rossum [Thu, 3 Feb 2000 13:42:50 +0000 (13:42 +0000)]
According to Harri Pasanen, the Solaris+gcc test for LINKFORSHARED
needed an adaptation for the latest gcc -- we need to grep stderr as
well as stdout for the magic string BFD. (Does anybody know what BFD
means?)
Guido van Rossum [Thu, 3 Feb 2000 00:41:22 +0000 (00:41 +0000)]
# module filecmp
# combo of old cmp, cmpcache and dircmp with redundancies removed
#
# bugs fixed:
# dircmp.dircmp was not ignoring IGNORES
# old stuff could falsely report files as "identical" when contents actually differed
#
# enhancements:
# dircmp has a more straightforward interface
#cmp enhanced by Moshe Zadca
#dircmp enhanced byGordon McMillan
[some layout changes by GvR]
Guido van Rossum [Wed, 2 Feb 2000 16:57:32 +0000 (16:57 +0000)]
In _fileobject, optimize read() a bit (it could be really slow), and
remove "import string" -- use string methods instead!
Guido van Rossum [Wed, 2 Feb 2000 16:54:39 +0000 (16:54 +0000)]
Optimize abspath() slightly for the case that win32api can't be
imported; in that case, abspath is replaced by a fallback version.
Guido van Rossum [Wed, 2 Feb 2000 16:51:06 +0000 (16:51 +0000)]
Make read() and readlines() conform more to the file object interface:
the default arg for read() is -1, not None, and readlines() has an
optional argument (which for now is ignored).
Guido van Rossum [Wed, 2 Feb 2000 15:10:15 +0000 (15:10 +0000)]
Mass patch by Ka-Ping Yee:
1. Comments at the beginning of the module, before
functions, and before classes have been turned
into docstrings.
2. Tabs are normalized to four spaces.
Also, removed the "remove" function from dircmp.py, which reimplements
list.remove() (it must have been very old).
Greg Ward [Wed, 2 Feb 2000 00:07:14 +0000 (00:07 +0000)]
Patch from Joe Van Andel: fix arg to % operator in warning.
Greg Ward [Wed, 2 Feb 2000 00:05:14 +0000 (00:05 +0000)]
Comment fix.
Always use normalized (with os.path.normpath()) versions of prefix and
exec_prefix.
Guido van Rossum [Tue, 1 Feb 2000 23:36:55 +0000 (23:36 +0000)]
Sjoerd Mullender writes:
Fixed a TypeError: not enough arguments; expected 4, got 3.
When authentication is needed, the default http_error_401 method calls
retry_http_basic_auth. The default version of that method expected a
data argument which wasn't provided, so now we provide the argument if
it was given and we also made the data argument optional.
Also changed other calls where data was optional to not pass data if
it was not passed to the calling method (in line with other similar
occurances).
Fred Drake [Tue, 1 Feb 2000 20:12:39 +0000 (20:12 +0000)]
Added docstring to crypt.crypt() based on the documentation.
Guido van Rossum [Mon, 31 Jan 2000 18:41:26 +0000 (18:41 +0000)]
The initialization of posix_putenv_garbage should only be done when it
is defined...
Greg Ward [Sun, 30 Jan 2000 20:22:27 +0000 (20:22 +0000)]
Allow either README or README.txt as a "standard file".
Greg Ward [Sun, 30 Jan 2000 19:57:48 +0000 (19:57 +0000)]
Fixed broken list extend in 'copy_tree()'.
Greg Ward [Sun, 30 Jan 2000 18:34:15 +0000 (18:34 +0000)]
Added 'description' class attribute to every command class (to help the
'--help-commands' option).
Shuffled imports around in a few command modules to avoid expensive
up-front import of sysconfig (and resulting delays in generating list
of all commands).
Greg Ward [Sun, 30 Jan 2000 18:31:34 +0000 (18:31 +0000)]
Added 'dist' command.
Greg Ward [Sun, 30 Jan 2000 18:30:32 +0000 (18:30 +0000)]
Improvements to the help system:
* "--help" can now come either before or after particular commands
to get help on and can give help on multiple commands, eg.
"--help install dist" gives help on those two commands
* added "--help-commands" option, implemented by the 'print_commands()'
and 'print_command_list()' methods
Greg Ward [Sun, 30 Jan 2000 15:07:56 +0000 (15:07 +0000)]
Added missing run of corresponding 'build' command.
Jack Jansen [Mon, 24 Jan 2000 10:37:59 +0000 (10:37 +0000)]
Big oops: macfs has always been using a private exception but calling it mac.error.
It now uses MacOS.Error (the OSErr valued error) and advertises that too. This
fix shouldn't break anything, I guess.
Jack Jansen [Mon, 24 Jan 2000 10:21:07 +0000 (10:21 +0000)]
Hmm, the project wasn't a 5.3 file, despite the log msg. Now it is.
Jack Jansen [Mon, 24 Jan 2000 10:15:59 +0000 (10:15 +0000)]
Build the Nav module too.
Jack Jansen [Mon, 24 Jan 2000 09:56:06 +0000 (09:56 +0000)]
If there's an error in an fsspec argument raise MacOS.Error, not ValueError.
Guido van Rossum [Fri, 21 Jan 2000 00:03:42 +0000 (00:03 +0000)]
Trent Mick: Setup PC configuration so that MSDEV chooses the x86
release project config as the default.
Fred Drake [Thu, 20 Jan 2000 22:51:14 +0000 (22:51 +0000)]
Don't insert extra indentation before <title> elements.
Guido van Rossum [Thu, 20 Jan 2000 22:32:56 +0000 (22:32 +0000)]
The rest of the changes by Trent Mick and Dale Nagata for warning-free
compilation on NT Alpha. Mostly added casts etc.
Guido van Rossum [Thu, 20 Jan 2000 21:37:19 +0000 (21:37 +0000)]
Fix some broken links.
Guido van Rossum [Thu, 20 Jan 2000 21:31:41 +0000 (21:31 +0000)]
Changes by Trent Mick (of ActiveState) and Dale Nagata to support
building for NT Alpha as well as NT x86.
Guido van Rossum [Thu, 20 Jan 2000 20:49:28 +0000 (20:49 +0000)]
Two patches from Jack Jansen:
Three bgen mods:
- support for FSSpecs passed-by-value and points-passed-by-reference added.
- strip single-line comments when parsing header files
- if a definition is blacklisted _do_ output it, but in comment
Jeremy Hylton [Thu, 20 Jan 2000 18:19:08 +0000 (18:19 +0000)]
EXPERIMENTAL
An extensible library for opening URLs using a variety protocols.
Intended as a replacement for urllib.
Guido van Rossum [Wed, 19 Jan 2000 21:57:30 +0000 (21:57 +0000)]
Change two occurrences of type(x) <> types.CodeType into
isinstance(x, types.CodeType).
Suggested by Finn Bock.
Jack Jansen [Tue, 18 Jan 2000 13:36:02 +0000 (13:36 +0000)]
Made all textfields in message and question boxes minimal height and invisible, and use AutoSizeDialog() and ShowWindow() before doing interaction.
Greg Ward [Mon, 17 Jan 2000 21:58:07 +0000 (21:58 +0000)]
Fix indentation bug.
Greg Ward [Mon, 17 Jan 2000 21:57:55 +0000 (21:57 +0000)]
Catch OSError from 'spawnv()' in '_spawn_nt()'.
Tweaked error messages in '_spawn_posix()'.
Greg Ward [Mon, 17 Jan 2000 21:57:17 +0000 (21:57 +0000)]
Removed /GD switch -- currently ignored by MSVC.
Greg Ward [Mon, 17 Jan 2000 20:40:48 +0000 (20:40 +0000)]
Added compiler flags suggested by Thomas Heller: optimize, use multi-threaded
RT library.
Greg Ward [Mon, 17 Jan 2000 20:23:34 +0000 (20:23 +0000)]
Added missing import.
Fixed 'make_release_tree()' to copy files if 'os.link()' doesn't exist.
Greg Ward [Mon, 17 Jan 2000 18:04:04 +0000 (18:04 +0000)]
Added code to use Jim Ahlstrom's zipfile.py module if the external zip
command wasn't found or failed. (Code supplied by Thomas Heller
<thomas.heller@ion-tof.com>.)
Greg Ward [Mon, 17 Jan 2000 18:00:04 +0000 (18:00 +0000)]
Fix library filename methods -- there is no 'lib' prefix under DOS/Windows.
Greg Ward [Mon, 17 Jan 2000 16:25:59 +0000 (16:25 +0000)]
Always run sys.prefix and sys.exec_prefix through 'os.path.normpath()'
before storing or using.
Greg Ward [Mon, 17 Jan 2000 16:25:17 +0000 (16:25 +0000)]
Ditch unneeded imports.
Guido van Rossum [Mon, 17 Jan 2000 14:11:04 +0000 (14:11 +0000)]
Fix by Nick Russo in processing of timezone in test program; the
ParsedDate didn't have the correct day of week.
Guido van Rossum [Fri, 14 Jan 2000 16:33:09 +0000 (16:33 +0000)]
According to Ron Bickers, and with apparent approval of Chris
Herborth, the code in list2set() that sets max unconditionally to 0
should not be used on BeOS. So be it. Anybody using BeOS, please
test!
Jack Jansen [Thu, 13 Jan 2000 16:26:35 +0000 (16:26 +0000)]
- Actually _implemented_ SetFolder()
- Fixed StandardPutFile: prompt, default
- Check explicitly for userCanceledErr, pass other Nav.error exceptions through.
Jack Jansen [Thu, 13 Jan 2000 16:24:32 +0000 (16:24 +0000)]
Handling of defaultLocation argument was wrong, causing a crash when used. Fixed.
Jack Jansen [Thu, 13 Jan 2000 16:23:39 +0000 (16:23 +0000)]
List objects obtained through as_List(resource) are not auto-disposed upon
Python object freeing.
Jack Jansen [Thu, 13 Jan 2000 16:22:12 +0000 (16:22 +0000)]
Get/set sys.path initializer in new appearance way.
Guido van Rossum [Wed, 12 Jan 2000 22:45:54 +0000 (22:45 +0000)]
Fix a bug in exec_statement() noted incidentally by Tim Peters in
PR#175 -- when exec is passed a code object, it didn't sync the locals
from the dictionary back into their fast representation.
Also took the time to remove some repetitive code there and to do the
syncing even when an exception is raised (since a partial effect
should still be synced).
Guido van Rossum [Wed, 12 Jan 2000 16:38:20 +0000 (16:38 +0000)]
The functions asctime() and mktime() are documented to take a 9-tuple
only. Through some mysterious interaction, they would take 9 separate
arguments as well. This misfeature is now disabled (to end a
difference with JPython).
Guido van Rossum [Wed, 12 Jan 2000 16:28:58 +0000 (16:28 +0000)]
On Linux, one sometimes sees spurious errors after interrupting
previous output. Call clearerr() to prevent past errors affecting our
ferror() test later, in PyObject_Print(). Suggested by Marc Lemburg.
Greg Ward [Sun, 9 Jan 2000 22:48:59 +0000 (22:48 +0000)]
'newer_group()' can now deal with missing files, in a way specified by
the 'missing' parameter.
Greg Ward [Sun, 9 Jan 2000 22:47:53 +0000 (22:47 +0000)]
Abstracted '_fix_link_args()' out of 'link_shared_object()'.
Added 'link_static_lib()' method, and 'archiver' and 'archiver_options'
class attributes to support it.
Added 'link_executable()' method, and 'ld_exec' instance attribute
to support it.
'newer_group()' is now able to handle missing files, so we don't have
to kludge it by catching OSError when calling it.
'object_filenames()' and 'shared_object_filename()' now take 'keep_dir'
flag parameters.
'library_filename()' and 'shared_library_filename()' now respect
a directory component in the library name.
Various comment updates/deletions.
Greg Ward [Sun, 9 Jan 2000 22:41:02 +0000 (22:41 +0000)]
Removed a bunch of irrelevant parameters from 'link_static_lib()' signature.
Added 'link_executable()' signature.
Greg Ward [Sun, 9 Jan 2000 22:39:32 +0000 (22:39 +0000)]
Typo fix: 'file.warn' should have been 'manifest.warn' in a couple of places.
Jack Jansen [Fri, 7 Jan 2000 14:55:40 +0000 (14:55 +0000)]
Two constants were missing.
Jack Jansen [Fri, 7 Jan 2000 14:53:31 +0000 (14:53 +0000)]
Added initializer routine optionally to be used as PEF fragment initialization routine, which allows us to get at our own resource fork even if some shared library init routine opens other resource files.
Guido van Rossum [Mon, 3 Jan 2000 15:44:40 +0000 (15:44 +0000)]
The correct RFC to reference is RFC-1521 (MIME part one), not 1421 (PEM).
Greg Stein [Mon, 3 Jan 2000 02:38:29 +0000 (02:38 +0000)]
redesign/rebuild around the ImportManager concept.
Jack Jansen [Sat, 1 Jan 2000 23:20:39 +0000 (23:20 +0000)]
CW Pro 5.3 projects.
Fred Drake [Thu, 30 Dec 1999 18:05:43 +0000 (18:05 +0000)]
setup_confname_table(): Use size_t instead of int for an index when
building the dicts used to inform the user about the defined
constants when using the *conf*() APIs.
Thanks to Mark Hammond <mhammond@skippinet.com.au>.
Jack Jansen [Wed, 29 Dec 1999 12:37:22 +0000 (12:37 +0000)]
Nasty error: handle parameters are passed by _address_ to SetControlData.
Jack Jansen [Wed, 29 Dec 1999 12:33:52 +0000 (12:33 +0000)]
Renamed USE_MAC_DYNAMIC_LOADING to HAVE_DYNAMIC_LOADING
Jack Jansen [Fri, 24 Dec 1999 13:41:31 +0000 (13:41 +0000)]
Modified for new dll import source organisation by Greg.
Jack Jansen [Fri, 24 Dec 1999 13:39:23 +0000 (13:39 +0000)]
Modified for appearance.
Jack Jansen [Thu, 23 Dec 1999 23:06:07 +0000 (23:06 +0000)]
Oops, forgot & in ParseTuple argument in ControlGetDataHandle.