Commit Graph

2526 Commits

Author SHA1 Message Date
Martin v. Löwis 5d12abe0b1 Patch #1075: Use wide API to format error messages. 2007-09-03 07:40:24 +00:00
Collin Winter 1966f1c98f Fix refleaks exposed by test_raise. 2007-09-01 20:26:44 +00:00
Eric Smith 37f10386f1 Changed to use 'U' argument to PyArg_ParseTuple, instead of manually checking for unicode objects. 2007-09-01 10:56:01 +00:00
Martin v. Löwis 5deb2101df Explicitly convert err->text to Unicode. Fixes #1069. 2007-08-31 11:17:42 +00:00
Neal Norwitz 64fd6fb254 Ugh, hopefully I can get this right. The code is only compiled on Win64 2007-08-31 05:32:33 +00:00
Neal Norwitz b879f57b32 Try to fix the problem of passing a non-int on Win64 right this time. 2007-08-31 05:20:36 +00:00
Neal Norwitz 538d17aa23 Try to fix a problem with large values on Win64. Diagnosed by Thomas Heller 2007-08-31 04:31:47 +00:00
Neal Norwitz c2550c7b1c Remove chr8, we're not likely to need it at this point 2007-08-31 04:17:51 +00:00
Guido van Rossum 71d4a34c39 Customary 2nd submit of this file after it's been changed. 2007-08-31 04:03:25 +00:00
Eric Smith 81936699c8 Added test cases for string.Formatter subclassing.
Made format_spec parameter to builtin format optional, defaults to
empty string.  Added test cases.
2007-08-31 01:14:01 +00:00
Collin Winter 32347fb29b Update import.c's MAGIC value for the new raise syntax (as opposed to merely updating the comment). 2007-08-31 00:42:15 +00:00
Collin Winter 828f04ac3f Issue #1066: implement PEP 3109, 2/3 of PEP 3134. 2007-08-31 00:04:24 +00:00
Thomas Wouters d2cf20eea2 Remove the simple slicing API. All slicing is now done with slice objects. 2007-08-30 22:57:53 +00:00
Guido van Rossum 63175a1330 [Oops, I forgot half of the patch.]
Patch # 1050 by Amaury Forgeot d'Arc.
On Windows, debug builds insert stack probes, and recursive functions
tend to exhaust the stack faster.
This patch reduces the marshal maximum depth from 2000 to 1500 for debug
builds only. Optimized builds are not affected.
This allows test_marshal to pass with debug builds.
2007-08-29 20:39:13 +00:00
Guido van Rossum fb67be2f6b Three patches from issue #1047, by Amaury Forgeot d'Arc:
1/ getargs.diff adds the 'Z' and 'Z#' format specifiers for
PyArg_ParseTuple. They mimic z and z# for unicode strings, by accepting
a Unicode or None (in which case the Py_UNICODE* pointer is set to
NULL). With doc and tests.

2/ subprocess.diff converts file PC/_subprocess.c to unicode. We use the
Unicode version of the win32 api (and Z conversion from previous patch)

3/ stdout.diff: sys.stdout must not convert the line endings, Windows
already does it.
Without this patch, when redirecting the output of python, the file
contains \r\r\n for each line. (test_subprocess did catch this)

