Commit Graph

8448 Commits

Author SHA1 Message Date
Greg Ward 29a1deff3a Test script changed. 2003-05-29 01:29:28 +00:00
Greg Ward 4f12d4652d Renamed test_errors() to test_setparameters() and completely rewrote it
to test the new setparameters() interface.

Modified play_sound_file() to print the elapsed time taken to play the
test sample (to the nearest 0.1 sec).
2003-05-29 01:27:39 +00:00
Greg Ward 080c110172 Order and number of arguments to setparameters() has changed.
Rename 'a' (the audio device) to 'dsp' everywhere.
2003-05-29 00:23:17 +00:00
Jack Jansen b789a060ee - Added a scheme whereby pimp can update itself, by importing a module
pimp_update if it exists. Upped the version number to indicate this.
  Fixes #731626.
- Added -V (print version) and -u (specify database URL) options when run
  as a command line tool.
2003-05-28 18:56:30 +00:00
Raymond Hettinger e8b0f0461b * Beefed-up tests
* Allow tuple re-use
* Call tp_iternext directly
2003-05-28 14:05:34 +00:00
Gregory P. Smith bc6e94a0fa Wrap the cursor functions with dbutils.DeadlockWrap to deal with the
expected DBLockDeadLockErrors.
2003-05-28 08:26:43 +00:00
Kurt B. Kaiser 62df044885 Added a config-main General option to delete sys.exitfunc. The default
is not to do that.  VPython and student environment support.

M PyShell.py
M config-main.def
M run.py
2003-05-28 01:47:46 +00:00
Jeremy Hylton 893801efb6 Add more tests from RFC 2202. 2003-05-27 16:16:41 +00:00
Raymond Hettinger 68dcd34c0a Fixup bare try/except. 2003-05-27 06:30:52 +00:00
Kurt B. Kaiser 8d1f11b0ef Whitespace Normalization
Modified Files:	PyShell.py ScriptBinding.py buildapp.py
2003-05-26 22:20:34 +00:00
Kurt B. Kaiser 053916959a 1. SF Bug 661676
The default font is not highlighted in the Options dialog when
   IDLEfork is first installed.

2. Reduce default font to 10 pt and increase default window height to give
   a better initial impression on Windows.

M config-main.def
M configDialog.py
2003-05-26 20:35:53 +00:00
Neal Norwitz 54f871e193 Fix SF bug #735694, Pydoc.py fixes links
Modified the patch some.  Fixed invalid link in UNICODE (to STRING).
Also updates some references.
2003-05-26 13:49:54 +00:00
Kurt B. Kaiser 6c638b6755 Bruce Sherwood RFE/Patch
SF 661318

Adds autosave capability to IDLE and IDLE configuration dialog.

User can Run/F5 without explicit save dialog.

The default is to require the user to confirm the save.

M ScriptBinding.py
M config-main.def
M configDialog.py
2003-05-26 06:23:10 +00:00
Jack Jansen 8ba0e80117 Added a --python option, which sets the python to be used in the #! line
in the bootstrap script of the applet.
2003-05-25 22:00:17 +00:00
Tim Peters 50d8b8b6ae Fleshed out WeakKeyDictionary.__delitem__ NEWS to cover issues raised on
Python-Dev.  Fixed typos in test comments.  Added some trivial new test
guts to show the parallelism (now) among __delitem__, __setitem__ and
__getitem__ wrt error conditions.

Still a bugfix candidate for 2.2.3 final, but waiting for Fred to get a
chance to chime in.
2003-05-25 17:44:31 +00:00
Tim Peters 886128f4f8 SF 742860: WeakKeyDictionary __delitem__ uses iterkeys
Someone review this, please!  Final releases are getting close, Fred
(the weakref guy) won't be around until Tuesday, and the pre-patch
code can indeed raise spurious RuntimeErrors in the presence of
threads or mutating comparison functions.

See the bug report for my confusions:  I can't see any reason for why
__delitem__ iterated over the keys.  The new one-liner implementation
is much faster, can't raise RuntimeError, and should be better-behaved
in all respects wrt threads.

New tests test_weak_keyed_bad_delitem and
test_weak_keyed_cascading_deletes fail before this patch.

Bugfix candidate for 2.2.3 too, if someone else agrees with this patch.
2003-05-25 01:45:11 +00:00
Kurt B. Kaiser 6f80594229 Improved the RESTART annotation in the shell window when the user
restarts the shell while it is generating output.  Also improved
annotation when user repeatedly hammers the Ctrl-F6 restart.
2003-05-24 21:12:46 +00:00
Kurt B. Kaiser 36364be3bf Fix a bug in Rev 1.10 - Windows can't handle a leading ':' if the
user's PYTHONPATH is empty (though Linux can).
Modified Files:
	idle idle.py idle.pyw
2003-05-24 21:01:39 +00:00
Kurt B. Kaiser 67fd0ea46d 1. Stake Freddy.
e.g. further improve subprocess interrupt, exceptions, and termination.
2. Remove the workarounds in PyShell.py and ScriptBinding.py involving
   interrupting the subprocess prior to killing it, not necessary anymore.
3. Fix a bug introduced at PyShell Rev 1.66: was getting extra shell menu
   every time the shell window was recreated.

