]> granicus.if.org Git - python/log
python
17 years agostr/bytes strictness.
Guido van Rossum [Mon, 27 Aug 2007 23:38:12 +0000 (23:38 +0000)]
str/bytes strictness.

17 years agostr/bytes strictness.
Guido van Rossum [Mon, 27 Aug 2007 23:36:53 +0000 (23:36 +0000)]
str/bytes strictness.

17 years agoCleanup in anticipation of moving formatteriterator and fieldnameiterator into string...
Eric Smith [Mon, 27 Aug 2007 23:30:47 +0000 (23:30 +0000)]
Cleanup in anticipation of moving formatteriterator and fieldnameiterator into stringlib/string_format.h.

17 years agoMore str/bytes strictness.
Guido van Rossum [Mon, 27 Aug 2007 23:26:56 +0000 (23:26 +0000)]
More str/bytes strictness.

17 years agoposix.confname(): enforce that names as str instances.
Guido van Rossum [Mon, 27 Aug 2007 23:24:46 +0000 (23:24 +0000)]
posix.confname(): enforce that names as str instances.

17 years agoMore str/bytes fixes.
Guido van Rossum [Mon, 27 Aug 2007 23:18:54 +0000 (23:18 +0000)]
More str/bytes fixes.

17 years agoMore changes needed to make things work once bytes and str are truly divorced.
Guido van Rossum [Mon, 27 Aug 2007 23:09:25 +0000 (23:09 +0000)]
More changes needed to make things work once bytes and str are truly divorced.

17 years agoOne further change.
Guido van Rossum [Mon, 27 Aug 2007 22:31:36 +0000 (22:31 +0000)]
One further change.

17 years agoForce test_xmlrpc to pass. I'm not happy with how I did this, but I don't
Guido van Rossum [Mon, 27 Aug 2007 22:27:41 +0000 (22:27 +0000)]
Force test_xmlrpc to pass.  I'm not happy with how I did this, but I don't
see a better way; the 'Binary' class is poorly specified so it's unclear
what behavior is relied upon.

17 years agoFix some tests I broke. (More to follow.)
Guido van Rossum [Mon, 27 Aug 2007 21:47:52 +0000 (21:47 +0000)]
Fix some tests I broke. (More to follow.)

17 years agoChanges in anticipation of stricter str vs. bytes enforcement.
Guido van Rossum [Mon, 27 Aug 2007 20:44:15 +0000 (20:44 +0000)]
Changes in anticipation of stricter str vs. bytes enforcement.

17 years agoChanges in anticipation of stricter str vs. bytes enforcement.
Guido van Rossum [Mon, 27 Aug 2007 20:40:10 +0000 (20:40 +0000)]
Changes in anticipation of stricter str vs. bytes enforcement.

17 years agoAdditional test for formatting code.
Eric Smith [Mon, 27 Aug 2007 19:07:22 +0000 (19:07 +0000)]
Additional test for formatting code.

17 years agoChanges in anticipation of stricter str vs. bytes enforcement.
Guido van Rossum [Mon, 27 Aug 2007 18:31:48 +0000 (18:31 +0000)]
Changes in anticipation of stricter str vs. bytes enforcement.

17 years agoThere should be no codecs left that return str8 intead of bytes.
Guido van Rossum [Mon, 27 Aug 2007 18:20:11 +0000 (18:20 +0000)]
There should be no codecs left that return str8 intead of bytes.
(And if there are, they will now get an error when used.  So fix them!)

17 years agoFix a few places that broke due to a recent change to io.py.
Guido van Rossum [Mon, 27 Aug 2007 18:10:06 +0000 (18:10 +0000)]
Fix a few places that broke due to a recent change to io.py.

17 years agoChanges to io.py and socket.py by Christian Heimes.
Guido van Rossum [Mon, 27 Aug 2007 17:39:33 +0000 (17:39 +0000)]
Changes to io.py and socket.py by Christian Heimes.
- Replace all asserts by ValuleErrors or TypeErrors as appropriate.
- Add _checkReadable, _checkWritable methods; these check self.closed too.
- Add a test that everything exported by io.py exists, and is either
  an exception or an IOBase instance (except for the open function).
- Default buffering to 1 if isatty() (I had to tweak this to enforce
  the *default* bit -- GvR).

17 years agoChanges in anticipation of stricter str vs. bytes enforcement.
Guido van Rossum [Mon, 27 Aug 2007 17:25:39 +0000 (17:25 +0000)]
Changes in anticipation of stricter str vs. bytes enforcement.

