summaryrefslogtreecommitdiffstats
path: root/Modules
Commit message (Collapse)AuthorAgeFilesLines
* SF patch #459385 (Norman Vine): time.timezone fix for Cygwin.Guido van Rossum2001-09-251-19/+19
| | | | Also did some whitespace normalization.
* StringIO patch #462596: let's [c]StringIO accept read buffers onMarc-André Lemburg2001-09-241-9/+5
| | | | input to .write() too.
* Patch #463421: speed up md5 module with real memcpy/set.Martin v. Löwis2001-09-241-28/+4
|
* Reactivate participation of expat parsers in GC. Fixes bug #462710.Martin v. Löwis2001-09-231-2/+33
|
* I_getiter(): Function for the tp_iter slot of Itype so thatBarry Warsaw2001-09-221-20/+45
| | | | | | cStringIO's can participate in the iterator protocol. Fill the Itype.tp_iter slot with I_getiter()
* Add optional docstrings to getset descriptors. Fortunately, there'sGuido van Rossum2001-09-201-2/+3
| | | | | | | | | | no backwards compatibility to worry about, so I just pushed the 'closure' struct member to the back -- it's never used in the current code base (I may eliminate it, but that's more work because the getter and setter signatures would have to change.) As examples, I added actual docstrings to the getset attributes of a few types: file.closed, xxsubtype.spamdict.state.
* Add optional docstrings to member descriptors. For backwardsGuido van Rossum2001-09-201-2/+3
| | | | | | | | | | | | | | | compatibility, this required all places where an array of "struct memberlist" structures was declared that is referenced from a type's tp_members slot to change the type of the structure to PyMemberDef; "struct memberlist" is now only used by old code that still calls PyMember_Get/Set. The code in PyObject_GenericGetAttr/SetAttr now calls the new APIs PyMember_GetOne/SetOne, which take a PyMemberDef argument. As examples, I added actual docstrings to the attributes of a few types: file, complex, instance method, super, and xxsubtype.spamlist. Also converted the symtable to new style getattr.
* PyLocale_setlocale(): silence compiler warning about free() of a constGuido van Rossum2001-09-201-1/+1
| | | | char *.
* Patch #435971: UTF-7 codec by Brian Quinlan.Marc-André Lemburg2001-09-201-0/+42
|
* Include ctype.h after Python.h.Martin v. Löwis2001-09-191-1/+1
|
* Patch to bug #461753: Allow None in ExternalEntityParserCreate.Martin v. Löwis2001-09-191-1/+1
|
* fixed #449964: sre.sub raises an exception if the template contains aFredrik Lundh2001-09-181-12/+16
| | | | | | \g<x> group reference followed by a character escape (also restructured a few things on the way to fixing #449000)
* an SRE bugfix a day keeps Guido away...Fredrik Lundh2001-09-181-9/+14
| | | | | | | #462270: sub-tle difference between pre.sub and sre.sub. PRE ignored an empty match at the previous location, SRE didn't. also synced with Secret Labs "sreopen" codebase.
* [Patch #462255, from Jason Tishler] Re-enables building the resouceAndrew M. Kuchling2001-09-171-1/+2
| | | | module on the Cygwin platform.
* The 'p' (Pascal string) pack code acts unreasonably when the string sizeTim Peters2001-09-151-0/+2
| | | | | and count exceed 255. Changed to preserve as much of the string as possible (instead of count%256 characters).
* Silence warnings about passing unsigned char** as char**.Martin v. Löwis2001-09-081-4/+4
|
* Patch #450702: allow threads when calling into zlib, protect usage ofMartin v. Löwis2001-09-071-114/+350
| | | | the module in multiple threads with a global lock.
* Fix compiler warnings. This closes some of the #458880 problem.Martin v. Löwis2001-09-071-9/+8
|
* Revert parts of patch #453627, documenting the resulting test failuresMartin v. Löwis2001-09-062-35/+3
| | | | instead.
* Enable large file support on Win32 systems.Tim Peters2001-09-061-3/+3
| | | | | | | | | Curious: the MS docs say stati64 etc are supported even on Win95, but Win95 doesn't support a filesystem that allows partitions > 2 Gb. test_largefile: This was opening its test file in text mode. I have no idea how that worked under Win64, but it sure needs binary mode on Win98. BTW, on Win98 test_largefile runs quickly (under a second).
* Rework the way we try to check for libm overflow, given that C99 no longerTim Peters2001-09-052-44/+15
| | | | | | | | | | | | | | | requires that errno ever get set, and it looks like glibc is already playing that game. New rules: + Never use HUGE_VAL. Use the new Py_HUGE_VAL instead. + Never believe errno. If overflow is the only thing you're interested in, use the new Py_OVERFLOWED(x) macro. If you're interested in any libm errors, use the new Py_SET_ERANGE_IF_OVERFLOW(x) macro, which attempts to set errno the way C89 said it worked. Unfortunately, none of these are reliable, but they work on Windows and I *expect* under glibc too.
* Patch #449815: Set filesystemencoding based on CODESET.Martin v. Löwis2001-09-051-1/+20
|
* Patch #453627: Define the following macros when compiling on a UnixWare 7.x ↵Martin v. Löwis2001-09-052-3/+35
| | | | | | | system: SCO_ATAN2_BUG, SCO_ACCEPT_BUG, and STRICT_SYSV_CURSES. Work aroudn a bug in the SCO UnixWare atan2() implementation.
* loghelper(): Try to nudge the compiler into doing mults in an order thatTim Peters2001-09-051-1/+1
| | | | minimizes roundoff error.
* Return reasonable results for math.log(long) and math.log10(long) (we wereTim Peters2001-09-051-4/+64
| | | | | | getting Infs, NaNs, or nonsense in 2.1 and before; in yesterday's CVS we were getting OverflowError; but these functions always make good sense for positive arguments, no matter how large).
* Mechanical fiddling to make this easier to work with in my editor.Tim Peters2001-09-041-18/+12
| | | | Repaired the ldexp docstring (said the name of the func was "ldexp_doc").
* [Bug #457654] bkgd() used a hard-coded A_NORMAL attribute, when it shouldAndrew M. Kuchling2001-09-041-1/+1
| | | | have used the attribute argument provided as a parameter
* PEP 238 documented -Qwarn as warning only for classic int or longGuido van Rossum2001-09-041-4/+8
| | | | | division, and this makes sense. Add -Qwarnall to warn for all classic divisions, as required by the fixdiv.py tool.
* Rename the -D option to -Q, to avoid a Jython option name conflict.Guido van Rossum2001-09-041-7/+7
|
* Oops. The -W option takes args, not -X.Guido van Rossum2001-08-311-1/+1
|
* Add warning mode for classic division, almost exactly as specified inGuido van Rossum2001-08-311-19/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PEP 238. Changes: - add a new flag variable Py_DivisionWarningFlag, declared in pydebug.h, defined in object.c, set in main.c, and used in {int,long,float,complex}object.c. When this flag is set, the classic division operator issues a DeprecationWarning message. - add a new API PyRun_SimpleStringFlags() to match PyRun_SimpleString(). The main() function calls this so that commands run with -c can also benefit from -Dnew. - While I was at it, I changed the usage message in main() somewhat: alphabetized the options, split it in *four* parts to fit in under 512 bytes (not that I still believe this is necessary -- doc strings elsewhere are much longer), and perhaps most visibly, don't display the full list of options on each command line error. Instead, the full list is only displayed when -h is used, and otherwise a brief reminder of -h is displayed. When -h is used, write to stdout so that you can do `python -h | more'. Notes: - I don't want to use the -W option to control whether the classic division warning is issued or not, because the machinery to decide whether to display the warning or not is very expensive (it involves calling into the warnings.py module). You can use -Werror to turn the warnings into exceptions though. - The -Dnew option doesn't select future division for all of the program -- only for the __main__ module. I don't know if I'll ever change this -- it would require changes to the .pyc file magic number to do it right, and a more global notion of compiler flags. - You can usefully combine -Dwarn and -Dnew: this gives the __main__ module new division, and warns about classic division everywhere else.
* Removed unreachable return to silence SGI compiler.Sjoerd Mullender2001-08-301-2/+1
|
* Removed an unreachable break statement to silence SGI compiler.Sjoerd Mullender2001-08-301-1/+1
|
* gcmodule is now always compiledNeil Schemenauer2001-08-301-3/+0
|
* gcmodule is now enabled hereNeil Schemenauer2001-08-301-0/+6
|
* Make more things internal to this file. RemoveNeil Schemenauer2001-08-301-93/+148
| | | | | | | | | visit_finalizer_reachable since it's the same as visit_reachable. Rename visit_reachable to visit_move. Objects can now have the GC type flag set, reachable by tp_traverse and not be in a GC linked list. This should make the collector more robust and easier to use by extension module writers. Add memory management functions for container objects (new, del, resize).
* Use new GC API.Neil Schemenauer2001-08-291-10/+10
|
* Remove bogus PyGC_HEAD_SIZE.Neil Schemenauer2001-08-291-1/+1
|
* SF bug [#456252] Python should never stomp on [u]intptr_t.Tim Peters2001-08-292-5/+5
| | | | | | | | | | | pyport.h: typedef a new Py_intptr_t type. DELICATE ASSUMPTION: That HAVE_UINTPTR_T implies intptr_t is available as well as uintptr_t. If that turns out not to be true, things must get uglier (C99 wants both, so I think it's an assumption we're *likely* to get away with). thread_nt.h, PyThread_start_new_thread: MS _beginthread is documented as returning unsigned long; no idea why uintptr_t was being used. Others: Always use Py_[u]intptr_t, never [u]intptr_t directly.
* load_int: The fallback to long ints was coded in such a way that itTim Peters2001-08-281-4/+3
| | | | couldn't succeed. Fixed.
* SF patch [ #455137 ] Makes popen work with COMMAND.COM on WNT, fromTim Peters2001-08-271-9/+22
| | | | Brian Quinlan.
* Back out trying to use the C values for CO_xxx.Tim Peters2001-08-241-31/+2
| | | | | __future__.py reverted to 1.9. newmodule.c reverted to 2.32.
* Merge changes from r22a2-branch back into trunk. Also, change patchBarry Warsaw2001-08-221-5/+1
| | | | level to 2.2a2+
* make the gettmarg error message more correct by making it more vague ;-)Skip Montanaro2001-08-221-1/+1
| | | | see SF bug 434143, part of which this addresses
* SSL_dealloc(): Apply the change suggested in SF bug #425370 whichBarry Warsaw2001-08-201-1/+1
| | | | | changes the order of the free calls to be the reverse of the alloc calls. Closes that bug.
* It will always be a string, because it is created just before this call.Jeremy Hylton2001-08-201-1/+1
|
* SF patch #452239 by Gordon McMillan, to fix SF bug #451547.Guido van Rossum2001-08-181-1/+25
| | | | | | | | | | This patch attempts to do to cPickle what Guido did for pickle.py v 1.50. That is: save_global tries importing the module, and fetching the name from the module. If that fails, or the returned object is not the same one we started with, it raises a PicklingError. (All this so pickling a lambda will fail at save time, rather than load time).
* Expose the CO_xxx flags via the "new" module (re-solving a problem "theTim Peters2001-08-181-2/+31
| | | | | | | | | | right way"). Fiddle __future__.py to use them. Jeremy's pyassem.py may also want to use them (by-hand duplication of magic numbers is brittle), but leaving that to his judgment. Beef up __future__'s test to verify the exported feature names appear correct.
* added warnings about security risk of using tmpnam and tempnamSkip Montanaro2001-08-181-0/+10
|
* Patch #445762: Support --disable-unicodeMartin v. Löwis2001-08-175-13/+45
| | | | | | | | - Do not compile unicodeobject, unicodectype, and unicodedata if Unicode is disabled - check for Py_USING_UNICODE in all places that use Unicode functions - disables unicode literals, and the builtin functions - add the types.StringTypes list - remove Unicode literals from most tests.