]> granicus.if.org Git - python/log
python
17 years agoMerged revisions 59187-59192 via svnmerge from
Christian Heimes [Tue, 27 Nov 2007 13:09:25 +0000 (13:09 +0000)]
Merged revisions 59187-59192 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r59190 | thomas.heller | 2007-11-27 13:22:11 +0100 (Tue, 27 Nov 2007) | 3 lines

  Remove unused global variable, and remove unneeded COMError.__str__
  implementation in C.
........

17 years agoThe changes to PyMethod_New and the removal of unbound methods breaks ctypes' COMErro...
Christian Heimes [Tue, 27 Nov 2007 13:05:10 +0000 (13:05 +0000)]
The changes to PyMethod_New and the removal of unbound methods breaks ctypes' COMError on Windows. This patch doesn't address the problem but re-enables the import of _ctypes until somebody has time to fix it right. I've no time to dig into it. Also see http://bugs.python.org/issue1505

17 years agoFuther update docs after unbound method removal.
Georg Brandl [Tue, 27 Nov 2007 12:43:08 +0000 (12:43 +0000)]
Futher update docs after unbound method removal.

17 years agoRemoved the API to create unbound methods and simplified the API for bound methods...
Christian Heimes [Tue, 27 Nov 2007 10:40:20 +0000 (10:40 +0000)]
Removed the API to create unbound methods and simplified the API for bound methods. The signature is PyMethod_New(func, instance).
Also removed im_class and renamed im_self to __self__ and im_func to __func__. im_class can be substituted with method.__self__.__class__.
I've also updated some parts of the documenation.

17 years agoMerged revisions 59107-59186 via svnmerge from
Guido van Rossum [Mon, 26 Nov 2007 23:23:18 +0000 (23:23 +0000)]
Merged revisions 59107-59186 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

(Note: some conflicts in the PCbuild9 directory reverted.  Sorry Christian!)

........
  r59120 | christian.heimes | 2007-11-22 03:21:16 -0800 (Thu, 22 Nov 2007) | 3 lines

  Backport of the PCbuild9 directory from the py3k branch.
  I've finished the last task for the PCbuild9 directory today. I don't think there is much left to do. Now you can all play around with the shiny new VS 2008 and try the PGO builds. I was able to get a speed improvement of about 10% on py3k.
  Have fun! :)
........
  r59126 | brett.cannon | 2007-11-22 16:06:51 -0800 (Thu, 22 Nov 2007) | 2 lines

  Fix a bug in the test for using __loader__.get_data().
........
  r59131 | christian.heimes | 2007-11-22 23:05:03 -0800 (Thu, 22 Nov 2007) | 1 line

  Backport of PCbuild9 fixes from py3k r59130
........
  r59132 | christian.heimes | 2007-11-23 01:10:36 -0800 (Fri, 23 Nov 2007) | 2 lines

  Applied patch #1754273 and #1754271 from Thomas Glee
  The patches are adding deprecation warnings for back ticks and <>
........
  r59133 | christian.heimes | 2007-11-23 04:12:02 -0800 (Fri, 23 Nov 2007) | 2 lines

  Fixed problems in the last commit. Filenames and line numbers weren't reported correctly.
  Backquotes still don't report the correct file. The AST nodes only contain the line number but not the file name.
........
  r59134 | christian.heimes | 2007-11-23 04:16:35 -0800 (Fri, 23 Nov 2007) | 1 line

  How did the comment get there?
........
  r59135 | christian.heimes | 2007-11-23 05:25:31 -0800 (Fri, 23 Nov 2007) | 1 line

  And yet another fix for the patch. Paul Moore has send me a note that I've missed a declaration. The additional code has moved the declaration in the middle of the block.
........
  r59136 | andrew.kuchling | 2007-11-23 05:37:39 -0800 (Fri, 23 Nov 2007) | 1 line

  Add item
........
  r59137 | skip.montanaro | 2007-11-23 09:08:35 -0800 (Fri, 23 Nov 2007) | 2 lines

  Make trace and doctest play nice together (issue 1429818).  Will backport.
........
  r59139 | skip.montanaro | 2007-11-23 09:12:47 -0800 (Fri, 23 Nov 2007) | 1 line

  issue 1429818
........
  r59144 | facundo.batista | 2007-11-23 09:59:00 -0800 (Fri, 23 Nov 2007) | 10 lines

  Major change in the internal structure of the Decimal
  number: now it does not store the mantissa as a tuple
  of numbers, but as a string.

  This avoids a lot of conversions, and achieves a
  speedup of 40%. The API remains intact.

  Thanks Mark Dickinson.
........
  r59146 | facundo.batista | 2007-11-23 10:14:50 -0800 (Fri, 23 Nov 2007) | 3 lines

  Test cases from Cowlishaw, v2.57. All are pased cleanly.
........
  r59156 | christian.heimes | 2007-11-23 17:36:02 -0800 (Fri, 23 Nov 2007) | 2 lines

  Added filename to compiling struct based on Martin's suggestion.
  I'm wonder why I was trying to add the filename to the node all the time. The compiling struct is more obvious.
........
  r59158 | christian.heimes | 2007-11-23 17:53:59 -0800 (Fri, 23 Nov 2007) | 2 lines

  Backport of fixes from py3k branch
  svn merge -r59131:HEAD ../../py3k/PCbuild9/ .
........
  r59159 | skip.montanaro | 2007-11-23 20:29:08 -0800 (Fri, 23 Nov 2007) | 1 line

  revert change that breaks test_doctest (which I forgot to run - sorry)
........
  r59162 | skip.montanaro | 2007-11-23 20:31:15 -0800 (Fri, 23 Nov 2007) | 1 line

  revert