However, I (GvR) removed the change to _fileio.c (included in the
patches) that prevents closing file descripors < 3 from being closed;
I think that needs to be solved in a different way.
2007-08-29 18:38:11 +00:00
Eric Smith 56e4a840bc Added test to ensure __format__ methods return unicode objects. 2007-08-27 15:31:40 +00:00
Guido van Rossum a4b8d1de7c Some changes in preparation of stricter rules about mixing str and bytes. 2007-08-27 15:02:28 +00:00
Eric Smith e226b55963 PEP 3101: Removed _formatter_xxx routines from sysmodule, and made them unicode methods instead (per GvR suggestion). 2007-08-27 11:28:18 +00:00
Neal Norwitz 8a4eb298e2 Fix refleaks in test_unicode and test_string related to the new format code.
Stop polluting namespace.
2007-08-27 07:24:17 +00:00
Neal Norwitz 2bad970293 Make some internal functions static 2007-08-27 06:19:22 +00:00
Eric Smith 7ade6485ab PEP 3101: Completed string.Formatter class. Reimplemented field_name to object transformation. 2007-08-26 22:27:13 +00:00
Neal Norwitz 80e7f27e62 Use unicode and remove support for some uses of str8. 2007-08-26 06:45:23 +00:00
Neal Norwitz da059e3585 Use unicode 2007-08-26 05:33:45 +00:00
Neal Norwitz 5616c6d690 Fix a couple of warnings 2007-08-26 05:32:41 +00:00
Neal Norwitz 6ea45d3341 Use unicode and remove support for some uses of str8. 2007-08-26 04:19:43 +00:00
Neal Norwitz a9ea3d9778 Regenerate 2007-08-26 02:06:15 +00:00
Neal Norwitz a369c5aba6 Use unicode 2007-08-25 07:41:59 +00:00
Eric Smith 8c66326368 Implementation of PEP 3101, Advanced String Formatting.
Known issues:

The string.Formatter class, as discussed in the PEP, is incomplete.

Error handling needs to conform to the PEP.

