Commit Graph

27305 Commits

Author SHA1 Message Date
Walter Dörwald ce07c8a9bf Max OS X returns "*" as the password in grp.getgrall()
and "" in grep.getgrgid(). Adjust the test to work
around this problem. This should fix SF bug #724771.
2003-04-23 19:50:24 +00:00
Tim Peters 2d1c846b73 Clarified new fsync() docs. 2003-04-23 19:47:14 +00:00
Thomas Heller 5eccabc730 Mention the new getargs.c format codes. 2003-04-23 19:35:25 +00:00
Thomas Heller 42a1172cf4 Document the new format codes B, H, I, k, K. 2003-04-23 19:27:35 +00:00
Raymond Hettinger 1d87786305 SF patch 557704: netrc module can't handle all passwords
Revised netrc.py to include the additional ascii punctuation
characters.  Omitted the other logic changes.  See
Lib/netrc.py 1.17.

Since this is more of a feature request than a bug,
including in Py2.3 but not recommending for backporting.
2003-04-23 19:06:08 +00:00
Raymond Hettinger 6eca358695 SF 557704: netrc module can't handle all passwords
Expanded the range of allowable characters to include ascii punctuation.
Allows resource files to have a larger character set for passwords.
(Idea contributed by Bram Moolenaar.)
2003-04-23 18:59:54 +00:00
Raymond Hettinger 88ba1e39ec SF Patch 685051: fix for 680789: reprs in arraymodule
(contributed by logistix; substantially reworked by rhettinger).

To create a representation of non-string arrays, array_repr() was
starting with a base Python string object and repeatedly using +=
to concatenate the representation of individual objects.

Logistix had the idea to convert to an intermediate tuple form and
then join it all at once.  I took advantage of existing tools and
formed a list with array_tolist() and got its representation through
PyObject_Repr(v) which already has a fast implementation for lists.
2003-04-23 17:27:00 +00:00
Fred Drake 444e434011 Update the package list whenever we build distfiles.
This is used on www.python.org.
2003-04-23 15:04:52 +00:00
Alex Martelli a9b9c9fa9f some more error-message enhancements 2003-04-23 13:34:35 +00:00
Neal Norwitz a256f7d36f Fix SF bug #723801, logging.setLoggerClass() doesn't support new-style classes 2003-04-23 13:12:19 +00:00
Alex Martelli f471d4783a complete and clarify some error messages for range() 2003-04-23 13:00:44 +00:00
Guido van Rossum 636688d470 Improve the message about metatype/metaclass conflicts. 2003-04-23 12:07:22 +00:00
Neal Norwitz f297bd1937 SF patch #725904, Minor changes to logging from module author (Vinay Sajip)
- upgrade to version 0.4.8
2003-04-23 03:49:43 +00:00
Tim Peters 11b2306960 Enable os.fsync() for Windows, mapping it to MS's _commit() there. The
docs here are best-guess:  the MS docs I could find weren't clear, and
some even claimed _commit() has no effect on Win32 systems (which is
easily shown to be false just by trying it).
2003-04-23 02:39:17 +00:00
Raymond Hettinger 9a9c436036 PyObject_IsTrue() can return an error condition.
Adding code to handle it properly.
2003-04-23 00:14:18 +00:00
Raymond Hettinger 863983e8e5 Add comment on performance.
Fix missing right parenthesis.
Add three examples.
2003-04-23 00:09:42 +00:00
Mark Hammond a69d409f05 Update to the new PyGILState APIs to simplify and correct thread-state
management.  Old code still #ifdef'd out - I may remove this in a sec,
but for now, let's get it in and things passing the tests again!
2003-04-22 23:13:27 +00:00
Jack Jansen 2b4b5a54d6 Fix by Lars Gustaebel for bug 721871: don't get upset if the prefix
field contains garbage after the first NUL character.
2003-04-22 22:03:11 +00:00
Fred Drake 70995830a6 markup corrections 2003-04-22 18:54:53 +00:00
Fred Drake b28271f24d Do a little more searching for the data file for the test: this allows
using a build directory just inside the source directory and saving
just one copy of the test data in the source tree, rather than having
a copy in each build directory.
2003-04-22 18:15:05 +00:00
Gustavo Niemeyer 3c9068bbec Made MAX_UNTIL/MIN_UNTIL code more coherent about mark protection,
accordingly to further discussions with Greg Chapman in patch #712900.
2003-04-22 15:39:09 +00:00
Jeremy Hylton c8c8b94c59 Only produce a dotted module name when writing output to a separate
directory.
2003-04-22 15:35:51 +00:00
Fred Drake 282be3ab89 - explain the start argument to sum()
- various adjustments to sum() markup and explanation
2003-04-22 14:52:08 +00:00
Jack Jansen d69b744531 If not icon file is specified use the default Python Applet icons.
Fixes 719303.
2003-04-22 14:33:48 +00:00
Fred Drake 03e929e7e0 Fix some markup nits. 2003-04-22 14:30:53 +00:00
Jack Jansen 6432f78215 Only return a warning message about not all files being unpacked if there
were indeed files that weren't unpacked.
2003-04-22 13:56:19 +00:00
Jack Jansen 8c46ce9add Allow setting the auto dispose flag on window objects. 2003-04-22 13:55:23 +00:00
Jack Jansen f776dee6dd Hiding packages was done incorrectly. Fixed. 2003-04-22 13:53:33 +00:00
Mark Hammond 6cb9029a22 PyGILState cleanup was too early - destructors called via module cleanup may use the API. 2003-04-22 11:18:00 +00:00
Walter Dörwald ecd2fdca0f Change test_pwd and test_grp so they can handle duplicate user
and group names. This should fix SF bug #724771.
2003-04-22 11:05:57 +00:00
Alex Martelli 41c9f880d8 fixed a potential refcount bug (thanks Raymond!). 2003-04-22 09:24:48 +00:00
Alex Martelli a70b19147f Adding new built-in function sum, with docs and tests. 2003-04-22 08:12:33 +00:00
Raymond Hettinger 060641d511 Improved the bytecode optimizer.
* 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.
2003-04-22 06:49:11 +00:00
Andrew MacIntyre 0c83348d5c minor cleanups and whitespace normalisation 2003-04-22 03:21:42 +00:00
Neal Norwitz 699cbb7676 Get test_capi & test_getargs2 to pass on alphas
* UINT_MAX -> ULONG_MAX since we are dealing with longs
  * ParseTuple needs &int for 'i' and &long for 'l'
    There may be a better way to do this, but this works.