........
  r59164 | georg.brandl | 2007-11-24 03:31:46 -0800 (Sat, 24 Nov 2007) | 3 lines

  #1344: document that you need to open std{in,out,err} with PIPE if you want
  communicate() to work as described.
........
  r59165 | georg.brandl | 2007-11-24 03:39:13 -0800 (Sat, 24 Nov 2007) | 2 lines

  #1467: fix documentation for TestResult.add{Error,Failure}.
........
  r59166 | georg.brandl | 2007-11-24 03:42:14 -0800 (Sat, 24 Nov 2007) | 2 lines

  #1355: remove mention of PyXML from xml.dom docs.
........
  r59169 | amaury.forgeotdarc | 2007-11-24 05:20:22 -0800 (Sat, 24 Nov 2007) | 2 lines

  Warning "<> not supported in 3.x" should be enabled only when the -3 option is set.
........
  r59170 | amaury.forgeotdarc | 2007-11-24 05:44:17 -0800 (Sat, 24 Nov 2007) | 3 lines

  Issue #1445: Fix a SystemError when accessing the ``cell_contents``
  attribute of an empty cell object.  Now a ValueError is raised.
........
  r59172 | georg.brandl | 2007-11-24 05:56:09 -0800 (Sat, 24 Nov 2007) | 3 lines

  #1735632: add O_NOATIME constant to os module.
  Also document a few other O_ constants that were missing from documentation.
........
  r59173 | skip.montanaro | 2007-11-24 06:30:47 -0800 (Sat, 24 Nov 2007) | 1 line

  back in these go - thanks to Titus Brown for the fix
........
  r59176 | martin.v.loewis | 2007-11-24 10:33:40 -0800 (Sat, 24 Nov 2007) | 2 lines

  Bug #1494: Document that appendChild removes first.
........
  r59186 | guido.van.rossum | 2007-11-26 14:16:49 -0800 (Mon, 26 Nov 2007) | 2 lines

  A thread-less variant of brownian.py, submitted by Michele Simoniato.
........

17 years agoMinor cleanup
Christian Heimes [Mon, 26 Nov 2007 10:14:51 +0000 (10:14 +0000)]
Minor cleanup

17 years agoPatch from Georg Brandl and me for #1493
Christian Heimes [Sun, 25 Nov 2007 09:39:14 +0000 (09:39 +0000)]
Patch from Georg Brandl and me for #1493
Remove unbound method objects

17 years agoFixed bug in input() which broke pdb
Christian Heimes [Sun, 25 Nov 2007 09:18:01 +0000 (09:18 +0000)]
Fixed bug in input() which broke pdb

17 years ago#1479: Fix refleak in csv module (from rev 59062).
Georg Brandl [Sun, 25 Nov 2007 00:52:21 +0000 (00:52 +0000)]
#1479: Fix refleak in csv module (from rev 59062).

17 years ago#1480: fix refleak in the sqlite module.
Georg Brandl [Sun, 25 Nov 2007 00:45:05 +0000 (00:45 +0000)]
#1480: fix refleak in the sqlite module.

It came from rev 58682. The reason is that PyString_Concat
and PyUnicode_Concat work differently -- the equivalent to
PyString_Concat is PyUnicode_Append.

17 years agoRemove unused variable.
Georg Brandl [Sun, 25 Nov 2007 00:31:12 +0000 (00:31 +0000)]
Remove unused variable.

17 years agoUse proper API for iter.__next__().
Georg Brandl [Sat, 24 Nov 2007 20:42:02 +0000 (20:42 +0000)]
Use proper API for iter.__next__().

17 years agoAdded a simple helper script to build the dependencies of _tkinter.
Christian Heimes [Sat, 24 Nov 2007 12:40:29 +0000 (12:40 +0000)]
Added a simple helper script to build the dependencies of _tkinter.

17 years agoUpdated readme.txt
Christian Heimes [Sat, 24 Nov 2007 05:50:35 +0000 (05:50 +0000)]
Updated readme.txt
Added user macro for tcltk 64bit directory
Redone some changes to the ssl project. From now on the _ssl project depends on a 32bit build of Python to aid cross compiling on a 32bit OS.

17 years agoFixed a newline problem
Christian Heimes [Sat, 24 Nov 2007 01:52:19 +0000 (01:52 +0000)]
Fixed a newline problem

17 years agofix #1409: cell variables were not initialized,
Amaury Forgeot d'Arc [Sat, 24 Nov 2007 00:29:24 +0000 (00:29 +0000)]
fix #1409: cell variables were not initialized,
when the value comes from a keyword-only parameter.

17 years agoOpen output files in text mode, after all they are text files.
Guido van Rossum [Fri, 23 Nov 2007 21:26:49 +0000 (21:26 +0000)]
Open output files in text mode, after all they are text files.
(Binary mode caused problems when "python" was 3.0.)

17 years agoPaul had the great idea to add /DNO_TCL to the pre-build step.
Christian Heimes [Fri, 23 Nov 2007 17:34:49 +0000 (17:34 +0000)]
Paul had the great idea to add /DNO_TCL to the pre-build step.

17 years agoImplemented request from Marc-Andre Lemburg
Christian Heimes [Fri, 23 Nov 2007 17:32:38 +0000 (17:32 +0000)]
Implemented request from Marc-Andre Lemburg
For license reasons Python must not ship with IDEA, RC5 and MDC2. The latter are disabled by default but IDEA is enabled by default.

17 years agoAdded code to pre-generate makefiles and assembly files to build_ssl.py
Christian Heimes [Fri, 23 Nov 2007 07:03:16 +0000 (07:03 +0000)]
Added code to pre-generate makefiles and assembly files to build_ssl.py
Fixed bug #1488 in my way.