M PyShell.py
M ScriptBinding.py
M rpc.py
M run.py
2003-05-24 20:59:15 +00:00
Tim Peters e87568dd9a SF bug 705231: Assertion failed, python aborts.
float_pow():  Don't let the platform pow() raise -1.0 to an integer power
anymore; at least glibc gets it wrong in some cases.  Note that
math.pow() will continue to deliver wrong (but platform-native) results
in such cases.
2003-05-24 20:18:24 +00:00
Raymond Hettinger b98154e424 'sum' is no longer a good variable name. Use 'total' instead. 2003-05-24 17:26:02 +00:00
Martin v. Löwis 5489597f56 Convert tcl_version to str before comparing. Fixes #729317. 2003-05-24 11:37:15 +00:00
Raymond Hettinger 4ec4fa208e iteritems() should not have been used for self.timeout which changes during the loop. 2003-05-23 08:51:51 +00:00
Walter Dörwald 8891021229 Port test_mimetools.py to PyUnit and add various tests.
From SF patch #736962.
2003-05-22 17:32:40 +00:00
Andrew M. Kuchling b1f8bab654 [Bug #741171] pdb crashes when enabling a non-existing breakpoint
Check the supplied breakpoint number more carefully.
(Incompatibility: before this patch, "enable -1" would enable
the last breakpoint on the list; now -1 is not a legal ID.  Not sure
anyone would ever use negative indices...)

2.2 bugfix candidate, assuming making -1 illegal isn't considered a problem.
2003-05-22 14:46:12 +00:00
Neal Norwitz 35c6cd0905 Walter's last checkin also needs to work on doubles.
* Move new test_byteswap into FPTest.
 * Remove extra lines at end of file.
2003-05-22 13:29:15 +00:00
Walter Dörwald cf99b0afb6 test_byteswap() fails on alphas, because treating the byte swapped bit
patterns as floats/doubles results in floating point exceptions.

Fix this by implementing a separate test_byteswap() for the floating
point tests. This new test compares the tostring() values of both arrays
instead of the arrays themselves.

Discovered by Neal Norwitz.
2003-05-22 13:15:31 +00:00
Jeremy Hylton 4d508adae3 Fix for SF [ 734869 ] Lambda functions in list comprehensions
The compiler was reseting the list comprehension tmpname counter for each function, but the symtable was using the same counter for the entire module.  Repair by move tmpname into the symtable entry.

Bugfix candidate.
2003-05-21 17:34:50 +00:00
Barry Warsaw e960e22579 Added a test for the fix of SF bug #658233, where continuation lines
in .po metadata caused a crash.

Also, removed some unnecessary code.

Backport candidate.
2003-05-20 17:28:54 +00:00
Barry Warsaw 7de63f57c8 GNUTranslations._parse(): Fix SF bug #658233, where continuation lines
in .po metadata caused a crash.

Backport candidate.
2003-05-20 17:26:48 +00:00
Just van Rossum 5d6ad75d50 'Progress' doesn't exists, causing 'from EasyDialogs import *' to fail 2003-05-20 12:07:19 +00:00
Raymond Hettinger 092b2a97d2 SF 740055: optional argument protocol in shelve.open is ignored
* added the missing parameter
* put optional parameters in correct positional order
2003-05-20 05:15:55 +00:00
Raymond Hettinger 22952a3efc SF bug 735293: Command line timeit.py sets sys.path badly
Paul Moore's patch to have timeit.py check the current directory for
imports (instead of the directory for Lib/timeit.py).
2003-05-20 04:59:56 +00:00
Kurt B. Kaiser 88957d8d0d Fix race exposed by 2.4 GHz XP box: Don't tear down PyShell until
subprocess polling has terminated.  Tk callit gets unhappy if it can't
find the function 'after' scheduled to run.

M PyShell.py
2003-05-19 23:11:51 +00:00
Skip Montanaro 7789237331 * Correct Sniffer doc to correspond to the implementation.
* Add optional delimiters arg to Sniffer.sniff() which restricts the set of
  candidate field delimiters.
2003-05-19 15:33:36 +00:00
Kurt B. Kaiser c626658a28 Let Python inform the user what went wrong with the import.
Modified Files:
 	idle idle.py idle.pyw
2003-05-19 02:07:44 +00:00
Martin v. Löwis 9a3a9f7791 Consider \U-escapes in raw-unicode-escape. Fixes #444514. 2003-05-18 12:31:09 +00:00
Walter Dörwald 9e46abed50 Fix array.array.insert(), so that it treats negative indices as
being relative to the end of the array, just like list.insert() does.
This closes SF bug #739313.
2003-05-18 03:15:10 +00:00
Brett Cannon df0d87a922 To be on the safe side, backed out any questionable iteritem changes and set back to item calls. 2003-05-18 02:25:07 +00:00
Kurt B. Kaiser 476740142d Whitespace Normalization 2003-05-18 02:24:32 +00:00
Kurt B. Kaiser 282f122250 Whitespace Normalization
Modified Files:
 	config-extensions.def config-highlight.def config-keys.def
 	config-main.def
2003-05-18 02:21:55 +00:00
Walter Dörwald ba39d9c168 Add another error case to the insert test. 2003-05-18 01:56:25 +00:00
Walter Dörwald 7fd9424230 Port test_array and test_winsound to PyUnit. Enhance tests for array
(code coverage for Modules/arraymodule.c is at 91%)

From SF patch #736962.
2003-05-18 00:47:47 +00:00
Kurt B. Kaiser a2792bec1d Show Freddy the mirror
i.e. improve subprocess exit paths and exeception reporting
2003-05-17 21:04:10 +00:00
Raymond Hettinger 74e67661a6 User cStringIO instead of StringIO. 2003-05-17 20:44:12 +00:00
Brett Cannon c8b188a9e2 Revert some changes back to dict.items made in a previous patch. 2003-05-17 19:51:26 +00:00
Tim Peters b0c854d6a7 datetime.timedelta is now subclassable in Python. The new test shows
one good use:  a subclass adding a method to express the duration as
a number of hours (or minutes, or whatever else you want to add).  The
native breakdown into days+seconds+us is often clumsy.  Incidentally
moved a large chunk of object-initialization code closer to the top of
the file, to avoid worse forward-reference trickery.
2003-05-17 15:57:00 +00:00
Tony Lownds 108c40c74c Added icon for IDLE on OS X 2003-05-17 15:14:10 +00:00
Samuele Pedroni 72c5c77ce1 minor fix, jython-only. Don't asssume stdout to save is the ur-stdout. 2003-05-17 12:51:10 +00:00
Tim Peters a98924a063 datetime.datetime and datetime.time can now be subclassed in Python. Brr. 2003-05-17 05:55:19 +00:00
Kurt B. Kaiser 63af08aa93 Nigel Rowe's Patch
[ 735527 ] Re Bug [ 678325 ] ParenMatching Missing AutoIndent

AutoIndent was merged with EditorWindow, this patch corrects
the references in ParenMatch.
2003-05-17 03:51:57 +00:00
Kurt B. Kaiser a80d57c41d Noam Raphael's patch.
SF Patch 686254 "Run IDLEfork from any directory without set-up"

Allows IDLE to run when not installed and cwd is not the IDLE directory.

I took the liberty of moving it to the startup scripts since once IDLEfork
is again a part of Python it will be superfluous and I don't want it to
be forgotten.  But it is very useful for those using IDLEfork standalone!

M CREDITS.txt
M NEWS.txt
M idle
M idle.py
M idle.pyw
2003-05-17 03:15:48 +00:00
Skip Montanaro ab0053aa13 simpler temp dir cleanup 2003-05-17 02:54:11 +00:00
Samuele Pedroni de9a0d3158 beefed up version: jython support, covers now fixed differences between CPython/Jython. 2003-05-17 02:39:52 +00:00
Tim Peters eb1a496039 test_subclass_date(): Beefed this up, to check that new instance
attributes and methods work, that new arguments can be passed to the
constructor, and that inherited methods and attrs still work.  Added
XXX comments about what to do when datetime becomes usably subclassable
too (it's not yet).
2003-05-17 02:25:20 +00:00
Raymond Hettinger 1ba24b4fbb Include module name in doctest summary. 2003-05-17 01:59:57 +00:00
Raymond Hettinger 627728acbc Use test_support.run_doctest() 2003-05-17 01:08:35 +00:00
Raymond Hettinger 35b34bd326 Provide a clue that the doctests have run. 2003-05-17 00:58:33 +00:00
Raymond Hettinger 929f06c570 Minor cleanups. 2003-05-16 23:16:36 +00:00
Marc-André Lemburg 2820125935 Remove usage of re module from encodings package search function. 2003-05-16 17:07:51 +00:00
Tim Peters 813cec9a62 test_fileno(): Skip this test on Windows. 2003-05-16 15:35:10 +00:00
Guido van Rossum fa19f7c20d More fixes according to SF 549151:
- When redirecting, always use GET.  This is common practice and
  more-or-less sanctioned by the HTTP standard.

- Add a handler for 307 redirection, which becomes an error for POST,
  but a regular redirect for GET and HEAD.
2003-05-16 01:46:51 +00:00
Guido van Rossum 993bc3a708 Don't replace an empty line with "pass" when symbol == "eval", where
"pass" isn't valid syntax.  Reported by Samuele Pedroni on python-dev
(May 12, 2003).
2003-05-16 01:24:30 +00:00
Kurt B. Kaiser 11659ade1e 1. When a module is run from an EditorWindow, if its directory is not in
sys.path, prepend it.  This allows the module to import other modules
   in the same directory.  Do the same for a script run from the command
   line.
2. Tweak the IDLE usage message a bit more.

SF Bug 706860 (closed)
SF Patch 686254 (reject specific solution)
SF Patch 507327 (similar)

M PyShell.py
M ScriptBinding.py
2003-05-15 23:23:21 +00:00
Kurt B. Kaiser 8f570a768f 1. Add a command line switch to run without the subprocess
2. Remove the shell menu and associated bindings when running
   without the subprocess.
3. Update the IDLE Help and usage text.
4. Update display_port_binding_error to suggest using -n

M PyShell.py
M help.txt
2003-05-15 18:52:51 +00:00
Kurt B. Kaiser 5db4843c5e 1. Make the startup more robust by not spawning the subprocess if IDLE
can't acquire the port to listen on.
2. Shorten the retry and simplify the messages.
2003-05-15 03:40:51 +00:00
Kurt B. Kaiser 7f38ec0849 1. Restore the capability to run and debug without a subprocess.
2. Add an indicator to the shell startup notice when running w/o
   subprocess.
3. Improve exception reporting when running a command or script from the
   command line.
4. Clarify the fact that breakpoints set or cleared after a file is
   saved will revert to the saved state if the file is closed without
   re-saving.
5. If user tries to exit or restart when user code is running, interrupt
   the user code.  This helps to eliminate occasional hanging
   subprocesses on Windows (except for Freddy :).

M NEWS.txt
M PyShell.py
M ScriptBinding.py
2003-05-15 03:19:42 +00:00
Marc-André Lemburg f0b5d174c1 Restore Python 1.5.2 compatibility. 2003-05-14 19:48:57 +00:00
Kurt B. Kaiser aa6b856a42 On Windows the subprocess was not exiting during a restart.
This bug, henceforth designated Freddy, was due to the mistaken
elimination of the KeyboardInterrupt exception at the previous revision.
PyShell's unix_terminate hammer was masking the problem on Linux.  On W2K
the subprocess MainThread was trying to print the exception after the
SockThread had ceased to service the socket.  The subprocess would then
detach and spin when the GUI created the new subprocess.

Modified Files: run.py
2003-05-14 18:15:40 +00:00
Skip Montanaro d8f21203b0 defer re module imports to help improve interpreter startup 2003-05-14 17:33:53 +00:00
Fred Drake 9c43910a27 - add a dump_stats() method similar to that of the profile.Profile class
- don't use "file" as the name of local variables
2003-05-14 14:28:09 +00:00
Brett Cannon a71319eebb Fleshed out tests for urllib requiring a network connection. 2003-05-14 02:18:31 +00:00
Brett Cannon abe8eb0a30 Call time.tzset (if available) just before calculating possible timezones from time.tzname. 2003-05-13 20:28:15 +00:00
Guido van Rossum bf1bef820c Add optional 'onerror' argument to os.walk(), to control error
handling.
2003-05-13 18:01:19 +00:00
Tony Lownds 2398d578a3 1. The command-line arguments for subprocesses no longer need to be
specialized for Mac OS X.

2. buildapp.py - a new file for building an application icon for IDLE on Mac
OS X. See INSTALL.txt
2003-05-13 15:28:21 +00:00
Brett Cannon 065f7b8626 Fixed test_anydbm_creates to use proper paths for the created db.
Made some stylistic fixes.
2003-05-13 06:42:59 +00:00
Tim Peters c2659cff5d Whitespace normalization. 2003-05-12 20:19:37 +00:00
Tim Peters 0ff2ee0561 Effectively renamed tokenize_tests.py to have a txt extension instead.
This file isn't meant to be executed, it's data input for test_tokenize.py.
The problem with the .py extension is that it uses "non-standard"
indentation, and it's good to test that, but reindent.py keeps wanting
to fix it.  But fixing the indentation causes the expected-output file to
change, since exact line and column numbers are part of the
tokenize.tokenize() output getting tested.
2003-05-12 19:42:04 +00:00
Tim Peters 11cb813598 Close the file after tokenizing it. Because the open file object was
bound to a module global, the file object remained opened throughout
the test suite run.
2003-05-12 19:29:36 +00:00
Brett Cannon 24b2bc3654 Remove assert that checked if a parameter was an instance of Request. Closes patch #639139. 2003-05-12 07:31:53 +00:00
Brett Cannon 86503b131b Change Request.add_header to call string.capitalize in order to normalize
headers and not have any dependency on case.  Closes patch #649742.

Also changed all instances of dict.items to dict.iteritems where appropriate.
2003-05-12 07:29:42 +00:00
Kurt B. Kaiser 73414a2705 Update for SF 71033 and changes to subprocess threading 2003-05-12 03:04:59 +00:00
Kurt B. Kaiser 9ec454ec00 1. RemoteDebugger now runs user code in subprocess MainThread
2. run.py: move exception printing to toplevel to allow access from main()
3. Clarification in PyShell.py: when the subprocess is restarted, the
   debugger GUI is reused with a fresh instance of the subprocess
   debugger.

M PyShell.py
M RemoteDebugger.py
M run.py
2003-05-12 02:33:47 +00:00
Brett Cannon 172d9ef47e Beefed up timezone support. UTC and GMT are now always recognized timezones
with values of 0.  Also now check time.daylight to see if time.tzname[1]
should be used in timezone checking.
2003-05-11 06:23:36 +00:00
Martin v. Löwis a94568a753 Patch #734231: Update RiscOS support. In particular, correct
riscospath.extsep, and use os.extsep throughout.
2003-05-10 07:36:56 +00:00
Raymond Hettinger b7b4ce27f7 All two more modules with __all__. 2003-05-10 05:37:13 +00:00
Kurt B. Kaiser a053f33887 [ SF 710733 - Martin v. Loewis] Improving source encoding dialog
M IOBinding.py
M config-main.def
M configDialog.py
2003-05-10 00:49:56 +00:00
Kurt B. Kaiser 57bfe5dc5a 1. Update debugger to not trace RPC code even when calling Queue and
threading modules.  Can debug user code which imports these modules,
   though.
2. Re-enable debugger in PyShell.
3. Remove old code implementing previous approaches to this issue.

M Debugger.py
M PyShell.py
M rpc.py
2003-05-10 00:09:52 +00:00
Jeremy Hylton 93724dbd3d Replace line somehow deleted before last checkin. 2003-05-09 16:55:28 +00:00
Jeremy Hylton 9ddf6c3803 Variant of SF patch 614770: MSVC 7 support
distutils now looks for the compiler version in sys.version, falling
back to MSVC 6 if the version isn't listed (Python 2.2 and lower).
Add helper routines for reading the registry.  Refactor many
module functions into methods of the compiler to avoid passing
lots of state as arguments.
2003-05-09 16:06:42 +00:00
Kurt B. Kaiser a00050f209 1. Implement processing of user code in subprocess MainThread. Pass loop
is now interruptable on Windows.
2. Tweak signal.signal() wait parameters as called by various methods
   to improve I/O response, especially on Windows.
3. Debugger is disabled at this check-in pending further development.

M NEWS.txt
M PyShell.py
M rpc.py
M run.py
2003-05-08 20:26:55 +00:00
Barry Warsaw 362310df81 Bump version number 2003-05-08 03:34:58 +00:00
Barry Warsaw f8b3e1f76e A couple of new parsedate test cases. 2003-05-08 03:34:01 +00:00
Barry Warsaw b5dc39f02c parsedate_tz(): Be slightly more lenient when there's no day of the
week.  Patch given by Daniel Berlin in SF bug # 732761.  Also closes
SF bug # 727719.

Backport candidate.
2003-05-08 03:33:15 +00:00
Greg Ward 86e1790cad Clarify the dedent() example a bit by indenting the input lines unevenly. 2003-05-08 02:12:35 +00:00
Greg Ward 2557100b9e Minor clarification of dedent(). 2003-05-08 02:02:50 +00:00
Greg Ward 9e082f4eae Add DedentTestCase to test dedent() function. 2003-05-08 01:58:26 +00:00
Greg Ward 478cd48dee SF patch #598163 (Ville Vainio, vvainio@users.sourceforge.net):
add dedent() function, to remove indentation from multiline strings
(eg. triple-quoted strings).  Differs from inspect.getdoc() by not
special-casing the first line (often a sensible approach for
non-docstring multiline strings).  This should make this function more
general (symmetric 'indent' also possible), and more fitting for the
textwrap module.
2003-05-08 01:58:05 +00:00
Greg Ward 4656ed44ca Update to Optik 1.4.1+: adds __all__ (Optik SF bug #728563). 2003-05-08 01:38:52 +00:00
Raymond Hettinger 686b14d7ad SF bug #730296: Unexpected Changes in list Iterator
Reverted a Py2.3b1 change to iterator in subclasses of list and tuple.
They had been changed to use __getitem__ whenever it had been overriden
in the subclass.

This caused some usabilty and performance problems.  Also, it was
inconsistent with the rest of python where many container methods
access the underlying object directly without first checking for
an overridden getter.  Users needing a change in iterator behavior
should override it directly.
2003-05-07 01:28:47 +00:00
Greg Ward a409f7c491 SF #596434: tweak wordsep_re so the definition of an em-dash is
stricter: specifically, "--" must be preceded by a limited set of
characters, not by any non-whitespace character.
2003-05-07 01:20:58 +00:00
Greg Ward cc55cb9539 SF #596434: add test_funky_parens() to probe some more of the tricky
edge cases that David Goodger reported long ago (July 2002?).
2003-05-07 01:19:22 +00:00
Greg Ward 21820cd925 SF #726446: raise ValueError if width <= 0. 2003-05-07 00:55:35 +00:00
Greg Ward 49128575e8 SF #726446: ensure wrap() raises ValueError when width <= 0. 2003-05-07 00:54:42 +00:00
Skip Montanaro 02cd36580f detect old version 2 hash files and return "bsddb185" as the appropriate
module to load them
2003-05-06 20:42:10 +00:00
Skip Montanaro 6967f2c2e9 don't need to worry about file endianness 2003-05-06 20:37:56 +00:00
Skip Montanaro f0776d2992 Data file for bsddb185 test 2003-05-06 20:37:25 +00:00
Skip Montanaro 46f4e79aaf test case for bsddb185 module 2003-05-06 20:36:57 +00:00
Skip Montanaro 823ba28b0d the new bsddb185 module is an expected skip on most platforms (this may not
be needed - just being anal)
2003-05-06 20:36:24 +00:00
Skip Montanaro 1a56665e39 add not-yet-supported Unicode test just so it doesn't get lost. 2003-05-06 15:56:05 +00:00
Jack Jansen c7c78ae531 Allow for Version, Flavor and Download-URL not being set. 2003-05-06 13:07:32 +00:00
Jack Jansen 705553acab When doing a forced install of a package depending on a pseudo-package
you got a strange error message. Fixed.
2003-05-06 12:44:00 +00:00
Walter Dörwald 411e5a2c29 Port test_uu.py to PyUnit. From SF patch #662807. 2003-05-06 08:57:41 +00:00
Walter Dörwald ce6829ade0 On Mac OS X pwd.getpwall() might return the tuples
('pgsql', '*', 252, []) and ('postgres', '*', 252, ['skip']),
but pwd.getgrgid(252) might return ('pgsql', '', 252, ['skip']).

Drop the test that tried to find a tuple similar to the one
returned from pwd.getgrgid() among those for the same gid returned
by pwd.getgrall(), as the only working definition of 'similar' seems
to be 'has the same gid'. This check can be done more directly.

This should fix SF bug #732783.
2003-05-05 20:37:33 +00:00
Jeremy Hylton c1b2cb9d8f SF bug 622042: Don't expect response body from HEAD request.
Bug fix candidate.
2003-05-05 16:13:58 +00:00
Skip Montanaro 581c36773a typo 2003-05-05 14:16:41 +00:00
Jeremy Hylton 0389295dcd Better fix for newurl as suggested by Jim Jewett in SF bug #730963. 2003-05-05 04:09:13 +00:00
Jeremy Hylton f6b444ede4 Add comment explaining try/except for endheaders(). 2003-05-05 01:47:13 +00:00
Jeremy Hylton 828023b6b5 Repair redirect handling and raise URLError on host-not-found.
The latest changes to the redirect handler couldn't possibly have been
tested, because they did not compute a newurl and failed with a
NameError.  The __name__ == "__main__": block has a test for
redirects.

Also, fix SF bug 723831.  A urlopen() that failed because the host was
not found raised a socket.gaierror unlike earlier versions of
urllib2.  The problem is that httplib actually establishes the
connection at a different point starting with Python 2.2.  Move the
try/except to endheaders(), which is where the connection gets
established.
2003-05-04 23:44:49 +00:00
Brett Cannon f1cfb622e8 'forget' now also deletes any proper .pyo files.
Added some docstrings.
2003-05-04 21:15:27 +00:00
Tim Peters 015dd82136 Somewhere along the way, the softspace attr of file objects became read-
only.  Repaired, and added new tests to test_file.py.
2003-05-04 04:16:52 +00:00
Martin v. Löwis 4d28d96afb Refer to __builtin__.file, not __builtins__.file 2003-05-03 09:58:26 +00:00
Martin v. Löwis e59e2bab8f Patch #711902: Cause pydoc to show data descriptor __doc__ strings. 2003-05-03 09:09:02 +00:00
Raymond Hettinger 7c2bb5bc57 * Added a substantial number of edge case and argument tests for
the itertoolsmodule.
* Taught itertools.repeat(obj, n) to treat negative repeat counts as
  zero.  This behavior matches that for sequences and prevents
  infinite loops.
2003-05-03 05:59:48 +00:00
Raymond Hettinger 27922eef35 Apply the simplified test_support boilerplate. 2003-05-03 03:38:01 +00:00
Raymond Hettinger 320a1b0454 Simplify ref count test. 2003-05-02 22:44:59 +00:00
Raymond Hettinger 8fd3f871f3 Add StopIteration tests.
Simplify test_main().
2003-05-02 22:38:07 +00:00
Jack Jansen 4f45011af2 CWI moved websites around without me knowing it, and together with
a bug in urllib2 this caused pimp to stop working. Fixed the URL to
make it work again.
2003-05-02 20:27:40 +00:00
Raymond Hettinger 341deb74e7 The previous made the stop argument optional.
It is better to be explicit and just allow stop to be None.
2003-05-02 19:44:20 +00:00
Raymond Hettinger 14ef54cd83 SF bug #730685: itertools.islice stop argument is not optional
* itertools.islice() stop argument did not perform as documented.
* beefed-up test suite
2003-05-02 19:04:37 +00:00
Raymond Hettinger 2e973c03f3 Added missing modules to __all__ check. 2003-05-02 09:36:07 +00:00
Raymond Hettinger 91bbd9a7b9 Used sets.Set() to compare unordered sequences.
Improves clarity and brevity.
2003-05-02 09:06:28 +00:00
Jack Jansen 40006e9f7a Rename funny long suite to Disk_File_Folder. 2003-05-01 22:06:15 +00:00
Walter Dörwald 21d3a32b99 Combine the functionality of test_support.run_unittest()
and test_support.run_classtests() into run_unittest()
and use it wherever possible.

Also don't use "from test.test_support import ...", but
"from test import test_support" in a few spots.

From SF patch #662807.
2003-05-01 17:45:56 +00:00
Walter Dörwald 90437c03f2 Consistently use test_support.foo everywhere.
Remove the last use of veris().

Remove now useless imports and functions.
2003-05-01 13:12:34 +00:00
Martin v. Löwis 9c5ea50c25 Patch #727805: Remove extra line ending from CGI responses. 2003-05-01 05:05:09 +00:00
Michael W. Hudson 1bc2fdd785 Delete comment my last checkin rendered obsolete.
I should also not that my last checkin did stuff that made failures give
more helpful information.
2003-04-30 08:42:19 +00:00
Brett Cannon f9addb676d Change from a threading.Condition object to a threading.Event object for
signalling when the TCP server is done.  Should hopefully solve hanging
issues for Solaris 8 & 9.  Solves the apparent hanging issue with OS X.

Closes patch #729988 .
2003-04-30 05:32:32 +00:00
Brett Cannon 13da5fa999 Make time.sleep calls go to 0 for common testing. 2003-04-30 03:03:37 +00:00
Brett Cannon e6b7033e79 Flesh out test_support docs. 2003-04-30 01:42:35 +00:00
Piers Lauder 533366beb0 improved CRLF regex for previous fix 2003-04-29 23:58:08 +00:00
Piers Lauder 47404fffff added code to canonicalise line endings in data sent via "append" - fix for bug report 723962 2003-04-29 23:40:59 +00:00
Fred Drake 75ab1462d5 Allow "@" in unquoted attribute values.
Added test that checks for characters allowed in the query part of URLs.
Backport candidate.
2003-04-29 22:12:55 +00:00
Walter Dörwald 721adf9952 Port test_richcmp.py to PyUnit. From SF patch #662807 which additional
tests and comments.
2003-04-29 21:31:19 +00:00
Walter Dörwald 1b0be2d4c6 Use the new htmlentitydefs.codepoint2name for test_xmlcharnamereplace() 2003-04-29 20:59:55 +00:00
Raymond Hettinger 1a4a9d0b0f Add doctest for example in the library reference. 2003-04-29 19:58:04 +00:00
Fred Drake 70d566be10 Extract the errno value to use from the errno module if possible. 2003-04-29 19:50:25 +00:00
Skip Montanaro c689918c94 Regain throughput lost with the _socketobject wrapper. The
throughput-sensitive methods are grabbed from the underlying _socket.socket
object.  Closes SF patch 729293.
2003-04-29 19:27:26 +00:00
Michael W. Hudson 26848a34d1 Use Tim's suggestion to fix
[ 708901 ] Lineno calculation sometimes broken

A one line patch to compile.c and a rather-more-than-one-line patch
to test_dis.  Hey ho.

Possibly a backport candidate -- tho' lnotab is less used in 2.2...
2003-04-29 17:07:36 +00:00
Michael W. Hudson 58ee2af48e Armin Rigo's fix & test for
[ 729622 ] line tracing hook errors

with massaging from me to integrate test into test suite.
2003-04-29 16:18:47 +00:00
Gustavo Niemeyer 572f5233f0 Applying patch #728656, by logistix, fixing opening of nonexistent
bz2 files. Also, included a testcase for this problem.
2003-04-29 14:53:08 +00:00
Brett Cannon 19691360c7 Added tests for urlretrieve. Also made sure urlopen tests cleaned up properly after themselves. 2003-04-29 05:08:06 +00:00
Brett Cannon 2b6dfec1cc Raise a ValueError when there is data that was not covered in the format string. Done to match behavior of pre-existing C-based strptime implementations. 2003-04-28 21:30:13 +00:00
Tim Peters 5501b5e3d7 SF bug 728097: tmpnam problems on windows 2.3b, breaks test.test_os.
tmpnam() appears essentially useless on Windows, and it finally broke
the test for Irmen de Jong.  Read the long new comment in test_tmpnam()
for details.  Since the MS implementation is insane, it might be good
if we supplied a different implementation.

Bugfix candidate.
2003-04-28 03:13:03 +00:00
Brett Cannon 4aebbb0449 Make tests clean up after themselves better. This means:
* call tearDown when Setup is called
* shutil.rmtree the root of the created directory instead of just the leaf
  directory
* set the LANGUAGE environment variable to what it was originally and not
  assume 'en'.
2003-04-27 19:42:41 +00:00
Gustavo Niemeyer 3646ab98af Fix for part of the problem mentioned in #725149 by Greg Chapman.
This problem is related to a wrong behavior from mark_save/restore(),
which don't restore the mark_stack_base before restoring the marks.
Greg's suggestion was to change the asserts, which happen to be
the only recursive ops that can continue the loop, but the problem would
happen to any operation with the same behavior. So, rather than
hardcoding this into asserts, I have changed mark_save/restore() to
always restore the stackbase before restoring the marks.

Both solutions should fix these two cases, presented by Greg:

>>> re.match('(a)(?:(?=(b)*)c)*', 'abb').groups()
('b', None)
>>> re.match('(a)((?!(b)*))*', 'abb').groups()
('b', None, None)

The rest of the bug and patch in #725149 must be discussed further.
2003-04-27 13:25:21 +00:00
Gustavo Niemeyer c34f2555bd Applied patch #725106, by Greg Chapman, fixing capturing groups
within repeats of alternatives. The only change to the original
patch was to convert the tests to the new test_re.py file.

This patch fixes cases like:

>>> re.match('((a)|b)*', 'abc').groups()
('b', '')

Which is wrong (it's impossible to match the empty string),
and incompatible with other regex systems, like the following
examples show:

% perl -e '"abc" =~ /^((a)|b)*/; print "$1 $2\n";'
b a

% echo "abc" | sed -r -e "s/^((a)|b)*/\1 \2|/"
b a|c
2003-04-27 12:34:14 +00:00
Raymond Hettinger 9dcbbea878 Factor out common boilerplate for test_support 2003-04-27 07:54:23 +00:00
Tim Peters 579bed7300 Rewrote. As reported on c.l.py, when the test suite is run via
"import test.autotest", temp_imp failed because the import lock was
still held at the test's end (the test assumed it wouldn't be), and
then a RuntimeError got raised at the end of the entire suite run because
test_imp cleared the import lock as a side effect of trying to test that
the import lock wasn't held (but a legitimate import is in progress,
so the lock should be held, and the import machinery complained when it
found that the lock was unexpectedly cleareed).

Also removed the unittest scaffolding.  It didn't buy anything here, and
the test was raising regrtest's TestFailed instead of using the unittest
failure-reporting mechanisms.
2003-04-26 14:31:24 +00:00
Guido van Rossum ecf0f02518 Merge back from r23b1-branch 2003-04-26 00:21:31 +00:00
Guido van Rossum c2f77dddf3 New feature: when saving a file, keep the eol convention of the
original.  New files are written using the eol convention of the
platform, given by os.linesep.  All files are read and written in
binary mode.
2003-04-25 18:36:31 +00:00
Kurt B. Kaiser 9a90e70b32 Update for release into Python
NEWS.txt idlever.py
2003-04-25 17:48:08 +00:00
Kurt B. Kaiser 40f19e3fd5 Update for 2.3b1
Modified Files:
	NEWS.txt CREDITS.txt INSTALL.txt setup.cfg
2003-04-25 16:37:31 +00:00
Skip Montanaro 5ba0054e69 final bit of tests converted from test_sre 2003-04-25 16:00:14 +00:00
Skip Montanaro 9593792da3 test_sre is dead! long live test_re! 2003-04-25 15:59:12 +00:00
Skip Montanaro 35b9ff3683 deleted more tests which were either already in test_re or that I migrated
in the last revison
2003-04-25 15:41:19 +00:00
Skip Montanaro 1e703c6278 more tests converted from test_sre 2003-04-25 15:40:28 +00:00
Skip Montanaro bf7ad96d36 Remove tests which were migrated to test_re.py. There are still more tests
to migrate.
2003-04-25 15:17:03 +00:00
Guido van Rossum f4001eed3b Skip testing inet_ntop() an inet_pton() if they aren't defined.
This makes the test pass on Windows again (and on other platforms
that don't have these).
2003-04-25 15:11:23 +00:00
Guido van Rossum 51735b0569 Fix the tests on Windows, by writing the test data file in binary
mode.

XXX I'm not convinced that this is the right solution -- arguably,
on Windows, the _fileobject class should honor the mode argument
and do newline translation.  But it's never done that so I think
there's no urgent need to fix this today.
2003-04-25 15:01:05 +00:00
Skip Montanaro 1448d4719c rework Sniffer api significantly 2003-04-25 14:47:16 +00:00
Skip Montanaro 48816c6f04 some sniffer tests 2003-04-25 14:43:14 +00:00
Skip Montanaro 2726fcd4b6 more tests from test_sre 2003-04-25 14:31:54 +00:00
Fred Drake 7c852f33a2 Attempt to deal with some obvious errors in the code. These were all
due to using a single module-level namespace where multiple namespaces
were used before.

There *really* need to be tests for the sniffer stuff.  This could
have been avoided.

Skip, please review, and add sniffer tests!
2003-04-25 14:27:00 +00:00
Guido van Rossum 376e636f18 New version from Vinaj, should solve the threading problems (hopefully). 2003-04-25 14:22:00 +00:00
Skip Montanaro 7d9963fea8 copy a few tests from test_sre 2003-04-25 14:12:40 +00:00
Walter Dörwald dbcede5d66 Port test_bool.py to PyUnit. From SF patch #662807. 2003-04-25 10:22:01 +00:00
Brett Cannon 74bfd70e92 Complete rewrite of module. Only has tests using temporary files; net tests
should go in test_urllibnet.py .

Still need to write tests for _urlopener usage and urlretrieve.
2003-04-25 09:39:47 +00:00
Tim Peters c4e0940042 New generator os.walk() does a bit more than os.path.walk() does, and
seems much easier to use.  Code, docs, NEWS, and additions to test_os.py
(testing this sucker is a bitch!).
2003-04-25 07:11:48 +00:00
Guido van Rossum 47dfa4a89a Patch by Jp Calderone:
- The socket module now provides the functions inet_pton and inet_ntop
  for converting between string and packed representation of IP addresses.
  See SF patch #658327.

This still needs a bit of work in the doc area, because it is not
available on all platforms (especially not on Windows).
2003-04-25 05:48:32 +00:00
Guido van Rossum 45f4130029 test_re is no longer needed 2003-04-25 01:44:40 +00:00
Guido van Rossum 46144be02c Fix test_limitations(). The match there is *expected* to raise
RuntimeError.
2003-04-25 01:40:11 +00:00
Andrew M. Kuchling 0b85203954 [Patch #628208] Test the 'nil' extension 2003-04-25 00:27:24 +00:00
Andrew M. Kuchling a4c2b7485b [Patch #628208] Add optional support for the 'nil' extension 2003-04-25 00:26:51 +00:00
Skip Montanaro da4ec5a7bc csv is a module again 2003-04-24 20:23:12 +00:00
Skip Montanaro 04ae7056cf cvs is going to be a module again 2003-04-24 20:21:31 +00:00
Raymond Hettinger b34ef94d46 SF bug 557704: netrc module can't handle all passwords
Let netrc handle entries with login fields (mail servers for instance)
by having login default to ''.

Backport candidate.
2003-04-24 20:11:20 +00:00
Skip Montanaro bfcbfa7c46 move imports in Binary class to top level to avoid repeated imports.
use cStringIO if available.
2003-04-24 19:51:31 +00:00
Skip Montanaro fa012610c4 new method: has_function() - returns a boolean indicating whether the
argument function is available on the current platform
2003-04-24 19:49:23 +00:00
Skip Montanaro 8ed06da754 first cut at unittest version of re tests 2003-04-24 19:43:18 +00:00
Skip Montanaro d839ecdc81 if the test is run directly (__name__ == "__main__") don't actually require
particular resources
2003-04-24 19:06:57 +00:00
Skip Montanaro 142da98beb remove test_socketserver from the skip lists 2003-04-24 19:05:41 +00:00
Barry Warsaw c4acc2bd32 GNUTranslations:
__init__(): Removed since we no longer need the coerce flag.
    Message ids and strings are now always coerced to Unicode, /if/
    the catalog specified a charset parameter.

    gettext(), ngettext(): Since the message strings are Unicodes in
    the catalog, coerce back to encoded 8-bit strings on return.

    ugettext(), ungettext(): Coerce the message ids to Unicode when
    there's no entry for the id in the catalog.

Minor code cleanups; use booleans where appropriate.
2003-04-24 18:13:39 +00:00
Barry Warsaw edb155fda1 UnicodeTranslationsTest.setUp(): Removed the coerce flag to the
GNUTranslations constructor.
2003-04-24 18:08:13 +00:00
Raymond Hettinger 9928571f3f SF bug 665835: filter() treatment of str and tuple inconsistent
As a side issue on this bug, it was noted that list and tuple iterators
used macros to directly access containers and would not recognize
__getitem__ overrides.  If the method is overridden, the patch returns
a generic sequence iterator which calls the __getitem__ method; otherwise,
it returns a high custom iterator with direct access to container elements.
2003-04-24 16:52:47 +00:00
Andrew M. Kuchling 47c2ab6b54 Fix docstring typo 2003-04-24 16:36:49 +00:00
Thomas Heller 54aa5781d5 This test now uses the separate getargs_X functions from _testcapimodule. 2003-04-24 16:15:29 +00:00
Tim Peters 0eadaac7dc Whitespace normalization. 2003-04-24 16:02:54 +00:00
Barry Warsaw 0822ff7cca Get rid of some hard coded tabs 2003-04-24 15:58:47 +00:00
Raymond Hettinger 352f9477da SF patch 695710: fix bug 678519: cStringIO self iterator
(requested by GvR. patch contributed by Michael Stone)
2003-04-24 15:50:11 +00:00
Raymond Hettinger 024aaa1bfe SF Patch 549151: urllib2 POSTs on redirect
(contributed by John J Lee)
2003-04-24 15:32:12 +00:00
Andrew M. Kuchling 9f4eb6b719 [Patch #679505] Silence DeprecationWarning when testing rotor module 2003-04-24 13:18:25 +00:00
Marc-André Lemburg 366a0feb9a Reformatted a bit to remove the lengthy re.compile() from the function
definitions.
2003-04-24 11:46:35 +00:00
Marc-André Lemburg 246d847475 New module platform.py, submitted by Marc-Andre Lemburg.
There's no separate documentation for this module yet - apart from the
doc-strings which explain the APIs.
2003-04-24 11:36:11 +00:00
Raymond Hettinger f4cf76dd5e Revert the previous enhancement to the bytecode optimizer.
The additional code complexity and new NOP opcode were not worth it.
2003-04-24 05:45:23 +00:00
Brett Cannon 7d618c731c Fix docstring for URLOpener.retrieve() in regards to opening a local file 2003-04-24 02:43:20 +00:00
Walter Dörwald ce07c8a9bf Max OS X returns "*" as the password in grp.getgrall()
and "" in grep.getgrgid(). Adjust the test to work
around this problem. This should fix SF bug #724771.
2003-04-23 19:50:24 +00:00
Raymond Hettinger 6eca358695 SF 557704: netrc module can't handle all passwords
Expanded the range of allowable characters to include ascii punctuation.
Allows resource files to have a larger character set for passwords.
(Idea contributed by Bram Moolenaar.)
2003-04-23 18:59:54 +00:00
Neal Norwitz a256f7d36f Fix SF bug #723801, logging.setLoggerClass() doesn't support new-style classes 2003-04-23 13:12:19 +00:00
Neal Norwitz f297bd1937 SF patch #725904, Minor changes to logging from module author (Vinay Sajip)
- upgrade to version 0.4.8
2003-04-23 03:49:43 +00:00
Jack Jansen 2b4b5a54d6 Fix by Lars Gustaebel for bug 721871: don't get upset if the prefix
field contains garbage after the first NUL character.
2003-04-22 22:03:11 +00:00
Fred Drake b28271f24d Do a little more searching for the data file for the test: this allows
using a build directory just inside the source directory and saving
just one copy of the test data in the source tree, rather than having
a copy in each build directory.
2003-04-22 18:15:05 +00:00
Jeremy Hylton c8c8b94c59 Only produce a dotted module name when writing output to a separate
directory.
2003-04-22 15:35:51 +00:00
Jack Jansen d69b744531 If not icon file is specified use the default Python Applet icons.
Fixes 719303.
2003-04-22 14:33:48 +00:00
Jack Jansen 6432f78215 Only return a warning message about not all files being unpacked if there
were indeed files that weren't unpacked.
2003-04-22 13:56:19 +00:00
Walter Dörwald ecd2fdca0f Change test_pwd and test_grp so they can handle duplicate user
and group names. This should fix SF bug #724771.
2003-04-22 11:05:57 +00:00
Alex Martelli a70b19147f Adding new built-in function sum, with docs and tests. 2003-04-22 08:12:33 +00:00
Raymond Hettinger 060641d511 Improved the bytecode optimizer.
* Can now test for basic blocks.
* Optimize inverted comparisions.
* Optimize unary_not followed by a conditional jump.
* Added a new opcode, NOP, to keep code size constant.
* Applied NOP to previous transformations where appropriate.

Note, the NOP would not be necessary if other functions were
added to re-target jump addresses and update the co_lnotab mapping.
That would yield slightly faster and cleaner bytecode at the
expense of optimizer simplicity and of keeping it decoupled
from the line-numbering structure.
2003-04-22 06:49:11 +00:00
Jeremy Hylton dfbfe736ce Add helper function to get module name taking packages into account. 2003-04-21 22:49:17 +00:00
Jeremy Hylton 38732e1065 Holistic refactoring.
Remove "." in coverage output for lines with comments.
Silence complaints in coverage output about unexecuted docstrings.

Eliminate use of inspect module in favor of direct access to frame and
code objects.  We're in a trace function here:  Efficiency counts!

Remove unused code.  Reflow long lines.

Remove backwards compatibility for stored trace output from Zooko's
experiment to add calledfuncs to the pickled dict.

Move code to generate per-file coverage stats to a separate routine.

Replace use of parser module with call to compile.
2003-04-21 22:04:46 +00:00
Greg Ward 5549322c79 Test suite for optparse. This is a slightly-edited copy of
test/test_optik.py (rev 1.19) from the Optik CVS.
2003-04-21 02:41:25 +00:00
Greg Ward 2492fcf3b0 Update to Optik 1.4.1; here are the relevant bits of the change log:
* Fixed some long-hidden bugs revealed by the new PyUnit-based
    test suite (thanks to Johannes Gijsbers the new test suite,
    improved tests that caught the bugs, and the bug fixes).

  * Make store_true/store_false store True/False rather than 1/0.

Details available in Optik's CVS repository.
2003-04-21 02:40:34 +00:00
Gustavo Niemeyer be733ee7fb More work on bug #672491 and patch #712900.
I've applied a modified version of Greg Chapman's patch. I've included
the fixes without introducing the reorganization mentioned, for the sake
of stability. Also, the second fix mentioned in the patch don't fix the
mentioned problem anymore, because of the change introduced by patch
#720991 (by Greg as well). The new fix wasn't complicated though, and is
included as well.

As a note. It seems that there are other places that require the
"protection" of LASTMARK_SAVE()/LASTMARK_RESTORE(), and are just waiting
for someone to find how to break them. Particularly, I belive that every
recursion of SRE_MATCH() should be protected by these macros. I won't
do that right now since I'm not completely sure about this, and we don't
have much time for testing until the next release.
2003-04-20 07:35:44 +00:00
Gustavo Niemeyer 48f3dcc93e - Changed shlex.split() method to have more useful and
meaningful parameters.
2003-04-20 01:57:03 +00:00
Martin v. Löwis 153c9e493e Patch #553171: Add writeback parameter. Also add protocol parameter. 2003-04-19 20:59:03 +00:00
Guido van Rossum aa86e35c52 - bool() called without arguments now returns False rather than
raising an exception.  This is consistent with calling the
  constructors for the other builtin types -- called without argument
  they all return the false value of that type.  (SF patch #724135)
  Thanks to Alex Martelli.
2003-04-19 18:15:10 +00:00
Guido van Rossum a26854095b - Several methods of nntplib.NNTP have grown an optional file argument
which specifies a file where to divert the command's output
  (already supported by the body() method).  (SF patch #720468)
  Thanks to Terry Carroll.
2003-04-19 18:04:57 +00:00
Mark Hammond 8d98d2cb95 New PyGILState_ API - implements pep 311, from patch 684256. 2003-04-19 15:41:53 +00:00
Martin v. Löwis b4cb664df4 New file. 2003-04-19 12:57:57 +00:00
Martin v. Löwis 78e2f06cc6 Fully support 32-bit codes. Enable BIGCHARSET in UCS-4 builds. 2003-04-19 12:56:08 +00:00
Martin v. Löwis 53d93adc46 Patch #681152: Support escaped Unicode characters in classes. Fixes #612074.
Will backport to 2.2.
2003-04-19 08:37:24 +00:00
Brett Cannon 1e91d8eb03 Make _strptime escape regex syntax in format string to prevent use in internal regex. 2003-04-19 04:00:56 +00:00
Barry Warsaw 482c5f7eb7 as_string(): Added some text to the docstring to make it clear that
it's a convenience only and give hints on what to do for more
flexibility.
2003-04-18 23:04:35 +00:00
Martin v. Löwis 281b2c6211 Patch #536883: SimpleXMLRPCServer auto-docing subclass. 2003-04-18 21:04:39 +00:00
Martin v. Löwis b5c4b7be3f Skip nameprep test 3.43, as we do allow unassigned characters. The test
fails only in UCS-2 mode, since it tests a non-BMP character.
2003-04-18 20:21:00 +00:00
Jason Tishler d7e83a1d51 Patch #718049: Setting exe_extension for cygwin
On cygwin, the setup.py script uses unixccompiler.py for compiling and linking
C extensions. The unixccompiler.py script assumes that executables do not get
special extensions, which makes sense for Unix.  However, on Cygwin,
executables get an .exe extension.

This causes a problem during the configuration step (python setup.py config),
in which some temporary executables may be generated. As unixccompiler.py does
not know about the .exe extension, distutils fails to clean up after itself: it
does not remove _configtest.exe but tries to remove _configtest instead.

The attached patch to unixccompiler.py sets the correct exe_extension for
cygwin by checking if sys.platform is 'cygwin'. With this patch, distutils
cleans up after itself correctly.

Michiel de Hoon
University of Tokyo, Human Genome Center.
2003-04-18 17:27:47 +00:00
Martin v. Löwis 2548c730c1 Implement IDNA (Internationalized Domain Names in Applications). 2003-04-18 10:39:54 +00:00
Guido van Rossum bbb931bebd Delete the 'h' test -- 'h' is no longer unsigned so the machinery here
can't test it.  It's unchanged so why would we test it anyway...
2003-04-18 00:13:53 +00:00
Neal Norwitz 10cf21802d Use True in a few more places.
Use isinstance(somestring, basestring) instead of type() as per PEP 8
2003-04-17 23:09:08 +00:00
Neal Norwitz aa1ac546b6 Get test to work under regrtest when running whole suite 2003-04-17 23:04:22 +00:00
Fred Drake fafd56f439 Add test that demonstrates SGML-style handling of processing
instructions.
2003-04-17 22:19:26 +00:00
Fred Drake 243152384b - use Tue/False for booleans
- some very minor cleanups
2003-04-17 22:01:17 +00:00
Gustavo Niemeyer 68d8cef89a Implemented posix-mode parsing support in shlex.py, as dicussed in
mailing list, and in patch #722686.
2003-04-17 21:31:33 +00:00
Thomas Heller a4ea603b05 SF # 595026: support for masks in getargs.c.
New functions:
  unsigned long PyInt_AsUnsignedLongMask(PyObject *);
  unsigned PY_LONG_LONG) PyInt_AsUnsignedLongLongMask(PyObject *);
  unsigned long PyLong_AsUnsignedLongMask(PyObject *);
  unsigned PY_LONG_LONG) PyLong_AsUnsignedLongLongMask(PyObject *);

New and changed format codes:

b unsigned char 0..UCHAR_MAX
B unsigned char none **
h unsigned short 0..USHRT_MAX
H unsigned short none **
i int INT_MIN..INT_MAX
I * unsigned int 0..UINT_MAX
l long LONG_MIN..LONG_MAX
k * unsigned long none
L long long LLONG_MIN..LLONG_MAX
K * unsigned long long none

Notes:

* New format codes.

** Changed from previous "range-and-a-half" to "none"; the
range-and-a-half checking wasn't particularly useful.

New test test_getargs2.py, to verify all this.
2003-04-17 18:55:45 +00:00
Neal Norwitz 6e5be22d97 Remove extra space in docstring 2003-04-17 13:13:55 +00:00
Guido van Rossum 2cd0a65c70 Add 'get' method to Variable and switch it from internal class to
standard class (it is now useful because it doesn't constrain the type
of the value).
2003-04-16 20:10:03 +00:00
Guido van Rossum a4541a30fc - super() no longer ignores data descriptors, except __class__. See
the thread started at
  http://mail.python.org/pipermail/python-dev/2003-April/034338.html
2003-04-16 20:02:22 +00:00
Martin v. Löwis bfe175c190 For StringVar results to strings. Document that boolean things are of
type bool. Requested in #721171.
2003-04-16 19:42:51 +00:00
Jack Jansen be5d707926 When on MacOSX, and only in a framework build, add
~/Library/Python/2.3/site-packages to sys.path, if it exists.
2003-04-16 13:12:21 +00:00
Jack Jansen 36d49a907f The identify() description didn't match the code. Fixed. 2003-04-16 13:10:53 +00:00