17 years agoChanges in anticipation of stricter str vs. bytes enforcement.
Guido van Rossum [Mon, 27 Aug 2007 17:23:59 +0000 (17:23 +0000)]
Changes in anticipation of stricter str vs. bytes enforcement.

17 years agoChanges preparing for stricter enforcement of bytes vs. str.
Guido van Rossum [Mon, 27 Aug 2007 17:03:28 +0000 (17:03 +0000)]
Changes preparing for stricter enforcement of bytes vs. str.

17 years agoAdded test to ensure __format__ methods return unicode objects.
Eric Smith [Mon, 27 Aug 2007 15:31:40 +0000 (15:31 +0000)]
Added test to ensure __format__ methods return unicode objects.

17 years agoSome changes in preparation of stricter rules about mixing str and bytes.
Guido van Rossum [Mon, 27 Aug 2007 15:02:28 +0000 (15:02 +0000)]
Some changes in preparation of stricter rules about mixing str and bytes.

17 years agoFixed accidental indentation change.
Eric Smith [Mon, 27 Aug 2007 11:33:42 +0000 (11:33 +0000)]
Fixed accidental indentation change.

17 years agoPEP 3101: Removed _formatter_xxx routines from sysmodule, and made them unicode metho...
Eric Smith [Mon, 27 Aug 2007 11:28:18 +0000 (11:28 +0000)]
PEP 3101: Removed _formatter_xxx routines from sysmodule, and made them unicode methods instead (per GvR suggestion).

17 years agoPort the build_ssl.py script to Python 3.
Thomas Heller [Mon, 27 Aug 2007 09:42:33 +0000 (09:42 +0000)]
Port the build_ssl.py script to Python 3.

17 years agoFix refleaks in test_unicode and test_string related to the new format code.
Neal Norwitz [Mon, 27 Aug 2007 07:24:17 +0000 (07:24 +0000)]
Fix refleaks in test_unicode and test_string related to the new format code.
Stop polluting namespace.

17 years agoMake some internal functions static
Neal Norwitz [Mon, 27 Aug 2007 06:19:22 +0000 (06:19 +0000)]
Make some internal functions static

17 years agoFix some refleaks (and format/error checking)
Neal Norwitz [Mon, 27 Aug 2007 04:58:38 +0000 (04:58 +0000)]
Fix some refleaks (and format/error checking)

17 years agoThis adds a leak, but fixes a crash. The leaking code is:
Neal Norwitz [Mon, 27 Aug 2007 03:22:50 +0000 (03:22 +0000)]
This adds a leak, but fixes a crash.  The leaking code is:
  "{0:.{precision}s}".format('hello world', precision=5)
I pretty sure it's because of the 'precision' keyword.
Still need to investigate further.

17 years agoGet gdb macros working with unicode and PyVarObject change
Neal Norwitz [Mon, 27 Aug 2007 02:49:29 +0000 (02:49 +0000)]
Get gdb macros working with unicode and PyVarObject change

17 years agoFix warning
Neal Norwitz [Mon, 27 Aug 2007 02:10:06 +0000 (02:10 +0000)]
Fix warning

17 years agoTkinter binding involving Control-spacebar raises unicode error
Kurt B. Kaiser [Mon, 27 Aug 2007 01:55:21 +0000 (01:55 +0000)]
Tkinter binding involving Control-spacebar raises unicode error
Issue1028

17 years agoAdd a couple of files that are necessary based on getting PCbuil8 to work.
Neal Norwitz [Sun, 26 Aug 2007 23:53:58 +0000 (23:53 +0000)]
Add a couple of files that are necessary based on getting PCbuil8 to work.
Hopefully this works with VC7.  If not, it should be pretty close.

17 years agoos.getcwd() now returns a normal string (ie, unicode)
Neal Norwitz [Sun, 26 Aug 2007 23:37:53 +0000 (23:37 +0000)]
os.getcwd() now returns a normal string (ie, unicode)

17 years agoCosmetics in error messages.
Guido van Rossum [Sun, 26 Aug 2007 23:30:31 +0000 (23:30 +0000)]
Cosmetics in error messages.

17 years agoAdd some more files from 1031 that I missed.
Neal Norwitz [Sun, 26 Aug 2007 23:20:01 +0000 (23:20 +0000)]
Add some more files from 1031 that I missed.

17 years agoManually apply most of patch 1031 to try to get python to build on Windows.
Neal Norwitz [Sun, 26 Aug 2007 23:14:58 +0000 (23:14 +0000)]
Manually apply most of patch 1031 to try to get python to build on Windows.
I skipped the adding of libraries because it was harder and I'm less
confident about getting it right.  Also I'm not sure why they are required
now and weren't required before.