17 years agoCleanup
Christian Heimes [Fri, 23 Nov 2007 06:52:42 +0000 (06:52 +0000)]
Cleanup
Removed unreferenced variable

17 years agoJust inline a function, and discover that it can only raise an exception.
Amaury Forgeot d'Arc [Thu, 22 Nov 2007 21:42:04 +0000 (21:42 +0000)]
Just inline a function, and discover that it can only raise an exception.

Next step: should PyString_AsStringAndSize accept buffer objects?

17 years agoStream functions like read() are supposed to return bytes, not buffer.
Amaury Forgeot d'Arc [Thu, 22 Nov 2007 21:33:52 +0000 (21:33 +0000)]
Stream functions like read() are supposed to return bytes, not buffer.
Now multibytecodec directly works with PyStrings, and disallow PyBytes.

17 years agoProblem found while converting from PyBytes to PyString:
Amaury Forgeot d'Arc [Thu, 22 Nov 2007 20:53:01 +0000 (20:53 +0000)]
Problem found while converting from PyBytes to PyString:

Re-enable (and correct) a test for the BOM at the beginning of a code unit.
And properly "unget" characters when the BOM is incomplete.

17 years agoFix, thanks to Nick.
Georg Brandl [Thu, 22 Nov 2007 14:16:00 +0000 (14:16 +0000)]
Fix, thanks to Nick.

17 years agoUpdate docs for buffer -> bytearray rename.
Georg Brandl [Thu, 22 Nov 2007 11:00:28 +0000 (11:00 +0000)]
Update docs for buffer -> bytearray rename.

17 years agoRevert change of bz2.vcproj
Christian Heimes [Thu, 22 Nov 2007 10:32:15 +0000 (10:32 +0000)]
Revert change of bz2.vcproj

17 years agoFixed PGO builds
Christian Heimes [Thu, 22 Nov 2007 10:25:50 +0000 (10:25 +0000)]
Fixed PGO builds
The intermediate PG instrument build now lands in Platform-pgi and the final optimized build in Platform-pgo.

17 years agoUse PyString instead of PyBytes in wrap_strftime().
Walter Dörwald [Thu, 22 Nov 2007 09:38:52 +0000 (09:38 +0000)]
Use PyString instead of PyBytes in wrap_strftime().

17 years agoRemoved blocks from several functions in unicodeobject and stringobject where a PyStr...
Christian Heimes [Thu, 22 Nov 2007 07:46:41 +0000 (07:46 +0000)]
Removed blocks from several functions in unicodeobject and stringobject where a PyString function was still checking for PyUnicode or the other way around.
PyUnicode and PyString shouldn't magically convert the other type.

17 years agoos.environ contains PyUnicode instances and not PyString instances
Christian Heimes [Thu, 22 Nov 2007 07:43:40 +0000 (07:43 +0000)]
os.environ contains PyUnicode instances and not PyString instances

17 years agoRemoved some leftovers from the str8 days
Christian Heimes [Thu, 22 Nov 2007 05:56:35 +0000 (05:56 +0000)]
Removed some leftovers from the str8 days

17 years agoTypo in bytes.replace(): the buffer interface was always used.
Amaury Forgeot d'Arc [Thu, 22 Nov 2007 02:55:35 +0000 (02:55 +0000)]
Typo in bytes.replace(): the buffer interface was always used.

17 years agoPyString_AsString is permissive and accepts unicode strings.
Amaury Forgeot d'Arc [Thu, 22 Nov 2007 02:48:12 +0000 (02:48 +0000)]
PyString_AsString is permissive and accepts unicode strings.

Replace it with PyUnicode_AsString when the argument is known to be a str.

17 years agoIn audioop, return PyString instead of PyBytes.
Amaury Forgeot d'Arc [Thu, 22 Nov 2007 01:09:33 +0000 (01:09 +0000)]
In audioop, return PyString instead of PyBytes.

17 years agoMerged revisions 59105-59106 via svnmerge from
Guido van Rossum [Thu, 22 Nov 2007 01:00:52 +0000 (01:00 +0000)]
Merged revisions 59105-59106 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r59106 | guido.van.rossum | 2007-11-21 16:55:51 -0800 (Wed, 21 Nov 2007) | 3 lines

  Backport of _abccoll.py by Benjamin Arangueren, issue 1383.
  With some changes of my own thrown in (e.g. backport of r58107).
........

17 years agoMerged revisions 59077-59104 via svnmerge from
Guido van Rossum [Thu, 22 Nov 2007 00:30:02 +0000 (00:30 +0000)]
Merged revisions 59077-59104 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r59078 | brett.cannon | 2007-11-20 16:16:20 -0800 (Tue, 20 Nov 2007) | 2 lines

  Remove a unneeded line that had typos.
........
  r59081 | christian.heimes | 2007-11-20 16:46:21 -0800 (Tue, 20 Nov 2007) | 1 line

  Fixed #1372: zlibmodule.c: int overflow in PyZlib_decompress
........
  r59082 | brett.cannon | 2007-11-20 16:47:36 -0800 (Tue, 20 Nov 2007) | 6 lines

  doctest assumed that a package's __loader__.get_data() method used universal
  newlines; it doesn't.  To rectify this the string returned replaces all
  instances of os.linesep with '\n' to fake universal newline support.

  Backport candidate.
........
  r59084 | brett.cannon | 2007-11-20 16:58:03 -0800 (Tue, 20 Nov 2007) | 2 lines

  Add a missing check before deleting a package's __loader__.
........
  r59088 | christian.heimes | 2007-11-20 17:17:28 -0800 (Tue, 20 Nov 2007) | 2 lines

  Added NEWS entry
  Thanks for the reminder, Brett