2003-04-22 01:28:57 +00:00
Jeremy Hylton dfbfe736ce Add helper function to get module name taking packages into account. 2003-04-21 22:49:17 +00:00
Jeremy Hylton 38732e1065 Holistic refactoring.
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.
2003-04-21 22:04:46 +00:00
Jeremy Hylton fbbe34789e Add a useful docstring to enumerate. 2003-04-21 20:26:25 +00:00
Andrew MacIntyre 631e87fb3d Makefile & config.c:
- restructure build for modules now in Python DLL

README.os2emx
- clean out old cruft no longer appropriate now that EMX port builds
  from CVS
- reflect move of modules into core DLL
- add section on building from source
2003-04-21 14:33:04 +00:00
Andrew MacIntyre d4c9b16b34 Makefile:
- add _csv module to the build list
- various cleanups

config.c:
- various cleanups

pyconfig.h:
- various cleanups
2003-04-21 14:28:01 +00:00
Andrew MacIntyre baf25b06a6 apply Mark Hammond's PEP 311 changes to the EMX ripoff of the Windows
popen[234]() code
2003-04-21 14:22:36 +00:00
Andrew MacIntyre 75e0145bb5 - DosSetExtLIBPATH objects to a NULL pointer, but a pointer to a NULL
string does what is expected (ie unset [BEGIN|END]LIBPATH)

- set the size of the DosQuerySysInfo buffer correctly; it was safe,
  but incorrect (allowing a 1 element overrun)
2003-04-21 14:19:51 +00:00
Greg Ward 5549322c79 Test suite for optparse. This is a slightly-edited copy of
test/test_optik.py (rev 1.19) from the Optik CVS.
2003-04-21 02:41:25 +00:00
Greg Ward 2492fcf3b0 Update to Optik 1.4.1; here are the relevant bits of the change log:
* 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.
2003-04-21 02:40:34 +00:00
Gustavo Niemeyer be733ee7fb More work on bug #672491 and patch #712900.
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.
2003-04-20 07:35:44 +00:00
Gustavo Niemeyer 48f3dcc93e - Changed shlex.split() method to have more useful and
meaningful parameters.
2003-04-20 01:57:03 +00:00
Gustavo Niemeyer cf146d31e7 - Included examples documenting how the lastindex member of
match objects work.
2003-04-20 01:48:59 +00:00
Barry Warsaw 334df6c597 Finally added a -h option to print the module docstring and exit. ;) 2003-04-20 00:59:24 +00:00
Gustavo Niemeyer 1aca359e89 - Fixed bug #672491. This change restores the behavior of lastindex/lastgroup
to be compliant with previous python versions, by backing out the changes
  made in revision 2.84 which affected this. The bugfix for backtracking is
  still maintained.
2003-04-20 00:45:13 +00:00
Martin v. Löwis 153c9e493e Patch #553171: Add writeback parameter. Also add protocol parameter. 2003-04-19 20:59:03 +00:00