Need to fix this warning that I introduced in Python/formatter_unicode.c:
Objects/stringlib/unicodedefs.h:26: warning: `STRINGLIB_CMP' defined but not used

Need to make sure sign formatting is correct, more tests needed.

Need to remove '()' sign formatting, left over from an earlier version of the PEP.
2007-08-25 02:26:07 +00:00
Neal Norwitz e4dc324884 Use unicode for AST attributes 2007-08-25 01:33:49 +00:00
Neal Norwitz aefab1e2ac Use unicode 2007-08-25 01:04:34 +00:00
Neal Norwitz f308132cc2 Add const to input string parameters 2007-08-25 00:32:45 +00:00
Neal Norwitz 41103bf6f2 Ensure that code object names (co_name) are unicode.
Verify that they print properly too.
2007-08-24 23:12:06 +00:00
Neal Norwitz a5d16a3f85 Use unicode for error messages of duplicate args 2007-08-24 22:53:58 +00:00
Neal Norwitz b382b84abe Add const to some strings that are not modified 2007-08-24 20:00:37 +00:00
Neal Norwitz cd795963c3 Use unicode for much of errors. 2007-08-24 19:54:13 +00:00
Guido van Rossum 04110fb859 Merged revisions 57221-57391 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r57227 | facundo.batista | 2007-08-20 17:16:21 -0700 (Mon, 20 Aug 2007) | 5 lines


  Catch ProtocolError exceptions and include the header information in
  test output (to make it easier to debug test failures caused by
  problems in the server). [GSoC - Alan McIntyre]
........
  r57229 | mark.hammond | 2007-08-20 18:04:47 -0700 (Mon, 20 Aug 2007) | 5 lines

  [ 1761786 ] distutils.util.get_platform() return value on 64bit Windows
  As discussed on distutils-sig: Allows the generated installer name on
  64bit Windows platforms to be different than the name generated for
  32bit Windows platforms.
........
  r57230 | mark.hammond | 2007-08-20 18:05:16 -0700 (Mon, 20 Aug 2007) | 5 lines

  [ 1761786 ] distutils.util.get_platform() return value on 64bit Windows
  As discussed on distutils-sig: Allows the generated installer name on
  64bit Windows platforms to be different than the name generated for
  32bit Windows platforms.
........
  r57253 | georg.brandl | 2007-08-20 23:01:18 -0700 (Mon, 20 Aug 2007) | 2 lines

  Demand version 2.5.1 since 2.5 has a bug with codecs.open context managers.
........
  r57254 | georg.brandl | 2007-08-20 23:03:43 -0700 (Mon, 20 Aug 2007) | 2 lines

  Revert accidental checkins from last commit.
........
  r57255 | georg.brandl | 2007-08-20 23:07:08 -0700 (Mon, 20 Aug 2007) | 2 lines

  Bug #1777160: mention explicitly that e.g. -1**2 is -1.
........
  r57256 | georg.brandl | 2007-08-20 23:12:19 -0700 (Mon, 20 Aug 2007) | 3 lines

  Bug #1777168: replace operator names "opa"... with "op1"... and mark everything up as literal,
  to enhance readability.
........
  r57259 | facundo.batista | 2007-08-21 09:57:18 -0700 (Tue, 21 Aug 2007) | 8 lines


  Added test for behavior of operations on an unconnected SMTP object,
  and tests for NOOP, RSET, and VRFY. Corrected typo in a comment for
  testNonnumericPort. Added a check for constructing SMTP objects when
  non-numeric ports are included in the host name. Derived a server from
  SMTPServer to test various ESMTP/SMTP capabilities. Check that a
  second HELO to DebuggingServer returns an error. [GSoC - Alan McIntyre]
........
  r57279 | skip.montanaro | 2007-08-22 12:02:16 -0700 (Wed, 22 Aug 2007) | 2 lines

  Note that BeOS is unsupported as of Python 2.6.
........
  r57280 | skip.montanaro | 2007-08-22 12:05:21 -0700 (Wed, 22 Aug 2007) | 1 line

  whoops - need to check in configure as well
........
  r57284 | alex.martelli | 2007-08-22 14:14:17 -0700 (Wed, 22 Aug 2007) | 5 lines

  Fix compile.c so that it records 0.0 and -0.0 as separate constants in a code
  object's co_consts tuple; add a test to show that the previous behavior (where
  these two constants were "collapsed" into one) causes serious malfunctioning.
........
  r57286 | gregory.p.smith | 2007-08-22 14:32:34 -0700 (Wed, 22 Aug 2007) | 3 lines

  stop leaving log.0000001 __db.00* and xxx.db turds in developer
  sandboxes when bsddb3 tests are run.
........
  r57301 | jeffrey.yasskin | 2007-08-22 16:14:27 -0700 (Wed, 22 Aug 2007) | 3 lines

  When setup.py fails to find the necessary bits to build some modules, have it
  print a slightly more informative message.
........
  r57320 | brett.cannon | 2007-08-23 07:53:17 -0700 (Thu, 23 Aug 2007) | 2 lines

  Make test_runpy re-entrant.
........
  r57324 | georg.brandl | 2007-08-23 10:54:11 -0700 (Thu, 23 Aug 2007) | 2 lines

  Bug #1768121: fix wrong/missing opcode docs.
........
  r57326 | georg.brandl | 2007-08-23 10:57:05 -0700 (Thu, 23 Aug 2007) | 2 lines

  Bug #1766421: "return code" vs. "status code".
........
  r57328 | georg.brandl | 2007-08-23 11:08:06 -0700 (Thu, 23 Aug 2007) | 2 lines

  Second half of #1752175: #ifdef out references to PyImport_DynLoadFiletab if HAVE_DYNAMIC_LOADING is not defined.
........
  r57331 | georg.brandl | 2007-08-23 11:11:33 -0700 (Thu, 23 Aug 2007) | 2 lines

  Use try-except-finally in contextlib.
........
  r57343 | georg.brandl | 2007-08-23 13:35:00 -0700 (Thu, 23 Aug 2007) | 2 lines

  Bug #1697820: document that the old slice protocol is still used by builtin types.
........
  r57345 | georg.brandl | 2007-08-23 13:40:01 -0700 (Thu, 23 Aug 2007) | 2 lines

  Bug #1573854: fix docs for sqlite3 cursor rowcount attr.
........
  r57347 | georg.brandl | 2007-08-23 13:50:23 -0700 (Thu, 23 Aug 2007) | 2 lines

  Bug #1694833: fix imp.find_module() docs wrt. packages.
........
  r57348 | georg.brandl | 2007-08-23 13:53:28 -0700 (Thu, 23 Aug 2007) | 2 lines

  Bug #1594966: fix misleading usage example
........
  r57349 | georg.brandl | 2007-08-23 13:55:44 -0700 (Thu, 23 Aug 2007) | 2 lines

  Clarify wording a bit.
........
  r57351 | georg.brandl | 2007-08-23 14:18:44 -0700 (Thu, 23 Aug 2007) | 2 lines

  Bug #1752332: httplib no longer uses socket.getaddrinfo().
........
  r57352 | georg.brandl | 2007-08-23 14:21:36 -0700 (Thu, 23 Aug 2007) | 2 lines

  Bug #1734111: document struct.Struct.size.
........
  r57353 | georg.brandl | 2007-08-23 14:27:57 -0700 (Thu, 23 Aug 2007) | 2 lines

  Bug #1688564: document os.path.join's absolute path behavior in the docstring.
........
  r57354 | georg.brandl | 2007-08-23 14:36:05 -0700 (Thu, 23 Aug 2007) | 2 lines

  Bug #1625381: clarify match vs search introduction.
........
  r57355 | georg.brandl | 2007-08-23 14:42:54 -0700 (Thu, 23 Aug 2007) | 2 lines

  Bug #1758696: more info about descriptors.
........
  r57357 | georg.brandl | 2007-08-23 14:55:57 -0700 (Thu, 23 Aug 2007) | 2 lines

  Patch #1779550: remove redundant code in logging.
........
  r57378 | gregory.p.smith | 2007-08-23 22:11:38 -0700 (Thu, 23 Aug 2007) | 2 lines

  Fix bug 1725856.
........
  r57382 | georg.brandl | 2007-08-23 23:10:01 -0700 (Thu, 23 Aug 2007) | 2 lines

  uuid creation is now threadsafe, backport from py3k rev. 57375.
........
  r57389 | georg.brandl | 2007-08-24 04:47:37 -0700 (Fri, 24 Aug 2007) | 2 lines

  Bug #1765375: fix stripping of unwanted LDFLAGS.
........
  r57391 | guido.van.rossum | 2007-08-24 07:53:14 -0700 (Fri, 24 Aug 2007) | 2 lines

  Fix silly typo in test name.
........
2007-08-24 16:32:05 +00:00
Guido van Rossum 15d3d04547 Before calling _PyType_Lookup() the type needs to be initialized. 2007-08-24 02:02:45 +00:00
Guido van Rossum 2fa33db12b Finish the work on __round__ and __trunc__.
With Alex Martelli and Keir Mierle.
2007-08-23 22:07:24 +00:00
Alex Martelli ae211f9abf Implement the round functionality for PEP 3141, and add tests for it. 2007-08-22 23:21:33 +00:00
Alex Martelli 86d8b3497f Implement the trunc builtin for PEP 3141 2007-08-22 22:39:42 +00:00
Collin Winter d5a5f5d32e Patch #1774414: make it possible to use SVK to develop Python. 2007-08-22 19:45:07 +00:00
Travis E. Oliphant b99f762f10 Merged in py3k-buffer branch to main line. All objects now use the buffer protocol in PEP 3118. 2007-08-18 11:21:56 +00:00
Skip Montanaro eb33e5ae79 Remove support for BeOS 2007-08-17 12:57:41 +00:00
Skip Montanaro 7a98be2efb Remove RISCOS support 2007-08-16 14:35:24 +00:00
Martin v. Löwis 47383403a0 Implement PEP 3131. Add isidentifier to str. 2007-08-15 07:32:56 +00:00
Collin Winter 3eed765223 Bug #1772489: make dir() work on traceback objects again. 2007-08-14 17:53:54 +00:00
Collin Winter ee634a4013 Get rid of traceback.c:tb_getattr in favor of marking the members as READONLY. 2007-08-14 17:47:27 +00:00
Skip Montanaro 46fc337395 PyErr_Warn is deprecated in 2.5 - goes away for 3.0 2007-08-12 11:44:53 +00:00
Neal Norwitz 016880229a Kill execfile(), use exec() instead 2007-08-12 00:43:29 +00:00
Martin v. Löwis 2614e1dc63 Remove obsolete ifdef. 2007-08-11 21:58:46 +00:00