........
  r59089 | amaury.forgeotdarc | 2007-11-20 17:38:26 -0800 (Tue, 20 Nov 2007) | 2 lines

  Add a NEWS entry for r59076.
........
  r59091 | christian.heimes | 2007-11-20 18:50:06 -0800 (Tue, 20 Nov 2007) | 2 lines

  Final fix for #1403
  The Windows installer and some Linux distros are using compileall to compile all py files in the Lib/ directory. However no test exists to check if all py files can be compiled. I figured out that make testall is the easiest way to test compileall.
........

17 years agoAdd ABC ByteString which unifies bytes and bytearray (but not memoryview).
Guido van Rossum [Wed, 21 Nov 2007 22:26:24 +0000 (22:26 +0000)]
Add ABC ByteString which unifies bytes and bytearray (but not memoryview).
There's no ABC for "PEP 3118 style buffer API objects" because there's no
way to recognize these in Python (apart from trying to use memoryview()
on them).
Note that array.array really should be registered as a MutableSequence
but that would require importing it whenever collections is imported.

17 years agowhen building with VC 2008, turn off unicode as default mode for the win32 API.
Amaury Forgeot d'Arc [Wed, 21 Nov 2007 22:24:31 +0000 (22:24 +0000)]
when building with VC 2008, turn off unicode as default mode for the win32 API.

For example, MessageBox takes char* parameters.
If you want to pass unicode strings, use MessageBoxW explicitely.

17 years agoConvert the socket module to insist on bytes for input, and to return bytes
Guido van Rossum [Wed, 21 Nov 2007 22:09:45 +0000 (22:09 +0000)]
Convert the socket module to insist on bytes for input, and to return bytes
(not bytearray) on output.  Discovered a bunch of places that were still
depending on it accepting text strings.

17 years agoFix error messages for buffer objects to say "bytes" instead of "string".
Guido van Rossum [Wed, 21 Nov 2007 21:53:51 +0000 (21:53 +0000)]
Fix error messages for buffer objects to say "bytes" instead of "string".

17 years agoMore PyBytes -> PyString.
Guido van Rossum [Wed, 21 Nov 2007 21:53:11 +0000 (21:53 +0000)]
More PyBytes -> PyString.

17 years agoMake os.read() return bytes, not bytearray.
Guido van Rossum [Wed, 21 Nov 2007 20:17:11 +0000 (20:17 +0000)]
Make os.read() return bytes, not bytearray.

17 years agoReturn PyString, not PyBytes, for a bytes array.
Guido van Rossum [Wed, 21 Nov 2007 20:09:18 +0000 (20:09 +0000)]
Return PyString, not PyBytes, for a bytes array.
Clean up trailing whitespace.

17 years agoFix an issue with str.translate() in IDLE -- str.translate() only accepts
Guido van Rossum [Wed, 21 Nov 2007 20:07:54 +0000 (20:07 +0000)]
Fix an issue with str.translate() in IDLE -- str.translate() only accepts
a dict argument now.

17 years agoMake read() and certificate() return bytes instead of bytearray instances.
Guido van Rossum [Wed, 21 Nov 2007 20:01:53 +0000 (20:01 +0000)]
Make read() and certificate() return bytes instead of bytearray instances.

17 years agoRename buffer -> bytearray.
Guido van Rossum [Wed, 21 Nov 2007 19:29:53 +0000 (19:29 +0000)]
Rename buffer -> bytearray.

17 years agoFinal fix for #1403
Christian Heimes [Wed, 21 Nov 2007 02:51:50 +0000 (02:51 +0000)]
Final fix for #1403
> The Windows installer and some Linux distros are using compileall to compile all py files in the Lib/ directory. However no test exists to check if all py files can be compiled. I figured out that make testall is the easiest way to test compileall.
For py3k unit tests do some extra checks with -bb.

17 years agoRemoved character set = unicode as requested by Amaury
Christian Heimes [Wed, 21 Nov 2007 02:20:59 +0000 (02:20 +0000)]
Removed character set = unicode as requested by Amaury
Removed more project configs in order to use the defaults defined in the property files. The 'sed' tool was more than helpful for the job.

17 years agoFixed bug #1020 pyexpat.XMParserType broken (was: pydoc doesn't work on pyexpat)
Christian Heimes [Wed, 21 Nov 2007 00:54:38 +0000 (00:54 +0000)]
Fixed bug #1020 pyexpat.XMParserType broken (was: pydoc doesn't work on pyexpat)
The sentinel in the methods struct was missing

17 years agoPatch +1478 from Joseph Armbruster
Christian Heimes [Wed, 21 Nov 2007 00:30:29 +0000 (00:30 +0000)]
Patch +1478 from Joseph Armbruster
pythoncore.vcproj fails to generate buildinfo (when spaces in path)

17 years agoMerged revisions 59056-59076 via svnmerge from
Christian Heimes [Tue, 20 Nov 2007 23:38:09 +0000 (23:38 +0000)]
Merged revisions 59056-59076 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r59064 | christian.heimes | 2007-11-20 02:48:48 +0100 (Tue, 20 Nov 2007) | 1 line

  Fixed bug #1470
........
  r59066 | martin.v.loewis | 2007-11-20 03:46:02 +0100 (Tue, 20 Nov 2007) | 2 lines

  Patch #1468: Package Lib/test/*.pem.
........
  r59068 | christian.heimes | 2007-11-20 04:21:02 +0100 (Tue, 20 Nov 2007) | 1 line

  Another fix for test_shutil. Martin pointed out that it breaks some build bots
........
  r59073 | nick.coghlan | 2007-11-20 15:55:57 +0100 (Tue, 20 Nov 2007) | 1 line

  Backport some main.c cleanup from the py3k branch
