Commit graph

35534 commits

Author SHA1 Message Date
Neal Norwitz
0cbd805a10 Bug #1333982: string/number constants were inappropriately stored
in the byte code and co_consts even if they were not used, ie
immediately popped off the stack.
2006-08-04 05:09:28 +00:00
Neal Norwitz
4ffedadb10 Bug #1191458: tracing over for loops now produces a line event
on each iteration.  I'm not positive this is the best way to handle
this.  I'm also not sure that there aren't other cases where
the lnotab is generated incorrectly.  It would be great if people
that use pdb or tracing could test heavily.

Also:
 * Remove dead/duplicated code that wasn't used/necessary
   because we already handled the docstring prior to entering the loop.
 * add some debugging code into the compiler (#if 0'd out).
2006-08-04 04:58:47 +00:00
Neal Norwitz
ff4b63b80f Bug #1531405, format_exception no longer raises an exception if
str(exception) raised an exception.
2006-08-04 04:50:21 +00:00
Anthony Baxter
4b8bd31ef0 Tagging for release of Python 2.5b3 2006-08-03 00:21:45 +00:00
Tim Peters
54e3cf0633 Add missing svn:eol-style property to text files. 2006-08-02 18:19:35 +00:00
Martin v. Löwis
961b91bd3c Correction of patch #1455898: In the mbcs decoder, set final=False
for stream decoder, but final=True for the decode function.
2006-08-02 13:53:55 +00:00
Thomas Heller
5c387f2e5d Fix a mistake. 2006-08-02 12:00:13 +00:00
Thomas Heller
6a0ce407fb A few nore words about what ctypes does.
Document that using the wrong calling convention can also raise
'ValueError: Procedure called with the wrong number of arguments'.
2006-08-02 11:35:31 +00:00
Anthony Baxter
5d32a9f188 pre-release machinations 2006-08-02 07:43:09 +00:00
Neal Norwitz
30eb9660b6 Add some explanation about Klocwork and Coverity static analysis 2006-08-02 07:09:32 +00:00
Neal Norwitz
9b0ca79213 Patch #1519025 and bug #926423: If a KeyboardInterrupt occurs during
a socket operation on a socket with a timeout, the exception will be
caught correctly.  Previously, the exception was not caught.
2006-08-02 06:46:21 +00:00
Neal Norwitz
3ee5941f68 Let us know when there was a problem and the child had to kill the parent 2006-08-02 06:19:19 +00:00
Neal Norwitz
c0328d17a5 v is already checked for NULL, so just DECREF it 2006-08-02 06:15:10 +00:00
Neal Norwitz
c5e060dee6 _PyWeakref_GetWeakrefCount() now returns a Py_ssize_t instead of long. 2006-08-02 06:14:22 +00:00
Ronald Oussoren
5fb9c20f2a Updated documentation for the script that builds the OSX installer. 2006-08-02 06:10:10 +00:00
Tim Peters
a05f6e244a _Stream.close(): Try to kill struct.pack() warnings when
writing the crc to file on the "PPC64 Debian trunk" buildbot
when running test_tarfile.

This is again a case where the native zlib crc is an unsigned
32-bit int, but the Python wrapper implicitly casts it to
signed C long, so that "the sign bit looks different" on
different platforms.
2006-08-02 05:20:08 +00:00
Neal Norwitz
99dfe3c411 Prevent memory leak on error.
Reported by Klocwork #36
2006-08-02 04:27:11 +00:00
Tim Peters
62decc9f49 Try to squash struct.pack warnings on the "amd64 gentoo trunk"
buildbot (& possibly other 64-bit boxes) during test_gzip.

The native zlib crc32 function returns an unsigned 32-bit integer,
which the Python wrapper implicitly casts to C long.  Therefore the
same crc can "look negative" on a 32-bit box but "look positive" on
a 64-bit box.  This patch papers over that platform difference when
writing the crc to file.

It may be better to change the Python wrapper, either to make
the result "look positive" on all platforms (which means it may
have to return a Python long at times on a 32-bit box), or to
keep the sign the same across boxes.  But that would be a visible
change in what users see, while the current hack changes no
visible behavior (well, apart from stopping the struct deprecation
warning).

Note that the module-level write32() function is no longer used.
2006-08-02 04:12:36 +00:00
Tim Peters
4edcba69f3 Whitespace normalization. 2006-08-02 03:27:46 +00:00
Ronald Oussoren
26cad08748 This fixes bug #1527397: PythonLauncher runs scripts with the wrong working
directory. It also fixes a bug where PythonLauncher failed to launch scripts
when the scriptname (or the path to the script) contains quotes.
2006-08-01 21:00:57 +00:00
Ronald Oussoren
0f53bb1cbe Make sure the postinstall action that optionally updates the user's profile
on MacOS X actually works correctly in all cases.
2006-08-01 20:30:31 +00:00
Thomas Heller
d61d0733cb Speed up PyType_stgdict and PyObject_stgdict. 2006-08-01 19:14:15 +00:00
Georg Brandl
07fec3aa5a os.urandom no longer masks unrelated exceptions like SystemExit or
KeyboardInterrupt.
2006-08-01 18:49:24 +00:00
Andrew M. Kuchling
86e1e38059 [Patch #1520905] Attempt to suppress core file created by test_subprocess.py.
Patch by Douglas Greiman.

The test_run_abort() testcase produces a core file on Unix systems,
even though the test is successful. This can be confusing or alarming
to someone who runs 'make test' and then finds that the Python
interpreter apparently crashed.
2006-08-01 18:16:15 +00:00
Thomas Heller
11d68a6ac4 Minimal useful docstring for CopyComPointer. 2006-08-01 17:46:10 +00:00
Thomas Heller
3de83e9b61 Fix a potential segfault and various potentail refcount leaks
in the cast() function.
2006-08-01 16:54:43 +00:00
Andrew M. Kuchling
5a51bf50b8 typo fix 2006-08-01 16:24:30 +00:00
Andrew M. Kuchling
fe5004fc86 Update list of files; fix a typo 2006-07-31 16:27:57 +00:00
Andrew M. Kuchling
b7697a50fb [Bug #848556] Remove \d* from second alternative to avoid exponential case when repeating match 2006-07-31 16:22:05 +00:00
Andrew M. Kuchling
aa95fdb783 [Bug #1514540] Instead of putting the standard types in a section, put them in a chapter of their own. This means string methods will now show up in the ToC. (Should the types come before or after the functions+exceptions+constants chapter? I've put them after, for now.) 2006-07-31 16:10:24 +00:00
Georg Brandl
fbf969928f Fix function name. 2006-07-31 16:00:34 +00:00
Andrew M. Kuchling
ec3a89449e Remove reference to notation 2006-07-31 15:23:43 +00:00
Andrew M. Kuchling
17159fe26f Typo fix 2006-07-31 15:22:58 +00:00
Andrew M. Kuchling
04c897a2a9 Mention csv newline changes 2006-07-31 13:18:27 +00:00
Andrew M. Kuchling
4bcfe53e29 Add PyErr_WarnEx() 2006-07-31 12:52:26 +00:00
Andrew M. Kuchling
555ac45b20 Document PyErr_WarnEx. (Bad Neal! No biscuit!)
Is the explanation of the 'stacklevel' parameter clear?  Please feel free
to edit it.

I don't have LaTeX installed on this machine, so haven't verified that the
markup is correct.  Will check tonight, or maybe the automatic doc build will
tell me.
2006-07-31 12:39:05 +00:00
Andrew M. Kuchling
43bae4144b Add refcounts for PyErr_WarnEx 2006-07-31 12:20:24 +00:00
Skip Montanaro
759c185ce0 minor tweaks 2006-07-31 03:11:11 +00:00
Skip Montanaro
08bbccf369 minor tweaks 2006-07-31 03:09:45 +00:00
Tim Peters
f79c32dbfb ZipFile.close(): Kill the other struct.pack deprecation
warning on Windows.

Afraid I can't detect a pattern to when the pack formats decide
to use a signed or unsigned format code -- appears nearly
arbitrary to my eyes.  So I left all the pack formats alone and
changed the special-case data values instead.
2006-07-31 02:53:03 +00:00
Tim Peters
352bf0d7ee ZipFile.close(): Killed one of the struct.pack deprecation
warnings on Win32.

Also added an XXX about the line:

                pos3 = self.fp.tell()

`pos3` is never referenced, and I have no idea what the code
intended to do instead.
2006-07-31 02:40:23 +00:00
Andrew McNamara
10183b8e40 Redo the comment about the 2.5 change in quoted-newline handling. 2006-07-31 02:27:48 +00:00
Tim Peters
6458452c8a Whitespace normalization. 2006-07-31 01:46:03 +00:00
Georg Brandl
5b654ea774 Bug #1531349: right <-> left glitch in __rop__ description. 2006-07-30 20:18:51 +00:00
Neal Norwitz
313f8a903c Try to prevent hangs on Tru64/Alpha buildbot. I'm not certain this will help
and may need to be reverted if it causes problems.
2006-07-30 19:20:42 +00:00
Neal Norwitz
ec3c5e396e Verify that the signal handlers were really called 2006-07-30 19:18:38 +00:00
Neal Norwitz
c173b488dc Add some asserts and update comments 2006-07-30 19:18:13 +00:00
George Yoshida
499b0e638b Typo fix 2006-07-30 16:41:30 +00:00
George Yoshida
c7605270b4 Rename struct.pack_to to struct.pack_into as changed in revision 46642. 2006-07-30 16:37:37 +00:00
Georg Brandl
b142c63fd9 Fix makefile changes for python-config. 2006-07-30 16:20:10 +00:00