Martin v. Löwis [Sun, 23 Jan 2005 09:41:49 +0000 (09:41 +0000)]
Flush std{in,out,err} before closing it. Fixes #
1074011.
Will backport to 2.4 and 2.3.
Martin v. Löwis [Sun, 23 Jan 2005 09:27:24 +0000 (09:27 +0000)]
Patch #579435: Shadow Password Support Module
Martin v. Löwis [Sun, 23 Jan 2005 09:19:22 +0000 (09:19 +0000)]
Truncate st_?time before comparing it with ST_?TIME in the tests.
Walter Dörwald [Fri, 21 Jan 2005 21:16:51 +0000 (21:16 +0000)]
Add a slice test with high < low.
Thomas Heller [Thu, 20 Jan 2005 19:20:16 +0000 (19:20 +0000)]
distutils/command/install.py change.
Thomas Heller [Thu, 20 Jan 2005 19:14:17 +0000 (19:14 +0000)]
Fix [
1103844 ] fix distutils.install.dump_dirs() with negated options.
Will backport myself.
Fred Drake [Wed, 19 Jan 2005 07:24:34 +0000 (07:24 +0000)]
fix typeset of vertical bar for PDF format
(closes SF bug #
1008998)
Fred Drake [Wed, 19 Jan 2005 06:24:58 +0000 (06:24 +0000)]
install distutils.tests on Unix (contributed patch)
(closes SF bug #
1093173)
Fred Drake [Wed, 19 Jan 2005 05:42:50 +0000 (05:42 +0000)]
documentation for the zipimport module using contributed patch
(closes SF bug #853800; markup adjusted)
Fred Drake [Wed, 19 Jan 2005 04:44:07 +0000 (04:44 +0000)]
Description of args to IMAP4.store() in imaplib
(closes SF patch #
1084092; modified per comments in SF)
Fred Drake [Wed, 19 Jan 2005 04:18:39 +0000 (04:18 +0000)]
Clean up discussion of new C thread idiom
(closes SF patch #
1031233; modified)
Fred Drake [Wed, 19 Jan 2005 03:39:17 +0000 (03:39 +0000)]
fix a bunch of spelling errors
(closes SF patch #
1104868)
Fred Drake [Wed, 19 Jan 2005 03:23:57 +0000 (03:23 +0000)]
remove spurious line from widget variables example
(closes SF patch #
1094815)
Kurt B. Kaiser [Wed, 19 Jan 2005 00:22:59 +0000 (00:22 +0000)]
1. Polish tabbing code.
2. Restore use of set_indentation_params(), was dead code since
Autoindent.py was merged into EditorWindow.py.
3. Make usetabs, indentwidth, tabwidth, context_use_ps1 instance vars
and set in EditorWindow.__init__()
4. In PyShell.__init__() set usetabs, indentwidth and context_use_ps1
explicitly (config() is eliminated).
5. Add Tabnanny check when Module is Run/F5, not just when Checked.
6. Discourage using an indent width other than 8 when using tabs to
indent Python code.
M EditorWindow.py
M NEWS.txt
M PyShell.py
M ScriptBinding.py
Michael W. Hudson [Tue, 18 Jan 2005 15:56:11 +0000 (15:56 +0000)]
Change the name of the macro used by --with-tsc builds to the less
inscrutable READ_TIMESTAMP.
Michael W. Hudson [Tue, 18 Jan 2005 15:53:59 +0000 (15:53 +0000)]
tweaks, small updates
Michael W. Hudson [Tue, 18 Jan 2005 15:26:11 +0000 (15:26 +0000)]
-X died some time ago; remove a tiny bit of associated cruft.
Kurt B. Kaiser [Tue, 18 Jan 2005 00:54:58 +0000 (00:54 +0000)]
If an extension can't be loaded, print warning and skip it instead of
erroring out.
Andrew MacIntyre [Mon, 17 Jan 2005 12:18:12 +0000 (12:18 +0000)]
make thread stack size compile-time tunable on OS/2, increase main stack
Andrew MacIntyre [Mon, 17 Jan 2005 12:16:36 +0000 (12:16 +0000)]
make thread stack size compile-time tunable on OS/2
Skip Montanaro [Sun, 16 Jan 2005 20:48:27 +0000 (20:48 +0000)]
Document the reconvert module.
Skip Montanaro [Sun, 16 Jan 2005 19:31:40 +0000 (19:31 +0000)]
allow triple-quoted string output from reconvert.quote()
Johannes Gijsbers [Sun, 16 Jan 2005 13:04:30 +0000 (13:04 +0000)]
Patch #
1100140: improved smtp connect debugging
Don't print the same (host, port) tuple thrice when debugging, but first print
(host, port), then (ip, port) and then the error message.
Martin v. Löwis [Sun, 16 Jan 2005 08:57:39 +0000 (08:57 +0000)]
Default stat_float_times to true.
Martin v. Löwis [Sun, 16 Jan 2005 08:40:58 +0000 (08:40 +0000)]
Added SEEK_* constants. Fixes #711830.
Guido van Rossum [Sun, 16 Jan 2005 00:25:31 +0000 (00:25 +0000)]
Use descriptors.
Guido van Rossum [Sun, 16 Jan 2005 00:21:28 +0000 (00:21 +0000)]
Use decorators.
Guido van Rossum [Sun, 16 Jan 2005 00:16:11 +0000 (00:16 +0000)]
Use decorators.
Tim Peters [Thu, 13 Jan 2005 21:06:25 +0000 (21:06 +0000)]
Gave the new datetime.strptime() a versionadded blurb.
Tim Peters [Thu, 13 Jan 2005 17:37:38 +0000 (17:37 +0000)]
Whitespace normalization.
Andrew McNamara [Thu, 13 Jan 2005 11:30:54 +0000 (11:30 +0000)]
Moved reader \r and \n processing from the iterator to the state machine -
this allows for better handling of newline characters in quoted fields (and
hopefully resolves Bug 967934).
Vinay Sajip [Thu, 13 Jan 2005 08:23:56 +0000 (08:23 +0000)]
Improved SysLogHandler error recovery (patch by Erik Forsberg)
Skip Montanaro [Thu, 13 Jan 2005 04:12:31 +0000 (04:12 +0000)]
Add strptime() constructor to datetime class. Thanks to Josh Spoerri for
the changes.
Fred Drake [Wed, 12 Jan 2005 19:11:45 +0000 (19:11 +0000)]
fix typo
Fred Drake [Wed, 12 Jan 2005 16:00:55 +0000 (16:00 +0000)]
remove unused variable
Andrew McNamara [Wed, 12 Jan 2005 11:47:57 +0000 (11:47 +0000)]
Many updates to csv module doco.
Andrew McNamara [Wed, 12 Jan 2005 11:39:50 +0000 (11:39 +0000)]
Improve wording of parser error message.
Andrew McNamara [Wed, 12 Jan 2005 11:17:16 +0000 (11:17 +0000)]
Add counting of source iterator lines to the reader object - handy for
user error messages (otherwise difficult to do without instrumenting
the source).
Andrew McNamara [Wed, 12 Jan 2005 09:45:18 +0000 (09:45 +0000)]
When quoting=QUOTE_NONNUMERIC, the reader now casts unquoted fields
to floats.
Andrew McNamara [Wed, 12 Jan 2005 08:16:17 +0000 (08:16 +0000)]
Fix logic problem in quoting=csv.QUOTE_ALL, quotechar=None check, add test.
Andrew McNamara [Wed, 12 Jan 2005 07:44:42 +0000 (07:44 +0000)]
When using QUOTE_NONNUMERIC, we now test for "numericness" with
PyNumber_Check, rather than trying to convert to a float. Reimplemented
writer - now raises exceptions when it sees a quotechar but neither
doublequote or escapechar are set. Doublequote results are now more
consistent (eg, single quote should generate """", rather than "",
which is ambiguous).
Andrew McNamara [Wed, 12 Jan 2005 03:45:10 +0000 (03:45 +0000)]
Rename csv.set_field_limit to csv.field_size_limit (since it both sets and
gets).
Andrew McNamara [Wed, 12 Jan 2005 03:25:27 +0000 (03:25 +0000)]
Add news about csv module updates.
Andrew McNamara [Wed, 12 Jan 2005 01:55:21 +0000 (01:55 +0000)]
Improve test coverage fractionally.
Andrew McNamara [Wed, 12 Jan 2005 01:16:35 +0000 (01:16 +0000)]
Add belt and braces check of PyString_AsString return.
Kurt B. Kaiser [Tue, 11 Jan 2005 19:29:39 +0000 (19:29 +0000)]
Improve error handling when .idlerc can't be created.
Raymond Hettinger [Tue, 11 Jan 2005 16:11:13 +0000 (16:11 +0000)]
Add duck-typing to the glossary.
Raymond Hettinger [Tue, 11 Jan 2005 15:33:03 +0000 (15:33 +0000)]
SF bug #
1099516: tempfile files not types.FileType
Clarified that the returned object is file-like rather than an actual file.
Andrew McNamara [Tue, 11 Jan 2005 07:32:02 +0000 (07:32 +0000)]
Set an upper limit on the size of the field buffer, raise an exception
when this limit is reached. Limit defaults to 128k, and is changed
by module set_field_limit() method. Previously, an unmatched quote
character could result in the entire file being read into the field
buffer, potentially exhausting virtual memory.
Andrew McNamara [Tue, 11 Jan 2005 04:49:53 +0000 (04:49 +0000)]
Now that internal dialect type is immutable, and the dialect registry
only contains instances of the dialect type, we can refer directly to the
dialect instances rather than creating new ones. In other words, if the
dialect comes from the registry, and we apply no further modifications,
the reader/writer can use the dialect object directly.
Raymond Hettinger [Tue, 11 Jan 2005 03:03:27 +0000 (03:03 +0000)]
SF
1098985: set objects cannot be marshalled
Andrew McNamara [Tue, 11 Jan 2005 02:22:47 +0000 (02:22 +0000)]
Replace python-coded validation of csv dialect with a call to the C
dialect type (which has a better idea of what is and isn't valid).
Andrew McNamara [Tue, 11 Jan 2005 02:18:36 +0000 (02:18 +0000)]
No longer attempt to instantiate python classes describing dialects. This
was done because we were previously performing validation of the dialect
from python, but this is now down within the C module. Also, the method
we were using to detect classes did not work with new-style classes.
Andrew McNamara [Tue, 11 Jan 2005 01:28:33 +0000 (01:28 +0000)]
Allow dialect-describing keywords to be supplied to register_dialect,
record objects of internal dialect type, rather than instances of
python objects.
Andrew McNamara [Tue, 11 Jan 2005 01:07:23 +0000 (01:07 +0000)]
Factor out the code for making a dialect instance.
Andrew McNamara [Mon, 10 Jan 2005 23:17:35 +0000 (23:17 +0000)]
Only set error string when dict lookup found no matching key (was setting
it for all failures, potentially masking other exceptions).
Tim Peters [Mon, 10 Jan 2005 16:48:37 +0000 (16:48 +0000)]
Whitespace normalization.
Andrew McNamara [Mon, 10 Jan 2005 12:25:11 +0000 (12:25 +0000)]
When parsing args that return a single character, treat null string the
same as None.
Andrew McNamara [Mon, 10 Jan 2005 12:22:48 +0000 (12:22 +0000)]
Where a string is desired, test for PyBaseString_Type derived type,
rather than using PyString_Check/PyUnicode_Check.
Walter Dörwald [Mon, 10 Jan 2005 12:01:39 +0000 (12:01 +0000)]
Fix and test for SF bug #
1098990: codec readline() splits lines apart.
Johannes Gijsbers [Mon, 10 Jan 2005 09:07:22 +0000 (09:07 +0000)]
Bug #489256: remove out of date and out of place profile.doc, and let
profile.help() point at the library reference instead of profile.doc.
Andrew McNamara [Mon, 10 Jan 2005 02:09:41 +0000 (02:09 +0000)]
Add missing PyObject_GC_Track and PyObject_GC_UnTrack calls to csv reader and
writer objects (other GC infrastructure already in place).
Andrew McNamara [Mon, 10 Jan 2005 01:04:40 +0000 (01:04 +0000)]
Fix parsing of csv files with escapes (escape character previously would be
left in stream).
Johannes Gijsbers [Sun, 9 Jan 2005 15:29:10 +0000 (15:29 +0000)]
Patch #712317: In URLs such as http://www.example.com?query=spam, treat '?' as
a delimiter. Previously, the 'network location' (<authority> in RFC 2396) would
become 'www.example.com?query=spam', while RFC 2396 does not allow a '?' in
<authority>. See bug #548176 for further discussion.
Johannes Gijsbers [Sun, 9 Jan 2005 05:51:49 +0000 (05:51 +0000)]
Patch #
1095362: replace hardcoded test for POST/GET with call to get_method,
removing some duplication and gaining some flexibility in the process.
Johannes Gijsbers [Sun, 9 Jan 2005 01:58:02 +0000 (01:58 +0000)]
Move code in __name__ == '__main__' block into main() function, rewrite code so
there's no need to subclass OptionParser.
Johannes Gijsbers [Sun, 9 Jan 2005 00:36:53 +0000 (00:36 +0000)]
Patch #
1051321 (fixes bugs
1010196,
1013525), by Mike Brown:
* Document hasFeature(), createDocument(), CreateDocumentType(),
hasAttribute(), hasAttributeNS().
* In the documentation for createDocument(), it is now stated that the Python
DOM API allows implementations to forego creation of the document element
child node, if no namespace and local name arguments are given. (This
possibility is left open and unaddressed in the W3C spec).
* Addition by me: use 'name' rather than 'attname', for consistency with the
DOM specification and the Python DOM API implementation.
Johannes Gijsbers [Sun, 9 Jan 2005 00:12:48 +0000 (00:12 +0000)]
Bug #
1098497: various small typo's, grammar and markup nits.
Skip Montanaro [Sat, 8 Jan 2005 21:58:58 +0000 (21:58 +0000)]
comment tweak
Skip Montanaro [Sat, 8 Jan 2005 21:56:43 +0000 (21:56 +0000)]
Add definitions for "up" and "down" commands that print/display the current
Python file/line when the current C execution frame is inside
PyEval_EvalFrame. These are commented out by default because GDB sometimes
crashes as a result (seems like a GDB bug).
Add a pyframe command that displays the current Python stack frame. If the
marked lines are uncommented, it will also cause Emacs/XEmacs to display the
current file/line.
Johannes Gijsbers [Sat, 8 Jan 2005 20:16:43 +0000 (20:16 +0000)]
Patch #936774: unify the display of data descriptors, including slots,
properties, and custom descriptors.
* removed special handling of properties
* added special handling of data descriptors - All data descriptors are grouped
together in a section. For each item, the attribute name and doc string, if
present, is displayed.
* disabled display of __slots__ attribute - since slots are descriptors, they
are listed in the section described above
Thanks to John Belmonte for the patch!
Johannes Gijsbers [Sat, 8 Jan 2005 14:12:27 +0000 (14:12 +0000)]
Replace rfc822.parseaddr with email.Utils.parseaddr. The implementation is
still the same, so there should be no backwards-compatibility problems.
Johannes Gijsbers [Sat, 8 Jan 2005 13:56:36 +0000 (13:56 +0000)]
Patch #
1079734: remove dependencies on (deprecated) rfc822 and mimetools
modules, replacing with email. Thanks to Josh Hoyt for the patch!
Johannes Gijsbers [Sat, 8 Jan 2005 13:28:54 +0000 (13:28 +0000)]
Clean up tests by reusing functions from other modules:
* replace deltree with shutil.rmtree()
* replace mkdirs with os.makedirs()
* fold touchfile into GlobTests.mktemp()
Johannes Gijsbers [Sat, 8 Jan 2005 13:13:19 +0000 (13:13 +0000)]
Patch #943206:
`glob.glob()` currently calls itself recursively to build a list of matches of
the dirname part of the pattern and then filters by the basename part. This is
effectively BFS. ``glob.glob('*/*/*/*/*/foo')`` will build a huge list of all
directories 5 levels deep even if only a handful of them contain a ``foo``
entry. A generator-based recusion would never have to store these list at once
by implementing DFS. This patch converts the `glob` function to an `iglob`
recursive generator . `glob()` now just returns ``list(iglob(pattern))``.
I also cleaned up the code a bit (reduced duplicate `has_magic()` checks and
created a second `glob0` helper func so that the main loop need not be
duplicated).
Thanks to Cherniavsky Beni for the patch!
Johannes Gijsbers [Sat, 8 Jan 2005 12:31:29 +0000 (12:31 +0000)]
Patch #
1094015:
* Use os.makedirs() instead os.mkdir(). (bug #975763)
* Use copystat() to copy directory bits (bug #
1048878)
Tim Peters [Sat, 8 Jan 2005 07:30:42 +0000 (07:30 +0000)]
threading._DummyThread.__init__(): document obscure new code.
test_threading.test_foreign_thread(): new test does a basic check that
"foreign" threads can using the threading module, and that they create
a _DummyThread instance in at least one use case. This isn't a very
good test, since a thread created by thread.start_new_thread() isn't
particularly "foreign".
Tim Peters [Sat, 8 Jan 2005 06:03:17 +0000 (06:03 +0000)]
Converted to a unittest. Added checks that the bounded semaphore actually
does what it's supposed to do.
Brett Cannon [Sat, 8 Jan 2005 02:43:53 +0000 (02:43 +0000)]
In _DummyThread objects the lock stored in __block (allocated thanks to
_Thread.__init__) was never used. This is a waste since locks use OS
primitives that are in limited supply. So the lock is deleted in
_DummyThread.__init__ .
Closes bug #
1089632.
Raymond Hettinger [Fri, 7 Jan 2005 18:34:56 +0000 (18:34 +0000)]
Remove test for BINARY_DIVIDE.
Armin Rigo [Fri, 7 Jan 2005 18:10:51 +0000 (18:10 +0000)]
Re-running python with/without the -Qnew flag uses incorrectly optimized
bytecodes from the previously saved .pyc files. Fixed by disabling the static
optimization of BINARY_DIVIDE between two constants.
Tim Peters [Fri, 7 Jan 2005 16:01:32 +0000 (16:01 +0000)]
Whitespace normalization.
Andrew M. Kuchling [Fri, 7 Jan 2005 14:34:41 +0000 (14:34 +0000)]
[Bug
1083177] Describe signal() change; add a link
Jack Jansen [Fri, 7 Jan 2005 13:43:31 +0000 (13:43 +0000)]
Allow relative URLs for included databases and packages.
Jack Jansen [Fri, 7 Jan 2005 13:08:22 +0000 (13:08 +0000)]
Patch #
1097739 by Bob Ippolito:
MacOSX: if we cannot use -undefined dynamic_lookup (such as on 10.2 or earlier)
we link extension directly against the dynamic library in the framework in
stead of against the framework. This will fix building extensions for 2.3
after 2.4 has been installed too.
Jack Jansen [Fri, 7 Jan 2005 12:56:21 +0000 (12:56 +0000)]
Oops, there was a tab in there.
Jack Jansen [Fri, 7 Jan 2005 12:50:12 +0000 (12:50 +0000)]
Workaround for the fact that urllib2 doesn't default to "file:" urls.
Jack Jansen [Fri, 7 Jan 2005 10:49:32 +0000 (10:49 +0000)]
Always set CONFIGURE_MACOSX_DEPLOYMENT_TARGET otherwise it may be set
to an empty value and distutils will get confused lateron.
Raymond Hettinger [Fri, 7 Jan 2005 08:15:41 +0000 (08:15 +0000)]
SF #75103: imghdr -- identify JPEGs in EXIF format
Andrew McNamara [Fri, 7 Jan 2005 06:46:50 +0000 (06:46 +0000)]
Fix to use PEP7 brace style.
Andrew McNamara [Fri, 7 Jan 2005 04:42:45 +0000 (04:42 +0000)]
Improved the implementation of the internal "dialect" type. The new
implementation features better error reporting, and better compliance
with the PEP.
Raymond Hettinger [Fri, 7 Jan 2005 04:33:44 +0000 (04:33 +0000)]
SF patch
1094011: Docs for file() vs open().
Facundo Batista [Fri, 7 Jan 2005 02:50:22 +0000 (02:50 +0000)]
Added example to os.stat()
Raymond Hettinger [Fri, 7 Jan 2005 00:49:17 +0000 (00:49 +0000)]
SF bug #
1091740: garbage collector still documented as optional
Andrew McNamara [Thu, 6 Jan 2005 02:25:41 +0000 (02:25 +0000)]
Delete Reader_getiter and replace with PyObject_SelfIter.
Skip Montanaro [Wed, 5 Jan 2005 07:19:11 +0000 (07:19 +0000)]
add two missing items
Skip Montanaro [Wed, 5 Jan 2005 07:13:32 +0000 (07:13 +0000)]
add descriptions of exported data attributes
Skip Montanaro [Wed, 5 Jan 2005 07:03:53 +0000 (07:03 +0000)]
describe reset()
Skip Montanaro [Wed, 5 Jan 2005 06:58:15 +0000 (06:58 +0000)]
add a couple missing items
Skip Montanaro [Wed, 5 Jan 2005 06:54:58 +0000 (06:54 +0000)]
add a couple missing docstrings