........
  r59076 | amaury.forgeotdarc | 2007-11-21 00:31:27 +0100 (Wed, 21 Nov 2007) | 6 lines

  The incremental decoder for utf-7 must preserve its state between calls.
  Solves issue1460.

  Might not be a backport candidate: a new API function was added,
  and some code may rely on details in utf-7.py.
........

17 years agoFor unknown reasons "Save All" doesn't save the vsprops files.
Christian Heimes [Tue, 20 Nov 2007 22:52:30 +0000 (22:52 +0000)]
For unknown reasons "Save All" doesn't save the vsprops files.

17 years agoFixes for #1473 and #1476
Christian Heimes [Tue, 20 Nov 2007 22:03:37 +0000 (22:03 +0000)]
Fixes for #1473 and #1476
Added debug builds to make_versioninfo
Removed some more defines

17 years agoThe Identifiers and keywords syntax diagram did not appear correctly in the
Mark Summerfield [Tue, 20 Nov 2007 13:22:19 +0000 (13:22 +0000)]
The Identifiers and keywords syntax diagram did not appear correctly in the
HTML output. I've now fixed this as best I can (but could do with
improvement).

Note that there are two terms used, "Other_ID_Start" and
"Other_ID_Continue" that are not explained; I've added an extra see
reference to PEP 3131 though.

17 years agoAdded configurations and files for profile guided optimization (PGO).
Christian Heimes [Tue, 20 Nov 2007 09:34:16 +0000 (09:34 +0000)]
Added configurations and files for profile guided optimization (PGO).

17 years agoThe patch from weck does a better job than my original idea. Thanks!
Christian Heimes [Tue, 20 Nov 2007 06:51:17 +0000 (06:51 +0000)]
The patch from weck does a better job than my original idea. Thanks!

17 years agoReport #1473 Drop _EXPORTS macros in PCbuild9
Christian Heimes [Tue, 20 Nov 2007 05:57:30 +0000 (05:57 +0000)]
Report #1473 Drop _EXPORTS macros in PCbuild9
I've removed a bunch of obsolete defines. I've also taken the opportunity to fix the pre-link event of sqlite3 and some optimization flags.

17 years agoAnother fix for test_shutil. Martin pointed out that it breaks some build bots
Christian Heimes [Tue, 20 Nov 2007 03:20:04 +0000 (03:20 +0000)]
Another fix for test_shutil. Martin pointed out that it breaks some build bots

17 years agoos.system: on Windows, avoid encoding the command and use the "wide" function: _wsystem
Amaury Forgeot d'Arc [Tue, 20 Nov 2007 01:52:14 +0000 (01:52 +0000)]
os.system: on Windows, avoid encoding the command and use the "wide" function: _wsystem

17 years agoFixed bug #1470
Christian Heimes [Tue, 20 Nov 2007 01:45:17 +0000 (01:45 +0000)]
Fixed bug #1470
py3k unit tests are removing %TEMP% dir on Windows
os.removedirs removes all parent directories until it hits a non empty directory. In my case my %TEMP% directory was clean and empty.

17 years agoCorrect test_cvs on Windows, as suggested by Raghuram Devarakonda
Amaury Forgeot d'Arc [Mon, 19 Nov 2007 21:20:21 +0000 (21:20 +0000)]
Correct test_cvs on Windows, as suggested by Raghuram Devarakonda
in issue1395. All other places in this file already use newline=''...

Also check that csv.reader is given an iterable returning strings.

17 years agoOops, I missed this one again (test_univnewlines fails):
Amaury Forgeot d'Arc [Mon, 19 Nov 2007 21:14:47 +0000 (21:14 +0000)]
Oops, I missed this one again (test_univnewlines fails):

Some incremental decoders return multiple characters, even when fed with
only one more byte. In this case the tell() state must subtract the
number of extra characters.

17 years agoIssue1395: Universal mode used to duplicate newlines when using read(1).
Amaury Forgeot d'Arc [Mon, 19 Nov 2007 20:34:10 +0000 (20:34 +0000)]
Issue1395: Universal mode used to duplicate newlines when using read(1).

"Universal newline" is now an incremental decoder wrapping the initial one,
with its own additional buffer (if '\r' is seen at the end of the input).

A decoder allows the tell() funtion to record the state of the translation.
This also simplifies the readline() process.

Now test_netrc passes on Windows, as well as many new tests in test_io.py

17 years agoMake test_cmd_line_scripts pass by using a unicode string instead of
Guido van Rossum [Mon, 19 Nov 2007 18:36:41 +0000 (18:36 +0000)]
Make test_cmd_line_scripts pass by using a unicode string instead of
a bytes string to hold argv0 in RunMainFromImporter().
Also changed the code lay-out a bit to be more readable (for me :-),
and print any unexpected errors rather than suppressing them.

17 years agoFixed build order of the _ssl project. The openssl project needs to come first becaus...
Christian Heimes [Mon, 19 Nov 2007 18:35:20 +0000 (18:35 +0000)]
Fixed build order of the _ssl project. The openssl project needs to come first because the makefile puts the header files in the right place.
Added some optimization flags to the Release builds of pythoncore and the executables.

17 years agoMerged revisions 59041-59055 via svnmerge from
Guido van Rossum [Mon, 19 Nov 2007 18:03:44 +0000 (18:03 +0000)]
Merged revisions 59041-59055 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r59044 | neal.norwitz | 2007-11-18 17:46:20 -0800 (Sun, 18 Nov 2007) | 1 line

  Use a slightly more recent version than 1.5.2b2.