17 years agoPatch 1030, Adapt _winreg.c to the new buffer API.
Neal Norwitz [Sun, 26 Aug 2007 23:07:13 +0000 (23:07 +0000)]
Patch 1030, Adapt _winreg.c to the new buffer API.

Applying without testing since I don't have Windows.  It
seems to make sense from a cursory review.

17 years agoUse new print function (part of patch 1031)
Neal Norwitz [Sun, 26 Aug 2007 23:03:13 +0000 (23:03 +0000)]
Use new print function (part of patch 1031)

17 years agoPEP 3101: Completed string.Formatter class. Reimplemented field_name to object trans...
Eric Smith [Sun, 26 Aug 2007 22:27:13 +0000 (22:27 +0000)]
PEP 3101: Completed string.Formatter class.  Reimplemented field_name to object transformation.

17 years agoUse the correct variable name
Neal Norwitz [Sun, 26 Aug 2007 22:16:55 +0000 (22:16 +0000)]
Use the correct variable name

17 years agoUse unicode (hope it's right, I can't test it)
Neal Norwitz [Sun, 26 Aug 2007 21:43:00 +0000 (21:43 +0000)]
Use unicode (hope it's right, I can't test it)

17 years agoWhen elapsed and expected time differ, at least show their two values.
Guido van Rossum [Sun, 26 Aug 2007 20:03:04 +0000 (20:03 +0000)]
When elapsed and expected time differ, at least show their two values.

17 years agoPass PyBUF_CHARACTER instead of PyBUF_SIMPLE to PyObject_GetBuffer().
Guido van Rossum [Sun, 26 Aug 2007 19:14:15 +0000 (19:14 +0000)]
Pass PyBUF_CHARACTER instead of PyBUF_SIMPLE to PyObject_GetBuffer().
This makes the failing tests (test_unicodedata and, on OSX, test_hashlib) pass.

XXX However, I'm not sure that this is the right thing to do;
this behavior means that Unicode strings are automatically hashed as their
UTF-8 encoding.  Is that what we want?

17 years agoRestore an assert, but move it to the proper place.
Neal Norwitz [Sun, 26 Aug 2007 18:20:46 +0000 (18:20 +0000)]
Restore an assert, but move it to the proper place.

17 years agoUse unicode
Neal Norwitz [Sun, 26 Aug 2007 07:21:45 +0000 (07:21 +0000)]
Use unicode

17 years agoUse unicode (and bytes as appropriate)
Neal Norwitz [Sun, 26 Aug 2007 07:10:06 +0000 (07:10 +0000)]
Use unicode (and bytes as appropriate)

17 years agoUse unicode and remove support for some uses of str8.
Neal Norwitz [Sun, 26 Aug 2007 06:45:23 +0000 (06:45 +0000)]
Use unicode and remove support for some uses of str8.

17 years agoUse unicode
Neal Norwitz [Sun, 26 Aug 2007 05:33:45 +0000 (05:33 +0000)]
Use unicode

17 years agoFix a couple of warnings
Neal Norwitz [Sun, 26 Aug 2007 05:32:41 +0000 (05:32 +0000)]
Fix a couple of warnings

17 years agoUse unicode (and bytes as appropriate)
Neal Norwitz [Sun, 26 Aug 2007 05:08:21 +0000 (05:08 +0000)]
Use unicode (and bytes as appropriate)

17 years agoUse unicode
Neal Norwitz [Sun, 26 Aug 2007 04:57:08 +0000 (04:57 +0000)]
Use unicode

17 years agoUse unicode and remove support for some uses of str8.
Neal Norwitz [Sun, 26 Aug 2007 04:51:28 +0000 (04:51 +0000)]
Use unicode and remove support for some uses of str8.

17 years agoUse unicode and remove support for some uses of str8.
Neal Norwitz [Sun, 26 Aug 2007 04:51:10 +0000 (04:51 +0000)]
Use unicode and remove support for some uses of str8.

17 years agoUse unicode and remove support for some uses of str8.
Neal Norwitz [Sun, 26 Aug 2007 04:19:43 +0000 (04:19 +0000)]
Use unicode and remove support for some uses of str8.

17 years agoFix another map(...) --> list(map...)
Kurt B. Kaiser [Sun, 26 Aug 2007 04:18:40 +0000 (04:18 +0000)]
Fix another map(...) --> list(map...)

