]> granicus.if.org Git - python/log
python
23 years agoDon't make even the _slightest_ modification between test and checkin,
Jack Jansen [Thu, 23 Aug 2001 13:25:59 +0000 (13:25 +0000)]
Don't make even the _slightest_ modification between test and checkin,
or you will break something:-)

23 years agoThe MacOS module may be available on Mac OS X, but it doesn't have a SchedParams...
Jack Jansen [Thu, 23 Aug 2001 13:18:10 +0000 (13:18 +0000)]
The MacOS module may be available on Mac OS X, but it doesn't have a SchedParams() method, and there's no need to call it anyway.

23 years agoTurn OverflowWarning into an error locally, in order to make the
Guido van Rossum [Thu, 23 Aug 2001 03:23:03 +0000 (03:23 +0000)]
Turn OverflowWarning into an error locally, in order to make the
OverflowError test succeed.

23 years agoIgnore OverflowWarning by default. To enable the warning, use
Guido van Rossum [Thu, 23 Aug 2001 03:07:42 +0000 (03:07 +0000)]
Ignore OverflowWarning by default.  To enable the warning, use

python -Wdefault

or

python -Wdefault::OverflowWarning

23 years agoChange all case where we used to raise OverflowError to issue a
Guido van Rossum [Thu, 23 Aug 2001 02:59:04 +0000 (02:59 +0000)]
Change all case where we used to raise OverflowError to issue a
warning and then redo the operation using long ints.

23 years agoWhen an inlined operation on two small ints causes overflow, don't
Guido van Rossum [Thu, 23 Aug 2001 02:58:07 +0000 (02:58 +0000)]
When an inlined operation on two small ints causes overflow, don't
raise the exception here -- call the generic function (which may
convert the arguments to long and try again).

23 years agoIntroduce OverflowWarning -- to be issued when short int operations
Guido van Rossum [Thu, 23 Aug 2001 02:56:07 +0000 (02:56 +0000)]
Introduce OverflowWarning -- to be issued when short int operations
are overflowing and a long int operation is substituted.

23 years agoAdd pynche's top-level txt files to Windows installer -- I don't believe
Tim Peters [Wed, 22 Aug 2001 22:18:31 +0000 (22:18 +0000)]
Add pynche's top-level txt files to Windows installer -- I don't believe
we've *ever* installed them!

23 years ago"The usual" post-release fiddling.
Tim Peters [Wed, 22 Aug 2001 21:36:50 +0000 (21:36 +0000)]
"The usual" post-release fiddling.

23 years agoAdd an item about Tim's new installer. This didn't make it into the
Barry Warsaw [Wed, 22 Aug 2001 20:26:56 +0000 (20:26 +0000)]
Add an item about Tim's new installer.  This didn't make it into the
2.2a2 release, but it's still worth mentioning.

23 years agoMerge changes from r22a2-branch back into trunk. Also, change patch
Barry Warsaw [Wed, 22 Aug 2001 19:24:42 +0000 (19:24 +0000)]
Merge changes from r22a2-branch back into trunk.  Also, change patch
level to 2.2a2+

23 years agoindicate that mktime is platform-dependent. See SF bug 434143.
Skip Montanaro [Wed, 22 Aug 2001 12:44:27 +0000 (12:44 +0000)]
indicate that mktime is platform-dependent.  See SF bug 434143.

23 years agoindicate that the years for which the calendar function will work are
Skip Montanaro [Wed, 22 Aug 2001 12:43:38 +0000 (12:43 +0000)]
indicate that the years for which the calendar function will work are
platform dependent.  See SF bug 434143.

23 years agomake the gettmarg error message more correct by making it more vague ;-)
Skip Montanaro [Wed, 22 Aug 2001 12:39:16 +0000 (12:39 +0000)]
make the gettmarg error message more correct by making it more vague ;-)
see SF bug 434143, part of which this addresses

23 years agoMore NEWS for 2.2a2.
Barry Warsaw [Wed, 22 Aug 2001 04:08:41 +0000 (04:08 +0000)]
More NEWS for 2.2a2.