........
  r59047 | walter.doerwald | 2007-11-19 04:14:05 -0800 (Mon, 19 Nov 2007) | 2 lines

  Fix typo in comment.
........
  r59049 | walter.doerwald | 2007-11-19 04:41:10 -0800 (Mon, 19 Nov 2007) | 4 lines

  Fix for #1444: utf_8_sig.StreamReader was (indirectly through decode())
  calling codecs.utf_8_decode() with final==True, which falled with incomplete
  byte sequences. Fix and test by James G. Sack.
........
  r59051 | nick.coghlan | 2007-11-19 05:56:27 -0800 (Mon, 19 Nov 2007) | 1 line

  Enable some test_cmd_line_script debugging output to investigate failure on Mac OSX buildbot
........
  r59053 | facundo.batista | 2007-11-19 08:30:24 -0800 (Mon, 19 Nov 2007) | 3 lines

  Fixed detail in add_type() explanation (issue 1463).
........
  r59054 | guido.van.rossum | 2007-11-19 09:35:24 -0800 (Mon, 19 Nov 2007) | 2 lines

  Make this work stand-alone, too.
........
  r59055 | guido.van.rossum | 2007-11-19 09:50:22 -0800 (Mon, 19 Nov 2007) | 3 lines

  Fix the OSX failures in this test -- they were due to /tmp being a symlink
  to /private/tmp.  Adding a call to os.path.realpath() to temp_dir() fixed it.
........