17 years agoRemove assert that seems out of place. It triggers with test_string,
Neal Norwitz [Sun, 26 Aug 2007 03:58:25 +0000 (03:58 +0000)]
Remove assert that seems out of place.  It triggers with test_string,
but without it test_string passes.  I'm not sure why it was there.

17 years agoUse unicode and stop supporting str8
Neal Norwitz [Sun, 26 Aug 2007 03:56:04 +0000 (03:56 +0000)]
Use unicode and stop supporting str8

17 years agoUse unicode
Neal Norwitz [Sun, 26 Aug 2007 03:55:15 +0000 (03:55 +0000)]
Use unicode

17 years agoUse the new buffer api for input data.
Gregory P. Smith [Sun, 26 Aug 2007 02:58:36 +0000 (02:58 +0000)]
Use the new buffer api for input data.

17 years agoUse unicode
Neal Norwitz [Sun, 26 Aug 2007 02:54:31 +0000 (02:54 +0000)]
Use unicode

17 years agoReturn a boolean for status
Neal Norwitz [Sun, 26 Aug 2007 02:26:31 +0000 (02:26 +0000)]
Return a boolean for status

17 years agoUse unicode
Neal Norwitz [Sun, 26 Aug 2007 02:22:30 +0000 (02:22 +0000)]
Use unicode

17 years agoGet rid of more uses of string and use const in a few places.
Neal Norwitz [Sun, 26 Aug 2007 02:21:42 +0000 (02:21 +0000)]
Get rid of more uses of string and use const in a few places.

17 years agoRegenerate
Neal Norwitz [Sun, 26 Aug 2007 02:06:15 +0000 (02:06 +0000)]
Regenerate

17 years agoGet the urllib tests to pass without the email package
Neal Norwitz [Sat, 25 Aug 2007 19:00:31 +0000 (19:00 +0000)]
Get the urllib tests to pass without the email package

17 years agoGet test working when there are multiple dbs supported.
Neal Norwitz [Sat, 25 Aug 2007 18:00:36 +0000 (18:00 +0000)]
Get test working when there are multiple dbs supported.

17 years agoDisable test until email comes back
Neal Norwitz [Sat, 25 Aug 2007 17:57:37 +0000 (17:57 +0000)]
Disable test until email comes back

17 years agoGet test_pyclbr to pass after removing the email package
Neal Norwitz [Sat, 25 Aug 2007 17:23:06 +0000 (17:23 +0000)]
Get test_pyclbr to pass after removing the email package

17 years agoUse unicode
Neal Norwitz [Sat, 25 Aug 2007 17:20:32 +0000 (17:20 +0000)]
Use unicode

17 years agoGet rid of compiler warning on 64-bit
Neal Norwitz [Sat, 25 Aug 2007 17:08:59 +0000 (17:08 +0000)]
Get rid of compiler warning on 64-bit

17 years agoUse unicode
Neal Norwitz [Sat, 25 Aug 2007 17:03:03 +0000 (17:03 +0000)]
Use unicode

17 years agoFix some comments
Neal Norwitz [Sat, 25 Aug 2007 17:01:41 +0000 (17:01 +0000)]
Fix some comments

17 years agoCosmetic fixes to make this work with Py3k (as well as with 2.5 still).
Guido van Rossum [Sat, 25 Aug 2007 14:55:35 +0000 (14:55 +0000)]
Cosmetic fixes to make this work with Py3k (as well as with 2.5 still).
Patch by Christian Heimes.

17 years agoRemove the email package for now.
Guido van Rossum [Sat, 25 Aug 2007 13:43:02 +0000 (13:43 +0000)]
Remove the email package for now.
Once Barry and the email-sig have a working new version
we'll add it back.
If it doesn't make the 3.0a deadline (release August 31), too bad.

17 years agoSupport unicode names
Neal Norwitz [Sat, 25 Aug 2007 08:13:40 +0000 (08:13 +0000)]
Support unicode names

17 years agoUse unicode
Neal Norwitz [Sat, 25 Aug 2007 08:01:41 +0000 (08:01 +0000)]
Use unicode

17 years agoUse unicode
Neal Norwitz [Sat, 25 Aug 2007 07:41:59 +0000 (07:41 +0000)]
Use unicode

17 years agoFix typo in comment
Neal Norwitz [Sat, 25 Aug 2007 05:22:02 +0000 (05:22 +0000)]
Fix typo in comment