23 years agoAdded a note about --enable-framework on Mac OS X.
Jack Jansen [Tue, 21 Aug 2001 19:28:20 +0000 (19:28 +0000)]
Added a note about --enable-framework on Mac OS X.

23 years agoThese long dead files somehow got revived. Killed them (but for how
Jack Jansen [Tue, 21 Aug 2001 10:51:47 +0000 (10:51 +0000)]
These long dead files somehow got revived. Killed them (but for how
long? :-).

23 years agoThis file has been dead for aeons. I have no idea how it suddenly
Jack Jansen [Tue, 21 Aug 2001 10:49:11 +0000 (10:49 +0000)]
This file has been dead for aeons. I have no idea how it suddenly
surfaced again.

23 years agoEnhancements:
Ka-Ping Yee [Tue, 21 Aug 2001 06:53:01 +0000 (06:53 +0000)]
Enhancements:
- file URL now starts with "file://" (standard) rather than "file:"
- new optional argument 'context' to enable()
- repeated variable names don't have their values shown twice
- dotted attributes are shown; missing attributes handled reasonably
- highlight the whole logical line even if it has multiple physical lines
- use nice generator interface to tokenize
- formatting fixed so that it looks good in lynx, links, and w3m too

23 years agoThis is supposed to help configure better sort out the various libdb
Skip Montanaro [Tue, 21 Aug 2001 04:23:21 +0000 (04:23 +0000)]
This is supposed to help configure better sort out the various libdb
incarnations.  It's probably not quite sufficient, but should be better than
the status quo...

23 years agoA test of SSL support, using a roundabout method suggested by Guido.
Barry Warsaw [Mon, 20 Aug 2001 22:39:42 +0000 (22:39 +0000)]
A test of SSL support, using a roundabout method suggested by Guido.
However, this is only enabled with regrtest's --use=network switch.

23 years agoUse test_support.requires() to decide whether additional largefile
Barry Warsaw [Mon, 20 Aug 2001 22:37:34 +0000 (22:37 +0000)]
Use test_support.requires() to decide whether additional largefile
tests should be run.

23 years agoRemoved --have-resources flag in favor of the more granular -u/--use
Barry Warsaw [Mon, 20 Aug 2001 22:33:46 +0000 (22:33 +0000)]
Removed --have-resources flag in favor of the more granular -u/--use
flag, which specifies external or resource intensive tests to
perform.  This is used by test_largefile and test_socket_ssl.

-u/--use takes a comma separated list of flags, currently supported:
largefile, network.

usage(): New function.  Note that the semantics of main() have changed
    slightly; instead of returning an error code, it raises a
    SystemExit (via sys.exit()) with the given error code.

main(): use_large_resources => use_resources
    Also, added support for long-option alternative to the short
    options.

_expectations: Added test_socket_ssl to the list of expectedly skipped
    tests.

23 years agouse_large_resources => use_resources
Barry Warsaw [Mon, 20 Aug 2001 22:29:23 +0000 (22:29 +0000)]
use_large_resources => use_resources

requires(): New function which can be used to `assert' that a specific
    -u/--use resource flag is present.  Raises a TestSkipped if not.
    This is used in test_largefile and test_socket_ssl to enable
    external or resource consumptive tests that are normally
    disabled.

23 years agoSSL_dealloc(): Apply the change suggested in SF bug #425370 which
Barry Warsaw [Mon, 20 Aug 2001 22:26:24 +0000 (22:26 +0000)]
SSL_dealloc(): Apply the change suggested in SF bug #425370 which
    changes the order of the free calls to be the reverse of the alloc
    calls.  Closes that bug.

23 years agoWhitespace normalization.
Tim Peters [Mon, 20 Aug 2001 21:48:00 +0000 (21:48 +0000)]
Whitespace normalization.

23 years agoTest failed because these was no expected-output file, but always printed
Tim Peters [Mon, 20 Aug 2001 21:45:19 +0000 (21:45 +0000)]
Test failed because these was no expected-output file, but always printed
to stdout.  Repaired by not printing at all except in verbose mode.

Made the test about 6x faster -- envelope analysis showed it took time
proportional to the square of the # of tasks.  Now it's linear.

23 years agoNew \grammartoken markup, similar to \token but allowed everywhere.
Fred Drake [Mon, 20 Aug 2001 21:36:38 +0000 (21:36 +0000)]
New \grammartoken markup, similar to \token but allowed everywhere.

23 years agoAdd another name.
Fred Drake [Mon, 20 Aug 2001 21:33:41 +0000 (21:33 +0000)]
Add another name.

23 years agoDeal more appropriately with bare ampersands and pointy brackets; this
Fred Drake [Mon, 20 Aug 2001 21:24:19 +0000 (21:24 +0000)]
Deal more appropriately with bare ampersands and pointy brackets; this
module has to deal with "class" HTML-as-deployed as well as XHTML, so we
cannot be as strict as XHTML allows.

This closes SF bug #453059, but uses a different fix than suggested in
the bug comments.

23 years agoAdd test case to cover multiple future statements on separate lines of
Jeremy Hylton [Mon, 20 Aug 2001 21:18:56 +0000 (21:18 +0000)]
Add test case to cover multiple future statements on separate lines of
a module.

23 years agoFix SF bug [ #450245 ] Error in parsing future stmts
Jeremy Hylton [Mon, 20 Aug 2001 20:33:42 +0000 (20:33 +0000)]
Fix SF bug [ #450245 ] Error in parsing future stmts

Add test case to cover multiple future statements on separate lines of
a module.

23 years agoFix SF bug [ #450245 ] Error in parsing future stmts
Jeremy Hylton [Mon, 20 Aug 2001 20:32:33 +0000 (20:32 +0000)]
Fix SF bug [ #450245 ] Error in parsing future stmts

Check return value from future_parse() in for loop for file_input to
accomodate multiple future statements on separate lines.

Add several comments explaining how the code works.

Remove out-dated XXX comment.

23 years agoCommitting and closing SF patch #403671 by Finn Bock to help Jython
Barry Warsaw [Mon, 20 Aug 2001 20:29:07 +0000 (20:29 +0000)]
Committing and closing SF patch #403671 by Finn Bock to help Jython
pass these tests.

23 years agoadd a few test cases for threading module.
Skip Montanaro [Mon, 20 Aug 2001 20:28:48 +0000 (20:28 +0000)]
add a few test cases for threading module.

23 years agoAdded new BoundedSemaphore class. Closes bug 452836.
Skip Montanaro [Mon, 20 Aug 2001 20:27:58 +0000 (20:27 +0000)]
Added new BoundedSemaphore class.  Closes bug 452836.

23 years agoSilence warnings during test_os
Jeremy Hylton [Mon, 20 Aug 2001 20:10:01 +0000 (20:10 +0000)]
Silence warnings during test_os

23 years agoSplit "Extending & Embedding" into separate files, one per chapter.
Fred Drake [Mon, 20 Aug 2001 19:30:29 +0000 (19:30 +0000)]
Split "Extending & Embedding" into separate files, one per chapter.

23 years agoIt will always be a string, because it is created just before this call.
Jeremy Hylton [Mon, 20 Aug 2001 19:06:36 +0000 (19:06 +0000)]
It will always be a string, because it is created just before this call.

23 years agoAdded documentation for BoundedSemaphore(), contributed by Skip Montanaro.
Fred Drake [Mon, 20 Aug 2001 18:49:00 +0000 (18:49 +0000)]
Added documentation for BoundedSemaphore(), contributed by Skip Montanaro.
This closes SF patch #452836.

23 years agoDocument PyTuple_GET_SIZE(), removing confusing sentence from PyDict_Copy()
Fred Drake [Mon, 20 Aug 2001 16:48:59 +0000 (16:48 +0000)]
Document PyTuple_GET_SIZE(), removing confusing sentence from PyDict_Copy()
description.

This fixes SF bug #453111.

23 years agoOops, these compatibility modules were missing. Which went unnoticed because their...
Jack Jansen [Mon, 20 Aug 2001 15:35:57 +0000 (15:35 +0000)]
Oops, these compatibility modules were missing. Which went unnoticed because their companions had been put in the wrong place.

23 years agoVarious toolbox modules were generated in lib-dynload accidentally
Jack Jansen [Mon, 20 Aug 2001 15:31:56 +0000 (15:31 +0000)]
Various toolbox modules were generated in lib-dynload accidentally
in stead of in Carbon. Fixed.

23 years agoClean up some argument profiles, enrich the docstring.
Eric S. Raymond [Mon, 20 Aug 2001 13:16:30 +0000 (13:16 +0000)]
Clean up some argument profiles, enrich the docstring.

23 years agoOops, this file shouldn't have been removed.
Jack Jansen [Mon, 20 Aug 2001 10:20:27 +0000 (10:20 +0000)]
Oops, this file shouldn't have been removed.

23 years agoThe destination folder is now :Lib:lib-dynload
Jack Jansen [Sun, 19 Aug 2001 22:32:57 +0000 (22:32 +0000)]
The destination folder is now :Lib:lib-dynload

23 years agoPATCHLEVEL is outdated, use PY_VERSION.
Jack Jansen [Sun, 19 Aug 2001 22:32:27 +0000 (22:32 +0000)]
PATCHLEVEL is outdated, use PY_VERSION.

23 years agoStep 1 in packaging the toolbox modules and making MacPython more
Jack Jansen [Sun, 19 Aug 2001 22:30:31 +0000 (22:30 +0000)]
Step 1 in packaging the toolbox modules and making MacPython more
like normal Python. toolbox modules are now in the Carbon package
in :Mac:Lib, with a workaround flat namespace in :Mac:Lib:lib-compat.
Other dynamic modules are in :Lib:lib-dynload. :Mac:Lib:lib-toolbox and
:Mac:Plugins are gone.

23 years agoDynamic modules are now put in :Lib:lib-dynload by default. For the toolbox modules...
Jack Jansen [Sun, 19 Aug 2001 22:29:57 +0000 (22:29 +0000)]
Dynamic modules are now put in :Lib:lib-dynload by default. For the toolbox modules this is overridden to put them in :Mac:Lib:Carbon.

23 years agoCompatibility modules. lib-compat is on the default sys.path for MacPython 2.2, and...
Jack Jansen [Sun, 19 Aug 2001 22:28:32 +0000 (22:28 +0000)]
Compatibility modules. lib-compat is on the default sys.path for MacPython 2.2, and each of these modules imports * from its namesake in the Carbon package.

23 years agoMoved to either :Mac:Lib (WASTEconst and files that weren't generated) or to the...
Jack Jansen [Sun, 19 Aug 2001 22:20:55 +0000 (22:20 +0000)]
Moved to either :Mac:Lib (WASTEconst and files that weren't generated) or to the Carbon package.

23 years agoThe modules with toolbox constants.
Jack Jansen [Sun, 19 Aug 2001 22:13:00 +0000 (22:13 +0000)]
The modules with toolbox constants.

23 years agoCarbon is now a package encapsulating all the toolbox modules. Carbon is not
Jack Jansen [Sun, 19 Aug 2001 22:07:59 +0000 (22:07 +0000)]
Carbon is now a package encapsulating all the toolbox modules. Carbon is not
the best of names right now (because QuickTime, for instance, is part of
its own framekwork in OSX terminology, and because all these modules also
work on pre-Carbon MacOS) but in a year or so it will be:-).

23 years agoMoved here form lib-toolbox, for lack of a better place to go.
Jack Jansen [Sun, 19 Aug 2001 22:05:33 +0000 (22:05 +0000)]
Moved here form lib-toolbox, for lack of a better place to go.

23 years agoMoved here from lib-toolbox, where they should never have been in the first place...
Jack Jansen [Sun, 19 Aug 2001 22:05:06 +0000 (22:05 +0000)]
Moved here from lib-toolbox, where they should never have been in the first place (all the other stuff there wa generated with bgen).

23 years agoStep 1 in packaging the toolbox modules and making MacPython more
Jack Jansen [Sun, 19 Aug 2001 22:02:56 +0000 (22:02 +0000)]
Step 1 in packaging the toolbox modules and making MacPython more
like normal Python. toolbox modules are now in the Carbon package
in :Mac:Lib, with a workaround flat namespace in :Mac:Lib:lib-compat.
Other dynamic modules are in :Lib:lib-dynload. :Mac:Lib:lib-toolbox and
:Mac:Plugins are gone.

23 years agoTemporarily disabled the import hook. It breaks with the package-based
Jack Jansen [Sun, 19 Aug 2001 22:00:20 +0000 (22:00 +0000)]
Temporarily disabled the import hook. It breaks with the package-based
Carbon and its workaround.

23 years agoRemoved NEXT-NOTES, the NeXT is no longer supported.
Jack Jansen [Sun, 19 Aug 2001 21:18:04 +0000 (21:18 +0000)]
Removed NEXT-NOTES, the NeXT is no longer supported.

23 years agoRemoved NeXT notes (replacing them with a line saying NeXT is no
Jack Jansen [Sun, 19 Aug 2001 21:17:03 +0000 (21:17 +0000)]
Removed NeXT notes (replacing them with a line saying NeXT is no
longer supported) and updated MacOSX notes.

23 years agoGot rid of all the plugin xml files: they are generated, and
Jack Jansen [Sun, 19 Aug 2001 20:28:39 +0000 (20:28 +0000)]
Got rid of all the plugin xml files: they are generated, and
they were only in the repository for people building MacPython from
CVS (the .cmp project files are in a MacPython source
distribution). The process to regenerate them is now easier (and
documented!) so these shouldn't be needed anymore.

And eventually they should all be built by setup.py anyway.

23 years agoof course I muffed it separating the notes code from the initial_value
Skip Montanaro [Sun, 19 Aug 2001 05:53:47 +0000 (05:53 +0000)]
of course I muffed it separating the notes code from the initial_value
code.  grrr...

23 years agoAvoid total dependency on the new module. This addresses the problem
Guido van Rossum [Sun, 19 Aug 2001 05:29:25 +0000 (05:29 +0000)]
Avoid total dependency on the new module.  This addresses the problem
reported by Greg Ball on python-dev.

23 years agoadd debug calls to self._note for the Semaphore class. This closes bug
Skip Montanaro [Sun, 19 Aug 2001 04:25:24 +0000 (04:25 +0000)]
add debug calls to self._note for the Semaphore class.  This closes bug
443614.  I will submit a new feature request and patch to threading.py and
libthreading.tex to address the bounded semaphore issue.

23 years agoImprove Windows time.clock() blurb; was missing return type and unit.
Tim Peters [Sun, 19 Aug 2001 01:38:03 +0000 (01:38 +0000)]
Improve Windows time.clock() blurb; was missing return type and unit.

23 years agoWindows fiddling for 2.2a2: bump build number; update copyright and
Tim Peters [Sun, 19 Aug 2001 00:56:28 +0000 (00:56 +0000)]
Windows fiddling for 2.2a2:  bump build number; update copyright and
company info in resource files; change installer strings to match.
This belongs in the release branch too, of course.

23 years agoSF patch #452239 by Gordon McMillan, to fix SF bug #451547.
Guido van Rossum [Sat, 18 Aug 2001 21:22:07 +0000 (21:22 +0000)]
SF patch #452239 by Gordon McMillan, to fix SF bug #451547.

   This patch attempts to do to cPickle what Guido did
   for pickle.py v 1.50. That is: save_global tries
   importing the module, and fetching the name from the
   module. If that fails, or the returned object is not
   the same one we started with, it raises a
   PicklingError. (All this so pickling a lambda will
   fail at save time, rather than load time).

23 years agoAdd dependencies for Python/thread.c on all of the header files that
Guido van Rossum [Sat, 18 Aug 2001 21:08:22 +0000 (21:08 +0000)]
Add dependencies for Python/thread.c on all of the header files that
it may depend on.  It's really annoying that thread.o doesn't get
rebuilt when the .h file is changed! :-)

The dependency is on *all* the Python/thread_*.h files -- that should
be sufficient and rarely cause unneeded recompilations.

23 years agoInspired by Greg Stein's proposed simplification of the _closesocket
Guido van Rossum [Sat, 18 Aug 2001 21:00:39 +0000 (21:00 +0000)]
Inspired by Greg Stein's proposed simplification of the _closesocket
class, I came up with an even simpler solution: raise the error in
__getattr__().

23 years agoExpose the CO_xxx flags via the "new" module (re-solving a problem "the
Tim Peters [Sat, 18 Aug 2001 20:18:49 +0000 (20:18 +0000)]
Expose the CO_xxx flags via the "new" module (re-solving a problem "the
right way").  Fiddle __future__.py to use them.

Jeremy's pyassem.py may also want to use them (by-hand duplication of
magic numbers is brittle), but leaving that to his judgment.

Beef up __future__'s test to verify the exported feature names appear
correct.

23 years agoadded warnings about security risk of using tmpnam and tempnam
Skip Montanaro [Sat, 18 Aug 2001 18:52:10 +0000 (18:52 +0000)]
added warnings about security risk of using tmpnam and tempnam

23 years agoFix SF bug #443600:
Guido van Rossum [Sat, 18 Aug 2001 17:43:36 +0000 (17:43 +0000)]
Fix SF bug #443600:

Change to get/set/del slice operations so that if the object doesn't
support slicing, *or* if either of the slice arguments is not an int
or long, we construct a slice object and call the get/set/del item
operation instead.  This makes it possible to design classes that
support slice arguments of non-integral types.

23 years agoFramework code for compilerlike scripts.
Eric S. Raymond [Sat, 18 Aug 2001 09:24:38 +0000 (09:24 +0000)]
Framework code for compilerlike scripts.

23 years agoResolve patch #449367.
Greg Stein [Sat, 18 Aug 2001 09:20:23 +0000 (09:20 +0000)]
Resolve patch #449367.

For the HTTPS class (when available), ensure that the x509 certificate data
gets passed through to the HTTPSConnection class. Create a new
HTTPS.__init__ to do this, and refactor the HTTP.__init__ into a new _setup
method for both init's to call.

Note: this is solved differently from the patch, which advocated a new
**x509 parameter on the base HTTPConnection class. But that would open
HTTPConnection to arbitrary (ignored) parameters, so was not as desirable.

23 years agoAdd some fairly important file extensions: bmp css doc mid midi mp2 mp3 xls.
Ka-Ping Yee [Sat, 18 Aug 2001 04:06:54 +0000 (04:06 +0000)]
Add some fairly important file extensions: bmp css doc mid midi mp2 mp3 xls.
Entries taken from the standard Debian mime.types file.

23 years agoInitial check-in of cgitb.
Ka-Ping Yee [Sat, 18 Aug 2001 04:04:50 +0000 (04:04 +0000)]
Initial check-in of cgitb.
A few enhancements are pending, but this should work reliably.

23 years agoWhen the socket is closed, don't just assign 0 to self._sock.
Guido van Rossum [Sat, 18 Aug 2001 01:23:20 +0000 (01:23 +0000)]
When the socket is closed, don't just assign 0 to self._sock.
This breaks software that excepts a socket.error but not an
AttributeError.

23 years agoAdd a little introductory text.
Jeremy Hylton [Sat, 18 Aug 2001 00:24:46 +0000 (00:24 +0000)]
Add a little introductory text.

Change several sections to subsections (part of the manual -> howto
transformation).

Flesh out discussion of assignment nodes (and delete statements).

Add an example of manipulating AST objects at a >>> prompt

23 years agoGenerate correct reprs for Mul, Add, etc.
Jeremy Hylton [Sat, 18 Aug 2001 00:14:37 +0000 (00:14 +0000)]
Generate correct reprs for Mul, Add, etc.

23 years agoTrack removal of doc string from Module().nodes[0]
Jeremy Hylton [Sat, 18 Aug 2001 00:07:46 +0000 (00:07 +0000)]
Track removal of doc string from Module().nodes[0]

23 years agoAdd Yield() node
Jeremy Hylton [Sat, 18 Aug 2001 00:07:14 +0000 (00:07 +0000)]
Add Yield() node

23 years agoRemove the horrid generators hack from doctest.py. This relies on a
Tim Peters [Sat, 18 Aug 2001 00:05:50 +0000 (00:05 +0000)]
Remove the horrid generators hack from doctest.py.  This relies on a
somewhat less horrid hack <wink>:  if a module does
    from __future__ import X
then the module dict D is left in a state such that (viewing X as a
string)
    D[X] is getattr(__future__, X)
So by examining D for all the names of future features, and making that
test for each, we can make a darned good guess as to which future-features
were imported by the module.  The appropriate flags are then sucked out
of the __future__ module, and passed on to compile()'s new optional
arguments (PEP 264).

Also gave doctest a meaningful __all__, removed the history of changes
(CVS serves that purpose now), and removed the __version__ vrbl (similarly;
before CVS, it was a reasonable clue, but not anymore).

23 years agoAdd Yield() statement handler
Jeremy Hylton [Sat, 18 Aug 2001 00:04:31 +0000 (00:04 +0000)]
Add Yield() statement handler

Fix Module() handler to avoid including the doc string in the AST

23 years agoFix for bug [#452230] future division isn't propagated.
Tim Peters [Fri, 17 Aug 2001 23:04:59 +0000 (23:04 +0000)]
Fix for bug [#452230] future division isn't propagated.
builtin_eval wasn't merging in the compiler flags from the current frame;
I suppose we never noticed this before because future division is the
first future-feature that can affect expressions (nested_scopes and
generators had only statement-level effects).

23 years agoThe OSX framework Headers symlink pointed the wrong way. Fixed.
Jack Jansen [Fri, 17 Aug 2001 22:37:02 +0000 (22:37 +0000)]
The OSX framework Headers symlink pointed the wrong way. Fixed.
Bill Fancher found this one.

23 years agoA fiddled version of the rest of Michael Hudson's SF patch
Tim Peters [Fri, 17 Aug 2001 22:11:27 +0000 (22:11 +0000)]
A fiddled version of the rest of Michael Hudson's SF patch
    #449043 supporting __future__ in simulated shells
which implements PEP 264.

23 years agoUse raw-unicode-escape for the tests that require it.
Martin v. Löwis [Fri, 17 Aug 2001 22:08:34 +0000 (22:08 +0000)]
Use raw-unicode-escape for the tests that require it.

23 years agoAddress SF bug #442813. The sequence getitem wrappers should do
Guido van Rossum [Fri, 17 Aug 2001 21:57:47 +0000 (21:57 +0000)]
Address SF bug #442813.  The sequence getitem wrappers should do
interpretation of negative indices, since neither the sq_*item slots
nor the slot_ wrappers do this.  (Slices are a different story, there
the size wrapping is done too early.)

23 years agoAdd test for weak references.
Guido van Rossum [Fri, 17 Aug 2001 21:27:53 +0000 (21:27 +0000)]
Add test for weak references.

23 years agoAdd note on type/class unification.
Guido van Rossum [Fri, 17 Aug 2001 21:21:04 +0000 (21:21 +0000)]
Add note on type/class unification.

23 years agoceval, PyEval_MergeCompilerFlags: wasn't merging in the
Tim Peters [Fri, 17 Aug 2001 20:47:47 +0000 (20:47 +0000)]
ceval, PyEval_MergeCompilerFlags:  wasn't merging in the
CO_FUTURE_DIVISION flag.  Redid this to use Jeremy's PyCF_MASK #define
instead, so we dont have to remember to fiddle individual feature names
here again.

pythonrun.h:  Also #define a PyCF_MASK_OBSOLETE mask.  This isn't used
yet, but will be as part of the PEP 264 implementation (compile() mustn't
raise an error just because old code uses a flag name that's become
obsolete; a warning may be appropriate, but not an error; so compile() has
to know about obsolete flags too, but nobody is going to remember to
update compile() with individual obsolete flag names across releases either
-- i.e., this is the flip side of PyEval_MergeCompilerFlags's oversight).

23 years agoWeak reference support, closing SF bug #451773.
Guido van Rossum [Fri, 17 Aug 2001 20:32:36 +0000 (20:32 +0000)]
Weak reference support, closing SF bug #451773.

Classes that don't use __slots__ have a __weakref__ member added in
the same way as __dict__ is added (i.e. only if the base didn't
already have one).  Classes using __slots__ can enable weak
referenceability by adding '__weakref__' to the __slots__ list.

Renamed the __weaklistoffset__ class member to __weakrefoffset__ --
it's not always a list, it seems.  (Is tp_weaklistoffset a historical
misnomer, or do I misunderstand this?)

23 years agoDocument that uu.decode() will always raise a uu.Error if out_file
Barry Warsaw [Fri, 17 Aug 2001 20:01:06 +0000 (20:01 +0000)]
Document that uu.decode() will always raise a uu.Error if out_file
isn't given, and the file in the uu header already exists.  Also add a
description of the uu.Error exception class.

23 years agoTest that uu.py will not override an existing file if out_file isn't
Barry Warsaw [Fri, 17 Aug 2001 20:00:11 +0000 (20:00 +0000)]
Test that uu.py will not override an existing file if out_file isn't
given and the path is gleaned from the uu header.

23 years agodecode(): Raise a uu.Error if no out_file is given but the file
Barry Warsaw [Fri, 17 Aug 2001 19:59:34 +0000 (19:59 +0000)]
decode(): Raise a uu.Error if no out_file is given but the file
    specified in the uu header already exists.  No additional
    workaround is provided since out_file=pathname is a deprecated
    interface, so it is better to simply pass a file-like object into
    out_file anyway.  This closes SF bug #438083.

Use isinstance() tests instead of type comparisons.

23 years agoA self-contained piece of Michael Hudson's patch
Tim Peters [Fri, 17 Aug 2001 19:49:02 +0000 (19:49 +0000)]
A self-contained piece of Michael Hudson's patch
    #449043 supporting __future__ in simulated shells
in support of PEP 264.

Much has changed from the patch version:
+ Repaired bad hex constant for nested_scopes.
+ Defined symbolic CO_xxx names so global search will find these uses.
+ Made the exported list of feature names explicit, instead of abusing
  __all__ for this purpose (and redefined __all__ accordingly).
+ Added gross .compiler_flag verification to test___future__.py, and
  reworked it a little to make use of the newly exported explicit list
  of feature names.

23 years agoAddress SF #451547. The approach is a bit draconian: any object that
Guido van Rossum [Fri, 17 Aug 2001 18:49:52 +0000 (18:49 +0000)]
Address SF #451547.  The approach is a bit draconian: any object that
is pickled as a global must now exist by the name under which it is
pickled, otherwise the pickling fails.  Previously, such things would
fail on unpickling, or unpickle as the wrong global object.  I'm
hoping that this won't break existing code that is playing tricks with
this.

I need a volunteer to do this for cPickle too.

23 years agoPatch #445762: Support --disable-unicode
Martin v. Löwis [Fri, 17 Aug 2001 18:39:25 +0000 (18:39 +0000)]
Patch #445762: Support --disable-unicode
- Do not compile unicodeobject, unicodectype, and unicodedata if Unicode is disabled
- check for Py_USING_UNICODE in all places that use Unicode functions
- disables unicode literals, and the builtin functions
- add the types.StringTypes list
- remove Unicode literals from most tests.

23 years agoAnother contributor's patch got accepted.
Guido van Rossum [Fri, 17 Aug 2001 17:36:00 +0000 (17:36 +0000)]
Another contributor's patch got accepted.

23 years agoChange the 227 response parser to use a more liberal regular
Guido van Rossum [Fri, 17 Aug 2001 17:24:29 +0000 (17:24 +0000)]
Change the 227 response parser to use a more liberal regular
expression.  This is needed for certain servers that (in violation of
the standard) don't return the parentheses in the response.

This fixes SF bug #441712 by Henrik Weber (not exactly using his
patch).

23 years agoMake sure that ampersand escaping is still performed on the contents of
Fred Drake [Fri, 17 Aug 2001 17:20:44 +0000 (17:20 +0000)]
Make sure that ampersand escaping is still performed on the contents of
local module tables (the lists of modules documented within a chapter,
inserted at the beginning of the chapter).  If this is not done here,
the text is not part of the resulting documents when latex2html does the
processing normally.

This fixes a little bit more of SF bug #451556.