summaryrefslogtreecommitdiffstats
path: root/Modules
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* Stop adding 3 to FD_SETSIZE -- it makes no sense. If it turns out itTim Peters2001-08-161-15/+11
| | | | | actually does <wink>, perhaps an Insure run will catch it. Also removed senseless Windows comment.
* init_sre(): Plug a little leak reported by Insure.Barry Warsaw2001-08-161-2/+5
|
* Fixed a couple of minor formatting nits where lines were > 79 columns wide.Barry Warsaw2001-08-161-2/+4
|
* select_select(): Closing bug #448351 the easy way, i.e. by changingBarry Warsaw2001-08-161-8/+21
| | | | | | | | | | the "#ifdef MS_WINDOWS" to "#ifdef SELECT_USES_HEAP" and by setting SELECT_USES_HEAP when FD_SETSIZE > 1024. The indirection seems useful since this subtly changes the path that "normal" Windows programs take (where Timmie sez FD_SETSIZE = 512). If that's a problem for Windows, he has only one place to change.
* Use METH_O where possible (two functions). This does not lead to realFred Drake2001-08-161-29/+24
| | | | | performance changes since the affected functions are not expected to be used frequently, but reduces the volume of code.
* Change the type names to xxsublist.<name>.Guido van Rossum2001-08-161-2/+2
|
* Add 'state' as a get/set attribute to spamlist. This serves as anGuido van Rossum2001-08-151-1/+12
| | | | example.
* Add 'state' as a read-only attribute to spamdict. This serves as anGuido van Rossum2001-08-151-1/+7
| | | | example.
* Fix portability problems with glibc 2.0, as reported in #449157.Martin v. Löwis2001-08-154-1/+17
|
* Use the abstract object interfaces when digging around in module objectsFred Drake2001-08-151-19/+19
| | | | instead of directly manipulating the underlying dictionary.
* With WITH_NEXT_FRAMEWORK defined we now also expect a normal PythonJack Jansen2001-08-151-6/+20
| | | | | | installation. If there is no LANDMARK we assume we're a bare framework in the install directory (again WITH_NEXT_FRAMEWORK only).
* Bump size of sprintf buffer. Suggested by Alex Coventry.Martin v. Löwis2001-08-121-1/+1
|
* Autotest for netpacket/packet.h, as it is not available on all Linux versions.Martin v. Löwis2001-08-101-6/+6
| | | | Depend AF_PACKET on HAVE_NETPACKET_PACKET_H. Fixes #449157
* _DATE_FMT does not always accompany CODESET.Martin v. Löwis2001-08-101-0/+3
|
* Remove "referents" structure (it's not needed). Check return valueNeil Schemenauer2001-08-101-20/+17
| | | | of PyList_Append.