summaryrefslogtreecommitdiffstats
path: root/Lib
Commit message (Collapse)AuthorAgeFilesLines
* Improved the bytecode optimizer.Raymond Hettinger2003-04-221-0/+2
| | | | | | | | | | | | | | * Can now test for basic blocks. * Optimize inverted comparisions. * Optimize unary_not followed by a conditional jump. * Added a new opcode, NOP, to keep code size constant. * Applied NOP to previous transformations where appropriate. Note, the NOP would not be necessary if other functions were added to re-target jump addresses and update the co_lnotab mapping. That would yield slightly faster and cleaner bytecode at the expense of optimizer simplicity and of keeping it decoupled from the line-numbering structure.
* Add helper function to get module name taking packages into account.Jeremy Hylton2003-04-211-1/+22
|
* Holistic refactoring.Jeremy Hylton2003-04-211-225/+159
| | | | | | | | | | | | | | | | | Remove "." in coverage output for lines with comments. Silence complaints in coverage output about unexecuted docstrings. Eliminate use of inspect module in favor of direct access to frame and code objects. We're in a trace function here: Efficiency counts! Remove unused code. Reflow long lines. Remove backwards compatibility for stored trace output from Zooko's experiment to add calledfuncs to the pickled dict. Move code to generate per-file coverage stats to a separate routine. Replace use of parser module with call to compile.
* Test suite for optparse. This is a slightly-edited copy ofGreg Ward2003-04-211-0/+1210
| | | | test/test_optik.py (rev 1.19) from the Optik CVS.
* Update to Optik 1.4.1; here are the relevant bits of the change log:Greg Ward2003-04-211-49/+48
| | | | | | | | | | * Fixed some long-hidden bugs revealed by the new PyUnit-based test suite (thanks to Johannes Gijsbers the new test suite, improved tests that caught the bugs, and the bug fixes). * Make store_true/store_false store True/False rather than 1/0. Details available in Optik's CVS repository.
* More work on bug #672491 and patch #712900.Gustavo Niemeyer2003-04-202-1/+7
| | | | | | | | | | | | | | | | I've applied a modified version of Greg Chapman's patch. I've included the fixes without introducing the reorganization mentioned, for the sake of stability. Also, the second fix mentioned in the patch don't fix the mentioned problem anymore, because of the change introduced by patch #720991 (by Greg as well). The new fix wasn't complicated though, and is included as well. As a note. It seems that there are other places that require the "protection" of LASTMARK_SAVE()/LASTMARK_RESTORE(), and are just waiting for someone to find how to break them. Particularly, I belive that every recursion of SRE_MATCH() should be protected by these macros. I won't do that right now since I'm not completely sure about this, and we don't have much time for testing until the next release.
* - Changed shlex.split() method to have more useful andGustavo Niemeyer2003-04-202-10/+8
| | | | meaningful parameters.
* Patch #553171: Add writeback parameter. Also add protocol parameter.Martin v. Löwis2003-04-192-25/+125
|
* - bool() called without arguments now returns False rather thanGuido van Rossum2003-04-192-0/+11
| | | | | | | raising an exception. This is consistent with calling the constructors for the other builtin types -- called without argument they all return the false value of that type. (SF patch #724135) Thanks to Alex Martelli.
* - Several methods of nntplib.NNTP have grown an optional file argumentGuido van Rossum2003-04-191-14/+14
| | | | | | which specifies a file where to divert the command's output (already supported by the body() method). (SF patch #720468) Thanks to Terry Carroll.
* New PyGILState_ API - implements pep 311, from patch 684256.Mark Hammond2003-04-191-0/+29
|
* New file.Martin v. Löwis2003-04-191-0/+90
|
* Fully support 32-bit codes. Enable BIGCHARSET in UCS-4 builds.Martin v. Löwis2003-04-192-24/+47
|
* Patch #681152: Support escaped Unicode characters in classes. Fixes #612074.Martin v. Löwis2003-04-192-1/+5
| | | | Will backport to 2.2.
* Make _strptime escape regex syntax in format string to prevent use in ↵Brett Cannon2003-04-192-1/+24
| | | | internal regex.
* as_string(): Added some text to the docstring to make it clear thatBarry Warsaw2003-04-181-0/+4
| | | | | it's a convenience only and give hints on what to do for more flexibility.
* Patch #536883: SimpleXMLRPCServer auto-docing subclass.Martin v. Löwis2003-04-181-0/+302
|
* Skip nameprep test 3.43, as we do allow unassigned characters. The testMartin v. Löwis2003-04-181-2/+4
| | | | fails only in UCS-2 mode, since it tests a non-BMP character.
* Patch #718049: Setting exe_extension for cygwinJason Tishler2003-04-181-0/+2
| | | | | | | | | | | | | | | | | | | On cygwin, the setup.py script uses unixccompiler.py for compiling and linking C extensions. The unixccompiler.py script assumes that executables do not get special extensions, which makes sense for Unix. However, on Cygwin, executables get an .exe extension. This causes a problem during the configuration step (python setup.py config), in which some temporary executables may be generated. As unixccompiler.py does not know about the .exe extension, distutils fails to clean up after itself: it does not remove _configtest.exe but tries to remove _configtest instead. The attached patch to unixccompiler.py sets the correct exe_extension for cygwin by checking if sys.platform is 'cygwin'. With this patch, distutils cleans up after itself correctly. Michiel de Hoon University of Tokyo, Human Genome Center.
* Implement IDNA (Internationalized Domain Names in Applications).Martin v. Löwis2003-04-185-3/+981
|
* Delete the 'h' test -- 'h' is no longer unsigned so the machinery hereGuido van Rossum2003-04-181-16/+1
| | | | can't test it. It's unchanged so why would we test it anyway...
* Use True in a few more places.Neal Norwitz2003-04-171-7/+5
| | | | Use isinstance(somestring, basestring) instead of type() as per PEP 8
* Get test to work under regrtest when running whole suiteNeal Norwitz2003-04-171-1/+6
|
* Add test that demonstrates SGML-style handling of processingFred Drake2003-04-171-0/+3
| | | | instructions.
* - use Tue/False for booleansFred Drake2003-04-171-9/+8
| | | | - some very minor cleanups
* Implemented posix-mode parsing support in shlex.py, as dicussed inGustavo Niemeyer2003-04-172-24/+299
| | | | mailing list, and in patch #722686.
* SF # 595026: support for masks in getargs.c.Thomas Heller2003-04-171-0/+245
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | New functions: unsigned long PyInt_AsUnsignedLongMask(PyObject *); unsigned PY_LONG_LONG) PyInt_AsUnsignedLongLongMask(PyObject *); unsigned long PyLong_AsUnsignedLongMask(PyObject *); unsigned PY_LONG_LONG) PyLong_AsUnsignedLongLongMask(PyObject *); New and changed format codes: b unsigned char 0..UCHAR_MAX B unsigned char none ** h unsigned short 0..USHRT_MAX H unsigned short none ** i int INT_MIN..INT_MAX I * unsigned int 0..UINT_MAX l long LONG_MIN..LONG_MAX k * unsigned long none L long long LLONG_MIN..LLONG_MAX K * unsigned long long none Notes: * New format codes. ** Changed from previous "range-and-a-half" to "none"; the range-and-a-half checking wasn't particularly useful. New test test_getargs2.py, to verify all this.
* Remove extra space in docstringNeal Norwitz2003-04-171-1/+1
|
* Add 'get' method to Variable and switch it from internal class toGuido van Rossum2003-04-161-1/+7
| | | | | standard class (it is now useful because it doesn't constrain the type of the value).
* - super() no longer ignores data descriptors, except __class__. SeeGuido van Rossum2003-04-161-1/+16
| | | | | the thread started at http://mail.python.org/pipermail/python-dev/2003-April/034338.html
* For StringVar results to strings. Document that boolean things are ofMartin v. Löwis2003-04-161-4/+7
| | | | type bool. Requested in #721171.
* When on MacOSX, and only in a framework build, addJack Jansen2003-04-161-0/+13
| | | | ~/Library/Python/2.3/site-packages to sys.path, if it exists.
* The identify() description didn't match the code. Fixed.Jack Jansen2003-04-161-1/+1
|
* Allow switching of install dir after creation of preferences.Jack Jansen2003-04-161-7/+10
| | | | Changed some message to be clearer when presented by Package Manager.
* Add two dictionaries to htmlentitydefs: name2codepoint mapsWalter Dörwald2003-04-161-254/+270
| | | | | HTML entity names to Unicode codepoints (as integers). codepoint2name is the reverse mapping. From SF patch #722017.
* Test SystemEvents too.Jack Jansen2003-04-151-1/+4
|
* Ouch, it's Carlo Verre, not Verre Carlo.Guido van Rossum2003-04-151-5/+5
|
* Add a few errors tests for range().Walter Dörwald2003-04-151-0/+6
|
* Fix copy & paste error in comment.Walter Dörwald2003-04-151-1/+1
|
* Fix the test so that it works even when /etc/group has two entriesWalter Dörwald2003-04-151-1/+12
| | | | for the same gid.
* Fix the test so that it works even when /etc/passwd has two entriesWalter Dörwald2003-04-151-1/+12
| | | | for the same uid.
* - Use the tarfile module to unpack tarfiles.Jack Jansen2003-04-151-62/+187
| | | | | | | | | - Allow setting the destination install directory. If this is set then it is used for the modules, other items (header files, etc) are not installed, and warnings are printed if the package would have liked to. Unfortunaltey binary installs seem broken due to a tarfile bug (#721871) or my misunderstanding of how tarfile works.
* test_range(): The C code changed to raise TypeError in one of theseTim Peters2003-04-151-1/+1
| | | | cases, but the test still expected ValueError. Repaired that.
* Port test_pwd.py to PyUnit. Check that getpwall() andWalter Dörwald2003-04-154-239/+319
| | | | | | | | | | | | getpwnam()/getpwuid() return consistent data. Change test_grp to check that getgrall() and getgrnam()/getgrgid() return consistent data. Add error checks similar to test_pwd.py. Port test___all__.py to PyUnit. From SF patch #662807.
* The date class is now properly subclassable. (SF bug #720908)Guido van Rossum2003-04-141-0/+6
| | | | | (This is only the tip of the iceberg; the time and datetime classes need the same treatment.)
* Close off the "Verre Carlo hack" as discussed on python-dev.Guido van Rossum2003-04-141-0/+17
|
* - list.insert(i, x) now interprets negative i as it would beGuido van Rossum2003-04-141-0/+5
| | | | | | interpreted by slicing, so negative values count from the end of the list. This was the only place where such an interpretation was not placed on a list index.
* SF patch #720991 by Gary Herron:Guido van Rossum2003-04-144-4/+24
| | | | | | | A small fix for bug #545855 and Greg Chapman's addition of op code SRE_OP_MIN_REPEAT_ONE for eliminating recursion on simple uses of pattern '*?' on a long string.
* Patch #709178: remove -static option from cygwinccompilerJason Tishler2003-04-141-5/+30
| | | | | | | | | | | | | | After some more reflection (and no negative feedback), I am reverting the original patch and applying my version, cygwinccompiler.py-shared.diff, instead. My reasons are the following: 1. support for older toolchains is retained 2. support for new toolchains (i.e., ld -shared) is added The goal of my approach is to avoid breaking older toolchains while adding better support for newer ones.
* Get test working if gzip support is not availableNeal Norwitz2003-04-141-1/+2
|