]> granicus.if.org Git - python/log
python
23 years agoMake no assumption about how modules are built when referring to them; this
Fred Drake [Mon, 3 Dec 2001 18:33:13 +0000 (18:33 +0000)]
Make no assumption about how modules are built when referring to them; this
can vary by platform and installation.
Based on suggestion to python-docs.

23 years agoRe-word the intro slightly to avoid reader misunderstanding: strings are not
Fred Drake [Mon, 3 Dec 2001 18:27:22 +0000 (18:27 +0000)]
Re-word the intro slightly to avoid reader misunderstanding: strings are not
mutable!  We do not want to shock anyone.
This closes SF bug #483805.

Re-factor so that the description of the "access" keyword parameter is not
repeated in both the descriptions of mmap().  Also, only make sure the first
description of mmap() appears in the index.  The the index link is followed,
the first is now used to locate the page on the screen; chances are really good
both will be visible.  This avoids the problem that the index entry for the
second is selected and the first version is not visible, making the reader
consider that mmap() is not available on Windows.

23 years agoRemoved old and broken AE-based browser controller, use webbrowser.py
Just van Rossum [Mon, 3 Dec 2001 18:11:36 +0000 (18:11 +0000)]
Removed old and broken AE-based browser controller, use webbrowser.py
instead. This fixes bug #488420.

23 years agoClarify that the Python runtime may behave mysteriously when an exception
Fred Drake [Mon, 3 Dec 2001 17:56:09 +0000 (17:56 +0000)]
Clarify that the Python runtime may behave mysteriously when an exception
is not handled properly.
This closes SF bug #485153.

23 years agoRemove most references to __members__ and __methods__, leaving only one pair
Fred Drake [Mon, 3 Dec 2001 17:32:27 +0000 (17:32 +0000)]
Remove most references to __members__ and __methods__, leaving only one pair
of references that now state that these attributes have been removed,
directing the reader to the dir() function.
This closes SF bug #456420.

23 years agoConvert to using string methods instead of the string module.
Fred Drake [Mon, 3 Dec 2001 17:09:50 +0000 (17:09 +0000)]
Convert to using string methods instead of the string module.
In goahead(), use a bound version of rawdata.startswith() since we use the
same method all the time and never change the value of rawdata.  This can
save a lot of bound method creation.

23 years agoAdd a test that makes sure unclosed entity references are handled consitently.
Fred Drake [Mon, 3 Dec 2001 16:44:09 +0000 (16:44 +0000)]
Add a test that makes sure unclosed entity references are handled consitently.

23 years agoPyErr_Format() does not return a new reference; it always returns NULL.
Fred Drake [Mon, 3 Dec 2001 16:36:43 +0000 (16:36 +0000)]
PyErr_Format() does not return a new reference; it always returns NULL.
This closes SF bug #488387.

