summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Add Raymond H to the list of authors; add some XXX comments aboutGuido van Rossum2002-08-211-0/+9
| | | | possible API improvements.
* Fast size check for sub/super set testsRaymond Hettinger2002-08-211-0/+4
|
* Optimize try/except ordering in sets.py.Raymond Hettinger2002-08-211-25/+25
| | | | | | | | Gains a 5:1 speed-up for membership testing by handling the most common case first (the case where the element is hashable). Closes SF Patch 597444.
* Minor typoRaymond Hettinger2002-08-201-1/+1
|
* Rename popitem() to pop(). (An idea from SF patch 597444.)Guido van Rossum2002-08-202-3/+3
|
* Move __init__ from BaseSet into Set and ImmutableSet. This causes aGuido van Rossum2002-08-201-16/+28
| | | | | tiny amount of code duplication, but makes it possible to give BaseSet an __init__ that raises an exception.
* Typo repair. Please include in any backports.Guido van Rossum2002-08-201-1/+1
|
* Add a note reminding the reader that sets are not sequences. IGuido van Rossum2002-08-201-0/+10
| | | | | received feedback that was based in the misunderstanding that sets were sequences.
* SF patch 595846 by Brett Cannon: Update environ for CGIHTTPServer.pyGuido van Rossum2002-08-201-2/+1
| | | | | | | This patch causes CGIHTTPServer to update os.environ regardless of how it tries to handle calls (fork, popen*, etc.). Backport bugfix candidate.
* long_format(), long_lshift(): Someone on c.l.py is trying to boostTim Peters2002-08-201-2/+2
| | | | | | | | | | | | SHIFT and MASK, and widen digit. One problem is that code of the form digit << small_integer implicitly assumes that the result fits in an int or unsigned int (platform-dependent, but "int sized" in any case), since digit is promoted "just" to int or unsigned via the usual integer promotions. But if digit is typedef'ed as unsigned int, this loses information. The cure for this is just to cast digit to twodigits first.
* Fix some endcase bugs in unicode rfind()/rindex() and endswith().Guido van Rossum2002-08-204-4/+11
| | | | | | These were reported and fixed by Inyeol Lee in SF bug 595350. The endswith() bug was already fixed in 2.3, but this adds some more test cases.
* Comment typo repair.Michael W. Hudson2002-08-201-1/+1
|
* My patch #597221. Use f_lasti more consistently.Michael W. Hudson2002-08-201-9/+9
|
* Bump version number to 2.3Barry Warsaw2002-08-201-1/+1
|
* Added tests for SF patch #597593, syntactically invalid Content-Type: headers.Barry Warsaw2002-08-201-2/+23
|
* get_content_type(), get_content_maintype(), get_content_subtype(): RFCBarry Warsaw2002-08-201-5/+5
| | | | | | | | | | | 2045, section 5.2 states that if the Content-Type: header is syntactically invalid, the default type should be text/plain. Implement minimal sanity checking of the header -- it must have exactly one slash in it. This closes SF patch #597593 by Skip, but in a different way. Note that these methods used to raise ValueError for invalid ctypes, but now they won't.
* _dispatch(): Use get_content_maintype() and get_content_subtype() toBarry Warsaw2002-08-201-3/+2
| | | | | | get the MIME main and sub types, instead of getting the whole ctype and splitting it here. The two more specific methods now correctly implement RFC 2045, section 5.2.
* getinstclassname(): Squash new compiler wng in assert (comparison ofTim Peters2002-08-201-1/+1
| | | | signed vs unsigned).
* Clarify the endpos argument to the rx.match() method.Fred Drake2002-08-201-2/+6
| | | | Closes SF bug #597177.
* test_three_lines(): Test case reported by Andrew McNamara. Works inBarry Warsaw2002-08-201-0/+8
| | | | email 2.2 but fails in email 1.0.
* Cover the sets module.Andrew M. Kuchling2002-08-201-0/+95
| | | | | (There's a link to PEP218; has PEP218 been updated to match the actual module implementation?)
* Create two subsections of the "Core Language Changes" section, becauseAndrew M. Kuchling2002-08-201-67/+104
| | | | | the list is getting awfully long Mention Karatsuba multiplication and some other items
* Add versionadded for operator.powNeal Norwitz2002-08-191-0/+1
|
* Extend some comments on the order of values in the returns fromFred Drake2002-08-191-8/+14
| | | | dict.items/keys/values/iteritems/iterkeys/itervalues().
* SF patch 576101, by Oren Tirosh: alternative implementation ofGuido van Rossum2002-08-197-106/+171
| | | | | | | | interning. I modified Oren's patch significantly, but the basic idea and most of the implementation is unchanged. Interned strings created with PyString_InternInPlace() are now mortal, and you must keep a reference to the resulting string around; use the new function PyString_InternImmortal() to create immortal interned strings.
* Add a warning comment to the LOAD_GLOBAL inline code.Guido van Rossum2002-08-191-1/+3
|
* Another ugly inlining hack, expanding the two PyDict_GetItem() callsGuido van Rossum2002-08-191-1/+25
| | | | | | | | | | | | | | | in LOAD_GLOBAL. Besides saving a C function call, it saves checks whether f_globals and f_builtins are dicts, and extracting and testing the string object's hash code is done only once. We bail out of the inlining if the name is not exactly a string, or when its hash is -1; because of interning, neither should ever happen. I believe interning guarantees that the hash code is set, and I believe that the 'names' tuple of a code object always contains interned strings, but I'm not assuming that -- I'm simply testing hash != -1. On my home machine, this makes a pystone variant with new-style classes and slots run at the same speed as classic pystone! (With new-style classes but without slots, it is still a lot slower.)
* Call me anal, but there was a particular phrase that was speading toGuido van Rossum2002-08-197-9/+9
| | | | | | | comments everywhere that bugged me: /* Foo is inlined */ instead of /* Inline Foo */. Somehow the "is inlined" phrase always confused me for half a second (thinking, "No it isn't" until I added the missing "here"). The new phrase is hopefully unambiguous.
* Another modest speedup in PyObject_GenericGetAttr(): inline the callGuido van Rossum2002-08-191-2/+26
| | | | to _PyType_Lookup().
* Make PyDescr_IsData() a macro. It's too simple to be a function.Guido van Rossum2002-08-192-7/+1
| | | | Should save 4% on slot lookups.
* Check in my ultra-shortlived patch #597220.Michael W. Hudson2002-08-191-3/+3
| | | | | | Move some debugging checks inside Py_DEBUG. They were causing cache misses according to cachegrind.
* Inline call to _PyObject_GetDictPtr() in PyObject_GenericGetAttr().Guido van Rossum2002-08-191-3/+20
| | | | This causes a modest speedup.
* Fix typo in __slots__ of ImmutableSet.Guido van Rossum2002-08-191-1/+1
|
* News about sets. (There's no documentation; if someone wants toGuido van Rossum2002-08-191-0/+7
| | | | convert the doc strings to LaTeX, be my guest.)
* Set classes and their unit tests, from sandbox.Guido van Rossum2002-08-192-0/+1097
|
* Simple but important optimization for descr_check(): instead of theGuido van Rossum2002-08-191-1/+1
| | | | | | | expensive and overly general PyObject_IsInstance(), call PyObject_TypeCheck() which is a macro that often avoids a call, and if it does make a call, calls the much more efficient PyType_IsSubtype(). This saved 6% on a benchmark for slot lookups.
* Fix spelling errors and note the addition of operator.pow()Raymond Hettinger2002-08-191-7/+9
|
* Merged the MacPython thanks list into the general acknowledgements.Jack Jansen2002-08-192-10/+25
| | | | There's really no point in a separate list of thank-you notes.
* Added __pow__(a,b) to the operator module. Completes the pattern ofRaymond Hettinger2002-08-193-0/+23
| | | | | | all operators having a counterpart in the operator module. Closes SF bug #577513.
* SF bug 595919: popenN return only text mode pipesTim Peters2002-08-191-2/+2
| | | | | popen2() and popen3() created text-mode pipes even when binary mode was asked for. This was specific to Windows.
* Add Steve Purcell for unittest.pyRaymond Hettinger2002-08-181-0/+1
|
* Refuse to run if the last bit of the destination path contains a # character.Jack Jansen2002-08-181-1/+4
| | | | | | | | | | | This is a silly workaround for a rather serious bug in MacOSX: if you take a long filename and convert it to an FSSpec the fsspec gets a magic cooky (containing a #, indeed). If you then massage the extension of this fsspec and convert back to a pathname you may end up referring to the same file. This could destroy your sourcefile. The problem only occcurs in MacPython-OS9, not MacPython-OSX (I think). Closes bug #505562.
* Modify splituser() method to allow an @ in the userinfo field.Raymond Hettinger2002-08-181-1/+1
| | | | | | | Jeremy reported that this is not allowed by RFC 2396; however, other tools support unescaped @'s so we should also. Apply SF patch 596581 closing bug 581529.
* OS/2 EMX behaves like Windows where file permissions are concernedAndrew MacIntyre2002-08-181-2/+2
|
* update contact infoAndrew MacIntyre2002-08-181-4/+9
|
* Prep for 2.3:Andrew MacIntyre2002-08-181-34/+39
| | | | | | | | | | | - update DLL version number - add files required for 2.3 (no changes to modules though) - restructure build of pgen.exe NOTE: As I don't have the VACPP compiler, these changes are untested. Apart from slightly re-ordering some file lists, and matching file name casing, I believe these changes are the minimum necessary to build 2.3 with VACPP.
* make port notes currentAndrew MacIntyre2002-08-181-48/+36
|
* Build process updates:Andrew MacIntyre2002-08-181-17/+33
| | | | | | | - the security fixes to tempfile have lead to test_tempfile wanting to create 100 temporary files. as the EMX default is only 40, the number of file handles has been bumped (up to 250). - changes to pgen have required restructuring its build support.
* Get rid of _once(); inlining it takes less code. :-)Guido van Rossum2002-08-172-97/+41
| | | | | | | Also, don't call gettempdir() in the default expression for the 'dir' argument to various functions; use 'dir=None' for the default and insert 'if dir is None: dir = gettemptir()' in the bodies. That way the work done by gettempdir is postponed until needed.
* Patch by Zack W to make test_noinherit() more robust: spawn a PythonGuido van Rossum2002-08-172-28/+48
| | | | | subprocess that does the right checks. This now works on Windows as well.