17 years agoTweak the imports so this script will run stand-alone.
Guido van Rossum [Mon, 19 Nov 2007 15:56:44 +0000 (15:56 +0000)]
Tweak the imports so this script will run stand-alone.
(No, this doesn't fix the bugs on OSX.)

17 years agoI've spend some time to automate more steps of the build process. Now bzip2, bsddb...
Christian Heimes [Mon, 19 Nov 2007 08:36:32 +0000 (08:36 +0000)]
I've spend some time to automate more steps of the build process. Now bzip2, bsddb, sqlite and openssl are automatically build by prelink steps.
I had to use some tricks to build openssl for 32 and 64bit CPUs in two separate build dirs.

17 years agoRevert modifications to extract_msvcr71 in 59040,
Martin v. Löwis [Mon, 19 Nov 2007 06:46:55 +0000 (06:46 +0000)]
Revert modifications to extract_msvcr71 in 59040,
as they didn't actually work.

17 years agoRemoved ReleaseAMD64 and replaced it with platform x64. The x64 builds fine except...
Christian Heimes [Mon, 19 Nov 2007 01:23:57 +0000 (01:23 +0000)]
Removed ReleaseAMD64 and replaced it with platform x64. The x64 builds fine except of the modules that depend on external libraries like tkinter and openssl. And I can't test the build on my 32bit CPU.

17 years agoI'm using the xxmodule and xxsubtype to test the msvccompiler on Windows. I'm having...
Christian Heimes [Sun, 18 Nov 2007 21:30:36 +0000 (21:30 +0000)]
I'm using the xxmodule and xxsubtype to test the msvccompiler on Windows. I'm having trouble to compile the module with VS 2008 cl.exe because "initializer is not a constant".

17 years agoMerged revisions 59005-59040 via svnmerge from
Christian Heimes [Sun, 18 Nov 2007 19:35:23 +0000 (19:35 +0000)]
Merged revisions 59005-59040 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

I've tried to fix test_cmd_line_script but I wasn't able to get all tests
right. Nick, can you please have a look?

........
  r59020 | facundo.batista | 2007-11-16 19:04:14 +0100 (Fri, 16 Nov 2007) | 12 lines

  Now in find, rfind, index, and rindex, you can use None as defaults,
  as usual with slicing (both with str and unicode strings).  This
  fixes issue 1259.

  For str only the stringobject.c file was modified.  But for unicode,
  I needed to repeat in the four functions a lot of code, so created
  a new function that does part of the job for them (and placed it in
  find.h, following a suggestion of Barry).

  Also added tests for this behaviour.
........
  r59021 | facundo.batista | 2007-11-16 19:41:24 +0100 (Fri, 16 Nov 2007) | 4 lines

  Fix for stupid error (I need to remember to do a full 'make clean + make'
  cycle before the tests...). Sorry.
........
  r59022 | facundo.batista | 2007-11-16 20:16:15 +0100 (Fri, 16 Nov 2007) | 3 lines

  Made _ParseTupleFinds only defined to unicodeobject.c
........
  r59024 | raymond.hettinger | 2007-11-17 02:51:22 +0100 (Sat, 17 Nov 2007) | 1 line

  Fix signature in example
........
  r59033 | brett.cannon | 2007-11-17 08:07:29 +0100 (Sat, 17 Nov 2007) | 5 lines

  Remove a confusing sentence about pth files and which directories are searched
  for them.

  Closes issue #1431.  Thanks Giambattista Bloisi for the help.
........
  r59039 | nick.coghlan | 2007-11-18 12:56:28 +0100 (Sun, 18 Nov 2007) | 1 line

  Patch #1739468: Directories and zipfiles containing __main__.py are now executable
........

17 years agoUpdates to the msi builder and PCbuild9 directory. msi.py can now create installers...
Christian Heimes [Sun, 18 Nov 2007 18:18:41 +0000 (18:18 +0000)]
Updates to the msi builder and PCbuild9 directory. msi.py can now create installers from the PCbuild9 directory with MSVCR90.dll. PCbuild and MSVCR71.dll are still the default.

17 years agoremove now-obsolete test_socket_ssl
Bill Janssen [Sat, 17 Nov 2007 21:51:51 +0000 (21:51 +0000)]
remove now-obsolete test_socket_ssl

17 years agoFixed some build issues and updated docs.
Christian Heimes [Sat, 17 Nov 2007 19:08:41 +0000 (19:08 +0000)]
Fixed some build issues and updated docs.

17 years agoThe _winreg module returns bytes which must be decoded to unicode, not encoded.
Christian Heimes [Sat, 17 Nov 2007 11:46:54 +0000 (11:46 +0000)]
The _winreg module returns bytes which must be decoded to unicode, not encoded.

17 years agoInitial import of new PCbuild9 for VS 2008. It partly based on PCbuild and partly...
Christian Heimes [Sat, 17 Nov 2007 08:15:27 +0000 (08:15 +0000)]
Initial import of new PCbuild9 for VS 2008. It partly based on PCbuild and partly hand crafted with some idea from PCbuild8. I've recreated all the extension module projects.

The new directory needs some more love and care but it works. I'm not able to test the AMD64 build.

The new tree is heavily using the *.vcprops property sheets. Please set any global settings in the property sheets.

17 years agoUse 'del' instead of rmpyc.py to remove the pyc and pyo files.
Thomas Heller [Fri, 16 Nov 2007 07:00:30 +0000 (07:00 +0000)]
Use 'del' instead of rmpyc.py to remove the pyc and pyo files.

17 years agoFixed an error in my last commit. The dll files are in the bin directory, not in...
Christian Heimes [Fri, 16 Nov 2007 02:35:02 +0000 (02:35 +0000)]
Fixed an error in my last commit. The dll files are in the bin directory, not in the lib directory.

17 years agoI finally figured out why _tkinter and _bsddb didn't compile with PCbuild8.
Christian Heimes [Fri, 16 Nov 2007 02:14:19 +0000 (02:14 +0000)]
I finally figured out why _tkinter and _bsddb didn't compile with PCbuild8.

17 years agoDisable dup() of SSLSocket. I don't think it can be made to work.
Guido van Rossum [Fri, 16 Nov 2007 01:28:45 +0000 (01:28 +0000)]
Disable dup() of SSLSocket.  I don't think it can be made to work.

17 years agoThis is roughly socket2.diff from issue 1378, with a few changes applied
Guido van Rossum [Fri, 16 Nov 2007 01:24:05 +0000 (01:24 +0000)]
This is roughly socket2.diff from issue 1378, with a few changes applied
to ssl.py (no need to test whether we can dup any more).
Regular sockets no longer have a _base, but we still have explicit
reference counting of socket objects for the benefit of makefile();
using duplicate sockets won't work for SSLSocket.

17 years agoCorrect a failing test when test_import is run after test_coding:
Amaury Forgeot d'Arc [Fri, 16 Nov 2007 00:56:23 +0000 (00:56 +0000)]
Correct a failing test when test_import is run after test_coding:
be sure to import a fresh module by removing it from sys.modules

17 years agoCleanup of tokenizer.c.
Guido van Rossum [Fri, 16 Nov 2007 00:51:45 +0000 (00:51 +0000)]
Cleanup of tokenizer.c.

17 years agoOops, forgot to test this after the merge.
Guido van Rossum [Fri, 16 Nov 2007 00:48:13 +0000 (00:48 +0000)]
Oops, forgot to test this after the merge.

17 years agoMerged revisions 58947-59004 via svnmerge from
Guido van Rossum [Fri, 16 Nov 2007 00:35:22 +0000 (00:35 +0000)]
Merged revisions 58947-59004 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r58952 | christian.heimes | 2007-11-12 10:58:08 -0800 (Mon, 12 Nov 2007) | 6 lines

  readline module cleanup
  fixed indention to tabs
  use Py_RETURN_NONE macro
  added more error checks to on_completion_display_matches_hook

  open question: Does PyList_SetItem(l, i, o) steal a reference to o in the case of an error?
........
  r58956 | guido.van.rossum | 2007-11-12 12:06:40 -0800 (Mon, 12 Nov 2007) | 2 lines

  Add the test from issue 1704621 (the issue itself is already fixed here).
........
  r58963 | amaury.forgeotdarc | 2007-11-13 13:54:28 -0800 (Tue, 13 Nov 2007) | 23 lines

  Merge from py3k branch:
  Correction for issue1265 (pdb bug with "with" statement).

  When an unfinished generator-iterator is garbage collected, PyEval_EvalFrameEx
  is called with a GeneratorExit exception set.  This leads to funny results
  if the sys.settrace function itself makes use of generators.
  A visible effect is that the settrace function is reset to None.
  Another is that the eventual "finally" block of the generator is not called.

  It is necessary to save/restore the exception around the call to the trace
  function.

  This happens a lot with py3k: isinstance() of an ABCMeta instance runs
      def __instancecheck__(cls, instance):
          """Override for isinstance(instance, cls)."""
          return any(cls.__subclasscheck__(c)
                     for c in {instance.__class__, type(instance)})
  which lets an opened generator expression each time it returns True.

  Backport candidate, even if the case is less frequent in 2.5.
........
  r58968 | georg.brandl | 2007-11-14 05:59:09 -0800 (Wed, 14 Nov 2007) | 2 lines

  Remove dead link from random docs.
........
  r58971 | raymond.hettinger | 2007-11-14 14:56:16 -0800 (Wed, 14 Nov 2007) | 1 line

  Make __fields__ read-only.  Suggested by Issac Morland
........
  r58972 | raymond.hettinger | 2007-11-14 15:02:30 -0800 (Wed, 14 Nov 2007) | 1 line

  Add test for __fields__ being read-only
........
  r58975 | raymond.hettinger | 2007-11-14 18:44:53 -0800 (Wed, 14 Nov 2007) | 6 lines

  Accept Issac Morland's suggestion for __replace__ to allow multiple replacements
  (suprisingly, this simplifies the signature, improves clarity, and is comparably fast).
  Update the docs to reflect a previous change to the function name.
  Add an example to the docs showing how to override the default __repr__ method.
........
  r58976 | raymond.hettinger | 2007-11-14 18:55:42 -0800 (Wed, 14 Nov 2007) | 1 line

  Small improvement to the implementation of __replace__().
........
  r58977 | raymond.hettinger | 2007-11-14 18:58:20 -0800 (Wed, 14 Nov 2007) | 1 line

  Fixup example in docs.
........
  r58978 | raymond.hettinger | 2007-11-14 19:16:09 -0800 (Wed, 14 Nov 2007) | 1 line

  Example of multiple replacements.
........
  r58998 | raymond.hettinger | 2007-11-15 14:39:34 -0800 (Thu, 15 Nov 2007) | 1 line

  Add example for use cases requiring default values.
........
  r59000 | bill.janssen | 2007-11-15 15:03:03 -0800 (Thu, 15 Nov 2007) | 1 line

  add the certificate for the Python SVN repository for testing SSL
........
  r59004 | guido.van.rossum | 2007-11-15 16:24:44 -0800 (Thu, 15 Nov 2007) | 8 lines

  A patch from issue 1378 by roudkerk:

  Currently on Windows set_error() make use of a large array which maps
  socket error numbers to error messages.

  This patch removes that array and just lets PyErr_SetExcFromWindowsErr()
  generate the message by using the Win32 function FormatMessage().
........

17 years agoFix some minor style nits. (I'll leave adding __all__ and making the
Guido van Rossum [Fri, 16 Nov 2007 00:06:11 +0000 (00:06 +0000)]
Fix some minor style nits.  (I'll leave adding __all__ and making the
docstrings conform to PEP 8 to someone else.)

17 years agoFix for VS 2008
Christian Heimes [Thu, 15 Nov 2007 23:37:07 +0000 (23:37 +0000)]
Fix for VS 2008
Although WS2_32.dll doesn't have inet_pton the definition conflicts with ws2tcpip.h.

17 years agoCorrection for issue1134: all source files with a coding spec, except latin-1
Amaury Forgeot d'Arc [Thu, 15 Nov 2007 23:19:43 +0000 (23:19 +0000)]
Correction for issue1134: all source files with a coding spec, except latin-1
and utf-8, crashed when parsing a multiline string, or a line longer that 512
columns.

17 years agoadd the certificate for the Python SVN repository for testing SSL
Bill Janssen [Thu, 15 Nov 2007 23:01:30 +0000 (23:01 +0000)]
add the certificate for the Python SVN repository for testing SSL

17 years agoget SSL support to work again
Bill Janssen [Thu, 15 Nov 2007 22:23:56 +0000 (22:23 +0000)]
get SSL support to work again

17 years agoAttempt to manually add _ssl to the PCBuild8 solution file.
Amaury Forgeot d'Arc [Thu, 15 Nov 2007 21:36:47 +0000 (21:36 +0000)]
Attempt to manually add _ssl to the PCBuild8 solution file.
Seems to start compiling.

17 years agoFound another memory leak in longrangeiter. And redo the previous correction
Amaury Forgeot d'Arc [Thu, 15 Nov 2007 20:52:21 +0000 (20:52 +0000)]
Found another memory leak in longrangeiter. And redo the previous correction
without calling PyType_Ready().

Question 1: Should the interpreter register all types with PyType_Ready()?
Many types seem to avoid it.

Question 2: To reproduce the problem, run the following code:
    def f():
        while True:
           for a in iter(range(0,1,10**20)):
              pass
    f()
And watch the memory used by the process.
How do we test this in a unittest?

17 years agoReplace PyObject_Unicode with PyObject_Str everywhere, and remove the
Thomas Heller [Thu, 15 Nov 2007 20:48:54 +0000 (20:48 +0000)]
Replace PyObject_Unicode with PyObject_Str everywhere, and remove the
#define for PyObject_Unicode in object.h.

17 years agoFix two compiler warnings on Win64.
Thomas Heller [Thu, 15 Nov 2007 20:03:00 +0000 (20:03 +0000)]
Fix two compiler warnings on Win64.

17 years agoIn anticipation of the upcoming ssl patch I've added _ssl to PCbuild8. It's based...
Christian Heimes [Thu, 15 Nov 2007 19:57:43 +0000 (19:57 +0000)]
In anticipation of the upcoming ssl patch I've added _ssl to PCbuild8. It's based on a copy of _socket.vcproj. My German version of VS 2005 alters almost every line of pcbuild.sln. Could somebody else please add _ssl.vcproj to the solution?

17 years agoPatch 1144 by David Binger, fix for parser module. With unittest.
Guido van Rossum [Thu, 15 Nov 2007 19:17:28 +0000 (19:17 +0000)]
Patch 1144 by David Binger, fix for parser module. With unittest.
(I also cleared out all trailing whitespace in the C file.)

17 years agoCorrect a memory leak: the range() object was not properly freed.
Amaury Forgeot d'Arc [Thu, 15 Nov 2007 19:16:08 +0000 (19:16 +0000)]
Correct a memory leak: the range() object was not properly freed.

17 years agoOn Win64, linking the python dll currently fails with 'unresolved
Thomas Heller [Thu, 15 Nov 2007 19:11:49 +0000 (19:11 +0000)]
On Win64, linking the python dll currently fails with 'unresolved
external symbol PyObject_Unicode'.

Building _ssl than hangs the build server because starting python.exe
displayes a message box that 'Python30.dll' cannot be found.

Temporary (?) solution: Look for existance of python30.dll and fail
the _ssl build when it is missing.