17 years agoReorder code and decls so it's compilable with gcc 2.96 (C89).
Guido van Rossum [Sat, 25 Aug 2007 03:14:09 +0000 (03:14 +0000)]
Reorder code and decls so it's compilable with gcc 2.96 (C89).

17 years agoImplementation of PEP 3101, Advanced String Formatting.
Eric Smith [Sat, 25 Aug 2007 02:26:07 +0000 (02:26 +0000)]
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.

17 years agoUse unicode for AST attributes
Neal Norwitz [Sat, 25 Aug 2007 01:33:49 +0000 (01:33 +0000)]
Use unicode for AST attributes

17 years agoUse unicode
Neal Norwitz [Sat, 25 Aug 2007 01:04:34 +0000 (01:04 +0000)]
Use unicode

17 years agoSince PyUnicode_AsString is a public API, don't just assert, but do
Neal Norwitz [Sat, 25 Aug 2007 01:04:21 +0000 (01:04 +0000)]
Since PyUnicode_AsString is a public API, don't just assert, but do
a regular check and return an error if not unicode.

17 years agoUse unicode strings
Neal Norwitz [Sat, 25 Aug 2007 00:49:05 +0000 (00:49 +0000)]
Use unicode strings

17 years agoAdd const to input string parameters
Neal Norwitz [Sat, 25 Aug 2007 00:32:45 +0000 (00:32 +0000)]
Add const to input string parameters

17 years agoWhoops, not sure how I screwed up the name. Now builds and passes the test.
Neal Norwitz [Sat, 25 Aug 2007 00:29:58 +0000 (00:29 +0000)]
Whoops, not sure how I screwed up the name.  Now builds and passes the test.

17 years agoUse unicode and add a "test" for syslog
Neal Norwitz [Sat, 25 Aug 2007 00:21:36 +0000 (00:21 +0000)]
Use unicode and add a "test" for syslog

17 years agoAdd a few mixed-mode (set vs. dict view) comparisons.
Guido van Rossum [Fri, 24 Aug 2007 23:51:55 +0000 (23:51 +0000)]
Add a few mixed-mode (set vs. dict view) comparisons.

17 years agoKeir Mierle's improved tests for dict view containment tests.
Guido van Rossum [Fri, 24 Aug 2007 23:49:54 +0000 (23:49 +0000)]
Keir Mierle's improved tests for dict view containment tests.

17 years agoAdd some mixed operations between sets and dict views.
Guido van Rossum [Fri, 24 Aug 2007 23:47:30 +0000 (23:47 +0000)]
Add some mixed operations between sets and dict views.

17 years agoAdd unit tests for set ops on dict.items().
Guido van Rossum [Fri, 24 Aug 2007 23:43:52 +0000 (23:43 +0000)]
Add unit tests for set ops on dict.items().

17 years agoKeir Mierle's set operations for dict views (keys/items only of course).
Guido van Rossum [Fri, 24 Aug 2007 23:41:22 +0000 (23:41 +0000)]
Keir Mierle's set operations for dict views (keys/items only of course).

17 years agoUse unicode for password modules
Neal Norwitz [Fri, 24 Aug 2007 23:26:23 +0000 (23:26 +0000)]
Use unicode for password modules

17 years agoUse the str builtin
Neal Norwitz [Fri, 24 Aug 2007 23:17:28 +0000 (23:17 +0000)]
Use the str builtin

17 years agoEnsure that code object names (co_name) are unicode.
Neal Norwitz [Fri, 24 Aug 2007 23:12:06 +0000 (23:12 +0000)]
Ensure that code object names (co_name) are unicode.
Verify that they print properly too.

17 years agoUse unicode for error messages of duplicate args
Neal Norwitz [Fri, 24 Aug 2007 22:53:58 +0000 (22:53 +0000)]
Use unicode for error messages of duplicate args

17 years agoUse unicode for reference (is there any way to build this module)
Neal Norwitz [Fri, 24 Aug 2007 22:49:25 +0000 (22:49 +0000)]
Use unicode for reference (is there any way to build this module)

17 years agoPatch with Keir Mierle: add rich comparisons between dict views and sets,
Guido van Rossum [Fri, 24 Aug 2007 22:33:45 +0000 (22:33 +0000)]
Patch with Keir Mierle: add rich comparisons between dict views and sets,
at least for .keys() and .items() (not .values() of course).

17 years agofollow up to bug 1007 commit.
Gregory P. Smith [Fri, 24 Aug 2007 22:14:21 +0000 (22:14 +0000)]
follow up to bug 1007 commit.
Use self.assertTrue in test cases rather than the assert statement.