23 years agoFix of SF bug #475877 (Mutable subtype instances are hashable).
Guido van Rossum [Mon, 3 Dec 2001 16:32:18 +0000 (16:32 +0000)]
Fix of SF bug #475877 (Mutable subtype instances are hashable).
Rather than tweaking the inheritance of type object slots (which turns
out to be too messy to try), this fix adds a __hash__ to the list and
dict types (the only mutable types I'm aware of) that explicitly
raises an error.  This has the advantage that list.__hash__([]) also
raises an error (previously, this would invoke object.__hash__([]),
returning the argument's address); ditto for dict.__hash__.

The disadvantage for this fix is that 3rd party mutable types aren't
automatically fixed.  This should be added to the rules for creating
subclassable extension types: if you don't want your object to be
hashable, add a tp_hash function that raises an exception.

Also, it's possible that I've forgotten about other mutable types for
which this should be done.

23 years ago_tryorder should always be a list, then the problem Jack had to fix in
Guido van Rossum [Mon, 3 Dec 2001 15:51:31 +0000 (15:51 +0000)]
_tryorder should always be a list, then the problem Jack had to fix in
1.24 wouldn't have occurred in the first place.

Remove a debug print command accidentally inserted by Martin in 1.23.

23 years agoNew about super.
Guido van Rossum [Mon, 3 Dec 2001 15:46:59 +0000 (15:46 +0000)]
New about super.

23 years agoMissing comma in tuple initializer caused webbrowser.open() not to work at
Jack Jansen [Mon, 3 Dec 2001 15:44:17 +0000 (15:44 +0000)]
Missing comma in tuple initializer caused webbrowser.open() not to work at
all in MacPython. (why did noone ever notice this?)

23 years agoAddress SF patch #480716 as well as related issues.
Guido van Rossum [Mon, 3 Dec 2001 15:38:28 +0000 (15:38 +0000)]
Address SF patch #480716 as well as related issues.

SF patch #480716 by Greg Chapman fixes the problem that super's
__get__ method always returns an instance of super, even when the
instance whose __get__ method is called is an instance of a subclass
of super.

Other issues fixed:

- super(C, C()).__class__ would return the __class__ attribute of C()
  rather than the __class__ attribute of the super object.  This is
  confusing.  To fix this, I decided to change the semantics of super
  so that it only applies to code attributes, not to data attributes.
  After all, overriding data attributes is not supported anyway.

- While super(C, x) carefully checked that x is an instance of C,
  super(C).__get__(x) made no such check, allowing for a loophole.
  This is now fixed.

23 years agoAdd Greg Chapman.
Guido van Rossum [Mon, 3 Dec 2001 15:37:40 +0000 (15:37 +0000)]
Add Greg Chapman.

23 years agoAdd more inline documentation, as contributed in #487906.
Martin v. Löwis [Mon, 3 Dec 2001 08:24:52 +0000 (08:24 +0000)]
Add more inline documentation, as contributed in #487906.

23 years agoClean up some material that is not part of the standard documentation.
Fred Drake [Mon, 3 Dec 2001 06:12:23 +0000 (06:12 +0000)]
Clean up some material that is not part of the standard documentation.
This closes SF bug #487308.

23 years agoPyString_FromFormatV, string_repr: document why these use sprintf
Tim Peters [Mon, 3 Dec 2001 01:55:38 +0000 (01:55 +0000)]
PyString_FromFormatV, string_repr:  document why these use sprintf
instead of PyOS_snprintf; add some relevant comments and asserts.

23 years agoFix for SF bug #485678.
Guido van Rossum [Mon, 3 Dec 2001 00:54:52 +0000 (00:54 +0000)]
Fix for SF bug #485678.

slot_tp_descr_set(): When deleting an attribute described by a
descriptor implemented in Python, the descriptor's __del__ method is
called by the slot_tp_descr_set dispatch function.  This is bogus --
__del__ already has a different meaning. Renaming this use of __del__
is renamed to __delete__.

23 years agomysnprintf.c: Massive rewrite of PyOS_snprintf and PyOS_vsnprintf, to
Tim Peters [Mon, 3 Dec 2001 00:43:33 +0000 (00:43 +0000)]
mysnprintf.c:  Massive rewrite of PyOS_snprintf and PyOS_vsnprintf, to
use wrappers on all platforms, to make this as consistent as possible x-
platform (in particular, make sure there's at least one \0 byte in
the output buffer).  Also document more of the truth about what these do.

getargs.c, seterror():  Three computations of remaining buffer size were
backwards, thus telling PyOS_snprintf the buffer is larger than it
actually is.  This matters a lot now that PyOS_snprintf ensures there's a
trailing \0 byte (because it didn't get the truth about the buffer size,
it was storing \0 beyond the true end of the buffer).

sysmodule.c, mywrite():  Simplify, now that PyOS_vsnprintf guarantees to
produce a \0 byte.

23 years agofurther work on new configuration system, specifically,
Steven M. Gava [Mon, 3 Dec 2001 00:37:28 +0000 (00:37 +0000)]
further work on new configuration system, specifically,
on keybinding configuration

23 years agoA system() lookalike that sends commands to ToolServer, by Daniel Brotsky. The semant...
Jack Jansen [Mon, 3 Dec 2001 00:11:35 +0000 (00:11 +0000)]
A system() lookalike that sends commands to ToolServer, by Daniel Brotsky. The semantics aren't enough like system() to add this to the main Lib folder, but it is pretty useful nonetheless for selected people.

23 years agoFix for SF bug #485678.
Guido van Rossum [Mon, 3 Dec 2001 00:08:33 +0000 (00:08 +0000)]
Fix for SF bug #485678.

slot_tp_descr_set(): When deleting an attribute described by a
descriptor implemented in Python, the descriptor's __del__ method is
called by the slot_tp_descr_set dispatch function.  This is bogus --
__del__ already has a different meaning. Renaming this use of __del__
is renamed to __delete__.

23 years agoChanged logic for finding python home in Mac OS X framework Pythons.
Jack Jansen [Sun, 2 Dec 2001 23:56:28 +0000 (23:56 +0000)]
Changed logic for finding python home in Mac OS X framework Pythons.
Now sys.executable points to the executable again, in stead of to
the shared library. The latter is used only for locating the python
home.

23 years agoAdded tests expected to be skipped on Mac OS X.
Jack Jansen [Sun, 2 Dec 2001 21:41:36 +0000 (21:41 +0000)]
Added tests expected to be skipped on Mac OS X.

23 years agoCheck for NULL return value of PyList_New (follow-up to patch #486743).
Martin v. Löwis [Sun, 2 Dec 2001 18:31:02 +0000 (18:31 +0000)]
Check for NULL return value of PyList_New (follow-up to patch #486743).

23 years agoPatch 487906: update inline docs.
Martin v. Löwis [Sun, 2 Dec 2001 18:09:41 +0000 (18:09 +0000)]
Patch 487906: update inline docs.

23 years agoAnother name.
Fred Drake [Sun, 2 Dec 2001 15:13:35 +0000 (15:13 +0000)]
Another name.

23 years agoAdd reference to the "String Methods" section to make that information
Fred Drake [Sun, 2 Dec 2001 15:10:46 +0000 (15:10 +0000)]
Add reference to the "String Methods" section to make that information
easier to find.  Based on the comment from Steve Alexander on the
zope-coders mailing list.

23 years agoPatch #487784: Support Unicode commands in popen3/4 handling on UNIX.
Martin v. Löwis [Sun, 2 Dec 2001 13:32:15 +0000 (13:32 +0000)]
Patch #487784: Support Unicode commands in popen3/4 handling on UNIX.

23 years agoCompute thread headers through shell expansion in configure.
Martin v. Löwis [Sun, 2 Dec 2001 13:02:32 +0000 (13:02 +0000)]
Compute thread headers through shell expansion in configure.
Fixes #485679.

23 years agoPatch #481718: Time module doc string changes.
Martin v. Löwis [Sun, 2 Dec 2001 12:27:43 +0000 (12:27 +0000)]
Patch #481718: Time module doc string changes.

23 years agoPatch #487275: windows-1251 charset alias.
Martin v. Löwis [Sun, 2 Dec 2001 12:26:03 +0000 (12:26 +0000)]
Patch #487275: windows-1251 charset alias.

23 years agoPatch #487275: Add windows-1251 charset alias.
Martin v. Löwis [Sun, 2 Dec 2001 12:24:19 +0000 (12:24 +0000)]
Patch #487275: Add windows-1251 charset alias.

23 years agoPatch #486743: remove bad INCREF, propagate exception in append_objects.
Martin v. Löwis [Sun, 2 Dec 2001 12:21:34 +0000 (12:21 +0000)]
Patch #486743: remove bad INCREF, propagate exception in append_objects.

23 years agoPatch #487455: make types.StringTypes a tuple.
Martin v. Löwis [Sun, 2 Dec 2001 12:08:06 +0000 (12:08 +0000)]
Patch #487455: make types.StringTypes a tuple.

23 years agoRemove INET6 define. Use ENABLE_IPV6 instead.
Martin v. Löwis [Sun, 2 Dec 2001 10:15:37 +0000 (10:15 +0000)]
Remove INET6 define. Use ENABLE_IPV6 instead.

23 years agomywrite(): The test for trouble in PyOS_vsnprintf was wrong on both
Tim Peters [Sun, 2 Dec 2001 08:29:16 +0000 (08:29 +0000)]
mywrite():  The test for trouble in PyOS_vsnprintf was wrong on both
ends.  Also, when there is trouble, ensure the buffer has a traiing
0 byte.

23 years agoWhen the number of bytes written to the malloc'ed buffer is larger
Guido van Rossum [Sat, 1 Dec 2001 16:00:10 +0000 (16:00 +0000)]
When the number of bytes written to the malloc'ed buffer is larger
than the argument string size, copy as many bytes as will fit
(including a terminating '\0'), rather than not copying anything.
This to make it satisfy the C99 spec.

23 years agoWhitespace normalization.
Tim Peters [Sat, 1 Dec 2001 04:11:16 +0000 (04:11 +0000)]
Whitespace normalization.

23 years agoSF bug #487743: test_builtin fails on 64 bit platform.
Tim Peters [Sat, 1 Dec 2001 02:52:56 +0000 (02:52 +0000)]
SF bug #487743: test_builtin fails on 64 bit platform.
Bugfix candidate.
int_repr():  we've never had a buffer big enough to hold the largest
possible result on a 64-bit box.  Now that we're using snprintf instead
of sprintf, this can lead to nonsense results instead of random stack
corruption.

23 years agoSynchronize with pulldom from PyXML (revision 1.18).
Fred Drake [Fri, 30 Nov 2001 22:22:26 +0000 (22:22 +0000)]
Synchronize with pulldom from PyXML (revision 1.18).

23 years agoSynchronize with minidom from PyXML (revision 1.35).
Fred Drake [Fri, 30 Nov 2001 22:21:58 +0000 (22:21 +0000)]
Synchronize with minidom from PyXML (revision 1.35).

23 years agoDrop xmllib in favor of SAX.
Fred Drake [Fri, 30 Nov 2001 19:30:03 +0000 (19:30 +0000)]
Drop xmllib in favor of SAX.

23 years agoAdd a couple of entries to the whitespace-cleanups table.
Fred Drake [Fri, 30 Nov 2001 19:25:39 +0000 (19:25 +0000)]
Add a couple of entries to the whitespace-cleanups table.

23 years agoAdd description of tkCommonDialog.
Fred Drake [Fri, 30 Nov 2001 19:24:49 +0000 (19:24 +0000)]
Add description of tkCommonDialog.

23 years agoAdded two new conversion specifications.
Fred Drake [Fri, 30 Nov 2001 19:06:18 +0000 (19:06 +0000)]
Added two new conversion specifications.

23 years agoChange the chapter title to reflect the Tk affinity.
Fred Drake [Fri, 30 Nov 2001 18:17:24 +0000 (18:17 +0000)]
Change the chapter title to reflect the Tk affinity.
Use the new seealso* environment in the section pointing out other GUI
toolkits.

23 years agoAdd a new environment in the Python docs markup: seealso*. This is similar
Fred Drake [Fri, 30 Nov 2001 18:09:54 +0000 (18:09 +0000)]
Add a new environment in the Python docs markup: seealso*.  This is similar
to seealso, but does not add the "See also:" header or put the content in a
box in the HTML version.

Updated the description of \seeurl to better indicate when it should be used;
the old description was written before we had \seetitle.

23 years agoMinor adjustments to markup for the getDOMImplementation() description.
Fred Drake [Fri, 30 Nov 2001 16:58:15 +0000 (16:58 +0000)]
Minor adjustments to markup for the getDOMImplementation() description.

23 years agoAdded the convenience constants that are present in PyXML to make these
Fred Drake [Fri, 30 Nov 2001 15:37:33 +0000 (15:37 +0000)]
Added the convenience constants that are present in PyXML to make these
more similar.

23 years agoMerged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen [Fri, 30 Nov 2001 14:16:36 +0000 (14:16 +0000)]
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
changes from start of branch upto r22b2 were already merged, of course).

23 years agounicodedata_decomposition(): sprintf -> PyOS_snprintf.
Tim Peters [Fri, 30 Nov 2001 07:23:05 +0000 (07:23 +0000)]
unicodedata_decomposition():  sprintf -> PyOS_snprintf.

23 years agoUpdated documentation for the new httplib interface, by Kalle Svensson.
Fred Drake [Fri, 30 Nov 2001 06:06:40 +0000 (06:06 +0000)]
Updated documentation for the new httplib interface, by Kalle Svensson.
This closes SF bug #458447.

23 years agoUpdate the signature of PyFile_WriteString().
Fred Drake [Thu, 29 Nov 2001 22:42:59 +0000 (22:42 +0000)]
Update the signature of PyFile_WriteString().

23 years agoMore information about Tix support, contributed by Mike Clarkson.
Fred Drake [Thu, 29 Nov 2001 21:09:08 +0000 (21:09 +0000)]
More information about Tix support, contributed by Mike Clarkson.

23 years agoVarious cleanups & markup fixes, mostly relating to the stat and statvfs
Fred Drake [Thu, 29 Nov 2001 20:48:44 +0000 (20:48 +0000)]
Various cleanups & markup fixes, mostly relating to the stat and statvfs
result object changes.

23 years agoNeil Schemenauer suggested a small improvement to one of the example REs.
Fred Drake [Thu, 29 Nov 2001 20:23:14 +0000 (20:23 +0000)]
Neil Schemenauer suggested a small improvement to one of the example REs.

23 years agowriteline() --> writelines()
Fred Drake [Thu, 29 Nov 2001 19:04:50 +0000 (19:04 +0000)]
writeline() --> writelines()
This closes SF bug #487147.

23 years agoUse identity instead of equality when looking for referrers. Fixes #485781.
Martin v. Löwis [Thu, 29 Nov 2001 18:08:31 +0000 (18:08 +0000)]
Use identity instead of equality when looking for referrers. Fixes #485781.

23 years agoNew section of regular expression examples contributed by Skip Montanaro,
Fred Drake [Thu, 29 Nov 2001 08:45:22 +0000 (08:45 +0000)]
New section of regular expression examples contributed by Skip Montanaro,
with some extensions and changes from me.
This closes SF patch #472825.

23 years agoClarify the description of the creation of an owned reference from an API
Fred Drake [Thu, 29 Nov 2001 07:16:19 +0000 (07:16 +0000)]
Clarify the description of the creation of an owned reference from an API
function.
This closes SF bug #486657.

23 years agoAdd an index entry for the discussion of PyEval_CallObject().
Fred Drake [Thu, 29 Nov 2001 05:02:34 +0000 (05:02 +0000)]
Add an index entry for the discussion of PyEval_CallObject().
This is related to SF bug #485165.

23 years agoA few small changes:
Fred Drake [Thu, 29 Nov 2001 04:30:46 +0000 (04:30 +0000)]
A few small changes:
- Change PREFIX to PREFIXES, which contains a sequence of prefix strings.
  This is useful since we want to look for both Py and PY.
- Wrap a long line.
- Collect struct tags as well as typedef names.  Since we generally only
  use one of the other, that improves coverage.
- Make the script executable on Unix.

This could use a better approach to determine if a symbol is documented,
and could easily avoid keeping the massive string in memory.  That would
take time to actually write more code, though, so we'll bail on that
for now.

23 years agoSF bug 486278 SystemError: Python/getargs.c:1086: bad.
Tim Peters [Thu, 29 Nov 2001 03:26:37 +0000 (03:26 +0000)]
SF bug 486278 SystemError: Python/getargs.c:1086: bad.
vgetargskeywords():  Now that this routine is checking for bad input
(rather than dump core in some cases), some bad calls are raising errors
that previously "worked".  This patch makes the error strings more
revealing, and changes the exceptions from SystemError to RuntimeError
(under the theory that SystemError is more of a "can't happen!" assert-
like thing, and so inappropriate for bad arguments to a public C API
function).

23 years agocanonic(): don't use abspath() for filenames looking like <...>; this
Guido van Rossum [Thu, 29 Nov 2001 02:50:15 +0000 (02:50 +0000)]
canonic(): don't use abspath() for filenames looking like <...>; this
fixes the problem reported in SF bug #477023 (Jonathan Mark): "pdb:
unexpected path confuses Emacs".

23 years agoSF bug 486480: zipfile __del__ is broken
Tim Peters [Wed, 28 Nov 2001 23:16:40 +0000 (23:16 +0000)]
SF bug 486480:  zipfile __del__ is broken
ZipFile.__del__():  call ZipFile.close(), like its docstring says it does.
ZipFile.close():  allow calling more than once (as all file-like objects
in Python should support).

23 years agoPyFloat_AsStringEx(): This function takes an output char* but doesn't
Tim Peters [Wed, 28 Nov 2001 22:43:45 +0000 (22:43 +0000)]
PyFloat_AsStringEx():  This function takes an output char* but doesn't
pass the buffer length.  Stop using it.  It should be deprecated, but too
late in the release cycle to do that now.
New static format_float() does the same thing but requires passing the
buffer length too.  Use it instead.

23 years agoTwo screwups fixed for sizeof(char *) instead of sizeof(char []).
Jeremy Hylton [Wed, 28 Nov 2001 22:14:37 +0000 (22:14 +0000)]
Two screwups fixed for sizeof(char *) instead of sizeof(char []).

Also change all the helper functions to pass along the size of the
msgbuf and use PyOS_snprintf() when writing into the buffer.

23 years agoPyFile_WriteString(): change prototype so that the string arg is
Tim Peters [Wed, 28 Nov 2001 22:13:25 +0000 (22:13 +0000)]
PyFile_WriteString():  change prototype so that the string arg is
const char* instead of char*.  The change is conceptually correct, and
indirectly fixes a compiler wng introduced when somebody else innocently
passed a const char* to this function.

23 years agoMore sprintf -> PyOS_snprintf.
Tim Peters [Wed, 28 Nov 2001 22:07:30 +0000 (22:07 +0000)]
More sprintf -> PyOS_snprintf.

23 years agoUse PyOS_snprintf() instead of sprintf().
Jeremy Hylton [Wed, 28 Nov 2001 21:49:51 +0000 (21:49 +0000)]
Use PyOS_snprintf() instead of sprintf().

23 years agoUse PyOS_snprintf() at some cost even though it was correct before.
Jeremy Hylton [Wed, 28 Nov 2001 21:46:59 +0000 (21:46 +0000)]
Use PyOS_snprintf() at some cost even though it was correct before.

seterror() uses a char array and a pointer to the current position in
that array.  Use snprintf() and compute the amount of space left in
the buffer based on the current pointer position.

23 years agoUse PyOS_vsnprintf() and check its return value.
Jeremy Hylton [Wed, 28 Nov 2001 21:44:53 +0000 (21:44 +0000)]
Use PyOS_vsnprintf() and check its return value.

If it returns -1 (which indicates overflow on old Linux platforms and
perhaps on Windows) or size greater than buffer, write a message
indicating that the previous message was truncated.

23 years agoste_repr(): Conversion of sprintf() to PyOS_snprintf() for buffer
Barry Warsaw [Wed, 28 Nov 2001 21:36:28 +0000 (21:36 +0000)]
ste_repr(): Conversion of sprintf() to PyOS_snprintf() for buffer
overrun avoidance.

23 years agoaix_loaderror(): Conversion of sprintf() to PyOS_snprintf() for buffer
Barry Warsaw [Wed, 28 Nov 2001 21:35:49 +0000 (21:35 +0000)]
aix_loaderror(): Conversion of sprintf() to PyOS_snprintf() for buffer
overrun avoidance.

23 years agoReverting last change so we don't have to think about the assert macro
Barry Warsaw [Wed, 28 Nov 2001 21:34:34 +0000 (21:34 +0000)]
Reverting last change so we don't have to think about the assert macro
redefinition problem.

23 years agoUse strncpy() instead of sprintf() in calculate_path().
Jeremy Hylton [Wed, 28 Nov 2001 21:30:04 +0000 (21:30 +0000)]
Use strncpy() instead of sprintf() in calculate_path().

Also reformat calculate_path() using the standard format.

23 years agocode_repr(), com_addop_varname(), com_list_comprehension(),
Barry Warsaw [Wed, 28 Nov 2001 21:10:39 +0000 (21:10 +0000)]
code_repr(), com_addop_varname(), com_list_comprehension(),
com_arglist(), symtable_check_unoptimized(), symtable_params(),
symtable_global(), symtable_list_comprehension():

    Conversion of sprintf() to PyOS_snprintf() for buffer overrun
    avoidance.

23 years agoPyGrammar_LabelRepr(): Conversion of sprintf() to PyOS_snprintf() for
Barry Warsaw [Wed, 28 Nov 2001 21:04:25 +0000 (21:04 +0000)]
PyGrammar_LabelRepr(): Conversion of sprintf() to PyOS_snprintf() for
buffer overrun avoidance.

23 years agoPyWin_FindRegisteredModule(): Conversion of sprintf() to
Barry Warsaw [Wed, 28 Nov 2001 21:03:37 +0000 (21:03 +0000)]
PyWin_FindRegisteredModule(): Conversion of sprintf() to
PyOS_snprintf() for buffer overrun avoidance.

23 years agoweakref_repr(), proxy_repr(): Conversion of sprintf() to
Barry Warsaw [Wed, 28 Nov 2001 21:01:56 +0000 (21:01 +0000)]
weakref_repr(), proxy_repr(): Conversion of sprintf() to
PyOS_snprintf() for buffer overrun avoidance.

23 years agoformatfloat(), formatint(): Conversion of sprintf() to PyOS_snprintf()
Barry Warsaw [Wed, 28 Nov 2001 21:00:41 +0000 (21:00 +0000)]
formatfloat(), formatint(): Conversion of sprintf() to PyOS_snprintf()
for buffer overrun avoidance.

23 years agostructseq_new(): Conversion of sprintf() to PyOS_snprintf() for buffer
Barry Warsaw [Wed, 28 Nov 2001 20:56:44 +0000 (20:56 +0000)]
structseq_new(): Conversion of sprintf() to PyOS_snprintf() for buffer
overrun avoidance.

23 years agoPyInt_FromString(), int_repr(), int_oct(), int_hex(): Conversion of
Barry Warsaw [Wed, 28 Nov 2001 20:55:34 +0000 (20:55 +0000)]
PyInt_FromString(), int_repr(), int_oct(), int_hex(): Conversion of
sprintf() to PyOS_snprintf() for buffer overrun avoidance.

23 years agoPyFloat_FromString(): Conversion of sprintf() to PyOS_snprintf() for
Barry Warsaw [Wed, 28 Nov 2001 20:52:21 +0000 (20:52 +0000)]
PyFloat_FromString(): Conversion of sprintf() to PyOS_snprintf() for
buffer overrun avoidance.

23 years agocomplex_to_buf(), complex_subtype_from_c_complex(): Conversion of
Barry Warsaw [Wed, 28 Nov 2001 20:50:56 +0000 (20:50 +0000)]
complex_to_buf(), complex_subtype_from_c_complex(): Conversion of
sprintf() to PyOS_snprintf() for buffer overrun avoidance.

complex_print(), complex_repr(), complex_str(): Call complex_to_buf()
passing in sizeof(buf).

23 years agoUse PyOS_snprintf instead of sprintf.
Jeremy Hylton [Wed, 28 Nov 2001 20:42:20 +0000 (20:42 +0000)]
Use PyOS_snprintf instead of sprintf.

23 years agoUse PyOS_snprintf instead of sprintf.
Jeremy Hylton [Wed, 28 Nov 2001 20:37:25 +0000 (20:37 +0000)]
Use PyOS_snprintf instead of sprintf.

Also replace a switch statement with one case and a default to an
if/else.

23 years agoRepair a botched PyOS_snprintf conversion.
Tim Peters [Wed, 28 Nov 2001 20:32:57 +0000 (20:32 +0000)]
Repair a botched PyOS_snprintf conversion.

23 years agoUse PyOS_snprintf when possible.
Jeremy Hylton [Wed, 28 Nov 2001 20:29:22 +0000 (20:29 +0000)]
Use PyOS_snprintf when possible.

23 years agosprintf -> PyOS_snprintf in some "obviously safe" cases.
Tim Peters [Wed, 28 Nov 2001 20:27:42 +0000 (20:27 +0000)]
sprintf -> PyOS_snprintf in some "obviously safe" cases.
Also changed <>-style #includes to ""-style in some places where the
former didn't make sense.

23 years agoUse PyOS_snprintf instead of sprintf.
Jeremy Hylton [Wed, 28 Nov 2001 20:24:33 +0000 (20:24 +0000)]
Use PyOS_snprintf instead of sprintf.

Just being sure.  The old code looks like it was safe, but there's no
harm in double-checking.

23 years agoChecking in Zooko's version per SF patch #476866, plus my changes to
Guido van Rossum [Wed, 28 Nov 2001 19:41:45 +0000 (19:41 +0000)]
Checking in Zooko's version per SF patch #476866, plus my changes to
the usage docs: (a) align properly, (b) explain properly.

23 years agoRemoved preprocessor gimmick trying to force use of snprintf emulation
Tim Peters [Wed, 28 Nov 2001 16:51:49 +0000 (16:51 +0000)]
Removed preprocessor gimmick trying to force use of snprintf emulation
before 2.2b1.

23 years agoFix SF bug [ #476852 ] Some bad macros in abstract.h
Jeremy Hylton [Wed, 28 Nov 2001 16:20:07 +0000 (16:20 +0000)]
Fix SF bug [ #476852 ] Some bad macros in abstract.h

Change macros as requested by Guido

23 years agoAdding test for Unicode repr()-output.
Marc-André Lemburg [Wed, 28 Nov 2001 14:03:14 +0000 (14:03 +0000)]
Adding test for Unicode repr()-output.

23 years agoFix for bug #485951: repr diff between string and unicode.
Marc-André Lemburg [Wed, 28 Nov 2001 12:56:20 +0000 (12:56 +0000)]
Fix for bug #485951: repr diff between string and unicode.

23 years agoFixes for possible buffer overflows in sprintf() usages.
Marc-André Lemburg [Wed, 28 Nov 2001 11:47:00 +0000 (11:47 +0000)]
Fixes for possible buffer overflows in sprintf() usages.

23 years agoRe-arrange the modules in the "Internet Data Handling" chapter to try to
Fred Drake [Wed, 28 Nov 2001 07:50:45 +0000 (07:50 +0000)]
Re-arrange the modules in the "Internet Data Handling" chapter to try to
achieve a more sensible organization.

23 years agoClarify that on some systems, lockf() using LOCK_EX requires that the file
Fred Drake [Wed, 28 Nov 2001 07:48:32 +0000 (07:48 +0000)]
Clarify that on some systems, lockf() using LOCK_EX requires that the file
is opened for writing; this closes SF bug #485342.

Added notes that file objects are also accepted in the place of file
descriptors.