#1370: Finish the merge r58749, log below, by resolving all conflicts in Doc/.
Merged revisions 58221-58741 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r58221 | georg.brandl | 2007-09-20 10:57:59 -0700 (Thu, 20 Sep 2007) | 2 lines
Patch #1181: add os.environ.clear() method.
........
r58225 | sean.reifschneider | 2007-09-20 23:33:28 -0700 (Thu, 20 Sep 2007) | 3 lines
Issue1704287: "make install" fails unless you do "make" first. Make
oldsharedmods and sharedmods in "libinstall".
........
r58232 | guido.van.rossum | 2007-09-22 13:18:03 -0700 (Sat, 22 Sep 2007) | 4 lines
Patch # 188 by Philip Jenvey.
Make tell() mark CRLF as a newline.
With unit test.
........
r58242 | georg.brandl | 2007-09-24 10:55:47 -0700 (Mon, 24 Sep 2007) | 2 lines
Fix typo and double word.
........
r58245 | georg.brandl | 2007-09-24 10:59:28 -0700 (Mon, 24 Sep 2007) | 2 lines
#1196: document default radix for int().
........
r58247 | georg.brandl | 2007-09-24 11:08:24 -0700 (Mon, 24 Sep 2007) | 2 lines
#1177: accept 2xx responses for https too, not only http.
........
r58249 | andrew.kuchling | 2007-09-24 16:45:51 -0700 (Mon, 24 Sep 2007) | 1 line
Remove stray odd character; grammar fix
........
r58250 | andrew.kuchling | 2007-09-24 16:46:28 -0700 (Mon, 24 Sep 2007) | 1 line
Typo fix
........
r58251 | andrew.kuchling | 2007-09-24 17:09:42 -0700 (Mon, 24 Sep 2007) | 1 line
Add various items
........
r58268 | vinay.sajip | 2007-09-26 22:34:45 -0700 (Wed, 26 Sep 2007) | 1 line
Change to flush and close logic to fix #1760556.
........
r58269 | vinay.sajip | 2007-09-26 22:38:51 -0700 (Wed, 26 Sep 2007) | 1 line
Change to basicConfig() to fix #1021.
........
r58270 | georg.brandl | 2007-09-26 23:26:58 -0700 (Wed, 26 Sep 2007) | 2 lines
#1208: document match object's boolean value.
........
r58271 | vinay.sajip | 2007-09-26 23:56:13 -0700 (Wed, 26 Sep 2007) | 1 line
Minor date change.
........
r58272 | vinay.sajip | 2007-09-27 00:35:10 -0700 (Thu, 27 Sep 2007) | 1 line
Change to LogRecord.__init__() to fix #1206. Note that archaic use of type(x) == types.DictType is because of keeping 1.5.2 compatibility. While this is much less relevant these days, there probably needs to be a separate commit for removing all archaic constructs at the same time.
........
r58288 | brett.cannon | 2007-09-30 12:45:10 -0700 (Sun, 30 Sep 2007) | 9 lines
tuple.__repr__ did not consider a reference loop as it is not possible from
Python code; but it is possible from C. object.__str__ had the issue of not
expecting a type to doing something within it's tp_str implementation that
could trigger an infinite recursion, but it could in C code.. Both found
thanks to BaseException and how it handles its repr.
Closes issue #1686386. Thanks to Thomas Herve for taking an initial stab at
coming up with a solution.
........
r58289 | brett.cannon | 2007-09-30 13:37:19 -0700 (Sun, 30 Sep 2007) | 3 lines
Fix error introduced by r58288; if a tuple is length 0 return its repr and
don't worry about any self-referring tuples.
........
r58294 | facundo.batista | 2007-10-02 10:01:24 -0700 (Tue, 02 Oct 2007) | 11 lines
Made the various is_* operations return booleans. This was discussed
with Cawlishaw by mail, and he basically confirmed that to these is_*
operations, there's no need to return Decimal(0) and Decimal(1) if
the language supports the False and True booleans.
Also added a few tests for the these functions in extra.decTest, since
they are mostly untested (apart from the doctests).
Thanks Mark Dickinson
........
r58295 | facundo.batista | 2007-10-02 11:21:18 -0700 (Tue, 02 Oct 2007) | 4 lines
Added a class to store the digits of log(10), so that they can be made
available when necessary without recomputing. Thanks Mark Dickinson
........
r58299 | mark.summerfield | 2007-10-03 01:53:21 -0700 (Wed, 03 Oct 2007) | 4 lines
Added note in footnote about string comparisons about
unicodedata.normalize().
........
r58304 | raymond.hettinger | 2007-10-03 14:18:11 -0700 (Wed, 03 Oct 2007) | 1 line
enumerate() is no longer bounded to using sequences shorter than LONG_MAX. The possibility of overflow was sending some newsgroup posters into a tizzy.
........
r58305 | raymond.hettinger | 2007-10-03 17:20:27 -0700 (Wed, 03 Oct 2007) | 1 line
itertools.count() no longer limited to sys.maxint.
........
r58306 | kurt.kaiser | 2007-10-03 18:49:54 -0700 (Wed, 03 Oct 2007) | 3 lines
Assume that the user knows when he wants to end the line; don't insert
something he didn't select or complete.
........
r58307 | kurt.kaiser | 2007-10-03 19:07:50 -0700 (Wed, 03 Oct 2007) | 2 lines
Remove unused theme that was causing a fault in p3k.
........
r58308 | kurt.kaiser | 2007-10-03 19:09:17 -0700 (Wed, 03 Oct 2007) | 2 lines
Clean up EditorWindow close.
........
r58309 | kurt.kaiser | 2007-10-03 19:53:07 -0700 (Wed, 03 Oct 2007) | 7 lines
textView cleanup. Patch 1718043 Tal Einat.
M idlelib/EditorWindow.py
M idlelib/aboutDialog.py
M idlelib/textView.py
M idlelib/NEWS.txt
........
r58310 | kurt.kaiser | 2007-10-03 20:11:12 -0700 (Wed, 03 Oct 2007) | 3 lines
configDialog cleanup. Patch 1730217 Tal Einat.
........
r58311 | neal.norwitz | 2007-10-03 23:00:48 -0700 (Wed, 03 Oct 2007) | 4 lines
Coverity #151: Remove deadcode.
All this code already exists above starting at line 653.
........
r58325 | fred.drake | 2007-10-04 19:46:12 -0700 (Thu, 04 Oct 2007) | 1 line
wrap lines to <80 characters before fixing errors
........
r58326 | raymond.hettinger | 2007-10-04 19:47:07 -0700 (Thu, 04 Oct 2007) | 6 lines
Add __asdict__() to NamedTuple and refine the docs.
Add maxlen support to deque() and fixup docs.
Partially fix __reduce__(). The None as a third arg was no longer supported.
Still needs work on __reduce__() to handle recursive inputs.
........
r58327 | fred.drake | 2007-10-04 19:48:32 -0700 (Thu, 04 Oct 2007) | 3 lines
move descriptions of ac_(in|out)_buffer_size to the right place
http://bugs.python.org/issue1053
........
r58329 | neal.norwitz | 2007-10-04 20:39:17 -0700 (Thu, 04 Oct 2007) | 3 lines
dict could be NULL, so we need to XDECREF.
Fix a compiler warning about passing a PyTypeObject* instead of PyObject*.
........
r58330 | neal.norwitz | 2007-10-04 20:41:19 -0700 (Thu, 04 Oct 2007) | 2 lines
Fix Coverity #158: Check the correct variable.
........
r58332 | neal.norwitz | 2007-10-04 22:01:38 -0700 (Thu, 04 Oct 2007) | 7 lines
Fix Coverity #159.
This code was broken if save() returned a negative number since i contained
a boolean value and then we compared i < 0 which should never be true.
Will backport (assuming it's necessary)
........
r58334 | neal.norwitz | 2007-10-04 22:29:17 -0700 (Thu, 04 Oct 2007) | 1 line
Add a note about fixing some more warnings found by Coverity.
........
r58338 | raymond.hettinger | 2007-10-05 12:07:31 -0700 (Fri, 05 Oct 2007) | 1 line
Restore BEGIN/END THREADS macros which were squashed in the previous checkin
........
r58343 | gregory.p.smith | 2007-10-06 00:48:10 -0700 (Sat, 06 Oct 2007) | 3 lines
Stab in the dark attempt to fix the test_bsddb3 failure on sparc and S-390
ubuntu buildbots.
........
r58344 | gregory.p.smith | 2007-10-06 00:51:59 -0700 (Sat, 06 Oct 2007) | 2 lines
Allows BerkeleyDB 4.6.x >= 4.6.21 for the bsddb module.
........
r58348 | gregory.p.smith | 2007-10-06 08:47:37 -0700 (Sat, 06 Oct 2007) | 3 lines
Use the host the author likely meant in the first place. pop.gmail.com is
reliable. gmail.org is someones personal domain.
........
r58351 | neal.norwitz | 2007-10-06 12:16:28 -0700 (Sat, 06 Oct 2007) | 3 lines
Ensure that this test will pass even if another test left an unwritable TESTFN.
Also use the safe unlink in test_support instead of rolling our own here.
........
r58368 | georg.brandl | 2007-10-08 00:50:24 -0700 (Mon, 08 Oct 2007) | 3 lines
#1123: fix the docs for the str.split(None, sep) case.
Also expand a few other methods' docs, which had more info in the deprecated string module docs.
........
r58369 | georg.brandl | 2007-10-08 01:06:05 -0700 (Mon, 08 Oct 2007) | 2 lines
Update docstring of sched, also remove an unused assignment.
........
r58370 | raymond.hettinger | 2007-10-08 02:14:28 -0700 (Mon, 08 Oct 2007) | 5 lines
Add comments to NamedTuple code.
Let the field spec be either a string or a non-string sequence (suggested by Martin Blais with use cases).
Improve the error message in the case of a SyntaxError (caused by a duplicate field name).
........
r58371 | raymond.hettinger | 2007-10-08 02:56:29 -0700 (Mon, 08 Oct 2007) | 1 line
Missed a line in the docs
........
r58372 | raymond.hettinger | 2007-10-08 03:11:51 -0700 (Mon, 08 Oct 2007) | 1 line
Better variable names
........
r58376 | georg.brandl | 2007-10-08 07:12:47 -0700 (Mon, 08 Oct 2007) | 3 lines
#1199: docs for tp_as_{number,sequence,mapping}, by Amaury Forgeot d'Arc.
No need to merge this to py3k!
........
r58380 | raymond.hettinger | 2007-10-08 14:26:58 -0700 (Mon, 08 Oct 2007) | 1 line
Eliminate camelcase function name
........
r58381 | andrew.kuchling | 2007-10-08 16:23:03 -0700 (Mon, 08 Oct 2007) | 1 line
Eliminate camelcase function name
........
r58382 | raymond.hettinger | 2007-10-08 18:36:23 -0700 (Mon, 08 Oct 2007) | 1 line
Make the error messages more specific
........
r58384 | gregory.p.smith | 2007-10-08 23:02:21 -0700 (Mon, 08 Oct 2007) | 10 lines
Splits Modules/_bsddb.c up into bsddb.h and _bsddb.c and adds a C API
object available as bsddb.db.api. This is based on the patch submitted
by Duncan Grisby here:
http://sourceforge.net/tracker/index.php?func=detail&aid=1551895&group_id=13900&atid=313900
See this thread for additional info:
http://sourceforge.net/mailarchive/forum.php?thread_name=E1GAVDK-0002rk-Iw%40apasphere.com&forum_name=pybsddb-users
It also cleans up the code a little by removing some ifdef/endifs for
python prior to 2.1 and for unsupported Berkeley DB <= 3.2.
........
r58385 | gregory.p.smith | 2007-10-08 23:50:43 -0700 (Mon, 08 Oct 2007) | 5 lines
Fix a double free when positioning a database cursor to a non-existant
string key (and probably a few other situations with string keys).
This was reported with a patch as pybsddb sourceforge bug 1708868 by
jjjhhhlll at gmail.
........
r58386 | gregory.p.smith | 2007-10-09 00:19:11 -0700 (Tue, 09 Oct 2007) | 3 lines
Use the highest cPickle protocol in bsddb.dbshelve. This comes from
sourceforge pybsddb patch 1551443 by w_barnes.
........
r58394 | gregory.p.smith | 2007-10-09 11:26:02 -0700 (Tue, 09 Oct 2007) | 2 lines
remove another sleepycat reference
........
r58396 | kurt.kaiser | 2007-10-09 12:31:30 -0700 (Tue, 09 Oct 2007) | 3 lines
Allow interrupt only when executing user code in subprocess
Patch 1225 Tal Einat modified from IDLE-Spoon.
........
r58399 | brett.cannon | 2007-10-09 17:07:50 -0700 (Tue, 09 Oct 2007) | 5 lines
Remove file-level typedefs that were inconsistently used throughout the file.
Just move over to the public API names.
Closes issue1238.
........
r58401 | raymond.hettinger | 2007-10-09 17:26:46 -0700 (Tue, 09 Oct 2007) | 1 line
Accept Jim Jewett's api suggestion to use None instead of -1 to indicate unbounded deques.
........
r58403 | kurt.kaiser | 2007-10-09 17:55:40 -0700 (Tue, 09 Oct 2007) | 2 lines
Allow cursor color change w/o restart. Patch 1725576 Tal Einat.
........
r58404 | kurt.kaiser | 2007-10-09 18:06:47 -0700 (Tue, 09 Oct 2007) | 2 lines
show paste if > 80 columns. Patch 1659326 Tal Einat.
........
r58415 | thomas.heller | 2007-10-11 12:51:32 -0700 (Thu, 11 Oct 2007) | 5 lines
On OS X, use os.uname() instead of gestalt.sysv(...) to get the
operating system version. This allows to use ctypes when Python
was configured with --disable-toolbox-glue.
........
r58419 | neal.norwitz | 2007-10-11 20:01:01 -0700 (Thu, 11 Oct 2007) | 1 line
Get rid of warning about not being able to create an existing directory.
........
r58420 | neal.norwitz | 2007-10-11 20:01:30 -0700 (Thu, 11 Oct 2007) | 1 line
Get rid of warnings on a bunch of platforms by using a proper prototype.
........
r58421 | neal.norwitz | 2007-10-11 20:01:54 -0700 (Thu, 11 Oct 2007) | 4 lines
Get rid of compiler warning about retval being used (returned) without
being initialized. (gcc warning and Coverity 202)
........
r58422 | neal.norwitz | 2007-10-11 20:03:23 -0700 (Thu, 11 Oct 2007) | 1 line
Fix Coverity 168: Close the file before returning (exiting).
........
r58423 | neal.norwitz | 2007-10-11 20:04:18 -0700 (Thu, 11 Oct 2007) | 4 lines
Fix Coverity 180: Don't overallocate. We don't need structs, but pointers.
Also fix a memory leak.
........
r58424 | neal.norwitz | 2007-10-11 20:05:19 -0700 (Thu, 11 Oct 2007) | 5 lines
Fix Coverity 185-186: If the passed in FILE is NULL, uninitialized memory
would be accessed.
Will backport.
........
r58425 | neal.norwitz | 2007-10-11 20:52:34 -0700 (Thu, 11 Oct 2007) | 1 line
Get this module to compile with bsddb versions prior to 4.3
........
r58430 | martin.v.loewis | 2007-10-12 01:56:52 -0700 (Fri, 12 Oct 2007) | 3 lines
Bug #1216: Restore support for Visual Studio 2002.
Will backport to 2.5.
........
r58433 | raymond.hettinger | 2007-10-12 10:53:11 -0700 (Fri, 12 Oct 2007) | 1 line
Fix test of count.__repr__() to ignore the 'L' if the count is a long
........
r58434 | gregory.p.smith | 2007-10-12 11:44:06 -0700 (Fri, 12 Oct 2007) | 4 lines
Fixes http://bugs.python.org/issue1233 - bsddb.dbshelve.DBShelf.append
was useless due to inverted logic. Also adds a test case for RECNO dbs
to test_dbshelve.
........
r58445 | georg.brandl | 2007-10-13 06:20:03 -0700 (Sat, 13 Oct 2007) | 2 lines
Fix email example.
........
r58450 | gregory.p.smith | 2007-10-13 16:02:05 -0700 (Sat, 13 Oct 2007) | 2 lines
Fix an uncollectable reference leak in bsddb.db.DBShelf.append
........
r58453 | neal.norwitz | 2007-10-13 17:18:40 -0700 (Sat, 13 Oct 2007) | 8 lines
Let the O/S supply a port if none of the default ports can be used.
This should make the tests more robust at the expense of allowing
tests to be sloppier by not requiring them to cleanup after themselves.
(It will legitamitely help when running two test suites simultaneously
or if another process is already using one of the predefined ports.)
Also simplifies (slightLy) the exception handling elsewhere.
........
r58459 | neal.norwitz | 2007-10-14 11:30:21 -0700 (Sun, 14 Oct 2007) | 2 lines
Don't raise a string exception, they don't work anymore.
........
r58460 | neal.norwitz | 2007-10-14 11:40:37 -0700 (Sun, 14 Oct 2007) | 1 line
Use unittest for assertions
........
r58468 | armin.rigo | 2007-10-15 00:48:35 -0700 (Mon, 15 Oct 2007) | 2 lines
test_bigbits was not testing what it seemed to.
........
r58471 | guido.van.rossum | 2007-10-15 08:54:11 -0700 (Mon, 15 Oct 2007) | 3 lines
Change a PyErr_Print() into a PyErr_Clear(),
per discussion in issue 1031213.
........
r58500 | raymond.hettinger | 2007-10-16 12:18:30 -0700 (Tue, 16 Oct 2007) | 1 line
Improve error messages
........
r58506 | raymond.hettinger | 2007-10-16 14:28:32 -0700 (Tue, 16 Oct 2007) | 1 line
More docs, error messages, and tests
........
r58507 | andrew.kuchling | 2007-10-16 15:58:03 -0700 (Tue, 16 Oct 2007) | 1 line
Add items
........
r58508 | brett.cannon | 2007-10-16 16:24:06 -0700 (Tue, 16 Oct 2007) | 3 lines
Remove ``:const:`` notation on None in parameter list. Since the markup is not
rendered for parameters it just showed up as ``:const:`None` `` in the output.
........
r58509 | brett.cannon | 2007-10-16 16:26:45 -0700 (Tue, 16 Oct 2007) | 3 lines
Re-order some functions whose parameters differ between PyObject and const char
* so that they are next to each other.
........
r58522 | armin.rigo | 2007-10-17 11:46:37 -0700 (Wed, 17 Oct 2007) | 5 lines
Fix the overflow checking of list_repeat.
Introduce overflow checking into list_inplace_repeat.
Backport candidate, possibly.
........
r58530 | facundo.batista | 2007-10-17 20:16:03 -0700 (Wed, 17 Oct 2007) | 7 lines
Issue #1580738. When HTTPConnection reads the whole stream with read(),
it closes itself. When the stream is read in several calls to read(n),
it should behave in the same way if HTTPConnection knows where the end
of the stream is (through self.length). Added a test case for this
behaviour.
........
r58531 | facundo.batista | 2007-10-17 20:44:48 -0700 (Wed, 17 Oct 2007) | 3 lines
Issue 1289, just a typo.
........
r58532 | gregory.p.smith | 2007-10-18 00:56:54 -0700 (Thu, 18 Oct 2007) | 4 lines
cleanup test_dbtables to use mkdtemp. cleanup dbtables to pass txn as a
keyword argument whenever possible to avoid bugs and confusion. (dbtables.py
line 447 self.db.get using txn as a non-keyword was an actual bug due to this)
........
r58533 | gregory.p.smith | 2007-10-18 01:34:20 -0700 (Thu, 18 Oct 2007) | 4 lines
Fix a weird bug in dbtables: if it chose a random rowid string that contained
NULL bytes it would cause the database all sorts of problems in the future
leading to very strange random failures and corrupt dbtables.bsdTableDb dbs.
........
r58534 | gregory.p.smith | 2007-10-18 09:32:02 -0700 (Thu, 18 Oct 2007) | 3 lines
A cleaner fix than the one committed last night. Generate random rowids that
do not contain null bytes.
........
r58537 | gregory.p.smith | 2007-10-18 10:17:57 -0700 (Thu, 18 Oct 2007) | 2 lines
mention bsddb fixes.
........
r58538 | raymond.hettinger | 2007-10-18 14:13:06 -0700 (Thu, 18 Oct 2007) | 1 line
Remove useless warning
........
r58539 | gregory.p.smith | 2007-10-19 00:31:20 -0700 (Fri, 19 Oct 2007) | 2 lines
squelch the warning that this test is supposed to trigger.
........
r58542 | georg.brandl | 2007-10-19 05:32:39 -0700 (Fri, 19 Oct 2007) | 2 lines
Clarify wording for apply().
........
r58544 | mark.summerfield | 2007-10-19 05:48:17 -0700 (Fri, 19 Oct 2007) | 3 lines
Added a cross-ref to each other.
........
r58545 | georg.brandl | 2007-10-19 10:38:49 -0700 (Fri, 19 Oct 2007) | 2 lines
#1284: "S" means "seen", not unread.
........
r58548 | thomas.heller | 2007-10-19 11:11:41 -0700 (Fri, 19 Oct 2007) | 4 lines
Fix ctypes on 32-bit systems when Python is configured --with-system-ffi.
See also https://bugs.launchpad.net/bugs/72505.
Ported from release25-maint branch.
........
r58550 | facundo.batista | 2007-10-19 12:25:57 -0700 (Fri, 19 Oct 2007) | 8 lines
The constructor from tuple was way too permissive: it allowed bad
coefficient numbers, floats in the sign, and other details that
generated directly the wrong number in the best case, or triggered
misfunctionality in the alorithms.
Test cases added for these issues. Thanks Mark Dickinson.
........
r58559 | georg.brandl | 2007-10-20 06:22:53 -0700 (Sat, 20 Oct 2007) | 2 lines
Fix code being interpreted as a target.
........
r58561 | georg.brandl | 2007-10-20 06:36:24 -0700 (Sat, 20 Oct 2007) | 2 lines
Document new "cmdoption" directive.
........
r58562 | georg.brandl | 2007-10-20 08:21:22 -0700 (Sat, 20 Oct 2007) | 2 lines
Make a path more Unix-standardy.
........
r58564 | georg.brandl | 2007-10-20 10:51:39 -0700 (Sat, 20 Oct 2007) | 2 lines
Document new directive "envvar".
........
r58567 | georg.brandl | 2007-10-20 11:08:14 -0700 (Sat, 20 Oct 2007) | 6 lines
* Add new toplevel chapter, "Using Python." (how to install,
configure and setup python on different platforms -- at least
in theory.)
* Move the Python on Mac docs in that chapter.
* Add a new chapter about the command line invocation, by stargaming.
........
r58568 | georg.brandl | 2007-10-20 11:33:20 -0700 (Sat, 20 Oct 2007) | 2 lines
Change title, for now.
........
r58569 | georg.brandl | 2007-10-20 11:39:25 -0700 (Sat, 20 Oct 2007) | 2 lines
Add entry to ACKS.
........
r58570 | georg.brandl | 2007-10-20 12:05:45 -0700 (Sat, 20 Oct 2007) | 2 lines
Clarify -E docs.
........
r58571 | georg.brandl | 2007-10-20 12:08:36 -0700 (Sat, 20 Oct 2007) | 2 lines
Even more clarification.
........
r58572 | andrew.kuchling | 2007-10-20 12:25:37 -0700 (Sat, 20 Oct 2007) | 1 line
Fix protocol name
........
r58573 | andrew.kuchling | 2007-10-20 12:35:18 -0700 (Sat, 20 Oct 2007) | 1 line
Various items
........
r58574 | andrew.kuchling | 2007-10-20 12:39:35 -0700 (Sat, 20 Oct 2007) | 1 line
Use correct header line
........
r58576 | armin.rigo | 2007-10-21 02:14:15 -0700 (Sun, 21 Oct 2007) | 3 lines
Add a crasher for the long-standing issue with closing a file
while another thread uses it.
........
r58577 | georg.brandl | 2007-10-21 03:01:56 -0700 (Sun, 21 Oct 2007) | 2 lines
Remove duplicate crasher.
........
r58578 | georg.brandl | 2007-10-21 03:24:20 -0700 (Sun, 21 Oct 2007) | 2 lines
Unify "byte code" to "bytecode". Also sprinkle :term: markup for it.
........
r58579 | georg.brandl | 2007-10-21 03:32:54 -0700 (Sun, 21 Oct 2007) | 2 lines
Add markup to new function descriptions.
........
r58580 | georg.brandl | 2007-10-21 03:45:46 -0700 (Sun, 21 Oct 2007) | 2 lines
Add :term:s for descriptors.
........
r58581 | georg.brandl | 2007-10-21 03:46:24 -0700 (Sun, 21 Oct 2007) | 2 lines
Unify "file-descriptor" to "file descriptor".
........
r58582 | georg.brandl | 2007-10-21 03:52:38 -0700 (Sun, 21 Oct 2007) | 2 lines
Add :term: for generators.
........
r58583 | georg.brandl | 2007-10-21 05:10:28 -0700 (Sun, 21 Oct 2007) | 2 lines
Add :term:s for iterator.
........
r58584 | georg.brandl | 2007-10-21 05:15:05 -0700 (Sun, 21 Oct 2007) | 2 lines
Add :term:s for "new-style class".
........
r58588 | neal.norwitz | 2007-10-21 21:47:54 -0700 (Sun, 21 Oct 2007) | 1 line
Add Chris Monson so he can edit PEPs.
........
r58594 | guido.van.rossum | 2007-10-22 09:27:19 -0700 (Mon, 22 Oct 2007) | 4 lines
Issue #1307, patch by Derek Shockey.
When "MAIL" is received without args, an exception happens instead of
sending a 501 syntax error response.
........
r58598 | travis.oliphant | 2007-10-22 19:40:56 -0700 (Mon, 22 Oct 2007) | 1 line
Add phuang patch from Issue 708374 which adds offset parameter to mmap module.
........
r58601 | neal.norwitz | 2007-10-22 22:44:27 -0700 (Mon, 22 Oct 2007) | 2 lines
Bug #1313, fix typo (wrong variable name) in example.
........
r58609 | georg.brandl | 2007-10-23 11:21:35 -0700 (Tue, 23 Oct 2007) | 2 lines
Update Pygments version from externals.
........
r58618 | guido.van.rossum | 2007-10-23 12:25:41 -0700 (Tue, 23 Oct 2007) | 3 lines
Issue 1307 by Derek Shockey, fox the same bug for RCPT.
Neal: please backport!
........
r58620 | raymond.hettinger | 2007-10-23 13:37:41 -0700 (Tue, 23 Oct 2007) | 1 line
Shorter name for namedtuple()
........
r58621 | andrew.kuchling | 2007-10-23 13:55:47 -0700 (Tue, 23 Oct 2007) | 1 line
Update name
........
r58622 | raymond.hettinger | 2007-10-23 14:23:07 -0700 (Tue, 23 Oct 2007) | 1 line
Fixup news entry
........
r58623 | raymond.hettinger | 2007-10-23 18:28:33 -0700 (Tue, 23 Oct 2007) | 1 line
Optimize sum() for integer and float inputs.
........
r58624 | raymond.hettinger | 2007-10-23 19:05:51 -0700 (Tue, 23 Oct 2007) | 1 line
Fixup error return and add support for intermixed ints and floats/
........
r58628 | vinay.sajip | 2007-10-24 03:47:06 -0700 (Wed, 24 Oct 2007) | 1 line
Bug #1321: Fixed logic error in TimedRotatingFileHandler.__init__()
........
r58641 | facundo.batista | 2007-10-24 12:11:08 -0700 (Wed, 24 Oct 2007) | 4 lines
Issue 1290. CharacterData.__repr__ was constructing a string
in response that keeped having a non-ascii character.
........
r58643 | thomas.heller | 2007-10-24 12:50:45 -0700 (Wed, 24 Oct 2007) | 1 line
Added unittest for calling a function with paramflags (backport from py3k branch).
........
r58645 | matthias.klose | 2007-10-24 13:00:44 -0700 (Wed, 24 Oct 2007) | 2 lines
- Build using system ffi library on arm*-linux*.
........
r58651 | georg.brandl | 2007-10-24 14:40:38 -0700 (Wed, 24 Oct 2007) | 2 lines
Bug #1287: make os.environ.pop() work as expected.
........
r58652 | raymond.hettinger | 2007-10-24 19:26:58 -0700 (Wed, 24 Oct 2007) | 1 line
Missing DECREFs
........
r58653 | matthias.klose | 2007-10-24 23:37:24 -0700 (Wed, 24 Oct 2007) | 2 lines
- Build using system ffi library on arm*-linux*, pass --with-system-ffi to CONFIG_ARGS
........
r58655 | thomas.heller | 2007-10-25 12:47:32 -0700 (Thu, 25 Oct 2007) | 2 lines
ffi_type_longdouble may be already #defined.
See issue 1324.
........
r58656 | kurt.kaiser | 2007-10-25 15:43:45 -0700 (Thu, 25 Oct 2007) | 3 lines
Correct an ancient bug in an unused path by removing that path: register() is
now idempotent.
........
r58660 | kurt.kaiser | 2007-10-25 17:10:09 -0700 (Thu, 25 Oct 2007) | 4 lines
1. Add comments to provide top-level documentation.
2. Refactor to use more descriptive names.
3. Enhance tests in main().
........
r58675 | georg.brandl | 2007-10-26 11:30:41 -0700 (Fri, 26 Oct 2007) | 2 lines
Fix new pop() method on os.environ on ignorecase-platforms.
........
r58696 | neal.norwitz | 2007-10-27 15:32:21 -0700 (Sat, 27 Oct 2007) | 1 line
Update URL for Pygments. 0.8.1 is no longer available
........
r58697 | hyeshik.chang | 2007-10-28 04:19:02 -0700 (Sun, 28 Oct 2007) | 3 lines
- Add support for FreeBSD 8 which is recently forked from FreeBSD 7.
- Regenerate IN module for most recent maintenance tree of FreeBSD 6 and 7.
........
r58698 | hyeshik.chang | 2007-10-28 05:38:09 -0700 (Sun, 28 Oct 2007) | 2 lines
Enable platform-specific tweaks for FreeBSD 8 (exactly same to FreeBSD 7's yet)
........
r58700 | kurt.kaiser | 2007-10-28 12:03:59 -0700 (Sun, 28 Oct 2007) | 2 lines
Add confirmation dialog before printing. Patch 1717170 Tal Einat.
........
r58706 | guido.van.rossum | 2007-10-29 13:52:45 -0700 (Mon, 29 Oct 2007) | 3 lines
Patch 1353 by Jacob Winther.
Add mp4 mapping to mimetypes.py.
........
r58709 | guido.van.rossum | 2007-10-29 15:15:05 -0700 (Mon, 29 Oct 2007) | 6 lines
Backport fixes for the code that decodes octal escapes (and for PyString
also hex escapes) -- this was reaching beyond the end of the input string
buffer, even though it is not supposed to be \0-terminated.
This has no visible effect but is clearly the correct thing to do.
(In 3.0 it had a visible effect after removing ob_sstate from PyString.)
........
r58710 | kurt.kaiser | 2007-10-29 19:38:54 -0700 (Mon, 29 Oct 2007) | 7 lines
check in Tal Einat's update to tabpage.py
Patch 1612746
M configDialog.py
M NEWS.txt
AM tabbedpages.py
........
r58715 | georg.brandl | 2007-10-30 10:51:18 -0700 (Tue, 30 Oct 2007) | 2 lines
Use correct markup.
........
r58716 | georg.brandl | 2007-10-30 10:57:12 -0700 (Tue, 30 Oct 2007) | 2 lines
Make example about hiding None return values at the prompt clearer.
........
r58728 | neal.norwitz | 2007-10-30 23:33:20 -0700 (Tue, 30 Oct 2007) | 1 line
Fix some compiler warnings for signed comparisons on Unix and Windows.
........
r58731 | martin.v.loewis | 2007-10-31 10:19:33 -0700 (Wed, 31 Oct 2007) | 2 lines
Adding Christian Heimes.
........
r58737 | raymond.hettinger | 2007-10-31 14:57:58 -0700 (Wed, 31 Oct 2007) | 1 line
Clarify the reasons why pickle is almost always better than marshal
........
r58739 | raymond.hettinger | 2007-10-31 15:15:49 -0700 (Wed, 31 Oct 2007) | 1 line
Sets are marshalable.
........
2007-11-01 17:32:30 -03:00
|
|
|
:mod:`dis` --- Disassembler for Python bytecode
|
|
|
|
===============================================
|
2007-08-15 11:28:22 -03:00
|
|
|
|
|
|
|
.. module:: dis
|
#1370: Finish the merge r58749, log below, by resolving all conflicts in Doc/.
Merged revisions 58221-58741 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r58221 | georg.brandl | 2007-09-20 10:57:59 -0700 (Thu, 20 Sep 2007) | 2 lines
Patch #1181: add os.environ.clear() method.
........
r58225 | sean.reifschneider | 2007-09-20 23:33:28 -0700 (Thu, 20 Sep 2007) | 3 lines
Issue1704287: "make install" fails unless you do "make" first. Make
oldsharedmods and sharedmods in "libinstall".
........
r58232 | guido.van.rossum | 2007-09-22 13:18:03 -0700 (Sat, 22 Sep 2007) | 4 lines
Patch # 188 by Philip Jenvey.
Make tell() mark CRLF as a newline.
With unit test.
........
r58242 | georg.brandl | 2007-09-24 10:55:47 -0700 (Mon, 24 Sep 2007) | 2 lines
Fix typo and double word.
........
r58245 | georg.brandl | 2007-09-24 10:59:28 -0700 (Mon, 24 Sep 2007) | 2 lines
#1196: document default radix for int().
........
r58247 | georg.brandl | 2007-09-24 11:08:24 -0700 (Mon, 24 Sep 2007) | 2 lines
#1177: accept 2xx responses for https too, not only http.
........
r58249 | andrew.kuchling | 2007-09-24 16:45:51 -0700 (Mon, 24 Sep 2007) | 1 line
Remove stray odd character; grammar fix
........
r58250 | andrew.kuchling | 2007-09-24 16:46:28 -0700 (Mon, 24 Sep 2007) | 1 line
Typo fix
........
r58251 | andrew.kuchling | 2007-09-24 17:09:42 -0700 (Mon, 24 Sep 2007) | 1 line
Add various items
........
r58268 | vinay.sajip | 2007-09-26 22:34:45 -0700 (Wed, 26 Sep 2007) | 1 line
Change to flush and close logic to fix #1760556.
........
r58269 | vinay.sajip | 2007-09-26 22:38:51 -0700 (Wed, 26 Sep 2007) | 1 line
Change to basicConfig() to fix #1021.
........
r58270 | georg.brandl | 2007-09-26 23:26:58 -0700 (Wed, 26 Sep 2007) | 2 lines
#1208: document match object's boolean value.
........
r58271 | vinay.sajip | 2007-09-26 23:56:13 -0700 (Wed, 26 Sep 2007) | 1 line
Minor date change.
........
r58272 | vinay.sajip | 2007-09-27 00:35:10 -0700 (Thu, 27 Sep 2007) | 1 line
Change to LogRecord.__init__() to fix #1206. Note that archaic use of type(x) == types.DictType is because of keeping 1.5.2 compatibility. While this is much less relevant these days, there probably needs to be a separate commit for removing all archaic constructs at the same time.
........
r58288 | brett.cannon | 2007-09-30 12:45:10 -0700 (Sun, 30 Sep 2007) | 9 lines
tuple.__repr__ did not consider a reference loop as it is not possible from
Python code; but it is possible from C. object.__str__ had the issue of not
expecting a type to doing something within it's tp_str implementation that
could trigger an infinite recursion, but it could in C code.. Both found
thanks to BaseException and how it handles its repr.
Closes issue #1686386. Thanks to Thomas Herve for taking an initial stab at
coming up with a solution.
........
r58289 | brett.cannon | 2007-09-30 13:37:19 -0700 (Sun, 30 Sep 2007) | 3 lines
Fix error introduced by r58288; if a tuple is length 0 return its repr and
don't worry about any self-referring tuples.
........
r58294 | facundo.batista | 2007-10-02 10:01:24 -0700 (Tue, 02 Oct 2007) | 11 lines
Made the various is_* operations return booleans. This was discussed
with Cawlishaw by mail, and he basically confirmed that to these is_*
operations, there's no need to return Decimal(0) and Decimal(1) if
the language supports the False and True booleans.
Also added a few tests for the these functions in extra.decTest, since
they are mostly untested (apart from the doctests).
Thanks Mark Dickinson
........
r58295 | facundo.batista | 2007-10-02 11:21:18 -0700 (Tue, 02 Oct 2007) | 4 lines
Added a class to store the digits of log(10), so that they can be made
available when necessary without recomputing. Thanks Mark Dickinson
........
r58299 | mark.summerfield | 2007-10-03 01:53:21 -0700 (Wed, 03 Oct 2007) | 4 lines
Added note in footnote about string comparisons about
unicodedata.normalize().
........
r58304 | raymond.hettinger | 2007-10-03 14:18:11 -0700 (Wed, 03 Oct 2007) | 1 line
enumerate() is no longer bounded to using sequences shorter than LONG_MAX. The possibility of overflow was sending some newsgroup posters into a tizzy.
........
r58305 | raymond.hettinger | 2007-10-03 17:20:27 -0700 (Wed, 03 Oct 2007) | 1 line
itertools.count() no longer limited to sys.maxint.
........
r58306 | kurt.kaiser | 2007-10-03 18:49:54 -0700 (Wed, 03 Oct 2007) | 3 lines
Assume that the user knows when he wants to end the line; don't insert
something he didn't select or complete.
........
r58307 | kurt.kaiser | 2007-10-03 19:07:50 -0700 (Wed, 03 Oct 2007) | 2 lines
Remove unused theme that was causing a fault in p3k.
........
r58308 | kurt.kaiser | 2007-10-03 19:09:17 -0700 (Wed, 03 Oct 2007) | 2 lines
Clean up EditorWindow close.
........
r58309 | kurt.kaiser | 2007-10-03 19:53:07 -0700 (Wed, 03 Oct 2007) | 7 lines
textView cleanup. Patch 1718043 Tal Einat.
M idlelib/EditorWindow.py
M idlelib/aboutDialog.py
M idlelib/textView.py
M idlelib/NEWS.txt
........
r58310 | kurt.kaiser | 2007-10-03 20:11:12 -0700 (Wed, 03 Oct 2007) | 3 lines
configDialog cleanup. Patch 1730217 Tal Einat.
........
r58311 | neal.norwitz | 2007-10-03 23:00:48 -0700 (Wed, 03 Oct 2007) | 4 lines
Coverity #151: Remove deadcode.
All this code already exists above starting at line 653.
........
r58325 | fred.drake | 2007-10-04 19:46:12 -0700 (Thu, 04 Oct 2007) | 1 line
wrap lines to <80 characters before fixing errors
........
r58326 | raymond.hettinger | 2007-10-04 19:47:07 -0700 (Thu, 04 Oct 2007) | 6 lines
Add __asdict__() to NamedTuple and refine the docs.
Add maxlen support to deque() and fixup docs.
Partially fix __reduce__(). The None as a third arg was no longer supported.
Still needs work on __reduce__() to handle recursive inputs.
........
r58327 | fred.drake | 2007-10-04 19:48:32 -0700 (Thu, 04 Oct 2007) | 3 lines
move descriptions of ac_(in|out)_buffer_size to the right place
http://bugs.python.org/issue1053
........
r58329 | neal.norwitz | 2007-10-04 20:39:17 -0700 (Thu, 04 Oct 2007) | 3 lines
dict could be NULL, so we need to XDECREF.
Fix a compiler warning about passing a PyTypeObject* instead of PyObject*.
........
r58330 | neal.norwitz | 2007-10-04 20:41:19 -0700 (Thu, 04 Oct 2007) | 2 lines
Fix Coverity #158: Check the correct variable.
........
r58332 | neal.norwitz | 2007-10-04 22:01:38 -0700 (Thu, 04 Oct 2007) | 7 lines
Fix Coverity #159.
This code was broken if save() returned a negative number since i contained
a boolean value and then we compared i < 0 which should never be true.
Will backport (assuming it's necessary)
........
r58334 | neal.norwitz | 2007-10-04 22:29:17 -0700 (Thu, 04 Oct 2007) | 1 line
Add a note about fixing some more warnings found by Coverity.
........
r58338 | raymond.hettinger | 2007-10-05 12:07:31 -0700 (Fri, 05 Oct 2007) | 1 line
Restore BEGIN/END THREADS macros which were squashed in the previous checkin
........
r58343 | gregory.p.smith | 2007-10-06 00:48:10 -0700 (Sat, 06 Oct 2007) | 3 lines
Stab in the dark attempt to fix the test_bsddb3 failure on sparc and S-390
ubuntu buildbots.
........
r58344 | gregory.p.smith | 2007-10-06 00:51:59 -0700 (Sat, 06 Oct 2007) | 2 lines
Allows BerkeleyDB 4.6.x >= 4.6.21 for the bsddb module.
........
r58348 | gregory.p.smith | 2007-10-06 08:47:37 -0700 (Sat, 06 Oct 2007) | 3 lines
Use the host the author likely meant in the first place. pop.gmail.com is
reliable. gmail.org is someones personal domain.
........
r58351 | neal.norwitz | 2007-10-06 12:16:28 -0700 (Sat, 06 Oct 2007) | 3 lines
Ensure that this test will pass even if another test left an unwritable TESTFN.
Also use the safe unlink in test_support instead of rolling our own here.
........
r58368 | georg.brandl | 2007-10-08 00:50:24 -0700 (Mon, 08 Oct 2007) | 3 lines
#1123: fix the docs for the str.split(None, sep) case.
Also expand a few other methods' docs, which had more info in the deprecated string module docs.
........
r58369 | georg.brandl | 2007-10-08 01:06:05 -0700 (Mon, 08 Oct 2007) | 2 lines
Update docstring of sched, also remove an unused assignment.
........
r58370 | raymond.hettinger | 2007-10-08 02:14:28 -0700 (Mon, 08 Oct 2007) | 5 lines
Add comments to NamedTuple code.
Let the field spec be either a string or a non-string sequence (suggested by Martin Blais with use cases).
Improve the error message in the case of a SyntaxError (caused by a duplicate field name).
........
r58371 | raymond.hettinger | 2007-10-08 02:56:29 -0700 (Mon, 08 Oct 2007) | 1 line
Missed a line in the docs
........
r58372 | raymond.hettinger | 2007-10-08 03:11:51 -0700 (Mon, 08 Oct 2007) | 1 line
Better variable names
........
r58376 | georg.brandl | 2007-10-08 07:12:47 -0700 (Mon, 08 Oct 2007) | 3 lines
#1199: docs for tp_as_{number,sequence,mapping}, by Amaury Forgeot d'Arc.
No need to merge this to py3k!
........
r58380 | raymond.hettinger | 2007-10-08 14:26:58 -0700 (Mon, 08 Oct 2007) | 1 line
Eliminate camelcase function name
........
r58381 | andrew.kuchling | 2007-10-08 16:23:03 -0700 (Mon, 08 Oct 2007) | 1 line
Eliminate camelcase function name
........
r58382 | raymond.hettinger | 2007-10-08 18:36:23 -0700 (Mon, 08 Oct 2007) | 1 line
Make the error messages more specific
........
r58384 | gregory.p.smith | 2007-10-08 23:02:21 -0700 (Mon, 08 Oct 2007) | 10 lines
Splits Modules/_bsddb.c up into bsddb.h and _bsddb.c and adds a C API
object available as bsddb.db.api. This is based on the patch submitted
by Duncan Grisby here:
http://sourceforge.net/tracker/index.php?func=detail&aid=1551895&group_id=13900&atid=313900
See this thread for additional info:
http://sourceforge.net/mailarchive/forum.php?thread_name=E1GAVDK-0002rk-Iw%40apasphere.com&forum_name=pybsddb-users
It also cleans up the code a little by removing some ifdef/endifs for
python prior to 2.1 and for unsupported Berkeley DB <= 3.2.
........
r58385 | gregory.p.smith | 2007-10-08 23:50:43 -0700 (Mon, 08 Oct 2007) | 5 lines
Fix a double free when positioning a database cursor to a non-existant
string key (and probably a few other situations with string keys).
This was reported with a patch as pybsddb sourceforge bug 1708868 by
jjjhhhlll at gmail.
........
r58386 | gregory.p.smith | 2007-10-09 00:19:11 -0700 (Tue, 09 Oct 2007) | 3 lines
Use the highest cPickle protocol in bsddb.dbshelve. This comes from
sourceforge pybsddb patch 1551443 by w_barnes.
........
r58394 | gregory.p.smith | 2007-10-09 11:26:02 -0700 (Tue, 09 Oct 2007) | 2 lines
remove another sleepycat reference
........
r58396 | kurt.kaiser | 2007-10-09 12:31:30 -0700 (Tue, 09 Oct 2007) | 3 lines
Allow interrupt only when executing user code in subprocess
Patch 1225 Tal Einat modified from IDLE-Spoon.
........
r58399 | brett.cannon | 2007-10-09 17:07:50 -0700 (Tue, 09 Oct 2007) | 5 lines
Remove file-level typedefs that were inconsistently used throughout the file.
Just move over to the public API names.
Closes issue1238.
........
r58401 | raymond.hettinger | 2007-10-09 17:26:46 -0700 (Tue, 09 Oct 2007) | 1 line
Accept Jim Jewett's api suggestion to use None instead of -1 to indicate unbounded deques.
........
r58403 | kurt.kaiser | 2007-10-09 17:55:40 -0700 (Tue, 09 Oct 2007) | 2 lines
Allow cursor color change w/o restart. Patch 1725576 Tal Einat.
........
r58404 | kurt.kaiser | 2007-10-09 18:06:47 -0700 (Tue, 09 Oct 2007) | 2 lines
show paste if > 80 columns. Patch 1659326 Tal Einat.
........
r58415 | thomas.heller | 2007-10-11 12:51:32 -0700 (Thu, 11 Oct 2007) | 5 lines
On OS X, use os.uname() instead of gestalt.sysv(...) to get the
operating system version. This allows to use ctypes when Python
was configured with --disable-toolbox-glue.
........
r58419 | neal.norwitz | 2007-10-11 20:01:01 -0700 (Thu, 11 Oct 2007) | 1 line
Get rid of warning about not being able to create an existing directory.
........
r58420 | neal.norwitz | 2007-10-11 20:01:30 -0700 (Thu, 11 Oct 2007) | 1 line
Get rid of warnings on a bunch of platforms by using a proper prototype.
........
r58421 | neal.norwitz | 2007-10-11 20:01:54 -0700 (Thu, 11 Oct 2007) | 4 lines
Get rid of compiler warning about retval being used (returned) without
being initialized. (gcc warning and Coverity 202)
........
r58422 | neal.norwitz | 2007-10-11 20:03:23 -0700 (Thu, 11 Oct 2007) | 1 line
Fix Coverity 168: Close the file before returning (exiting).
........
r58423 | neal.norwitz | 2007-10-11 20:04:18 -0700 (Thu, 11 Oct 2007) | 4 lines
Fix Coverity 180: Don't overallocate. We don't need structs, but pointers.
Also fix a memory leak.
........
r58424 | neal.norwitz | 2007-10-11 20:05:19 -0700 (Thu, 11 Oct 2007) | 5 lines
Fix Coverity 185-186: If the passed in FILE is NULL, uninitialized memory
would be accessed.
Will backport.
........
r58425 | neal.norwitz | 2007-10-11 20:52:34 -0700 (Thu, 11 Oct 2007) | 1 line
Get this module to compile with bsddb versions prior to 4.3
........
r58430 | martin.v.loewis | 2007-10-12 01:56:52 -0700 (Fri, 12 Oct 2007) | 3 lines
Bug #1216: Restore support for Visual Studio 2002.
Will backport to 2.5.
........
r58433 | raymond.hettinger | 2007-10-12 10:53:11 -0700 (Fri, 12 Oct 2007) | 1 line
Fix test of count.__repr__() to ignore the 'L' if the count is a long
........
r58434 | gregory.p.smith | 2007-10-12 11:44:06 -0700 (Fri, 12 Oct 2007) | 4 lines
Fixes http://bugs.python.org/issue1233 - bsddb.dbshelve.DBShelf.append
was useless due to inverted logic. Also adds a test case for RECNO dbs
to test_dbshelve.
........
r58445 | georg.brandl | 2007-10-13 06:20:03 -0700 (Sat, 13 Oct 2007) | 2 lines
Fix email example.
........
r58450 | gregory.p.smith | 2007-10-13 16:02:05 -0700 (Sat, 13 Oct 2007) | 2 lines
Fix an uncollectable reference leak in bsddb.db.DBShelf.append
........
r58453 | neal.norwitz | 2007-10-13 17:18:40 -0700 (Sat, 13 Oct 2007) | 8 lines
Let the O/S supply a port if none of the default ports can be used.
This should make the tests more robust at the expense of allowing
tests to be sloppier by not requiring them to cleanup after themselves.
(It will legitamitely help when running two test suites simultaneously
or if another process is already using one of the predefined ports.)
Also simplifies (slightLy) the exception handling elsewhere.
........
r58459 | neal.norwitz | 2007-10-14 11:30:21 -0700 (Sun, 14 Oct 2007) | 2 lines
Don't raise a string exception, they don't work anymore.
........
r58460 | neal.norwitz | 2007-10-14 11:40:37 -0700 (Sun, 14 Oct 2007) | 1 line
Use unittest for assertions
........
r58468 | armin.rigo | 2007-10-15 00:48:35 -0700 (Mon, 15 Oct 2007) | 2 lines
test_bigbits was not testing what it seemed to.
........
r58471 | guido.van.rossum | 2007-10-15 08:54:11 -0700 (Mon, 15 Oct 2007) | 3 lines
Change a PyErr_Print() into a PyErr_Clear(),
per discussion in issue 1031213.
........
r58500 | raymond.hettinger | 2007-10-16 12:18:30 -0700 (Tue, 16 Oct 2007) | 1 line
Improve error messages
........
r58506 | raymond.hettinger | 2007-10-16 14:28:32 -0700 (Tue, 16 Oct 2007) | 1 line
More docs, error messages, and tests
........
r58507 | andrew.kuchling | 2007-10-16 15:58:03 -0700 (Tue, 16 Oct 2007) | 1 line
Add items
........
r58508 | brett.cannon | 2007-10-16 16:24:06 -0700 (Tue, 16 Oct 2007) | 3 lines
Remove ``:const:`` notation on None in parameter list. Since the markup is not
rendered for parameters it just showed up as ``:const:`None` `` in the output.
........
r58509 | brett.cannon | 2007-10-16 16:26:45 -0700 (Tue, 16 Oct 2007) | 3 lines
Re-order some functions whose parameters differ between PyObject and const char
* so that they are next to each other.
........
r58522 | armin.rigo | 2007-10-17 11:46:37 -0700 (Wed, 17 Oct 2007) | 5 lines
Fix the overflow checking of list_repeat.
Introduce overflow checking into list_inplace_repeat.
Backport candidate, possibly.
........
r58530 | facundo.batista | 2007-10-17 20:16:03 -0700 (Wed, 17 Oct 2007) | 7 lines
Issue #1580738. When HTTPConnection reads the whole stream with read(),
it closes itself. When the stream is read in several calls to read(n),
it should behave in the same way if HTTPConnection knows where the end
of the stream is (through self.length). Added a test case for this
behaviour.
........
r58531 | facundo.batista | 2007-10-17 20:44:48 -0700 (Wed, 17 Oct 2007) | 3 lines
Issue 1289, just a typo.
........
r58532 | gregory.p.smith | 2007-10-18 00:56:54 -0700 (Thu, 18 Oct 2007) | 4 lines
cleanup test_dbtables to use mkdtemp. cleanup dbtables to pass txn as a
keyword argument whenever possible to avoid bugs and confusion. (dbtables.py
line 447 self.db.get using txn as a non-keyword was an actual bug due to this)
........
r58533 | gregory.p.smith | 2007-10-18 01:34:20 -0700 (Thu, 18 Oct 2007) | 4 lines
Fix a weird bug in dbtables: if it chose a random rowid string that contained
NULL bytes it would cause the database all sorts of problems in the future
leading to very strange random failures and corrupt dbtables.bsdTableDb dbs.
........
r58534 | gregory.p.smith | 2007-10-18 09:32:02 -0700 (Thu, 18 Oct 2007) | 3 lines
A cleaner fix than the one committed last night. Generate random rowids that
do not contain null bytes.
........
r58537 | gregory.p.smith | 2007-10-18 10:17:57 -0700 (Thu, 18 Oct 2007) | 2 lines
mention bsddb fixes.
........
r58538 | raymond.hettinger | 2007-10-18 14:13:06 -0700 (Thu, 18 Oct 2007) | 1 line
Remove useless warning
........
r58539 | gregory.p.smith | 2007-10-19 00:31:20 -0700 (Fri, 19 Oct 2007) | 2 lines
squelch the warning that this test is supposed to trigger.
........
r58542 | georg.brandl | 2007-10-19 05:32:39 -0700 (Fri, 19 Oct 2007) | 2 lines
Clarify wording for apply().
........
r58544 | mark.summerfield | 2007-10-19 05:48:17 -0700 (Fri, 19 Oct 2007) | 3 lines
Added a cross-ref to each other.
........
r58545 | georg.brandl | 2007-10-19 10:38:49 -0700 (Fri, 19 Oct 2007) | 2 lines
#1284: "S" means "seen", not unread.
........
r58548 | thomas.heller | 2007-10-19 11:11:41 -0700 (Fri, 19 Oct 2007) | 4 lines
Fix ctypes on 32-bit systems when Python is configured --with-system-ffi.
See also https://bugs.launchpad.net/bugs/72505.
Ported from release25-maint branch.
........
r58550 | facundo.batista | 2007-10-19 12:25:57 -0700 (Fri, 19 Oct 2007) | 8 lines
The constructor from tuple was way too permissive: it allowed bad
coefficient numbers, floats in the sign, and other details that
generated directly the wrong number in the best case, or triggered
misfunctionality in the alorithms.
Test cases added for these issues. Thanks Mark Dickinson.
........
r58559 | georg.brandl | 2007-10-20 06:22:53 -0700 (Sat, 20 Oct 2007) | 2 lines
Fix code being interpreted as a target.
........
r58561 | georg.brandl | 2007-10-20 06:36:24 -0700 (Sat, 20 Oct 2007) | 2 lines
Document new "cmdoption" directive.
........
r58562 | georg.brandl | 2007-10-20 08:21:22 -0700 (Sat, 20 Oct 2007) | 2 lines
Make a path more Unix-standardy.
........
r58564 | georg.brandl | 2007-10-20 10:51:39 -0700 (Sat, 20 Oct 2007) | 2 lines
Document new directive "envvar".
........
r58567 | georg.brandl | 2007-10-20 11:08:14 -0700 (Sat, 20 Oct 2007) | 6 lines
* Add new toplevel chapter, "Using Python." (how to install,
configure and setup python on different platforms -- at least
in theory.)
* Move the Python on Mac docs in that chapter.
* Add a new chapter about the command line invocation, by stargaming.
........
r58568 | georg.brandl | 2007-10-20 11:33:20 -0700 (Sat, 20 Oct 2007) | 2 lines
Change title, for now.
........
r58569 | georg.brandl | 2007-10-20 11:39:25 -0700 (Sat, 20 Oct 2007) | 2 lines
Add entry to ACKS.
........
r58570 | georg.brandl | 2007-10-20 12:05:45 -0700 (Sat, 20 Oct 2007) | 2 lines
Clarify -E docs.
........
r58571 | georg.brandl | 2007-10-20 12:08:36 -0700 (Sat, 20 Oct 2007) | 2 lines
Even more clarification.
........
r58572 | andrew.kuchling | 2007-10-20 12:25:37 -0700 (Sat, 20 Oct 2007) | 1 line
Fix protocol name
........
r58573 | andrew.kuchling | 2007-10-20 12:35:18 -0700 (Sat, 20 Oct 2007) | 1 line
Various items
........
r58574 | andrew.kuchling | 2007-10-20 12:39:35 -0700 (Sat, 20 Oct 2007) | 1 line
Use correct header line
........
r58576 | armin.rigo | 2007-10-21 02:14:15 -0700 (Sun, 21 Oct 2007) | 3 lines
Add a crasher for the long-standing issue with closing a file
while another thread uses it.
........
r58577 | georg.brandl | 2007-10-21 03:01:56 -0700 (Sun, 21 Oct 2007) | 2 lines
Remove duplicate crasher.
........
r58578 | georg.brandl | 2007-10-21 03:24:20 -0700 (Sun, 21 Oct 2007) | 2 lines
Unify "byte code" to "bytecode". Also sprinkle :term: markup for it.
........
r58579 | georg.brandl | 2007-10-21 03:32:54 -0700 (Sun, 21 Oct 2007) | 2 lines
Add markup to new function descriptions.
........
r58580 | georg.brandl | 2007-10-21 03:45:46 -0700 (Sun, 21 Oct 2007) | 2 lines
Add :term:s for descriptors.
........
r58581 | georg.brandl | 2007-10-21 03:46:24 -0700 (Sun, 21 Oct 2007) | 2 lines
Unify "file-descriptor" to "file descriptor".
........
r58582 | georg.brandl | 2007-10-21 03:52:38 -0700 (Sun, 21 Oct 2007) | 2 lines
Add :term: for generators.
........
r58583 | georg.brandl | 2007-10-21 05:10:28 -0700 (Sun, 21 Oct 2007) | 2 lines
Add :term:s for iterator.
........
r58584 | georg.brandl | 2007-10-21 05:15:05 -0700 (Sun, 21 Oct 2007) | 2 lines
Add :term:s for "new-style class".
........
r58588 | neal.norwitz | 2007-10-21 21:47:54 -0700 (Sun, 21 Oct 2007) | 1 line
Add Chris Monson so he can edit PEPs.
........
r58594 | guido.van.rossum | 2007-10-22 09:27:19 -0700 (Mon, 22 Oct 2007) | 4 lines
Issue #1307, patch by Derek Shockey.
When "MAIL" is received without args, an exception happens instead of
sending a 501 syntax error response.
........
r58598 | travis.oliphant | 2007-10-22 19:40:56 -0700 (Mon, 22 Oct 2007) | 1 line
Add phuang patch from Issue 708374 which adds offset parameter to mmap module.
........
r58601 | neal.norwitz | 2007-10-22 22:44:27 -0700 (Mon, 22 Oct 2007) | 2 lines
Bug #1313, fix typo (wrong variable name) in example.
........
r58609 | georg.brandl | 2007-10-23 11:21:35 -0700 (Tue, 23 Oct 2007) | 2 lines
Update Pygments version from externals.
........
r58618 | guido.van.rossum | 2007-10-23 12:25:41 -0700 (Tue, 23 Oct 2007) | 3 lines
Issue 1307 by Derek Shockey, fox the same bug for RCPT.
Neal: please backport!
........
r58620 | raymond.hettinger | 2007-10-23 13:37:41 -0700 (Tue, 23 Oct 2007) | 1 line
Shorter name for namedtuple()
........
r58621 | andrew.kuchling | 2007-10-23 13:55:47 -0700 (Tue, 23 Oct 2007) | 1 line
Update name
........
r58622 | raymond.hettinger | 2007-10-23 14:23:07 -0700 (Tue, 23 Oct 2007) | 1 line
Fixup news entry
........
r58623 | raymond.hettinger | 2007-10-23 18:28:33 -0700 (Tue, 23 Oct 2007) | 1 line
Optimize sum() for integer and float inputs.
........
r58624 | raymond.hettinger | 2007-10-23 19:05:51 -0700 (Tue, 23 Oct 2007) | 1 line
Fixup error return and add support for intermixed ints and floats/
........
r58628 | vinay.sajip | 2007-10-24 03:47:06 -0700 (Wed, 24 Oct 2007) | 1 line
Bug #1321: Fixed logic error in TimedRotatingFileHandler.__init__()
........
r58641 | facundo.batista | 2007-10-24 12:11:08 -0700 (Wed, 24 Oct 2007) | 4 lines
Issue 1290. CharacterData.__repr__ was constructing a string
in response that keeped having a non-ascii character.
........
r58643 | thomas.heller | 2007-10-24 12:50:45 -0700 (Wed, 24 Oct 2007) | 1 line
Added unittest for calling a function with paramflags (backport from py3k branch).
........
r58645 | matthias.klose | 2007-10-24 13:00:44 -0700 (Wed, 24 Oct 2007) | 2 lines
- Build using system ffi library on arm*-linux*.
........
r58651 | georg.brandl | 2007-10-24 14:40:38 -0700 (Wed, 24 Oct 2007) | 2 lines
Bug #1287: make os.environ.pop() work as expected.
........
r58652 | raymond.hettinger | 2007-10-24 19:26:58 -0700 (Wed, 24 Oct 2007) | 1 line
Missing DECREFs
........
r58653 | matthias.klose | 2007-10-24 23:37:24 -0700 (Wed, 24 Oct 2007) | 2 lines
- Build using system ffi library on arm*-linux*, pass --with-system-ffi to CONFIG_ARGS
........
r58655 | thomas.heller | 2007-10-25 12:47:32 -0700 (Thu, 25 Oct 2007) | 2 lines
ffi_type_longdouble may be already #defined.
See issue 1324.
........
r58656 | kurt.kaiser | 2007-10-25 15:43:45 -0700 (Thu, 25 Oct 2007) | 3 lines
Correct an ancient bug in an unused path by removing that path: register() is
now idempotent.
........
r58660 | kurt.kaiser | 2007-10-25 17:10:09 -0700 (Thu, 25 Oct 2007) | 4 lines
1. Add comments to provide top-level documentation.
2. Refactor to use more descriptive names.
3. Enhance tests in main().
........
r58675 | georg.brandl | 2007-10-26 11:30:41 -0700 (Fri, 26 Oct 2007) | 2 lines
Fix new pop() method on os.environ on ignorecase-platforms.
........
r58696 | neal.norwitz | 2007-10-27 15:32:21 -0700 (Sat, 27 Oct 2007) | 1 line
Update URL for Pygments. 0.8.1 is no longer available
........
r58697 | hyeshik.chang | 2007-10-28 04:19:02 -0700 (Sun, 28 Oct 2007) | 3 lines
- Add support for FreeBSD 8 which is recently forked from FreeBSD 7.
- Regenerate IN module for most recent maintenance tree of FreeBSD 6 and 7.
........
r58698 | hyeshik.chang | 2007-10-28 05:38:09 -0700 (Sun, 28 Oct 2007) | 2 lines
Enable platform-specific tweaks for FreeBSD 8 (exactly same to FreeBSD 7's yet)
........
r58700 | kurt.kaiser | 2007-10-28 12:03:59 -0700 (Sun, 28 Oct 2007) | 2 lines
Add confirmation dialog before printing. Patch 1717170 Tal Einat.
........
r58706 | guido.van.rossum | 2007-10-29 13:52:45 -0700 (Mon, 29 Oct 2007) | 3 lines
Patch 1353 by Jacob Winther.
Add mp4 mapping to mimetypes.py.
........
r58709 | guido.van.rossum | 2007-10-29 15:15:05 -0700 (Mon, 29 Oct 2007) | 6 lines
Backport fixes for the code that decodes octal escapes (and for PyString
also hex escapes) -- this was reaching beyond the end of the input string
buffer, even though it is not supposed to be \0-terminated.
This has no visible effect but is clearly the correct thing to do.
(In 3.0 it had a visible effect after removing ob_sstate from PyString.)
........
r58710 | kurt.kaiser | 2007-10-29 19:38:54 -0700 (Mon, 29 Oct 2007) | 7 lines
check in Tal Einat's update to tabpage.py
Patch 1612746
M configDialog.py
M NEWS.txt
AM tabbedpages.py
........
r58715 | georg.brandl | 2007-10-30 10:51:18 -0700 (Tue, 30 Oct 2007) | 2 lines
Use correct markup.
........
r58716 | georg.brandl | 2007-10-30 10:57:12 -0700 (Tue, 30 Oct 2007) | 2 lines
Make example about hiding None return values at the prompt clearer.
........
r58728 | neal.norwitz | 2007-10-30 23:33:20 -0700 (Tue, 30 Oct 2007) | 1 line
Fix some compiler warnings for signed comparisons on Unix and Windows.
........
r58731 | martin.v.loewis | 2007-10-31 10:19:33 -0700 (Wed, 31 Oct 2007) | 2 lines
Adding Christian Heimes.
........
r58737 | raymond.hettinger | 2007-10-31 14:57:58 -0700 (Wed, 31 Oct 2007) | 1 line
Clarify the reasons why pickle is almost always better than marshal
........
r58739 | raymond.hettinger | 2007-10-31 15:15:49 -0700 (Wed, 31 Oct 2007) | 1 line
Sets are marshalable.
........
2007-11-01 17:32:30 -03:00
|
|
|
:synopsis: Disassembler for Python bytecode.
|
2007-08-15 11:28:22 -03:00
|
|
|
|
2011-01-09 23:26:08 -04:00
|
|
|
**Source code:** :source:`Lib/dis.py`
|
2007-08-15 11:28:22 -03:00
|
|
|
|
2011-01-10 15:54:11 -04:00
|
|
|
--------------
|
|
|
|
|
2010-07-02 19:03:00 -03:00
|
|
|
The :mod:`dis` module supports the analysis of CPython :term:`bytecode` by
|
2015-03-02 10:31:40 -04:00
|
|
|
disassembling it. The CPython bytecode which this module takes as an input is
|
|
|
|
defined in the file :file:`Include/opcode.h` and used by the compiler and the
|
|
|
|
interpreter.
|
2007-08-15 11:28:22 -03:00
|
|
|
|
2010-07-03 07:21:50 -03:00
|
|
|
.. impl-detail::
|
|
|
|
|
2011-01-09 23:26:08 -04:00
|
|
|
Bytecode is an implementation detail of the CPython interpreter. No
|
2010-07-03 07:21:50 -03:00
|
|
|
guarantees are made that bytecode will not be added, removed, or changed
|
|
|
|
between versions of Python. Use of this module should not be considered to
|
|
|
|
work across Python VMs or Python releases.
|
|
|
|
|
2017-03-24 18:05:04 -03:00
|
|
|
.. versionchanged:: 3.6
|
|
|
|
Use 2 bytes for each instruction. Previously the number of bytes varied
|
|
|
|
by instruction.
|
|
|
|
|
2010-07-02 19:03:00 -03:00
|
|
|
|
2007-08-15 11:28:22 -03:00
|
|
|
Example: Given the function :func:`myfunc`::
|
|
|
|
|
|
|
|
def myfunc(alist):
|
|
|
|
return len(alist)
|
|
|
|
|
2013-05-06 10:59:20 -03:00
|
|
|
the following command can be used to display the disassembly of
|
|
|
|
:func:`myfunc`::
|
2007-08-15 11:28:22 -03:00
|
|
|
|
|
|
|
>>> dis.dis(myfunc)
|
|
|
|
2 0 LOAD_GLOBAL 0 (len)
|
2016-05-24 03:15:14 -03:00
|
|
|
2 LOAD_FAST 0 (alist)
|
|
|
|
4 CALL_FUNCTION 1
|
|
|
|
6 RETURN_VALUE
|
2007-08-15 11:28:22 -03:00
|
|
|
|
|
|
|
(The "2" is a line number).
|
|
|
|
|
2013-05-06 10:59:20 -03:00
|
|
|
Bytecode analysis
|
|
|
|
-----------------
|
2007-08-15 11:28:22 -03:00
|
|
|
|
2014-01-07 15:30:17 -04:00
|
|
|
.. versionadded:: 3.4
|
|
|
|
|
2013-05-06 10:59:20 -03:00
|
|
|
The bytecode analysis API allows pieces of Python code to be wrapped in a
|
2015-03-02 10:31:40 -04:00
|
|
|
:class:`Bytecode` object that provides easy access to details of the compiled
|
|
|
|
code.
|
2013-05-06 10:59:20 -03:00
|
|
|
|
2013-11-22 10:57:00 -04:00
|
|
|
.. class:: Bytecode(x, *, first_line=None, current_offset=None)
|
2013-05-06 10:59:20 -03:00
|
|
|
|
|
|
|
|
2017-08-17 23:29:21 -03:00
|
|
|
Analyse the bytecode corresponding to a function, generator, asynchronous
|
|
|
|
generator, coroutine, method, string of source code, or a code object (as
|
|
|
|
returned by :func:`compile`).
|
2013-05-06 10:59:20 -03:00
|
|
|
|
2015-03-02 10:31:40 -04:00
|
|
|
This is a convenience wrapper around many of the functions listed below, most
|
|
|
|
notably :func:`get_instructions`, as iterating over a :class:`Bytecode`
|
|
|
|
instance yields the bytecode operations as :class:`Instruction` instances.
|
2013-05-06 10:59:20 -03:00
|
|
|
|
2016-10-19 10:29:26 -03:00
|
|
|
If *first_line* is not ``None``, it indicates the line number that should be
|
2015-03-02 10:31:40 -04:00
|
|
|
reported for the first source line in the disassembled code. Otherwise, the
|
|
|
|
source line information (if any) is taken directly from the disassembled code
|
|
|
|
object.
|
2013-05-06 10:59:20 -03:00
|
|
|
|
2016-10-19 10:29:26 -03:00
|
|
|
If *current_offset* is not ``None``, it refers to an instruction offset in the
|
2015-03-02 10:31:40 -04:00
|
|
|
disassembled code. Setting this means :meth:`.dis` will display a "current
|
|
|
|
instruction" marker against the specified opcode.
|
2013-11-22 10:57:00 -04:00
|
|
|
|
|
|
|
.. classmethod:: from_traceback(tb)
|
|
|
|
|
2015-03-02 10:31:40 -04:00
|
|
|
Construct a :class:`Bytecode` instance from the given traceback, setting
|
|
|
|
*current_offset* to the instruction responsible for the exception.
|
2013-11-22 10:57:00 -04:00
|
|
|
|
2013-05-06 10:59:20 -03:00
|
|
|
.. data:: codeobj
|
|
|
|
|
|
|
|
The compiled code object.
|
|
|
|
|
2013-11-06 08:08:36 -04:00
|
|
|
.. data:: first_line
|
2013-05-06 10:59:20 -03:00
|
|
|
|
2013-11-06 08:08:36 -04:00
|
|
|
The first source line of the code object (if available)
|
|
|
|
|
|
|
|
.. method:: dis()
|
|
|
|
|
2015-03-02 10:27:43 -04:00
|
|
|
Return a formatted view of the bytecode operations (the same as printed by
|
|
|
|
:func:`dis.dis`, but returned as a multi-line string).
|
2013-05-06 10:59:20 -03:00
|
|
|
|
|
|
|
.. method:: info()
|
|
|
|
|
|
|
|
Return a formatted multi-line string with detailed information about the
|
|
|
|
code object, like :func:`code_info`.
|
|
|
|
|
2017-08-17 23:29:21 -03:00
|
|
|
.. versionchanged:: 3.7
|
|
|
|
This can now handle coroutine and asynchronous generator objects.
|
|
|
|
|
2013-05-06 10:59:20 -03:00
|
|
|
Example::
|
|
|
|
|
|
|
|
>>> bytecode = dis.Bytecode(myfunc)
|
|
|
|
>>> for instr in bytecode:
|
|
|
|
... print(instr.opname)
|
|
|
|
...
|
|
|
|
LOAD_GLOBAL
|
|
|
|
LOAD_FAST
|
|
|
|
CALL_FUNCTION
|
|
|
|
RETURN_VALUE
|
|
|
|
|
|
|
|
|
|
|
|
Analysis functions
|
|
|
|
------------------
|
|
|
|
|
2015-03-02 10:31:40 -04:00
|
|
|
The :mod:`dis` module also defines the following analysis functions that convert
|
|
|
|
the input directly to the desired output. They can be useful if only a single
|
|
|
|
operation is being performed, so the intermediate analysis object isn't useful:
|
2007-08-15 11:28:22 -03:00
|
|
|
|
2010-09-10 11:08:04 -03:00
|
|
|
.. function:: code_info(x)
|
2010-08-17 05:03:36 -03:00
|
|
|
|
2010-08-17 12:07:14 -03:00
|
|
|
Return a formatted multi-line string with detailed code object information
|
2017-08-17 23:29:21 -03:00
|
|
|
for the supplied function, generator, asynchronous generator, coroutine,
|
|
|
|
method, source code string or code object.
|
2010-08-17 05:03:36 -03:00
|
|
|
|
2010-08-17 12:07:14 -03:00
|
|
|
Note that the exact contents of code info strings are highly implementation
|
|
|
|
dependent and they may change arbitrarily across Python VMs or Python
|
|
|
|
releases.
|
2010-08-17 05:03:36 -03:00
|
|
|
|
|
|
|
.. versionadded:: 3.2
|
|
|
|
|
2017-08-17 23:29:21 -03:00
|
|
|
.. versionchanged:: 3.7
|
|
|
|
This can now handle coroutine and asynchronous generator objects.
|
|
|
|
|
2010-08-17 12:07:14 -03:00
|
|
|
|
2013-05-06 10:59:20 -03:00
|
|
|
.. function:: show_code(x, *, file=None)
|
2010-09-10 11:08:04 -03:00
|
|
|
|
|
|
|
Print detailed code object information for the supplied function, method,
|
2013-08-23 16:41:39 -03:00
|
|
|
source code string or code object to *file* (or ``sys.stdout`` if *file*
|
|
|
|
is not specified).
|
2010-09-10 11:08:04 -03:00
|
|
|
|
2013-05-06 10:59:20 -03:00
|
|
|
This is a convenient shorthand for ``print(code_info(x), file=file)``,
|
|
|
|
intended for interactive exploration at the interpreter prompt.
|
2010-09-10 11:08:04 -03:00
|
|
|
|
|
|
|
.. versionadded:: 3.2
|
|
|
|
|
2013-05-06 10:59:20 -03:00
|
|
|
.. versionchanged:: 3.4
|
2014-11-11 04:02:11 -04:00
|
|
|
Added *file* parameter.
|
2013-05-06 10:59:20 -03:00
|
|
|
|
|
|
|
|
2017-06-11 08:09:39 -03:00
|
|
|
.. function:: dis(x=None, *, file=None, depth=None)
|
2007-08-15 11:28:22 -03:00
|
|
|
|
2010-08-17 12:07:14 -03:00
|
|
|
Disassemble the *x* object. *x* can denote either a module, a class, a
|
2018-10-05 11:17:18 -03:00
|
|
|
method, a function, a generator, an asynchronous generator, a coroutine,
|
2017-08-17 23:29:21 -03:00
|
|
|
a code object, a string of source code or a byte sequence of raw bytecode.
|
|
|
|
For a module, it disassembles all functions. For a class, it disassembles
|
|
|
|
all methods (including class and static methods). For a code object or
|
|
|
|
sequence of raw bytecode, it prints one line per bytecode instruction.
|
|
|
|
It also recursively disassembles nested code objects (the code of
|
|
|
|
comprehensions, generator expressions and nested functions, and the code
|
2017-06-11 08:09:39 -03:00
|
|
|
used for building nested classes).
|
|
|
|
Strings are first compiled to code objects with the :func:`compile`
|
2016-04-23 03:23:52 -03:00
|
|
|
built-in function before being disassembled. If no object is provided, this
|
|
|
|
function disassembles the last traceback.
|
2007-08-15 11:28:22 -03:00
|
|
|
|
2014-11-11 04:02:11 -04:00
|
|
|
The disassembly is written as text to the supplied *file* argument if
|
2013-05-06 10:59:20 -03:00
|
|
|
provided and to ``sys.stdout`` otherwise.
|
|
|
|
|
2017-06-11 08:09:39 -03:00
|
|
|
The maximal depth of recursion is limited by *depth* unless it is ``None``.
|
|
|
|
``depth=0`` means no recursion.
|
|
|
|
|
2013-05-06 10:59:20 -03:00
|
|
|
.. versionchanged:: 3.4
|
2014-11-11 04:02:11 -04:00
|
|
|
Added *file* parameter.
|
2007-08-15 11:28:22 -03:00
|
|
|
|
2017-06-11 08:09:39 -03:00
|
|
|
.. versionchanged:: 3.7
|
|
|
|
Implemented recursive disassembling and added *depth* parameter.
|
|
|
|
|
2017-08-17 23:29:21 -03:00
|
|
|
.. versionchanged:: 3.7
|
|
|
|
This can now handle coroutine and asynchronous generator objects.
|
|
|
|
|
2013-05-06 10:59:20 -03:00
|
|
|
|
|
|
|
.. function:: distb(tb=None, *, file=None)
|
2007-08-15 11:28:22 -03:00
|
|
|
|
2010-07-03 07:41:33 -03:00
|
|
|
Disassemble the top-of-stack function of a traceback, using the last
|
|
|
|
traceback if none was passed. The instruction causing the exception is
|
|
|
|
indicated.
|
2007-08-15 11:28:22 -03:00
|
|
|
|
2014-11-11 04:02:11 -04:00
|
|
|
The disassembly is written as text to the supplied *file* argument if
|
2013-05-06 10:59:20 -03:00
|
|
|
provided and to ``sys.stdout`` otherwise.
|
|
|
|
|
|
|
|
.. versionchanged:: 3.4
|
2014-11-11 04:02:11 -04:00
|
|
|
Added *file* parameter.
|
2007-08-15 11:28:22 -03:00
|
|
|
|
2013-05-06 10:59:20 -03:00
|
|
|
|
|
|
|
.. function:: disassemble(code, lasti=-1, *, file=None)
|
|
|
|
disco(code, lasti=-1, *, file=None)
|
2007-08-15 11:28:22 -03:00
|
|
|
|
2010-07-03 07:41:33 -03:00
|
|
|
Disassemble a code object, indicating the last instruction if *lasti* was
|
2007-08-15 11:28:22 -03:00
|
|
|
provided. The output is divided in the following columns:
|
|
|
|
|
|
|
|
#. the line number, for the first instruction of each line
|
|
|
|
#. the current instruction, indicated as ``-->``,
|
|
|
|
#. a labelled instruction, indicated with ``>>``,
|
|
|
|
#. the address of the instruction,
|
|
|
|
#. the operation code name,
|
|
|
|
#. operation parameters, and
|
|
|
|
#. interpretation of the parameters in parentheses.
|
|
|
|
|
|
|
|
The parameter interpretation recognizes local and global variable names,
|
|
|
|
constant values, branch targets, and compare operators.
|
|
|
|
|
2014-11-11 04:02:11 -04:00
|
|
|
The disassembly is written as text to the supplied *file* argument if
|
2013-05-06 10:59:20 -03:00
|
|
|
provided and to ``sys.stdout`` otherwise.
|
|
|
|
|
|
|
|
.. versionchanged:: 3.4
|
2014-11-11 04:02:11 -04:00
|
|
|
Added *file* parameter.
|
2013-05-06 10:59:20 -03:00
|
|
|
|
|
|
|
|
2013-11-06 08:08:36 -04:00
|
|
|
.. function:: get_instructions(x, *, first_line=None)
|
2013-05-06 10:59:20 -03:00
|
|
|
|
|
|
|
Return an iterator over the instructions in the supplied function, method,
|
|
|
|
source code string or code object.
|
|
|
|
|
2015-03-02 10:31:40 -04:00
|
|
|
The iterator generates a series of :class:`Instruction` named tuples giving
|
|
|
|
the details of each operation in the supplied code.
|
2013-05-06 10:59:20 -03:00
|
|
|
|
2016-10-19 10:29:26 -03:00
|
|
|
If *first_line* is not ``None``, it indicates the line number that should be
|
2015-03-02 10:31:40 -04:00
|
|
|
reported for the first source line in the disassembled code. Otherwise, the
|
|
|
|
source line information (if any) is taken directly from the disassembled code
|
|
|
|
object.
|
2013-05-06 10:59:20 -03:00
|
|
|
|
|
|
|
.. versionadded:: 3.4
|
|
|
|
|
2007-08-15 11:28:22 -03:00
|
|
|
|
Merged revisions 68116-68119,68121,68123-68127 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r68116 | georg.brandl | 2009-01-01 05:46:51 -0600 (Thu, 01 Jan 2009) | 2 lines
#4100: note that element children are not necessarily present on "start" events.
........
r68117 | georg.brandl | 2009-01-01 05:53:55 -0600 (Thu, 01 Jan 2009) | 2 lines
#4156: make clear that "protocol" is to be replaced with the protocol name.
........
r68118 | georg.brandl | 2009-01-01 06:00:19 -0600 (Thu, 01 Jan 2009) | 2 lines
#4185: clarify escape behavior of replacement strings.
........
r68119 | georg.brandl | 2009-01-01 06:09:40 -0600 (Thu, 01 Jan 2009) | 3 lines
#4222: document dis.findlabels() and dis.findlinestarts() and
put them into dis.__all__.
........
r68121 | georg.brandl | 2009-01-01 06:43:33 -0600 (Thu, 01 Jan 2009) | 2 lines
Point to types module in new module deprecation notice.
........
r68123 | georg.brandl | 2009-01-01 06:52:29 -0600 (Thu, 01 Jan 2009) | 2 lines
#4784: ... on three counts ...
........
r68124 | georg.brandl | 2009-01-01 06:53:19 -0600 (Thu, 01 Jan 2009) | 2 lines
#4782: Fix markup error that hid load() and loads().
........
r68125 | georg.brandl | 2009-01-01 07:02:09 -0600 (Thu, 01 Jan 2009) | 2 lines
#4776: add data_files and package_dir arguments.
........
r68126 | georg.brandl | 2009-01-01 07:05:13 -0600 (Thu, 01 Jan 2009) | 2 lines
Handlers are in the `logging.handlers` module.
........
r68127 | georg.brandl | 2009-01-01 07:14:49 -0600 (Thu, 01 Jan 2009) | 2 lines
#4767: Use correct submodules for all MIME classes.
........
2009-01-01 11:05:06 -04:00
|
|
|
.. function:: findlinestarts(code)
|
|
|
|
|
|
|
|
This generator function uses the ``co_firstlineno`` and ``co_lnotab``
|
|
|
|
attributes of the code object *code* to find the offsets which are starts of
|
|
|
|
lines in the source code. They are generated as ``(offset, lineno)`` pairs.
|
2017-03-24 18:05:04 -03:00
|
|
|
See :source:`Objects/lnotab_notes.txt` for the ``co_lnotab`` format and
|
|
|
|
how to decode it.
|
|
|
|
|
|
|
|
.. versionchanged:: 3.6
|
|
|
|
Line numbers can be decreasing. Before, they were always increasing.
|
Merged revisions 68116-68119,68121,68123-68127 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r68116 | georg.brandl | 2009-01-01 05:46:51 -0600 (Thu, 01 Jan 2009) | 2 lines
#4100: note that element children are not necessarily present on "start" events.
........
r68117 | georg.brandl | 2009-01-01 05:53:55 -0600 (Thu, 01 Jan 2009) | 2 lines
#4156: make clear that "protocol" is to be replaced with the protocol name.
........
r68118 | georg.brandl | 2009-01-01 06:00:19 -0600 (Thu, 01 Jan 2009) | 2 lines
#4185: clarify escape behavior of replacement strings.
........
r68119 | georg.brandl | 2009-01-01 06:09:40 -0600 (Thu, 01 Jan 2009) | 3 lines
#4222: document dis.findlabels() and dis.findlinestarts() and
put them into dis.__all__.
........
r68121 | georg.brandl | 2009-01-01 06:43:33 -0600 (Thu, 01 Jan 2009) | 2 lines
Point to types module in new module deprecation notice.
........
r68123 | georg.brandl | 2009-01-01 06:52:29 -0600 (Thu, 01 Jan 2009) | 2 lines
#4784: ... on three counts ...
........
r68124 | georg.brandl | 2009-01-01 06:53:19 -0600 (Thu, 01 Jan 2009) | 2 lines
#4782: Fix markup error that hid load() and loads().
........
r68125 | georg.brandl | 2009-01-01 07:02:09 -0600 (Thu, 01 Jan 2009) | 2 lines
#4776: add data_files and package_dir arguments.
........
r68126 | georg.brandl | 2009-01-01 07:05:13 -0600 (Thu, 01 Jan 2009) | 2 lines
Handlers are in the `logging.handlers` module.
........
r68127 | georg.brandl | 2009-01-01 07:14:49 -0600 (Thu, 01 Jan 2009) | 2 lines
#4767: Use correct submodules for all MIME classes.
........
2009-01-01 11:05:06 -04:00
|
|
|
|
|
|
|
|
|
|
|
.. function:: findlabels(code)
|
|
|
|
|
2020-04-03 05:00:28 -03:00
|
|
|
Detect all offsets in the raw compiled bytecode string *code* which are jump targets, and
|
Merged revisions 68116-68119,68121,68123-68127 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r68116 | georg.brandl | 2009-01-01 05:46:51 -0600 (Thu, 01 Jan 2009) | 2 lines
#4100: note that element children are not necessarily present on "start" events.
........
r68117 | georg.brandl | 2009-01-01 05:53:55 -0600 (Thu, 01 Jan 2009) | 2 lines
#4156: make clear that "protocol" is to be replaced with the protocol name.
........
r68118 | georg.brandl | 2009-01-01 06:00:19 -0600 (Thu, 01 Jan 2009) | 2 lines
#4185: clarify escape behavior of replacement strings.
........
r68119 | georg.brandl | 2009-01-01 06:09:40 -0600 (Thu, 01 Jan 2009) | 3 lines
#4222: document dis.findlabels() and dis.findlinestarts() and
put them into dis.__all__.
........
r68121 | georg.brandl | 2009-01-01 06:43:33 -0600 (Thu, 01 Jan 2009) | 2 lines
Point to types module in new module deprecation notice.
........
r68123 | georg.brandl | 2009-01-01 06:52:29 -0600 (Thu, 01 Jan 2009) | 2 lines
#4784: ... on three counts ...
........
r68124 | georg.brandl | 2009-01-01 06:53:19 -0600 (Thu, 01 Jan 2009) | 2 lines
#4782: Fix markup error that hid load() and loads().
........
r68125 | georg.brandl | 2009-01-01 07:02:09 -0600 (Thu, 01 Jan 2009) | 2 lines
#4776: add data_files and package_dir arguments.
........
r68126 | georg.brandl | 2009-01-01 07:05:13 -0600 (Thu, 01 Jan 2009) | 2 lines
Handlers are in the `logging.handlers` module.
........
r68127 | georg.brandl | 2009-01-01 07:14:49 -0600 (Thu, 01 Jan 2009) | 2 lines
#4767: Use correct submodules for all MIME classes.
........
2009-01-01 11:05:06 -04:00
|
|
|
return a list of these offsets.
|
2009-01-03 17:18:54 -04:00
|
|
|
|
2013-11-23 18:49:22 -04:00
|
|
|
|
2018-09-18 03:54:26 -03:00
|
|
|
.. function:: stack_effect(opcode, oparg=None, *, jump=None)
|
2013-11-23 18:49:22 -04:00
|
|
|
|
|
|
|
Compute the stack effect of *opcode* with argument *oparg*.
|
|
|
|
|
2018-09-18 03:54:26 -03:00
|
|
|
If the code has a jump target and *jump* is ``True``, :func:`~stack_effect`
|
|
|
|
will return the stack effect of jumping. If *jump* is ``False``,
|
|
|
|
it will return the stack effect of not jumping. And if *jump* is
|
|
|
|
``None`` (default), it will return the maximal stack effect of both cases.
|
|
|
|
|
2013-11-23 18:49:22 -04:00
|
|
|
.. versionadded:: 3.4
|
|
|
|
|
2018-09-18 03:54:26 -03:00
|
|
|
.. versionchanged:: 3.8
|
|
|
|
Added *jump* parameter.
|
|
|
|
|
|
|
|
|
2013-05-06 10:59:20 -03:00
|
|
|
.. _bytecodes:
|
2009-01-03 17:18:54 -04:00
|
|
|
|
2013-05-06 10:59:20 -03:00
|
|
|
Python Bytecode Instructions
|
|
|
|
----------------------------
|
2007-08-15 11:28:22 -03:00
|
|
|
|
2013-05-06 10:59:20 -03:00
|
|
|
The :func:`get_instructions` function and :class:`Bytecode` class provide
|
|
|
|
details of bytecode instructions as :class:`Instruction` instances:
|
2007-08-15 11:28:22 -03:00
|
|
|
|
2013-05-06 10:59:20 -03:00
|
|
|
.. class:: Instruction
|
2007-08-15 11:28:22 -03:00
|
|
|
|
2013-05-06 10:59:20 -03:00
|
|
|
Details for a bytecode operation
|
2007-08-15 11:28:22 -03:00
|
|
|
|
2013-05-06 10:59:20 -03:00
|
|
|
.. data:: opcode
|
2007-08-15 11:28:22 -03:00
|
|
|
|
2013-05-06 10:59:20 -03:00
|
|
|
numeric code for operation, corresponding to the opcode values listed
|
|
|
|
below and the bytecode values in the :ref:`opcode_collections`.
|
2007-08-15 11:28:22 -03:00
|
|
|
|
|
|
|
|
2013-05-06 10:59:20 -03:00
|
|
|
.. data:: opname
|
2007-08-15 11:28:22 -03:00
|
|
|
|
2013-05-06 10:59:20 -03:00
|
|
|
human readable name for operation
|
2007-08-15 11:28:22 -03:00
|
|
|
|
|
|
|
|
2013-05-06 10:59:20 -03:00
|
|
|
.. data:: arg
|
2007-08-15 11:28:22 -03:00
|
|
|
|
2016-10-19 10:29:26 -03:00
|
|
|
numeric argument to operation (if any), otherwise ``None``
|
2007-08-15 11:28:22 -03:00
|
|
|
|
|
|
|
|
2013-05-06 10:59:20 -03:00
|
|
|
.. data:: argval
|
2007-08-15 11:28:22 -03:00
|
|
|
|
2013-05-06 10:59:20 -03:00
|
|
|
resolved arg value (if known), otherwise same as arg
|
2007-08-15 11:28:22 -03:00
|
|
|
|
|
|
|
|
2013-05-06 10:59:20 -03:00
|
|
|
.. data:: argrepr
|
2007-08-15 11:28:22 -03:00
|
|
|
|
2013-05-06 10:59:20 -03:00
|
|
|
human readable description of operation argument
|
2007-08-15 11:28:22 -03:00
|
|
|
|
|
|
|
|
2013-05-06 10:59:20 -03:00
|
|
|
.. data:: offset
|
2007-08-15 11:28:22 -03:00
|
|
|
|
2013-05-06 10:59:20 -03:00
|
|
|
start index of operation within bytecode sequence
|
2007-08-15 11:28:22 -03:00
|
|
|
|
|
|
|
|
2013-05-06 10:59:20 -03:00
|
|
|
.. data:: starts_line
|
2007-08-15 11:28:22 -03:00
|
|
|
|
2016-10-19 10:29:26 -03:00
|
|
|
line started by this opcode (if any), otherwise ``None``
|
2007-08-15 11:28:22 -03:00
|
|
|
|
|
|
|
|
2013-05-06 10:59:20 -03:00
|
|
|
.. data:: is_jump_target
|
2007-08-15 11:28:22 -03:00
|
|
|
|
2013-11-29 06:19:53 -04:00
|
|
|
``True`` if other code jumps to here, otherwise ``False``
|
2007-08-15 11:28:22 -03:00
|
|
|
|
2013-05-06 10:59:20 -03:00
|
|
|
.. versionadded:: 3.4
|
2007-08-15 11:28:22 -03:00
|
|
|
|
|
|
|
|
#1370: Finish the merge r58749, log below, by resolving all conflicts in Doc/.
Merged revisions 58221-58741 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r58221 | georg.brandl | 2007-09-20 10:57:59 -0700 (Thu, 20 Sep 2007) | 2 lines
Patch #1181: add os.environ.clear() method.
........
r58225 | sean.reifschneider | 2007-09-20 23:33:28 -0700 (Thu, 20 Sep 2007) | 3 lines
Issue1704287: "make install" fails unless you do "make" first. Make
oldsharedmods and sharedmods in "libinstall".
........
r58232 | guido.van.rossum | 2007-09-22 13:18:03 -0700 (Sat, 22 Sep 2007) | 4 lines
Patch # 188 by Philip Jenvey.
Make tell() mark CRLF as a newline.
With unit test.
........
r58242 | georg.brandl | 2007-09-24 10:55:47 -0700 (Mon, 24 Sep 2007) | 2 lines
Fix typo and double word.
........
r58245 | georg.brandl | 2007-09-24 10:59:28 -0700 (Mon, 24 Sep 2007) | 2 lines
#1196: document default radix for int().
........
r58247 | georg.brandl | 2007-09-24 11:08:24 -0700 (Mon, 24 Sep 2007) | 2 lines
#1177: accept 2xx responses for https too, not only http.
........
r58249 | andrew.kuchling | 2007-09-24 16:45:51 -0700 (Mon, 24 Sep 2007) | 1 line
Remove stray odd character; grammar fix
........
r58250 | andrew.kuchling | 2007-09-24 16:46:28 -0700 (Mon, 24 Sep 2007) | 1 line
Typo fix
........
r58251 | andrew.kuchling | 2007-09-24 17:09:42 -0700 (Mon, 24 Sep 2007) | 1 line
Add various items
........
r58268 | vinay.sajip | 2007-09-26 22:34:45 -0700 (Wed, 26 Sep 2007) | 1 line
Change to flush and close logic to fix #1760556.
........
r58269 | vinay.sajip | 2007-09-26 22:38:51 -0700 (Wed, 26 Sep 2007) | 1 line
Change to basicConfig() to fix #1021.
........
r58270 | georg.brandl | 2007-09-26 23:26:58 -0700 (Wed, 26 Sep 2007) | 2 lines
#1208: document match object's boolean value.
........
r58271 | vinay.sajip | 2007-09-26 23:56:13 -0700 (Wed, 26 Sep 2007) | 1 line
Minor date change.
........
r58272 | vinay.sajip | 2007-09-27 00:35:10 -0700 (Thu, 27 Sep 2007) | 1 line
Change to LogRecord.__init__() to fix #1206. Note that archaic use of type(x) == types.DictType is because of keeping 1.5.2 compatibility. While this is much less relevant these days, there probably needs to be a separate commit for removing all archaic constructs at the same time.
........
r58288 | brett.cannon | 2007-09-30 12:45:10 -0700 (Sun, 30 Sep 2007) | 9 lines
tuple.__repr__ did not consider a reference loop as it is not possible from
Python code; but it is possible from C. object.__str__ had the issue of not
expecting a type to doing something within it's tp_str implementation that
could trigger an infinite recursion, but it could in C code.. Both found
thanks to BaseException and how it handles its repr.
Closes issue #1686386. Thanks to Thomas Herve for taking an initial stab at
coming up with a solution.
........
r58289 | brett.cannon | 2007-09-30 13:37:19 -0700 (Sun, 30 Sep 2007) | 3 lines
Fix error introduced by r58288; if a tuple is length 0 return its repr and
don't worry about any self-referring tuples.
........
r58294 | facundo.batista | 2007-10-02 10:01:24 -0700 (Tue, 02 Oct 2007) | 11 lines
Made the various is_* operations return booleans. This was discussed
with Cawlishaw by mail, and he basically confirmed that to these is_*
operations, there's no need to return Decimal(0) and Decimal(1) if
the language supports the False and True booleans.
Also added a few tests for the these functions in extra.decTest, since
they are mostly untested (apart from the doctests).
Thanks Mark Dickinson
........
r58295 | facundo.batista | 2007-10-02 11:21:18 -0700 (Tue, 02 Oct 2007) | 4 lines
Added a class to store the digits of log(10), so that they can be made
available when necessary without recomputing. Thanks Mark Dickinson
........
r58299 | mark.summerfield | 2007-10-03 01:53:21 -0700 (Wed, 03 Oct 2007) | 4 lines
Added note in footnote about string comparisons about
unicodedata.normalize().
........
r58304 | raymond.hettinger | 2007-10-03 14:18:11 -0700 (Wed, 03 Oct 2007) | 1 line
enumerate() is no longer bounded to using sequences shorter than LONG_MAX. The possibility of overflow was sending some newsgroup posters into a tizzy.
........
r58305 | raymond.hettinger | 2007-10-03 17:20:27 -0700 (Wed, 03 Oct 2007) | 1 line
itertools.count() no longer limited to sys.maxint.
........
r58306 | kurt.kaiser | 2007-10-03 18:49:54 -0700 (Wed, 03 Oct 2007) | 3 lines
Assume that the user knows when he wants to end the line; don't insert
something he didn't select or complete.
........
r58307 | kurt.kaiser | 2007-10-03 19:07:50 -0700 (Wed, 03 Oct 2007) | 2 lines
Remove unused theme that was causing a fault in p3k.
........
r58308 | kurt.kaiser | 2007-10-03 19:09:17 -0700 (Wed, 03 Oct 2007) | 2 lines
Clean up EditorWindow close.
........
r58309 | kurt.kaiser | 2007-10-03 19:53:07 -0700 (Wed, 03 Oct 2007) | 7 lines
textView cleanup. Patch 1718043 Tal Einat.
M idlelib/EditorWindow.py
M idlelib/aboutDialog.py
M idlelib/textView.py
M idlelib/NEWS.txt
........
r58310 | kurt.kaiser | 2007-10-03 20:11:12 -0700 (Wed, 03 Oct 2007) | 3 lines
configDialog cleanup. Patch 1730217 Tal Einat.
........
r58311 | neal.norwitz | 2007-10-03 23:00:48 -0700 (Wed, 03 Oct 2007) | 4 lines
Coverity #151: Remove deadcode.
All this code already exists above starting at line 653.
........
r58325 | fred.drake | 2007-10-04 19:46:12 -0700 (Thu, 04 Oct 2007) | 1 line
wrap lines to <80 characters before fixing errors
........
r58326 | raymond.hettinger | 2007-10-04 19:47:07 -0700 (Thu, 04 Oct 2007) | 6 lines
Add __asdict__() to NamedTuple and refine the docs.
Add maxlen support to deque() and fixup docs.
Partially fix __reduce__(). The None as a third arg was no longer supported.
Still needs work on __reduce__() to handle recursive inputs.
........
r58327 | fred.drake | 2007-10-04 19:48:32 -0700 (Thu, 04 Oct 2007) | 3 lines
move descriptions of ac_(in|out)_buffer_size to the right place
http://bugs.python.org/issue1053
........
r58329 | neal.norwitz | 2007-10-04 20:39:17 -0700 (Thu, 04 Oct 2007) | 3 lines
dict could be NULL, so we need to XDECREF.
Fix a compiler warning about passing a PyTypeObject* instead of PyObject*.
........
r58330 | neal.norwitz | 2007-10-04 20:41:19 -0700 (Thu, 04 Oct 2007) | 2 lines
Fix Coverity #158: Check the correct variable.
........
r58332 | neal.norwitz | 2007-10-04 22:01:38 -0700 (Thu, 04 Oct 2007) | 7 lines
Fix Coverity #159.
This code was broken if save() returned a negative number since i contained
a boolean value and then we compared i < 0 which should never be true.
Will backport (assuming it's necessary)
........
r58334 | neal.norwitz | 2007-10-04 22:29:17 -0700 (Thu, 04 Oct 2007) | 1 line
Add a note about fixing some more warnings found by Coverity.
........
r58338 | raymond.hettinger | 2007-10-05 12:07:31 -0700 (Fri, 05 Oct 2007) | 1 line
Restore BEGIN/END THREADS macros which were squashed in the previous checkin
........
r58343 | gregory.p.smith | 2007-10-06 00:48:10 -0700 (Sat, 06 Oct 2007) | 3 lines
Stab in the dark attempt to fix the test_bsddb3 failure on sparc and S-390
ubuntu buildbots.
........
r58344 | gregory.p.smith | 2007-10-06 00:51:59 -0700 (Sat, 06 Oct 2007) | 2 lines
Allows BerkeleyDB 4.6.x >= 4.6.21 for the bsddb module.
........
r58348 | gregory.p.smith | 2007-10-06 08:47:37 -0700 (Sat, 06 Oct 2007) | 3 lines
Use the host the author likely meant in the first place. pop.gmail.com is
reliable. gmail.org is someones personal domain.
........
r58351 | neal.norwitz | 2007-10-06 12:16:28 -0700 (Sat, 06 Oct 2007) | 3 lines
Ensure that this test will pass even if another test left an unwritable TESTFN.
Also use the safe unlink in test_support instead of rolling our own here.
........
r58368 | georg.brandl | 2007-10-08 00:50:24 -0700 (Mon, 08 Oct 2007) | 3 lines
#1123: fix the docs for the str.split(None, sep) case.
Also expand a few other methods' docs, which had more info in the deprecated string module docs.
........
r58369 | georg.brandl | 2007-10-08 01:06:05 -0700 (Mon, 08 Oct 2007) | 2 lines
Update docstring of sched, also remove an unused assignment.
........
r58370 | raymond.hettinger | 2007-10-08 02:14:28 -0700 (Mon, 08 Oct 2007) | 5 lines
Add comments to NamedTuple code.
Let the field spec be either a string or a non-string sequence (suggested by Martin Blais with use cases).
Improve the error message in the case of a SyntaxError (caused by a duplicate field name).
........
r58371 | raymond.hettinger | 2007-10-08 02:56:29 -0700 (Mon, 08 Oct 2007) | 1 line
Missed a line in the docs
........
r58372 | raymond.hettinger | 2007-10-08 03:11:51 -0700 (Mon, 08 Oct 2007) | 1 line
Better variable names
........
r58376 | georg.brandl | 2007-10-08 07:12:47 -0700 (Mon, 08 Oct 2007) | 3 lines
#1199: docs for tp_as_{number,sequence,mapping}, by Amaury Forgeot d'Arc.
No need to merge this to py3k!
........
r58380 | raymond.hettinger | 2007-10-08 14:26:58 -0700 (Mon, 08 Oct 2007) | 1 line
Eliminate camelcase function name
........
r58381 | andrew.kuchling | 2007-10-08 16:23:03 -0700 (Mon, 08 Oct 2007) | 1 line
Eliminate camelcase function name
........
r58382 | raymond.hettinger | 2007-10-08 18:36:23 -0700 (Mon, 08 Oct 2007) | 1 line
Make the error messages more specific
........
r58384 | gregory.p.smith | 2007-10-08 23:02:21 -0700 (Mon, 08 Oct 2007) | 10 lines
Splits Modules/_bsddb.c up into bsddb.h and _bsddb.c and adds a C API
object available as bsddb.db.api. This is based on the patch submitted
by Duncan Grisby here:
http://sourceforge.net/tracker/index.php?func=detail&aid=1551895&group_id=13900&atid=313900
See this thread for additional info:
http://sourceforge.net/mailarchive/forum.php?thread_name=E1GAVDK-0002rk-Iw%40apasphere.com&forum_name=pybsddb-users
It also cleans up the code a little by removing some ifdef/endifs for
python prior to 2.1 and for unsupported Berkeley DB <= 3.2.
........
r58385 | gregory.p.smith | 2007-10-08 23:50:43 -0700 (Mon, 08 Oct 2007) | 5 lines
Fix a double free when positioning a database cursor to a non-existant
string key (and probably a few other situations with string keys).
This was reported with a patch as pybsddb sourceforge bug 1708868 by
jjjhhhlll at gmail.
........
r58386 | gregory.p.smith | 2007-10-09 00:19:11 -0700 (Tue, 09 Oct 2007) | 3 lines
Use the highest cPickle protocol in bsddb.dbshelve. This comes from
sourceforge pybsddb patch 1551443 by w_barnes.
........
r58394 | gregory.p.smith | 2007-10-09 11:26:02 -0700 (Tue, 09 Oct 2007) | 2 lines
remove another sleepycat reference
........
r58396 | kurt.kaiser | 2007-10-09 12:31:30 -0700 (Tue, 09 Oct 2007) | 3 lines
Allow interrupt only when executing user code in subprocess
Patch 1225 Tal Einat modified from IDLE-Spoon.
........
r58399 | brett.cannon | 2007-10-09 17:07:50 -0700 (Tue, 09 Oct 2007) | 5 lines
Remove file-level typedefs that were inconsistently used throughout the file.
Just move over to the public API names.
Closes issue1238.
........
r58401 | raymond.hettinger | 2007-10-09 17:26:46 -0700 (Tue, 09 Oct 2007) | 1 line
Accept Jim Jewett's api suggestion to use None instead of -1 to indicate unbounded deques.
........
r58403 | kurt.kaiser | 2007-10-09 17:55:40 -0700 (Tue, 09 Oct 2007) | 2 lines
Allow cursor color change w/o restart. Patch 1725576 Tal Einat.
........
r58404 | kurt.kaiser | 2007-10-09 18:06:47 -0700 (Tue, 09 Oct 2007) | 2 lines
show paste if > 80 columns. Patch 1659326 Tal Einat.
........
r58415 | thomas.heller | 2007-10-11 12:51:32 -0700 (Thu, 11 Oct 2007) | 5 lines
On OS X, use os.uname() instead of gestalt.sysv(...) to get the
operating system version. This allows to use ctypes when Python
was configured with --disable-toolbox-glue.
........
r58419 | neal.norwitz | 2007-10-11 20:01:01 -0700 (Thu, 11 Oct 2007) | 1 line
Get rid of warning about not being able to create an existing directory.
........
r58420 | neal.norwitz | 2007-10-11 20:01:30 -0700 (Thu, 11 Oct 2007) | 1 line
Get rid of warnings on a bunch of platforms by using a proper prototype.
........
r58421 | neal.norwitz | 2007-10-11 20:01:54 -0700 (Thu, 11 Oct 2007) | 4 lines
Get rid of compiler warning about retval being used (returned) without
being initialized. (gcc warning and Coverity 202)
........
r58422 | neal.norwitz | 2007-10-11 20:03:23 -0700 (Thu, 11 Oct 2007) | 1 line
Fix Coverity 168: Close the file before returning (exiting).
........
r58423 | neal.norwitz | 2007-10-11 20:04:18 -0700 (Thu, 11 Oct 2007) | 4 lines
Fix Coverity 180: Don't overallocate. We don't need structs, but pointers.
Also fix a memory leak.
........
r58424 | neal.norwitz | 2007-10-11 20:05:19 -0700 (Thu, 11 Oct 2007) | 5 lines
Fix Coverity 185-186: If the passed in FILE is NULL, uninitialized memory
would be accessed.
Will backport.
........
r58425 | neal.norwitz | 2007-10-11 20:52:34 -0700 (Thu, 11 Oct 2007) | 1 line
Get this module to compile with bsddb versions prior to 4.3
........
r58430 | martin.v.loewis | 2007-10-12 01:56:52 -0700 (Fri, 12 Oct 2007) | 3 lines
Bug #1216: Restore support for Visual Studio 2002.
Will backport to 2.5.
........
r58433 | raymond.hettinger | 2007-10-12 10:53:11 -0700 (Fri, 12 Oct 2007) | 1 line
Fix test of count.__repr__() to ignore the 'L' if the count is a long
........
r58434 | gregory.p.smith | 2007-10-12 11:44:06 -0700 (Fri, 12 Oct 2007) | 4 lines
Fixes http://bugs.python.org/issue1233 - bsddb.dbshelve.DBShelf.append
was useless due to inverted logic. Also adds a test case for RECNO dbs
to test_dbshelve.
........
r58445 | georg.brandl | 2007-10-13 06:20:03 -0700 (Sat, 13 Oct 2007) | 2 lines
Fix email example.
........
r58450 | gregory.p.smith | 2007-10-13 16:02:05 -0700 (Sat, 13 Oct 2007) | 2 lines
Fix an uncollectable reference leak in bsddb.db.DBShelf.append
........
r58453 | neal.norwitz | 2007-10-13 17:18:40 -0700 (Sat, 13 Oct 2007) | 8 lines
Let the O/S supply a port if none of the default ports can be used.
This should make the tests more robust at the expense of allowing
tests to be sloppier by not requiring them to cleanup after themselves.
(It will legitamitely help when running two test suites simultaneously
or if another process is already using one of the predefined ports.)
Also simplifies (slightLy) the exception handling elsewhere.
........
r58459 | neal.norwitz | 2007-10-14 11:30:21 -0700 (Sun, 14 Oct 2007) | 2 lines
Don't raise a string exception, they don't work anymore.
........
r58460 | neal.norwitz | 2007-10-14 11:40:37 -0700 (Sun, 14 Oct 2007) | 1 line
Use unittest for assertions
........
r58468 | armin.rigo | 2007-10-15 00:48:35 -0700 (Mon, 15 Oct 2007) | 2 lines
test_bigbits was not testing what it seemed to.
........
r58471 | guido.van.rossum | 2007-10-15 08:54:11 -0700 (Mon, 15 Oct 2007) | 3 lines
Change a PyErr_Print() into a PyErr_Clear(),
per discussion in issue 1031213.
........
r58500 | raymond.hettinger | 2007-10-16 12:18:30 -0700 (Tue, 16 Oct 2007) | 1 line
Improve error messages
........
r58506 | raymond.hettinger | 2007-10-16 14:28:32 -0700 (Tue, 16 Oct 2007) | 1 line
More docs, error messages, and tests
........
r58507 | andrew.kuchling | 2007-10-16 15:58:03 -0700 (Tue, 16 Oct 2007) | 1 line
Add items
........
r58508 | brett.cannon | 2007-10-16 16:24:06 -0700 (Tue, 16 Oct 2007) | 3 lines
Remove ``:const:`` notation on None in parameter list. Since the markup is not
rendered for parameters it just showed up as ``:const:`None` `` in the output.
........
r58509 | brett.cannon | 2007-10-16 16:26:45 -0700 (Tue, 16 Oct 2007) | 3 lines
Re-order some functions whose parameters differ between PyObject and const char
* so that they are next to each other.
........
r58522 | armin.rigo | 2007-10-17 11:46:37 -0700 (Wed, 17 Oct 2007) | 5 lines
Fix the overflow checking of list_repeat.
Introduce overflow checking into list_inplace_repeat.
Backport candidate, possibly.
........
r58530 | facundo.batista | 2007-10-17 20:16:03 -0700 (Wed, 17 Oct 2007) | 7 lines
Issue #1580738. When HTTPConnection reads the whole stream with read(),
it closes itself. When the stream is read in several calls to read(n),
it should behave in the same way if HTTPConnection knows where the end
of the stream is (through self.length). Added a test case for this
behaviour.
........
r58531 | facundo.batista | 2007-10-17 20:44:48 -0700 (Wed, 17 Oct 2007) | 3 lines
Issue 1289, just a typo.
........
r58532 | gregory.p.smith | 2007-10-18 00:56:54 -0700 (Thu, 18 Oct 2007) | 4 lines
cleanup test_dbtables to use mkdtemp. cleanup dbtables to pass txn as a
keyword argument whenever possible to avoid bugs and confusion. (dbtables.py
line 447 self.db.get using txn as a non-keyword was an actual bug due to this)
........
r58533 | gregory.p.smith | 2007-10-18 01:34:20 -0700 (Thu, 18 Oct 2007) | 4 lines
Fix a weird bug in dbtables: if it chose a random rowid string that contained
NULL bytes it would cause the database all sorts of problems in the future
leading to very strange random failures and corrupt dbtables.bsdTableDb dbs.
........
r58534 | gregory.p.smith | 2007-10-18 09:32:02 -0700 (Thu, 18 Oct 2007) | 3 lines
A cleaner fix than the one committed last night. Generate random rowids that
do not contain null bytes.
........
r58537 | gregory.p.smith | 2007-10-18 10:17:57 -0700 (Thu, 18 Oct 2007) | 2 lines
mention bsddb fixes.
........
r58538 | raymond.hettinger | 2007-10-18 14:13:06 -0700 (Thu, 18 Oct 2007) | 1 line
Remove useless warning
........
r58539 | gregory.p.smith | 2007-10-19 00:31:20 -0700 (Fri, 19 Oct 2007) | 2 lines
squelch the warning that this test is supposed to trigger.
........
r58542 | georg.brandl | 2007-10-19 05:32:39 -0700 (Fri, 19 Oct 2007) | 2 lines
Clarify wording for apply().
........
r58544 | mark.summerfield | 2007-10-19 05:48:17 -0700 (Fri, 19 Oct 2007) | 3 lines
Added a cross-ref to each other.
........
r58545 | georg.brandl | 2007-10-19 10:38:49 -0700 (Fri, 19 Oct 2007) | 2 lines
#1284: "S" means "seen", not unread.
........
r58548 | thomas.heller | 2007-10-19 11:11:41 -0700 (Fri, 19 Oct 2007) | 4 lines
Fix ctypes on 32-bit systems when Python is configured --with-system-ffi.
See also https://bugs.launchpad.net/bugs/72505.
Ported from release25-maint branch.
........
r58550 | facundo.batista | 2007-10-19 12:25:57 -0700 (Fri, 19 Oct 2007) | 8 lines
The constructor from tuple was way too permissive: it allowed bad
coefficient numbers, floats in the sign, and other details that
generated directly the wrong number in the best case, or triggered
misfunctionality in the alorithms.
Test cases added for these issues. Thanks Mark Dickinson.
........
r58559 | georg.brandl | 2007-10-20 06:22:53 -0700 (Sat, 20 Oct 2007) | 2 lines
Fix code being interpreted as a target.
........
r58561 | georg.brandl | 2007-10-20 06:36:24 -0700 (Sat, 20 Oct 2007) | 2 lines
Document new "cmdoption" directive.
........
r58562 | georg.brandl | 2007-10-20 08:21:22 -0700 (Sat, 20 Oct 2007) | 2 lines
Make a path more Unix-standardy.
........
r58564 | georg.brandl | 2007-10-20 10:51:39 -0700 (Sat, 20 Oct 2007) | 2 lines
Document new directive "envvar".
........
r58567 | georg.brandl | 2007-10-20 11:08:14 -0700 (Sat, 20 Oct 2007) | 6 lines
* Add new toplevel chapter, "Using Python." (how to install,
configure and setup python on different platforms -- at least
in theory.)
* Move the Python on Mac docs in that chapter.
* Add a new chapter about the command line invocation, by stargaming.
........
r58568 | georg.brandl | 2007-10-20 11:33:20 -0700 (Sat, 20 Oct 2007) | 2 lines
Change title, for now.
........
r58569 | georg.brandl | 2007-10-20 11:39:25 -0700 (Sat, 20 Oct 2007) | 2 lines
Add entry to ACKS.
........
r58570 | georg.brandl | 2007-10-20 12:05:45 -0700 (Sat, 20 Oct 2007) | 2 lines
Clarify -E docs.
........
r58571 | georg.brandl | 2007-10-20 12:08:36 -0700 (Sat, 20 Oct 2007) | 2 lines
Even more clarification.
........
r58572 | andrew.kuchling | 2007-10-20 12:25:37 -0700 (Sat, 20 Oct 2007) | 1 line
Fix protocol name
........
r58573 | andrew.kuchling | 2007-10-20 12:35:18 -0700 (Sat, 20 Oct 2007) | 1 line
Various items
........
r58574 | andrew.kuchling | 2007-10-20 12:39:35 -0700 (Sat, 20 Oct 2007) | 1 line
Use correct header line
........
r58576 | armin.rigo | 2007-10-21 02:14:15 -0700 (Sun, 21 Oct 2007) | 3 lines
Add a crasher for the long-standing issue with closing a file
while another thread uses it.
........
r58577 | georg.brandl | 2007-10-21 03:01:56 -0700 (Sun, 21 Oct 2007) | 2 lines
Remove duplicate crasher.
........
r58578 | georg.brandl | 2007-10-21 03:24:20 -0700 (Sun, 21 Oct 2007) | 2 lines
Unify "byte code" to "bytecode". Also sprinkle :term: markup for it.
........
r58579 | georg.brandl | 2007-10-21 03:32:54 -0700 (Sun, 21 Oct 2007) | 2 lines
Add markup to new function descriptions.
........
r58580 | georg.brandl | 2007-10-21 03:45:46 -0700 (Sun, 21 Oct 2007) | 2 lines
Add :term:s for descriptors.
........
r58581 | georg.brandl | 2007-10-21 03:46:24 -0700 (Sun, 21 Oct 2007) | 2 lines
Unify "file-descriptor" to "file descriptor".
........
r58582 | georg.brandl | 2007-10-21 03:52:38 -0700 (Sun, 21 Oct 2007) | 2 lines
Add :term: for generators.
........
r58583 | georg.brandl | 2007-10-21 05:10:28 -0700 (Sun, 21 Oct 2007) | 2 lines
Add :term:s for iterator.
........
r58584 | georg.brandl | 2007-10-21 05:15:05 -0700 (Sun, 21 Oct 2007) | 2 lines
Add :term:s for "new-style class".
........
r58588 | neal.norwitz | 2007-10-21 21:47:54 -0700 (Sun, 21 Oct 2007) | 1 line
Add Chris Monson so he can edit PEPs.
........
r58594 | guido.van.rossum | 2007-10-22 09:27:19 -0700 (Mon, 22 Oct 2007) | 4 lines
Issue #1307, patch by Derek Shockey.
When "MAIL" is received without args, an exception happens instead of
sending a 501 syntax error response.
........
r58598 | travis.oliphant | 2007-10-22 19:40:56 -0700 (Mon, 22 Oct 2007) | 1 line
Add phuang patch from Issue 708374 which adds offset parameter to mmap module.
........
r58601 | neal.norwitz | 2007-10-22 22:44:27 -0700 (Mon, 22 Oct 2007) | 2 lines
Bug #1313, fix typo (wrong variable name) in example.
........
r58609 | georg.brandl | 2007-10-23 11:21:35 -0700 (Tue, 23 Oct 2007) | 2 lines
Update Pygments version from externals.
........
r58618 | guido.van.rossum | 2007-10-23 12:25:41 -0700 (Tue, 23 Oct 2007) | 3 lines
Issue 1307 by Derek Shockey, fox the same bug for RCPT.
Neal: please backport!
........
r58620 | raymond.hettinger | 2007-10-23 13:37:41 -0700 (Tue, 23 Oct 2007) | 1 line
Shorter name for namedtuple()
........
r58621 | andrew.kuchling | 2007-10-23 13:55:47 -0700 (Tue, 23 Oct 2007) | 1 line
Update name
........
r58622 | raymond.hettinger | 2007-10-23 14:23:07 -0700 (Tue, 23 Oct 2007) | 1 line
Fixup news entry
........
r58623 | raymond.hettinger | 2007-10-23 18:28:33 -0700 (Tue, 23 Oct 2007) | 1 line
Optimize sum() for integer and float inputs.
........
r58624 | raymond.hettinger | 2007-10-23 19:05:51 -0700 (Tue, 23 Oct 2007) | 1 line
Fixup error return and add support for intermixed ints and floats/
........
r58628 | vinay.sajip | 2007-10-24 03:47:06 -0700 (Wed, 24 Oct 2007) | 1 line
Bug #1321: Fixed logic error in TimedRotatingFileHandler.__init__()
........
r58641 | facundo.batista | 2007-10-24 12:11:08 -0700 (Wed, 24 Oct 2007) | 4 lines
Issue 1290. CharacterData.__repr__ was constructing a string
in response that keeped having a non-ascii character.
........
r58643 | thomas.heller | 2007-10-24 12:50:45 -0700 (Wed, 24 Oct 2007) | 1 line
Added unittest for calling a function with paramflags (backport from py3k branch).
........
r58645 | matthias.klose | 2007-10-24 13:00:44 -0700 (Wed, 24 Oct 2007) | 2 lines
- Build using system ffi library on arm*-linux*.
........
r58651 | georg.brandl | 2007-10-24 14:40:38 -0700 (Wed, 24 Oct 2007) | 2 lines
Bug #1287: make os.environ.pop() work as expected.
........
r58652 | raymond.hettinger | 2007-10-24 19:26:58 -0700 (Wed, 24 Oct 2007) | 1 line
Missing DECREFs
........
r58653 | matthias.klose | 2007-10-24 23:37:24 -0700 (Wed, 24 Oct 2007) | 2 lines
- Build using system ffi library on arm*-linux*, pass --with-system-ffi to CONFIG_ARGS
........
r58655 | thomas.heller | 2007-10-25 12:47:32 -0700 (Thu, 25 Oct 2007) | 2 lines
ffi_type_longdouble may be already #defined.
See issue 1324.
........
r58656 | kurt.kaiser | 2007-10-25 15:43:45 -0700 (Thu, 25 Oct 2007) | 3 lines
Correct an ancient bug in an unused path by removing that path: register() is
now idempotent.
........
r58660 | kurt.kaiser | 2007-10-25 17:10:09 -0700 (Thu, 25 Oct 2007) | 4 lines
1. Add comments to provide top-level documentation.
2. Refactor to use more descriptive names.
3. Enhance tests in main().
........
r58675 | georg.brandl | 2007-10-26 11:30:41 -0700 (Fri, 26 Oct 2007) | 2 lines
Fix new pop() method on os.environ on ignorecase-platforms.
........
r58696 | neal.norwitz | 2007-10-27 15:32:21 -0700 (Sat, 27 Oct 2007) | 1 line
Update URL for Pygments. 0.8.1 is no longer available
........
r58697 | hyeshik.chang | 2007-10-28 04:19:02 -0700 (Sun, 28 Oct 2007) | 3 lines
- Add support for FreeBSD 8 which is recently forked from FreeBSD 7.
- Regenerate IN module for most recent maintenance tree of FreeBSD 6 and 7.
........
r58698 | hyeshik.chang | 2007-10-28 05:38:09 -0700 (Sun, 28 Oct 2007) | 2 lines
Enable platform-specific tweaks for FreeBSD 8 (exactly same to FreeBSD 7's yet)
........
r58700 | kurt.kaiser | 2007-10-28 12:03:59 -0700 (Sun, 28 Oct 2007) | 2 lines
Add confirmation dialog before printing. Patch 1717170 Tal Einat.
........
r58706 | guido.van.rossum | 2007-10-29 13:52:45 -0700 (Mon, 29 Oct 2007) | 3 lines
Patch 1353 by Jacob Winther.
Add mp4 mapping to mimetypes.py.
........
r58709 | guido.van.rossum | 2007-10-29 15:15:05 -0700 (Mon, 29 Oct 2007) | 6 lines
Backport fixes for the code that decodes octal escapes (and for PyString
also hex escapes) -- this was reaching beyond the end of the input string
buffer, even though it is not supposed to be \0-terminated.
This has no visible effect but is clearly the correct thing to do.
(In 3.0 it had a visible effect after removing ob_sstate from PyString.)
........
r58710 | kurt.kaiser | 2007-10-29 19:38:54 -0700 (Mon, 29 Oct 2007) | 7 lines
check in Tal Einat's update to tabpage.py
Patch 1612746
M configDialog.py
M NEWS.txt
AM tabbedpages.py
........
r58715 | georg.brandl | 2007-10-30 10:51:18 -0700 (Tue, 30 Oct 2007) | 2 lines
Use correct markup.
........
r58716 | georg.brandl | 2007-10-30 10:57:12 -0700 (Tue, 30 Oct 2007) | 2 lines
Make example about hiding None return values at the prompt clearer.
........
r58728 | neal.norwitz | 2007-10-30 23:33:20 -0700 (Tue, 30 Oct 2007) | 1 line
Fix some compiler warnings for signed comparisons on Unix and Windows.
........
r58731 | martin.v.loewis | 2007-10-31 10:19:33 -0700 (Wed, 31 Oct 2007) | 2 lines
Adding Christian Heimes.
........
r58737 | raymond.hettinger | 2007-10-31 14:57:58 -0700 (Wed, 31 Oct 2007) | 1 line
Clarify the reasons why pickle is almost always better than marshal
........
r58739 | raymond.hettinger | 2007-10-31 15:15:49 -0700 (Wed, 31 Oct 2007) | 1 line
Sets are marshalable.
........
2007-11-01 17:32:30 -03:00
|
|
|
The Python compiler currently generates the following bytecode instructions.
|
2007-08-15 11:28:22 -03:00
|
|
|
|
|
|
|
|
2010-07-03 07:41:33 -03:00
|
|
|
**General instructions**
|
|
|
|
|
|
|
|
.. opcode:: NOP
|
2007-08-15 11:28:22 -03:00
|
|
|
|
|
|
|
Do nothing code. Used as a placeholder by the bytecode optimizer.
|
|
|
|
|
|
|
|
|
2010-07-03 07:41:33 -03:00
|
|
|
.. opcode:: POP_TOP
|
2007-08-15 11:28:22 -03:00
|
|
|
|
|
|
|
Removes the top-of-stack (TOS) item.
|
|
|
|
|
|
|
|
|
2010-07-03 07:41:33 -03:00
|
|
|
.. opcode:: ROT_TWO
|
2007-08-15 11:28:22 -03:00
|
|
|
|
|
|
|
Swaps the two top-most stack items.
|
|
|
|
|
|
|
|
|
2010-07-03 07:41:33 -03:00
|
|
|
.. opcode:: ROT_THREE
|
2007-08-15 11:28:22 -03:00
|
|
|
|
|
|
|
Lifts second and third stack item one position up, moves top down to position
|
|
|
|
three.
|
|
|
|
|
|
|
|
|
2018-02-22 17:33:30 -04:00
|
|
|
.. opcode:: ROT_FOUR
|
|
|
|
|
|
|
|
Lifts second, third and forth stack items one position up, moves top down
|
|
|
|
to position four.
|
|
|
|
|
|
|
|
.. versionadded:: 3.8
|
|
|
|
|
|
|
|
|
2010-09-04 15:43:52 -03:00
|
|
|
.. opcode:: DUP_TOP
|
2007-08-15 11:28:22 -03:00
|
|
|
|
2010-09-04 15:43:52 -03:00
|
|
|
Duplicates the reference on top of the stack.
|
2007-08-15 11:28:22 -03:00
|
|
|
|
2018-02-01 07:48:33 -04:00
|
|
|
.. versionadded:: 3.2
|
|
|
|
|
2007-08-15 11:28:22 -03:00
|
|
|
|
2010-09-04 15:43:52 -03:00
|
|
|
.. opcode:: DUP_TOP_TWO
|
2007-08-15 11:28:22 -03:00
|
|
|
|
2010-09-04 15:43:52 -03:00
|
|
|
Duplicates the two references on top of the stack, leaving them in the
|
|
|
|
same order.
|
2007-08-15 11:28:22 -03:00
|
|
|
|
2018-02-01 07:48:33 -04:00
|
|
|
.. versionadded:: 3.2
|
|
|
|
|
2007-08-15 11:28:22 -03:00
|
|
|
|
2010-07-03 07:41:33 -03:00
|
|
|
**Unary operations**
|
|
|
|
|
|
|
|
Unary operations take the top of the stack, apply the operation, and push the
|
|
|
|
result back on the stack.
|
2007-08-15 11:28:22 -03:00
|
|
|
|
2010-07-03 07:41:33 -03:00
|
|
|
.. opcode:: UNARY_POSITIVE
|
2007-08-15 11:28:22 -03:00
|
|
|
|
|
|
|
Implements ``TOS = +TOS``.
|
|
|
|
|
|
|
|
|
2010-07-03 07:41:33 -03:00
|
|
|
.. opcode:: UNARY_NEGATIVE
|
2007-08-15 11:28:22 -03:00
|
|
|
|
|
|
|
Implements ``TOS = -TOS``.
|
|
|
|
|
|
|
|
|
2010-07-03 07:41:33 -03:00
|
|
|
.. opcode:: UNARY_NOT
|
2007-08-15 11:28:22 -03:00
|
|
|
|
|
|
|
Implements ``TOS = not TOS``.
|
|
|
|
|
|
|
|
|
2010-07-03 07:41:33 -03:00
|
|
|
.. opcode:: UNARY_INVERT
|
2007-08-15 11:28:22 -03:00
|
|
|
|
|
|
|
Implements ``TOS = ~TOS``.
|
|
|
|
|
|
|
|
|
2010-07-03 07:41:33 -03:00
|
|
|
.. opcode:: GET_ITER
|
2007-08-15 11:28:22 -03:00
|
|
|
|
|
|
|
Implements ``TOS = iter(TOS)``.
|
|
|
|
|
2010-07-03 07:41:33 -03:00
|
|
|
|
Issue #24400: Introduce a distinct type for 'async def' coroutines.
Summary of changes:
1. Coroutines now have a distinct, separate from generators
type at the C level: PyGen_Type, and a new typedef PyCoroObject.
PyCoroObject shares the initial segment of struct layout with
PyGenObject, making it possible to reuse existing generators
machinery. The new type is exposed as 'types.CoroutineType'.
As a consequence of having a new type, CO_GENERATOR flag is
no longer applied to coroutines.
2. Having a separate type for coroutines made it possible to add
an __await__ method to the type. Although it is not used by the
interpreter (see details on that below), it makes coroutines
naturally (without using __instancecheck__) conform to
collections.abc.Coroutine and collections.abc.Awaitable ABCs.
[The __instancecheck__ is still used for generator-based
coroutines, as we don't want to add __await__ for generators.]
3. Add new opcode: GET_YIELD_FROM_ITER. The opcode is needed to
allow passing native coroutines to the YIELD_FROM opcode.
Before this change, 'yield from o' expression was compiled to:
(o)
GET_ITER
LOAD_CONST
YIELD_FROM
Now, we use GET_YIELD_FROM_ITER instead of GET_ITER.
The reason for adding a new opcode is that GET_ITER is used
in some contexts (such as 'for .. in' loops) where passing
a coroutine object is invalid.
4. Add two new introspection functions to the inspec module:
getcoroutinestate(c) and getcoroutinelocals(c).
5. inspect.iscoroutine(o) is updated to test if 'o' is a native
coroutine object. Before this commit it used abc.Coroutine,
and it was requested to update inspect.isgenerator(o) to use
abc.Generator; it was decided, however, that inspect functions
should really be tailored for checking for native types.
6. sys.set_coroutine_wrapper(w) API is updated to work with only
native coroutines. Since types.coroutine decorator supports
any type of callables now, it would be confusing that it does
not work for all types of coroutines.
7. Exceptions logic in generators C implementation was updated
to raise clearer messages for coroutines:
Before: TypeError("generator raised StopIteration")
After: TypeError("coroutine raised StopIteration")
2015-06-22 13:19:30 -03:00
|
|
|
.. opcode:: GET_YIELD_FROM_ITER
|
|
|
|
|
|
|
|
If ``TOS`` is a :term:`generator iterator` or :term:`coroutine` object
|
|
|
|
it is left as is. Otherwise, implements ``TOS = iter(TOS)``.
|
|
|
|
|
|
|
|
.. versionadded:: 3.5
|
|
|
|
|
|
|
|
|
2010-07-03 07:41:33 -03:00
|
|
|
**Binary operations**
|
|
|
|
|
2007-08-15 11:28:22 -03:00
|
|
|
Binary operations remove the top of the stack (TOS) and the second top-most
|
|
|
|
stack item (TOS1) from the stack. They perform the operation, and put the
|
|
|
|
result back on the stack.
|
|
|
|
|
2010-07-03 07:41:33 -03:00
|
|
|
.. opcode:: BINARY_POWER
|
2007-08-15 11:28:22 -03:00
|
|
|
|
|
|
|
Implements ``TOS = TOS1 ** TOS``.
|
|
|
|
|
|
|
|
|
2010-07-03 07:41:33 -03:00
|
|
|
.. opcode:: BINARY_MULTIPLY
|
2007-08-15 11:28:22 -03:00
|
|
|
|
|
|
|
Implements ``TOS = TOS1 * TOS``.
|
|
|
|
|
|
|
|
|
2014-04-10 00:55:56 -03:00
|
|
|
.. opcode:: BINARY_MATRIX_MULTIPLY
|
|
|
|
|
|
|
|
Implements ``TOS = TOS1 @ TOS``.
|
|
|
|
|
2015-03-12 15:56:45 -03:00
|
|
|
.. versionadded:: 3.5
|
|
|
|
|
2014-04-10 00:55:56 -03:00
|
|
|
|
2010-07-03 07:41:33 -03:00
|
|
|
.. opcode:: BINARY_FLOOR_DIVIDE
|
2007-08-15 11:28:22 -03:00
|
|
|
|
|
|
|
Implements ``TOS = TOS1 // TOS``.
|
|
|
|
|
|
|
|
|
2010-07-03 07:41:33 -03:00
|
|
|
.. opcode:: BINARY_TRUE_DIVIDE
|
2007-08-15 11:28:22 -03:00
|
|
|
|
2010-01-05 04:37:27 -04:00
|
|
|
Implements ``TOS = TOS1 / TOS``.
|
2007-08-15 11:28:22 -03:00
|
|
|
|
|
|
|
|
2010-07-03 07:41:33 -03:00
|
|
|
.. opcode:: BINARY_MODULO
|
2007-08-15 11:28:22 -03:00
|
|
|
|
|
|
|
Implements ``TOS = TOS1 % TOS``.
|
|
|
|
|
|
|
|
|
2010-07-03 07:41:33 -03:00
|
|
|
.. opcode:: BINARY_ADD
|
2007-08-15 11:28:22 -03:00
|
|
|
|
|
|
|
Implements ``TOS = TOS1 + TOS``.
|
|
|
|
|
|
|
|
|
2010-07-03 07:41:33 -03:00
|
|
|
.. opcode:: BINARY_SUBTRACT
|
2007-08-15 11:28:22 -03:00
|
|
|
|
|
|
|
Implements ``TOS = TOS1 - TOS``.
|
|
|
|
|
|
|
|
|
2010-07-03 07:41:33 -03:00
|
|
|
.. opcode:: BINARY_SUBSCR
|
2007-08-15 11:28:22 -03:00
|
|
|
|
|
|
|
Implements ``TOS = TOS1[TOS]``.
|
|
|
|
|
|
|
|
|
2010-07-03 07:41:33 -03:00
|
|
|
.. opcode:: BINARY_LSHIFT
|
2007-08-15 11:28:22 -03:00
|
|
|
|
|
|
|
Implements ``TOS = TOS1 << TOS``.
|
|
|
|
|
|
|
|
|
2010-07-03 07:41:33 -03:00
|
|
|
.. opcode:: BINARY_RSHIFT
|
2007-08-15 11:28:22 -03:00
|
|
|
|
|
|
|
Implements ``TOS = TOS1 >> TOS``.
|
|
|
|
|
|
|
|
|
2010-07-03 07:41:33 -03:00
|
|
|
.. opcode:: BINARY_AND
|
2007-08-15 11:28:22 -03:00
|
|
|
|
|
|
|
Implements ``TOS = TOS1 & TOS``.
|
|
|
|
|
|
|
|
|
2010-07-03 07:41:33 -03:00
|
|
|
.. opcode:: BINARY_XOR
|
2007-08-15 11:28:22 -03:00
|
|
|
|
|
|
|
Implements ``TOS = TOS1 ^ TOS``.
|
|
|
|
|
|
|
|
|
2010-07-03 07:41:33 -03:00
|
|
|
.. opcode:: BINARY_OR
|
2007-08-15 11:28:22 -03:00
|
|
|
|
|
|
|
Implements ``TOS = TOS1 | TOS``.
|
|
|
|
|
2010-07-03 07:41:33 -03:00
|
|
|
|
|
|
|
**In-place operations**
|
|
|
|
|
2007-08-15 11:28:22 -03:00
|
|
|
In-place operations are like binary operations, in that they remove TOS and
|
|
|
|
TOS1, and push the result back on the stack, but the operation is done in-place
|
|
|
|
when TOS1 supports it, and the resulting TOS may be (but does not have to be)
|
|
|
|
the original TOS1.
|
|
|
|
|
2010-07-03 07:41:33 -03:00
|
|
|
.. opcode:: INPLACE_POWER
|
2007-08-15 11:28:22 -03:00
|
|
|
|
|
|
|
Implements in-place ``TOS = TOS1 ** TOS``.
|
|
|
|
|
|
|
|
|
2010-07-03 07:41:33 -03:00
|
|
|
.. opcode:: INPLACE_MULTIPLY
|
2007-08-15 11:28:22 -03:00
|
|
|
|
|
|
|
Implements in-place ``TOS = TOS1 * TOS``.
|
|
|
|
|
|
|
|
|
2014-04-10 00:55:56 -03:00
|
|
|
.. opcode:: INPLACE_MATRIX_MULTIPLY
|
|
|
|
|
|
|
|
Implements in-place ``TOS = TOS1 @ TOS``.
|
|
|
|
|
2015-03-12 15:56:45 -03:00
|
|
|
.. versionadded:: 3.5
|
|
|
|
|
2014-04-10 00:55:56 -03:00
|
|
|
|
2010-07-03 07:41:33 -03:00
|
|
|
.. opcode:: INPLACE_FLOOR_DIVIDE
|
2007-08-15 11:28:22 -03:00
|
|
|
|
|
|
|
Implements in-place ``TOS = TOS1 // TOS``.
|
|
|
|
|
|
|
|
|
2010-07-03 07:41:33 -03:00
|
|
|
.. opcode:: INPLACE_TRUE_DIVIDE
|
2007-08-15 11:28:22 -03:00
|
|
|
|
2010-01-05 04:37:27 -04:00
|
|
|
Implements in-place ``TOS = TOS1 / TOS``.
|
2007-08-15 11:28:22 -03:00
|
|
|
|
|
|
|
|
2010-07-03 07:41:33 -03:00
|
|
|
.. opcode:: INPLACE_MODULO
|
2007-08-15 11:28:22 -03:00
|
|
|
|
|
|
|
Implements in-place ``TOS = TOS1 % TOS``.
|
|
|
|
|
|
|
|
|
2010-07-03 07:41:33 -03:00
|
|
|
.. opcode:: INPLACE_ADD
|
2007-08-15 11:28:22 -03:00
|
|
|
|
|
|
|
Implements in-place ``TOS = TOS1 + TOS``.
|
|
|
|
|
|
|
|
|
2010-07-03 07:41:33 -03:00
|
|
|
.. opcode:: INPLACE_SUBTRACT
|
2007-08-15 11:28:22 -03:00
|
|
|
|
|
|
|
Implements in-place ``TOS = TOS1 - TOS``.
|
|
|
|
|
|
|
|
|
2010-07-03 07:41:33 -03:00
|
|
|
.. opcode:: INPLACE_LSHIFT
|
2007-08-15 11:28:22 -03:00
|
|
|
|
|
|
|
Implements in-place ``TOS = TOS1 << TOS``.
|
|
|
|
|
|
|
|
|
2010-07-03 07:41:33 -03:00
|
|
|
.. opcode:: INPLACE_RSHIFT
|
2007-08-15 11:28:22 -03:00
|
|
|
|
|
|
|
Implements in-place ``TOS = TOS1 >> TOS``.
|
|
|
|
|
|
|
|
|
2010-07-03 07:41:33 -03:00
|
|
|
.. opcode:: INPLACE_AND
|
2007-08-15 11:28:22 -03:00
|
|
|
|
|
|
|
Implements in-place ``TOS = TOS1 & TOS``.
|
|
|
|
|
|
|
|
|
2010-07-03 07:41:33 -03:00
|
|
|
.. opcode:: INPLACE_XOR
|
2007-08-15 11:28:22 -03:00
|
|
|
|
|
|
|
Implements in-place ``TOS = TOS1 ^ TOS``.
|
|
|
|
|
|
|
|
|
2010-07-03 07:41:33 -03:00
|
|
|
.. opcode:: INPLACE_OR
|
2007-08-15 11:28:22 -03:00
|
|
|
|
|
|
|
Implements in-place ``TOS = TOS1 | TOS``.
|
|
|
|
|
|
|
|
|
2010-07-03 07:41:33 -03:00
|
|
|
.. opcode:: STORE_SUBSCR
|
2007-08-15 11:28:22 -03:00
|
|
|
|
|
|
|
Implements ``TOS1[TOS] = TOS2``.
|
|
|
|
|
|
|
|
|
2010-07-03 07:41:33 -03:00
|
|
|
.. opcode:: DELETE_SUBSCR
|
2007-08-15 11:28:22 -03:00
|
|
|
|
|
|
|
Implements ``del TOS1[TOS]``.
|
|
|
|
|
|
|
|
|
2015-06-24 12:04:15 -03:00
|
|
|
**Coroutine opcodes**
|
2015-05-11 23:57:16 -03:00
|
|
|
|
|
|
|
.. opcode:: GET_AWAITABLE
|
|
|
|
|
2015-06-24 12:04:15 -03:00
|
|
|
Implements ``TOS = get_awaitable(TOS)``, where ``get_awaitable(o)``
|
|
|
|
returns ``o`` if ``o`` is a coroutine object or a generator object with
|
|
|
|
the CO_ITERABLE_COROUTINE flag, or resolves
|
|
|
|
``o.__await__``.
|
2015-05-11 23:57:16 -03:00
|
|
|
|
2018-02-01 07:48:33 -04:00
|
|
|
.. versionadded:: 3.5
|
|
|
|
|
2015-05-11 23:57:16 -03:00
|
|
|
|
|
|
|
.. opcode:: GET_AITER
|
|
|
|
|
2017-10-06 11:18:10 -03:00
|
|
|
Implements ``TOS = TOS.__aiter__()``.
|
|
|
|
|
2018-02-01 07:48:33 -04:00
|
|
|
.. versionadded:: 3.5
|
2017-10-06 11:18:10 -03:00
|
|
|
.. versionchanged:: 3.7
|
|
|
|
Returning awaitable objects from ``__aiter__`` is no longer
|
|
|
|
supported.
|
2015-05-11 23:57:16 -03:00
|
|
|
|
|
|
|
|
|
|
|
.. opcode:: GET_ANEXT
|
|
|
|
|
|
|
|
Implements ``PUSH(get_awaitable(TOS.__anext__()))``. See ``GET_AWAITABLE``
|
|
|
|
for details about ``get_awaitable``
|
|
|
|
|
2018-02-01 07:48:33 -04:00
|
|
|
.. versionadded:: 3.5
|
|
|
|
|
2015-05-11 23:57:16 -03:00
|
|
|
|
2018-03-23 09:34:35 -03:00
|
|
|
.. opcode:: END_ASYNC_FOR
|
|
|
|
|
|
|
|
Terminates an :keyword:`async for` loop. Handles an exception raised
|
|
|
|
when awaiting a next item. If TOS is :exc:`StopAsyncIteration` pop 7
|
|
|
|
values from the stack and restore the exception state using the second
|
|
|
|
three of them. Otherwise re-raise the exception using the three values
|
|
|
|
from the stack. An exception handler block is removed from the block stack.
|
|
|
|
|
|
|
|
.. versionadded:: 3.8
|
|
|
|
|
|
|
|
|
2015-05-11 23:57:16 -03:00
|
|
|
.. opcode:: BEFORE_ASYNC_WITH
|
|
|
|
|
|
|
|
Resolves ``__aenter__`` and ``__aexit__`` from the object on top of the
|
|
|
|
stack. Pushes ``__aexit__`` and result of ``__aenter__()`` to the stack.
|
|
|
|
|
2018-02-01 07:48:33 -04:00
|
|
|
.. versionadded:: 3.5
|
|
|
|
|
2015-05-11 23:57:16 -03:00
|
|
|
|
|
|
|
.. opcode:: SETUP_ASYNC_WITH
|
|
|
|
|
|
|
|
Creates a new frame object.
|
|
|
|
|
2018-02-01 07:48:33 -04:00
|
|
|
.. versionadded:: 3.5
|
|
|
|
|
2015-05-11 23:57:16 -03:00
|
|
|
|
|
|
|
|
2010-07-03 07:41:33 -03:00
|
|
|
**Miscellaneous opcodes**
|
2007-08-15 11:28:22 -03:00
|
|
|
|
2010-07-03 07:41:33 -03:00
|
|
|
.. opcode:: PRINT_EXPR
|
2007-08-15 11:28:22 -03:00
|
|
|
|
|
|
|
Implements the expression statement for the interactive mode. TOS is removed
|
2015-03-02 10:31:40 -04:00
|
|
|
from the stack and printed. In non-interactive mode, an expression statement
|
|
|
|
is terminated with :opcode:`POP_TOP`.
|
2007-08-15 11:28:22 -03:00
|
|
|
|
|
|
|
|
2008-12-18 07:06:25 -04:00
|
|
|
.. opcode:: SET_ADD (i)
|
2007-08-15 11:28:22 -03:00
|
|
|
|
2008-12-18 07:06:25 -04:00
|
|
|
Calls ``set.add(TOS1[-i], TOS)``. Used to implement set comprehensions.
|
2007-08-15 11:28:22 -03:00
|
|
|
|
|
|
|
|
2008-12-18 07:06:25 -04:00
|
|
|
.. opcode:: LIST_APPEND (i)
|
2007-08-15 11:28:22 -03:00
|
|
|
|
2020-07-28 13:51:33 -03:00
|
|
|
Calls ``list.append(TOS1[-i], TOS)``. Used to implement list comprehensions.
|
2008-12-18 07:06:25 -04:00
|
|
|
|
|
|
|
|
|
|
|
.. opcode:: MAP_ADD (i)
|
|
|
|
|
2019-06-22 11:40:55 -03:00
|
|
|
Calls ``dict.__setitem__(TOS1[-i], TOS1, TOS)``. Used to implement dict
|
2008-12-18 07:06:25 -04:00
|
|
|
comprehensions.
|
|
|
|
|
2018-02-01 07:48:33 -04:00
|
|
|
.. versionadded:: 3.1
|
2019-06-22 11:40:55 -03:00
|
|
|
.. versionchanged:: 3.8
|
|
|
|
Map value is TOS and map key is TOS1. Before, those were reversed.
|
2018-02-01 07:48:33 -04:00
|
|
|
|
2014-11-11 04:02:11 -04:00
|
|
|
For all of the :opcode:`SET_ADD`, :opcode:`LIST_APPEND` and :opcode:`MAP_ADD`
|
2015-03-02 10:31:40 -04:00
|
|
|
instructions, while the added value or key/value pair is popped off, the
|
|
|
|
container object remains on the stack so that it is available for further
|
|
|
|
iterations of the loop.
|
2007-08-15 11:28:22 -03:00
|
|
|
|
|
|
|
|
2010-07-03 07:41:33 -03:00
|
|
|
.. opcode:: RETURN_VALUE
|
2007-08-15 11:28:22 -03:00
|
|
|
|
|
|
|
Returns with TOS to the caller of the function.
|
|
|
|
|
|
|
|
|
2010-07-03 07:41:33 -03:00
|
|
|
.. opcode:: YIELD_VALUE
|
2007-08-15 11:28:22 -03:00
|
|
|
|
2015-03-02 00:33:30 -04:00
|
|
|
Pops TOS and yields it from a :term:`generator`.
|
2007-08-15 11:28:22 -03:00
|
|
|
|
|
|
|
|
2012-01-13 07:43:40 -04:00
|
|
|
.. opcode:: YIELD_FROM
|
|
|
|
|
2015-03-02 00:33:30 -04:00
|
|
|
Pops TOS and delegates to it as a subiterator from a :term:`generator`.
|
2012-01-13 07:43:40 -04:00
|
|
|
|
|
|
|
.. versionadded:: 3.3
|
|
|
|
|
2018-02-01 07:48:33 -04:00
|
|
|
|
2016-09-09 00:50:03 -03:00
|
|
|
.. opcode:: SETUP_ANNOTATIONS
|
|
|
|
|
|
|
|
Checks whether ``__annotations__`` is defined in ``locals()``, if not it is
|
2016-10-09 21:38:21 -03:00
|
|
|
set up to an empty ``dict``. This opcode is only emitted if a class
|
2016-09-09 00:50:03 -03:00
|
|
|
or module body contains :term:`variable annotations <variable annotation>`
|
|
|
|
statically.
|
2012-01-13 07:43:40 -04:00
|
|
|
|
2016-09-12 02:00:01 -03:00
|
|
|
.. versionadded:: 3.6
|
|
|
|
|
2018-02-01 07:48:33 -04:00
|
|
|
|
2010-07-03 07:41:33 -03:00
|
|
|
.. opcode:: IMPORT_STAR
|
2007-08-15 11:28:22 -03:00
|
|
|
|
2015-03-02 10:31:40 -04:00
|
|
|
Loads all symbols not starting with ``'_'`` directly from the module TOS to
|
|
|
|
the local namespace. The module is popped after loading all names. This
|
|
|
|
opcode implements ``from module import *``.
|
2007-08-15 11:28:22 -03:00
|
|
|
|
|
|
|
|
2010-07-03 07:41:33 -03:00
|
|
|
.. opcode:: POP_BLOCK
|
2007-08-15 11:28:22 -03:00
|
|
|
|
2015-03-02 10:31:40 -04:00
|
|
|
Removes one block from the block stack. Per frame, there is a stack of
|
2018-02-22 17:33:30 -04:00
|
|
|
blocks, denoting :keyword:`try` statements, and such.
|
2007-08-15 11:28:22 -03:00
|
|
|
|
|
|
|
|
2010-07-03 07:41:33 -03:00
|
|
|
.. opcode:: POP_EXCEPT
|
2008-06-11 12:59:43 -03:00
|
|
|
|
|
|
|
Removes one block from the block stack. The popped block must be an exception
|
2015-03-02 10:31:40 -04:00
|
|
|
handler block, as implicitly created when entering an except handler. In
|
|
|
|
addition to popping extraneous values from the frame stack, the last three
|
|
|
|
popped values are used to restore the exception state.
|
2008-06-11 12:59:43 -03:00
|
|
|
|
|
|
|
|
2019-11-21 05:11:43 -04:00
|
|
|
.. opcode:: RERAISE
|
2018-02-22 17:33:30 -04:00
|
|
|
|
2020-12-17 09:55:28 -04:00
|
|
|
Re-raises the exception currently on top of the stack. If oparg is non-zero,
|
|
|
|
restores ``f_lasti`` of the current frame to its value when the exception was raised.
|
2018-02-22 17:33:30 -04:00
|
|
|
|
2019-11-21 10:47:49 -04:00
|
|
|
.. versionadded:: 3.9
|
2018-02-22 17:33:30 -04:00
|
|
|
|
|
|
|
|
2019-11-21 05:11:43 -04:00
|
|
|
.. opcode:: WITH_EXCEPT_START
|
2018-02-22 17:33:30 -04:00
|
|
|
|
2019-11-21 05:11:43 -04:00
|
|
|
Calls the function in position 7 on the stack with the top three
|
|
|
|
items on the stack as arguments.
|
|
|
|
Used to implement the call ``context_manager.__exit__(*exc_info())`` when an exception
|
|
|
|
has occurred in a :keyword:`with` statement.
|
2018-02-22 17:33:30 -04:00
|
|
|
|
2019-11-21 10:47:49 -04:00
|
|
|
.. versionadded:: 3.9
|
2007-08-15 11:28:22 -03:00
|
|
|
|
|
|
|
|
2019-08-25 06:44:09 -03:00
|
|
|
.. opcode:: LOAD_ASSERTION_ERROR
|
|
|
|
|
|
|
|
Pushes :exc:`AssertionError` onto the stack. Used by the :keyword:`assert`
|
|
|
|
statement.
|
|
|
|
|
|
|
|
.. versionadded:: 3.9
|
|
|
|
|
|
|
|
|
2010-07-03 07:41:33 -03:00
|
|
|
.. opcode:: LOAD_BUILD_CLASS
|
2007-08-15 11:28:22 -03:00
|
|
|
|
2008-07-20 18:39:03 -03:00
|
|
|
Pushes :func:`builtins.__build_class__` onto the stack. It is later called
|
2014-11-11 04:02:11 -04:00
|
|
|
by :opcode:`CALL_FUNCTION` to construct a class.
|
2007-08-15 11:28:22 -03:00
|
|
|
|
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 13:32:05 -03:00
|
|
|
|
2009-06-28 00:18:59 -03:00
|
|
|
.. opcode:: SETUP_WITH (delta)
|
|
|
|
|
|
|
|
This opcode performs several operations before a with block starts. First,
|
|
|
|
it loads :meth:`~object.__exit__` from the context manager and pushes it onto
|
2018-02-22 17:33:30 -04:00
|
|
|
the stack for later use by :opcode:`WITH_CLEANUP_START`. Then,
|
2009-06-28 00:18:59 -03:00
|
|
|
:meth:`~object.__enter__` is called, and a finally block pointing to *delta*
|
2018-02-22 17:33:30 -04:00
|
|
|
is pushed. Finally, the result of calling the ``__enter__()`` method is pushed onto
|
2009-06-28 00:18:59 -03:00
|
|
|
the stack. The next opcode will either ignore it (:opcode:`POP_TOP`), or
|
|
|
|
store it in (a) variable(s) (:opcode:`STORE_FAST`, :opcode:`STORE_NAME`, or
|
|
|
|
:opcode:`UNPACK_SEQUENCE`).
|
|
|
|
|
2018-02-01 07:48:33 -04:00
|
|
|
.. versionadded:: 3.2
|
|
|
|
|
2009-06-28 00:18:59 -03:00
|
|
|
|
2016-05-24 03:15:14 -03:00
|
|
|
All of the following opcodes use their arguments.
|
2007-08-15 11:28:22 -03:00
|
|
|
|
|
|
|
.. opcode:: STORE_NAME (namei)
|
|
|
|
|
|
|
|
Implements ``name = TOS``. *namei* is the index of *name* in the attribute
|
2015-03-02 10:31:40 -04:00
|
|
|
:attr:`co_names` of the code object. The compiler tries to use
|
|
|
|
:opcode:`STORE_FAST` or :opcode:`STORE_GLOBAL` if possible.
|
2007-08-15 11:28:22 -03:00
|
|
|
|
|
|
|
|
|
|
|
.. opcode:: DELETE_NAME (namei)
|
|
|
|
|
|
|
|
Implements ``del name``, where *namei* is the index into :attr:`co_names`
|
|
|
|
attribute of the code object.
|
|
|
|
|
|
|
|
|
|
|
|
.. opcode:: UNPACK_SEQUENCE (count)
|
|
|
|
|
|
|
|
Unpacks TOS into *count* individual values, which are put onto the stack
|
|
|
|
right-to-left.
|
|
|
|
|
|
|
|
|
2008-07-20 18:39:03 -03:00
|
|
|
.. opcode:: UNPACK_EX (counts)
|
|
|
|
|
|
|
|
Implements assignment with a starred target: Unpacks an iterable in TOS into
|
|
|
|
individual values, where the total number of values can be smaller than the
|
2016-04-05 03:19:42 -03:00
|
|
|
number of items in the iterable: one of the new values will be a list of all
|
2008-07-20 18:39:03 -03:00
|
|
|
leftover items.
|
|
|
|
|
|
|
|
The low byte of *counts* is the number of values before the list value, the
|
|
|
|
high byte of *counts* the number of values after it. The resulting values
|
|
|
|
are put onto the stack right-to-left.
|
2009-01-03 17:18:54 -04:00
|
|
|
|
2008-07-20 18:39:03 -03:00
|
|
|
|
2007-08-15 11:28:22 -03:00
|
|
|
.. opcode:: STORE_ATTR (namei)
|
|
|
|
|
|
|
|
Implements ``TOS.name = TOS1``, where *namei* is the index of name in
|
|
|
|
:attr:`co_names`.
|
|
|
|
|
|
|
|
|
|
|
|
.. opcode:: DELETE_ATTR (namei)
|
|
|
|
|
|
|
|
Implements ``del TOS.name``, using *namei* as index into :attr:`co_names`.
|
|
|
|
|
|
|
|
|
|
|
|
.. opcode:: STORE_GLOBAL (namei)
|
|
|
|
|
2014-11-11 04:02:11 -04:00
|
|
|
Works as :opcode:`STORE_NAME`, but stores the name as a global.
|
2007-08-15 11:28:22 -03:00
|
|
|
|
|
|
|
|
|
|
|
.. opcode:: DELETE_GLOBAL (namei)
|
|
|
|
|
2014-11-11 04:02:11 -04:00
|
|
|
Works as :opcode:`DELETE_NAME`, but deletes a global name.
|
2007-08-15 11:28:22 -03:00
|
|
|
|
|
|
|
|
|
|
|
.. opcode:: LOAD_CONST (consti)
|
|
|
|
|
|
|
|
Pushes ``co_consts[consti]`` onto the stack.
|
|
|
|
|
|
|
|
|
|
|
|
.. opcode:: LOAD_NAME (namei)
|
|
|
|
|
|
|
|
Pushes the value associated with ``co_names[namei]`` onto the stack.
|
|
|
|
|
|
|
|
|
|
|
|
.. opcode:: BUILD_TUPLE (count)
|
|
|
|
|
2015-03-02 10:31:40 -04:00
|
|
|
Creates a tuple consuming *count* items from the stack, and pushes the
|
|
|
|
resulting tuple onto the stack.
|
2007-08-15 11:28:22 -03:00
|
|
|
|
|
|
|
|
|
|
|
.. opcode:: BUILD_LIST (count)
|
|
|
|
|
2014-11-11 04:02:11 -04:00
|
|
|
Works as :opcode:`BUILD_TUPLE`, but creates a list.
|
2007-08-15 11:28:22 -03:00
|
|
|
|
|
|
|
|
|
|
|
.. opcode:: BUILD_SET (count)
|
|
|
|
|
2014-11-11 04:02:11 -04:00
|
|
|
Works as :opcode:`BUILD_TUPLE`, but creates a set.
|
2007-08-15 11:28:22 -03:00
|
|
|
|
|
|
|
|
Merged revisions 59921-59932 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r59923 | raymond.hettinger | 2008-01-11 19:04:55 +0100 (Fri, 11 Jan 2008) | 1 line
Speed-up and simplify code urlparse's result objects.
........
r59924 | andrew.kuchling | 2008-01-11 20:33:24 +0100 (Fri, 11 Jan 2008) | 1 line
Bug #1790: update link; remove outdated paragraph
........
r59925 | thomas.heller | 2008-01-11 20:34:06 +0100 (Fri, 11 Jan 2008) | 5 lines
Raise an error instead of crashing with a segfault when a NULL
function pointer is called.
Will backport to release25-maint.
........
r59927 | thomas.heller | 2008-01-11 21:29:19 +0100 (Fri, 11 Jan 2008) | 4 lines
Fix a potential 'SystemError: NULL result without error'.
NULL may be a valid return value from PyLong_AsVoidPtr.
Will backport to release25-maint.
........
r59928 | raymond.hettinger | 2008-01-12 00:25:18 +0100 (Sat, 12 Jan 2008) | 1 line
Update the opcode docs for STORE_MAP and BUILD_MAP
........
r59929 | mark.dickinson | 2008-01-12 02:56:00 +0100 (Sat, 12 Jan 2008) | 4 lines
Issue 1780: Allow leading and trailing whitespace in Decimal constructor,
when constructing from a string. Disallow trailing newlines in
Context.create_decimal.
........
r59930 | georg.brandl | 2008-01-12 11:53:29 +0100 (Sat, 12 Jan 2008) | 3 lines
Move OSError docs to exceptions doc, remove obsolete descriptions
from os docs, rework posix docs.
........
r59931 | georg.brandl | 2008-01-12 14:47:57 +0100 (Sat, 12 Jan 2008) | 3 lines
Patch #1700288: Method cache optimization, by Armin Rigo, ported to
2.6 by Kevin Jacobs.
........
r59932 | georg.brandl | 2008-01-12 17:11:09 +0100 (Sat, 12 Jan 2008) | 2 lines
Fix editing glitch.
........
2008-01-12 15:39:10 -04:00
|
|
|
.. opcode:: BUILD_MAP (count)
|
2007-08-15 11:28:22 -03:00
|
|
|
|
2017-03-03 17:46:39 -04:00
|
|
|
Pushes a new dictionary object onto the stack. Pops ``2 * count`` items
|
|
|
|
so that the dictionary holds *count* entries:
|
|
|
|
``{..., TOS3: TOS2, TOS1: TOS}``.
|
|
|
|
|
|
|
|
.. versionchanged:: 3.5
|
|
|
|
The dictionary is created from stack items instead of creating an
|
|
|
|
empty dictionary pre-sized to hold *count* items.
|
2007-08-15 11:28:22 -03:00
|
|
|
|
|
|
|
|
2016-06-11 18:39:41 -03:00
|
|
|
.. opcode:: BUILD_CONST_KEY_MAP (count)
|
|
|
|
|
2020-04-12 23:55:45 -03:00
|
|
|
The version of :opcode:`BUILD_MAP` specialized for constant keys. Pops the
|
|
|
|
top element on the stack which contains a tuple of keys, then starting from
|
|
|
|
``TOS1``, pops *count* values to form values in the built dictionary.
|
2016-06-11 18:39:41 -03:00
|
|
|
|
|
|
|
.. versionadded:: 3.6
|
|
|
|
|
|
|
|
|
2016-09-06 16:07:53 -03:00
|
|
|
.. opcode:: BUILD_STRING (count)
|
|
|
|
|
|
|
|
Concatenates *count* strings from the stack and pushes the resulting string
|
|
|
|
onto the stack.
|
|
|
|
|
|
|
|
.. versionadded:: 3.6
|
|
|
|
|
|
|
|
|
2020-01-23 05:25:17 -04:00
|
|
|
.. opcode:: LIST_TO_TUPLE
|
2017-03-03 17:46:39 -04:00
|
|
|
|
2020-11-28 17:43:22 -04:00
|
|
|
Pops a list from the stack and pushes a tuple containing the same values.
|
2017-03-03 17:46:39 -04:00
|
|
|
|
2020-01-23 05:25:17 -04:00
|
|
|
.. versionadded:: 3.9
|
2017-03-10 18:16:44 -04:00
|
|
|
|
|
|
|
|
2020-01-23 05:25:17 -04:00
|
|
|
.. opcode:: LIST_EXTEND (i)
|
2017-03-03 17:46:39 -04:00
|
|
|
|
2020-01-23 05:25:17 -04:00
|
|
|
Calls ``list.extend(TOS1[-i], TOS)``. Used to build lists.
|
2017-03-03 17:46:39 -04:00
|
|
|
|
2020-01-23 05:25:17 -04:00
|
|
|
.. versionadded:: 3.9
|
2017-03-03 17:46:39 -04:00
|
|
|
|
|
|
|
|
2020-01-27 05:57:45 -04:00
|
|
|
.. opcode:: SET_UPDATE (i)
|
2017-03-03 17:46:39 -04:00
|
|
|
|
2020-01-23 05:25:17 -04:00
|
|
|
Calls ``set.update(TOS1[-i], TOS)``. Used to build sets.
|
2017-03-03 17:46:39 -04:00
|
|
|
|
2020-01-23 05:25:17 -04:00
|
|
|
.. versionadded:: 3.9
|
2017-03-03 17:46:39 -04:00
|
|
|
|
|
|
|
|
2020-01-27 05:57:45 -04:00
|
|
|
.. opcode:: DICT_UPDATE (i)
|
2017-03-03 17:46:39 -04:00
|
|
|
|
2020-01-27 05:57:45 -04:00
|
|
|
Calls ``dict.update(TOS1[-i], TOS)``. Used to build dicts.
|
2017-03-03 17:46:39 -04:00
|
|
|
|
2020-01-27 05:57:45 -04:00
|
|
|
.. versionadded:: 3.9
|
2017-03-03 17:46:39 -04:00
|
|
|
|
|
|
|
|
2020-01-27 05:57:45 -04:00
|
|
|
.. opcode:: DICT_MERGE
|
2017-03-03 17:46:39 -04:00
|
|
|
|
2020-11-28 17:43:22 -04:00
|
|
|
Like :opcode:`DICT_UPDATE` but raises an exception for duplicate keys.
|
2017-03-03 17:46:39 -04:00
|
|
|
|
2020-01-27 05:57:45 -04:00
|
|
|
.. versionadded:: 3.9
|
2017-03-03 17:46:39 -04:00
|
|
|
|
|
|
|
|
2007-08-15 11:28:22 -03:00
|
|
|
.. opcode:: LOAD_ATTR (namei)
|
|
|
|
|
|
|
|
Replaces TOS with ``getattr(TOS, co_names[namei])``.
|
|
|
|
|
|
|
|
|
|
|
|
.. opcode:: COMPARE_OP (opname)
|
|
|
|
|
|
|
|
Performs a Boolean operation. The operation name can be found in
|
|
|
|
``cmp_op[opname]``.
|
|
|
|
|
|
|
|
|
2020-01-14 06:12:45 -04:00
|
|
|
.. opcode:: IS_OP (invert)
|
|
|
|
|
2020-11-28 17:43:22 -04:00
|
|
|
Performs ``is`` comparison, or ``is not`` if ``invert`` is 1.
|
2020-01-14 06:12:45 -04:00
|
|
|
|
|
|
|
.. versionadded:: 3.9
|
|
|
|
|
|
|
|
|
|
|
|
.. opcode:: CONTAINS_OP (invert)
|
|
|
|
|
2020-11-28 17:43:22 -04:00
|
|
|
Performs ``in`` comparison, or ``not in`` if ``invert`` is 1.
|
2020-01-14 06:12:45 -04:00
|
|
|
|
|
|
|
.. versionadded:: 3.9
|
|
|
|
|
|
|
|
|
2007-08-15 11:28:22 -03:00
|
|
|
.. opcode:: IMPORT_NAME (namei)
|
|
|
|
|
Merged revisions 62386-62387,62389-62393,62396,62400-62402,62407,62409-62410,62412-62414,62418-62419 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r62386 | christian.heimes | 2008-04-19 04:23:57 +0200 (Sat, 19 Apr 2008) | 2 lines
Added kill, terminate and send_signal to subprocess.Popen
The bits and pieces for the Windows side were already in place. The POSIX side is trivial (as usual) and uses os.kill().
........
r62387 | georg.brandl | 2008-04-19 10:23:59 +0200 (Sat, 19 Apr 2008) | 2 lines
Fix-up docs for revision 62386.
........
r62389 | georg.brandl | 2008-04-19 18:57:43 +0200 (Sat, 19 Apr 2008) | 2 lines
#2369: clarify that copyfile() doesn't take a target directory.
........
r62390 | georg.brandl | 2008-04-19 18:58:28 +0200 (Sat, 19 Apr 2008) | 2 lines
#2634: clarify meaning of env parameter to spawn/exec*e.
........
r62391 | georg.brandl | 2008-04-19 18:58:49 +0200 (Sat, 19 Apr 2008) | 2 lines
#2633: clarify meaning of env parameter.
........
r62392 | georg.brandl | 2008-04-19 18:59:16 +0200 (Sat, 19 Apr 2008) | 2 lines
#2631: clarify IMPORT_NAME semantics.
........
r62393 | georg.brandl | 2008-04-19 19:00:14 +0200 (Sat, 19 Apr 2008) | 2 lines
:func: et al. should *not* include the parens.
........
r62396 | mark.dickinson | 2008-04-19 20:51:48 +0200 (Sat, 19 Apr 2008) | 5 lines
Additional tests for math.pow, and extra special-case
handling code in math.pow, in the hope of making all
tests pass on the alpha Tru64 buildbot.
........
r62400 | mark.dickinson | 2008-04-19 21:41:52 +0200 (Sat, 19 Apr 2008) | 3 lines
Additional special-case handling for math.pow.
Windows/VS2008 doesn't like (-1)**(+-inf).
........
r62401 | benjamin.peterson | 2008-04-19 21:47:34 +0200 (Sat, 19 Apr 2008) | 2 lines
Complete documentation for errors argument of io's open and TextIOWrapper
........
r62402 | mark.dickinson | 2008-04-19 22:31:16 +0200 (Sat, 19 Apr 2008) | 2 lines
Document updates to math and cmath modules.
........
r62407 | georg.brandl | 2008-04-19 23:28:38 +0200 (Sat, 19 Apr 2008) | 2 lines
Update template for newest Sphinx.
........
r62409 | mark.dickinson | 2008-04-19 23:35:35 +0200 (Sat, 19 Apr 2008) | 5 lines
Correct documentation for math.pow;
0**nan is nan, not 0. (But nan**0 and 1**nan are 1.)
Also fix minor typo: 'quite NaN' -> 'quiet NaN'
........
r62410 | mark.dickinson | 2008-04-19 23:49:22 +0200 (Sat, 19 Apr 2008) | 4 lines
Move asinh documentation to the proper place.
Remove meaningless 'in radians' from inverse
hyperbolic functions.
........
r62412 | mark.dickinson | 2008-04-20 03:22:30 +0200 (Sun, 20 Apr 2008) | 5 lines
Report additional diagnostic information in
test_math, to help track down debian-alpha
buildbot failure.
........
r62413 | mark.dickinson | 2008-04-20 03:39:24 +0200 (Sun, 20 Apr 2008) | 3 lines
FreeBSD doesn't follow C99 for modf(inf); so add explicit
special-value handling to math.modf code.
........
r62414 | mark.dickinson | 2008-04-20 06:13:13 +0200 (Sun, 20 Apr 2008) | 5 lines
Yet more explicit special case handling to make
math.pow behave on alpha Tru64. All IEEE 754
special values are now handled directly; only
the finite**finite case is handled by libm.
........
r62418 | mark.dickinson | 2008-04-20 18:13:17 +0200 (Sun, 20 Apr 2008) | 7 lines
Issue 2662: Initialize special value tables dynamically (i.e. when
cmath module is loaded) instead of statically. This fixes compile-time
problems on platforms where HUGE_VAL is an extern variable rather than
a constant.
Thanks Hirokazu Yamamoto for the patch.
........
r62419 | andrew.kuchling | 2008-04-20 18:54:02 +0200 (Sun, 20 Apr 2008) | 1 line
Move description of math module changes; various edits to description of cmath changes
........
2008-04-20 18:01:16 -03:00
|
|
|
Imports the module ``co_names[namei]``. TOS and TOS1 are popped and provide
|
|
|
|
the *fromlist* and *level* arguments of :func:`__import__`. The module
|
2015-03-02 10:31:40 -04:00
|
|
|
object is pushed onto the stack. The current namespace is not affected: for
|
|
|
|
a proper import statement, a subsequent :opcode:`STORE_FAST` instruction
|
Merged revisions 62386-62387,62389-62393,62396,62400-62402,62407,62409-62410,62412-62414,62418-62419 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r62386 | christian.heimes | 2008-04-19 04:23:57 +0200 (Sat, 19 Apr 2008) | 2 lines
Added kill, terminate and send_signal to subprocess.Popen
The bits and pieces for the Windows side were already in place. The POSIX side is trivial (as usual) and uses os.kill().
........
r62387 | georg.brandl | 2008-04-19 10:23:59 +0200 (Sat, 19 Apr 2008) | 2 lines
Fix-up docs for revision 62386.
........
r62389 | georg.brandl | 2008-04-19 18:57:43 +0200 (Sat, 19 Apr 2008) | 2 lines
#2369: clarify that copyfile() doesn't take a target directory.
........
r62390 | georg.brandl | 2008-04-19 18:58:28 +0200 (Sat, 19 Apr 2008) | 2 lines
#2634: clarify meaning of env parameter to spawn/exec*e.
........
r62391 | georg.brandl | 2008-04-19 18:58:49 +0200 (Sat, 19 Apr 2008) | 2 lines
#2633: clarify meaning of env parameter.
........
r62392 | georg.brandl | 2008-04-19 18:59:16 +0200 (Sat, 19 Apr 2008) | 2 lines
#2631: clarify IMPORT_NAME semantics.
........
r62393 | georg.brandl | 2008-04-19 19:00:14 +0200 (Sat, 19 Apr 2008) | 2 lines
:func: et al. should *not* include the parens.
........
r62396 | mark.dickinson | 2008-04-19 20:51:48 +0200 (Sat, 19 Apr 2008) | 5 lines
Additional tests for math.pow, and extra special-case
handling code in math.pow, in the hope of making all
tests pass on the alpha Tru64 buildbot.
........
r62400 | mark.dickinson | 2008-04-19 21:41:52 +0200 (Sat, 19 Apr 2008) | 3 lines
Additional special-case handling for math.pow.
Windows/VS2008 doesn't like (-1)**(+-inf).
........
r62401 | benjamin.peterson | 2008-04-19 21:47:34 +0200 (Sat, 19 Apr 2008) | 2 lines
Complete documentation for errors argument of io's open and TextIOWrapper
........
r62402 | mark.dickinson | 2008-04-19 22:31:16 +0200 (Sat, 19 Apr 2008) | 2 lines
Document updates to math and cmath modules.
........
r62407 | georg.brandl | 2008-04-19 23:28:38 +0200 (Sat, 19 Apr 2008) | 2 lines
Update template for newest Sphinx.
........
r62409 | mark.dickinson | 2008-04-19 23:35:35 +0200 (Sat, 19 Apr 2008) | 5 lines
Correct documentation for math.pow;
0**nan is nan, not 0. (But nan**0 and 1**nan are 1.)
Also fix minor typo: 'quite NaN' -> 'quiet NaN'
........
r62410 | mark.dickinson | 2008-04-19 23:49:22 +0200 (Sat, 19 Apr 2008) | 4 lines
Move asinh documentation to the proper place.
Remove meaningless 'in radians' from inverse
hyperbolic functions.
........
r62412 | mark.dickinson | 2008-04-20 03:22:30 +0200 (Sun, 20 Apr 2008) | 5 lines
Report additional diagnostic information in
test_math, to help track down debian-alpha
buildbot failure.
........
r62413 | mark.dickinson | 2008-04-20 03:39:24 +0200 (Sun, 20 Apr 2008) | 3 lines
FreeBSD doesn't follow C99 for modf(inf); so add explicit
special-value handling to math.modf code.
........
r62414 | mark.dickinson | 2008-04-20 06:13:13 +0200 (Sun, 20 Apr 2008) | 5 lines
Yet more explicit special case handling to make
math.pow behave on alpha Tru64. All IEEE 754
special values are now handled directly; only
the finite**finite case is handled by libm.
........
r62418 | mark.dickinson | 2008-04-20 18:13:17 +0200 (Sun, 20 Apr 2008) | 7 lines
Issue 2662: Initialize special value tables dynamically (i.e. when
cmath module is loaded) instead of statically. This fixes compile-time
problems on platforms where HUGE_VAL is an extern variable rather than
a constant.
Thanks Hirokazu Yamamoto for the patch.
........
r62419 | andrew.kuchling | 2008-04-20 18:54:02 +0200 (Sun, 20 Apr 2008) | 1 line
Move description of math module changes; various edits to description of cmath changes
........
2008-04-20 18:01:16 -03:00
|
|
|
modifies the namespace.
|
2007-08-15 11:28:22 -03:00
|
|
|
|
|
|
|
|
|
|
|
.. opcode:: IMPORT_FROM (namei)
|
|
|
|
|
|
|
|
Loads the attribute ``co_names[namei]`` from the module found in TOS. The
|
|
|
|
resulting object is pushed onto the stack, to be subsequently stored by a
|
2014-11-11 04:02:11 -04:00
|
|
|
:opcode:`STORE_FAST` instruction.
|
2007-08-15 11:28:22 -03:00
|
|
|
|
|
|
|
|
|
|
|
.. opcode:: JUMP_FORWARD (delta)
|
|
|
|
|
#1370: Finish the merge r58749, log below, by resolving all conflicts in Doc/.
Merged revisions 58221-58741 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r58221 | georg.brandl | 2007-09-20 10:57:59 -0700 (Thu, 20 Sep 2007) | 2 lines
Patch #1181: add os.environ.clear() method.
........
r58225 | sean.reifschneider | 2007-09-20 23:33:28 -0700 (Thu, 20 Sep 2007) | 3 lines
Issue1704287: "make install" fails unless you do "make" first. Make
oldsharedmods and sharedmods in "libinstall".
........
r58232 | guido.van.rossum | 2007-09-22 13:18:03 -0700 (Sat, 22 Sep 2007) | 4 lines
Patch # 188 by Philip Jenvey.
Make tell() mark CRLF as a newline.
With unit test.
........
r58242 | georg.brandl | 2007-09-24 10:55:47 -0700 (Mon, 24 Sep 2007) | 2 lines
Fix typo and double word.
........
r58245 | georg.brandl | 2007-09-24 10:59:28 -0700 (Mon, 24 Sep 2007) | 2 lines
#1196: document default radix for int().
........
r58247 | georg.brandl | 2007-09-24 11:08:24 -0700 (Mon, 24 Sep 2007) | 2 lines
#1177: accept 2xx responses for https too, not only http.
........
r58249 | andrew.kuchling | 2007-09-24 16:45:51 -0700 (Mon, 24 Sep 2007) | 1 line
Remove stray odd character; grammar fix
........
r58250 | andrew.kuchling | 2007-09-24 16:46:28 -0700 (Mon, 24 Sep 2007) | 1 line
Typo fix
........
r58251 | andrew.kuchling | 2007-09-24 17:09:42 -0700 (Mon, 24 Sep 2007) | 1 line
Add various items
........
r58268 | vinay.sajip | 2007-09-26 22:34:45 -0700 (Wed, 26 Sep 2007) | 1 line
Change to flush and close logic to fix #1760556.
........
r58269 | vinay.sajip | 2007-09-26 22:38:51 -0700 (Wed, 26 Sep 2007) | 1 line
Change to basicConfig() to fix #1021.
........
r58270 | georg.brandl | 2007-09-26 23:26:58 -0700 (Wed, 26 Sep 2007) | 2 lines
#1208: document match object's boolean value.
........
r58271 | vinay.sajip | 2007-09-26 23:56:13 -0700 (Wed, 26 Sep 2007) | 1 line
Minor date change.
........
r58272 | vinay.sajip | 2007-09-27 00:35:10 -0700 (Thu, 27 Sep 2007) | 1 line
Change to LogRecord.__init__() to fix #1206. Note that archaic use of type(x) == types.DictType is because of keeping 1.5.2 compatibility. While this is much less relevant these days, there probably needs to be a separate commit for removing all archaic constructs at the same time.
........
r58288 | brett.cannon | 2007-09-30 12:45:10 -0700 (Sun, 30 Sep 2007) | 9 lines
tuple.__repr__ did not consider a reference loop as it is not possible from
Python code; but it is possible from C. object.__str__ had the issue of not
expecting a type to doing something within it's tp_str implementation that
could trigger an infinite recursion, but it could in C code.. Both found
thanks to BaseException and how it handles its repr.
Closes issue #1686386. Thanks to Thomas Herve for taking an initial stab at
coming up with a solution.
........
r58289 | brett.cannon | 2007-09-30 13:37:19 -0700 (Sun, 30 Sep 2007) | 3 lines
Fix error introduced by r58288; if a tuple is length 0 return its repr and
don't worry about any self-referring tuples.
........
r58294 | facundo.batista | 2007-10-02 10:01:24 -0700 (Tue, 02 Oct 2007) | 11 lines
Made the various is_* operations return booleans. This was discussed
with Cawlishaw by mail, and he basically confirmed that to these is_*
operations, there's no need to return Decimal(0) and Decimal(1) if
the language supports the False and True booleans.
Also added a few tests for the these functions in extra.decTest, since
they are mostly untested (apart from the doctests).
Thanks Mark Dickinson
........
r58295 | facundo.batista | 2007-10-02 11:21:18 -0700 (Tue, 02 Oct 2007) | 4 lines
Added a class to store the digits of log(10), so that they can be made
available when necessary without recomputing. Thanks Mark Dickinson
........
r58299 | mark.summerfield | 2007-10-03 01:53:21 -0700 (Wed, 03 Oct 2007) | 4 lines
Added note in footnote about string comparisons about
unicodedata.normalize().
........
r58304 | raymond.hettinger | 2007-10-03 14:18:11 -0700 (Wed, 03 Oct 2007) | 1 line
enumerate() is no longer bounded to using sequences shorter than LONG_MAX. The possibility of overflow was sending some newsgroup posters into a tizzy.
........
r58305 | raymond.hettinger | 2007-10-03 17:20:27 -0700 (Wed, 03 Oct 2007) | 1 line
itertools.count() no longer limited to sys.maxint.
........
r58306 | kurt.kaiser | 2007-10-03 18:49:54 -0700 (Wed, 03 Oct 2007) | 3 lines
Assume that the user knows when he wants to end the line; don't insert
something he didn't select or complete.
........
r58307 | kurt.kaiser | 2007-10-03 19:07:50 -0700 (Wed, 03 Oct 2007) | 2 lines
Remove unused theme that was causing a fault in p3k.
........
r58308 | kurt.kaiser | 2007-10-03 19:09:17 -0700 (Wed, 03 Oct 2007) | 2 lines
Clean up EditorWindow close.
........
r58309 | kurt.kaiser | 2007-10-03 19:53:07 -0700 (Wed, 03 Oct 2007) | 7 lines
textView cleanup. Patch 1718043 Tal Einat.
M idlelib/EditorWindow.py
M idlelib/aboutDialog.py
M idlelib/textView.py
M idlelib/NEWS.txt
........
r58310 | kurt.kaiser | 2007-10-03 20:11:12 -0700 (Wed, 03 Oct 2007) | 3 lines
configDialog cleanup. Patch 1730217 Tal Einat.
........
r58311 | neal.norwitz | 2007-10-03 23:00:48 -0700 (Wed, 03 Oct 2007) | 4 lines
Coverity #151: Remove deadcode.
All this code already exists above starting at line 653.
........
r58325 | fred.drake | 2007-10-04 19:46:12 -0700 (Thu, 04 Oct 2007) | 1 line
wrap lines to <80 characters before fixing errors
........
r58326 | raymond.hettinger | 2007-10-04 19:47:07 -0700 (Thu, 04 Oct 2007) | 6 lines
Add __asdict__() to NamedTuple and refine the docs.
Add maxlen support to deque() and fixup docs.
Partially fix __reduce__(). The None as a third arg was no longer supported.
Still needs work on __reduce__() to handle recursive inputs.
........
r58327 | fred.drake | 2007-10-04 19:48:32 -0700 (Thu, 04 Oct 2007) | 3 lines
move descriptions of ac_(in|out)_buffer_size to the right place
http://bugs.python.org/issue1053
........
r58329 | neal.norwitz | 2007-10-04 20:39:17 -0700 (Thu, 04 Oct 2007) | 3 lines
dict could be NULL, so we need to XDECREF.
Fix a compiler warning about passing a PyTypeObject* instead of PyObject*.
........
r58330 | neal.norwitz | 2007-10-04 20:41:19 -0700 (Thu, 04 Oct 2007) | 2 lines
Fix Coverity #158: Check the correct variable.
........
r58332 | neal.norwitz | 2007-10-04 22:01:38 -0700 (Thu, 04 Oct 2007) | 7 lines
Fix Coverity #159.
This code was broken if save() returned a negative number since i contained
a boolean value and then we compared i < 0 which should never be true.
Will backport (assuming it's necessary)
........
r58334 | neal.norwitz | 2007-10-04 22:29:17 -0700 (Thu, 04 Oct 2007) | 1 line
Add a note about fixing some more warnings found by Coverity.
........
r58338 | raymond.hettinger | 2007-10-05 12:07:31 -0700 (Fri, 05 Oct 2007) | 1 line
Restore BEGIN/END THREADS macros which were squashed in the previous checkin
........
r58343 | gregory.p.smith | 2007-10-06 00:48:10 -0700 (Sat, 06 Oct 2007) | 3 lines
Stab in the dark attempt to fix the test_bsddb3 failure on sparc and S-390
ubuntu buildbots.
........
r58344 | gregory.p.smith | 2007-10-06 00:51:59 -0700 (Sat, 06 Oct 2007) | 2 lines
Allows BerkeleyDB 4.6.x >= 4.6.21 for the bsddb module.
........
r58348 | gregory.p.smith | 2007-10-06 08:47:37 -0700 (Sat, 06 Oct 2007) | 3 lines
Use the host the author likely meant in the first place. pop.gmail.com is
reliable. gmail.org is someones personal domain.
........
r58351 | neal.norwitz | 2007-10-06 12:16:28 -0700 (Sat, 06 Oct 2007) | 3 lines
Ensure that this test will pass even if another test left an unwritable TESTFN.
Also use the safe unlink in test_support instead of rolling our own here.
........
r58368 | georg.brandl | 2007-10-08 00:50:24 -0700 (Mon, 08 Oct 2007) | 3 lines
#1123: fix the docs for the str.split(None, sep) case.
Also expand a few other methods' docs, which had more info in the deprecated string module docs.
........
r58369 | georg.brandl | 2007-10-08 01:06:05 -0700 (Mon, 08 Oct 2007) | 2 lines
Update docstring of sched, also remove an unused assignment.
........
r58370 | raymond.hettinger | 2007-10-08 02:14:28 -0700 (Mon, 08 Oct 2007) | 5 lines
Add comments to NamedTuple code.
Let the field spec be either a string or a non-string sequence (suggested by Martin Blais with use cases).
Improve the error message in the case of a SyntaxError (caused by a duplicate field name).
........
r58371 | raymond.hettinger | 2007-10-08 02:56:29 -0700 (Mon, 08 Oct 2007) | 1 line
Missed a line in the docs
........
r58372 | raymond.hettinger | 2007-10-08 03:11:51 -0700 (Mon, 08 Oct 2007) | 1 line
Better variable names
........
r58376 | georg.brandl | 2007-10-08 07:12:47 -0700 (Mon, 08 Oct 2007) | 3 lines
#1199: docs for tp_as_{number,sequence,mapping}, by Amaury Forgeot d'Arc.
No need to merge this to py3k!
........
r58380 | raymond.hettinger | 2007-10-08 14:26:58 -0700 (Mon, 08 Oct 2007) | 1 line
Eliminate camelcase function name
........
r58381 | andrew.kuchling | 2007-10-08 16:23:03 -0700 (Mon, 08 Oct 2007) | 1 line
Eliminate camelcase function name
........
r58382 | raymond.hettinger | 2007-10-08 18:36:23 -0700 (Mon, 08 Oct 2007) | 1 line
Make the error messages more specific
........
r58384 | gregory.p.smith | 2007-10-08 23:02:21 -0700 (Mon, 08 Oct 2007) | 10 lines
Splits Modules/_bsddb.c up into bsddb.h and _bsddb.c and adds a C API
object available as bsddb.db.api. This is based on the patch submitted
by Duncan Grisby here:
http://sourceforge.net/tracker/index.php?func=detail&aid=1551895&group_id=13900&atid=313900
See this thread for additional info:
http://sourceforge.net/mailarchive/forum.php?thread_name=E1GAVDK-0002rk-Iw%40apasphere.com&forum_name=pybsddb-users
It also cleans up the code a little by removing some ifdef/endifs for
python prior to 2.1 and for unsupported Berkeley DB <= 3.2.
........
r58385 | gregory.p.smith | 2007-10-08 23:50:43 -0700 (Mon, 08 Oct 2007) | 5 lines
Fix a double free when positioning a database cursor to a non-existant
string key (and probably a few other situations with string keys).
This was reported with a patch as pybsddb sourceforge bug 1708868 by
jjjhhhlll at gmail.
........
r58386 | gregory.p.smith | 2007-10-09 00:19:11 -0700 (Tue, 09 Oct 2007) | 3 lines
Use the highest cPickle protocol in bsddb.dbshelve. This comes from
sourceforge pybsddb patch 1551443 by w_barnes.
........
r58394 | gregory.p.smith | 2007-10-09 11:26:02 -0700 (Tue, 09 Oct 2007) | 2 lines
remove another sleepycat reference
........
r58396 | kurt.kaiser | 2007-10-09 12:31:30 -0700 (Tue, 09 Oct 2007) | 3 lines
Allow interrupt only when executing user code in subprocess
Patch 1225 Tal Einat modified from IDLE-Spoon.
........
r58399 | brett.cannon | 2007-10-09 17:07:50 -0700 (Tue, 09 Oct 2007) | 5 lines
Remove file-level typedefs that were inconsistently used throughout the file.
Just move over to the public API names.
Closes issue1238.
........
r58401 | raymond.hettinger | 2007-10-09 17:26:46 -0700 (Tue, 09 Oct 2007) | 1 line
Accept Jim Jewett's api suggestion to use None instead of -1 to indicate unbounded deques.
........
r58403 | kurt.kaiser | 2007-10-09 17:55:40 -0700 (Tue, 09 Oct 2007) | 2 lines
Allow cursor color change w/o restart. Patch 1725576 Tal Einat.
........
r58404 | kurt.kaiser | 2007-10-09 18:06:47 -0700 (Tue, 09 Oct 2007) | 2 lines
show paste if > 80 columns. Patch 1659326 Tal Einat.
........
r58415 | thomas.heller | 2007-10-11 12:51:32 -0700 (Thu, 11 Oct 2007) | 5 lines
On OS X, use os.uname() instead of gestalt.sysv(...) to get the
operating system version. This allows to use ctypes when Python
was configured with --disable-toolbox-glue.
........
r58419 | neal.norwitz | 2007-10-11 20:01:01 -0700 (Thu, 11 Oct 2007) | 1 line
Get rid of warning about not being able to create an existing directory.
........
r58420 | neal.norwitz | 2007-10-11 20:01:30 -0700 (Thu, 11 Oct 2007) | 1 line
Get rid of warnings on a bunch of platforms by using a proper prototype.
........
r58421 | neal.norwitz | 2007-10-11 20:01:54 -0700 (Thu, 11 Oct 2007) | 4 lines
Get rid of compiler warning about retval being used (returned) without
being initialized. (gcc warning and Coverity 202)
........
r58422 | neal.norwitz | 2007-10-11 20:03:23 -0700 (Thu, 11 Oct 2007) | 1 line
Fix Coverity 168: Close the file before returning (exiting).
........
r58423 | neal.norwitz | 2007-10-11 20:04:18 -0700 (Thu, 11 Oct 2007) | 4 lines
Fix Coverity 180: Don't overallocate. We don't need structs, but pointers.
Also fix a memory leak.
........
r58424 | neal.norwitz | 2007-10-11 20:05:19 -0700 (Thu, 11 Oct 2007) | 5 lines
Fix Coverity 185-186: If the passed in FILE is NULL, uninitialized memory
would be accessed.
Will backport.
........
r58425 | neal.norwitz | 2007-10-11 20:52:34 -0700 (Thu, 11 Oct 2007) | 1 line
Get this module to compile with bsddb versions prior to 4.3
........
r58430 | martin.v.loewis | 2007-10-12 01:56:52 -0700 (Fri, 12 Oct 2007) | 3 lines
Bug #1216: Restore support for Visual Studio 2002.
Will backport to 2.5.
........
r58433 | raymond.hettinger | 2007-10-12 10:53:11 -0700 (Fri, 12 Oct 2007) | 1 line
Fix test of count.__repr__() to ignore the 'L' if the count is a long
........
r58434 | gregory.p.smith | 2007-10-12 11:44:06 -0700 (Fri, 12 Oct 2007) | 4 lines
Fixes http://bugs.python.org/issue1233 - bsddb.dbshelve.DBShelf.append
was useless due to inverted logic. Also adds a test case for RECNO dbs
to test_dbshelve.
........
r58445 | georg.brandl | 2007-10-13 06:20:03 -0700 (Sat, 13 Oct 2007) | 2 lines
Fix email example.
........
r58450 | gregory.p.smith | 2007-10-13 16:02:05 -0700 (Sat, 13 Oct 2007) | 2 lines
Fix an uncollectable reference leak in bsddb.db.DBShelf.append
........
r58453 | neal.norwitz | 2007-10-13 17:18:40 -0700 (Sat, 13 Oct 2007) | 8 lines
Let the O/S supply a port if none of the default ports can be used.
This should make the tests more robust at the expense of allowing
tests to be sloppier by not requiring them to cleanup after themselves.
(It will legitamitely help when running two test suites simultaneously
or if another process is already using one of the predefined ports.)
Also simplifies (slightLy) the exception handling elsewhere.
........
r58459 | neal.norwitz | 2007-10-14 11:30:21 -0700 (Sun, 14 Oct 2007) | 2 lines
Don't raise a string exception, they don't work anymore.
........
r58460 | neal.norwitz | 2007-10-14 11:40:37 -0700 (Sun, 14 Oct 2007) | 1 line
Use unittest for assertions
........
r58468 | armin.rigo | 2007-10-15 00:48:35 -0700 (Mon, 15 Oct 2007) | 2 lines
test_bigbits was not testing what it seemed to.
........
r58471 | guido.van.rossum | 2007-10-15 08:54:11 -0700 (Mon, 15 Oct 2007) | 3 lines
Change a PyErr_Print() into a PyErr_Clear(),
per discussion in issue 1031213.
........
r58500 | raymond.hettinger | 2007-10-16 12:18:30 -0700 (Tue, 16 Oct 2007) | 1 line
Improve error messages
........
r58506 | raymond.hettinger | 2007-10-16 14:28:32 -0700 (Tue, 16 Oct 2007) | 1 line
More docs, error messages, and tests
........
r58507 | andrew.kuchling | 2007-10-16 15:58:03 -0700 (Tue, 16 Oct 2007) | 1 line
Add items
........
r58508 | brett.cannon | 2007-10-16 16:24:06 -0700 (Tue, 16 Oct 2007) | 3 lines
Remove ``:const:`` notation on None in parameter list. Since the markup is not
rendered for parameters it just showed up as ``:const:`None` `` in the output.
........
r58509 | brett.cannon | 2007-10-16 16:26:45 -0700 (Tue, 16 Oct 2007) | 3 lines
Re-order some functions whose parameters differ between PyObject and const char
* so that they are next to each other.
........
r58522 | armin.rigo | 2007-10-17 11:46:37 -0700 (Wed, 17 Oct 2007) | 5 lines
Fix the overflow checking of list_repeat.
Introduce overflow checking into list_inplace_repeat.
Backport candidate, possibly.
........
r58530 | facundo.batista | 2007-10-17 20:16:03 -0700 (Wed, 17 Oct 2007) | 7 lines
Issue #1580738. When HTTPConnection reads the whole stream with read(),
it closes itself. When the stream is read in several calls to read(n),
it should behave in the same way if HTTPConnection knows where the end
of the stream is (through self.length). Added a test case for this
behaviour.
........
r58531 | facundo.batista | 2007-10-17 20:44:48 -0700 (Wed, 17 Oct 2007) | 3 lines
Issue 1289, just a typo.
........
r58532 | gregory.p.smith | 2007-10-18 00:56:54 -0700 (Thu, 18 Oct 2007) | 4 lines
cleanup test_dbtables to use mkdtemp. cleanup dbtables to pass txn as a
keyword argument whenever possible to avoid bugs and confusion. (dbtables.py
line 447 self.db.get using txn as a non-keyword was an actual bug due to this)
........
r58533 | gregory.p.smith | 2007-10-18 01:34:20 -0700 (Thu, 18 Oct 2007) | 4 lines
Fix a weird bug in dbtables: if it chose a random rowid string that contained
NULL bytes it would cause the database all sorts of problems in the future
leading to very strange random failures and corrupt dbtables.bsdTableDb dbs.
........
r58534 | gregory.p.smith | 2007-10-18 09:32:02 -0700 (Thu, 18 Oct 2007) | 3 lines
A cleaner fix than the one committed last night. Generate random rowids that
do not contain null bytes.
........
r58537 | gregory.p.smith | 2007-10-18 10:17:57 -0700 (Thu, 18 Oct 2007) | 2 lines
mention bsddb fixes.
........
r58538 | raymond.hettinger | 2007-10-18 14:13:06 -0700 (Thu, 18 Oct 2007) | 1 line
Remove useless warning
........
r58539 | gregory.p.smith | 2007-10-19 00:31:20 -0700 (Fri, 19 Oct 2007) | 2 lines
squelch the warning that this test is supposed to trigger.
........
r58542 | georg.brandl | 2007-10-19 05:32:39 -0700 (Fri, 19 Oct 2007) | 2 lines
Clarify wording for apply().
........
r58544 | mark.summerfield | 2007-10-19 05:48:17 -0700 (Fri, 19 Oct 2007) | 3 lines
Added a cross-ref to each other.
........
r58545 | georg.brandl | 2007-10-19 10:38:49 -0700 (Fri, 19 Oct 2007) | 2 lines
#1284: "S" means "seen", not unread.
........
r58548 | thomas.heller | 2007-10-19 11:11:41 -0700 (Fri, 19 Oct 2007) | 4 lines
Fix ctypes on 32-bit systems when Python is configured --with-system-ffi.
See also https://bugs.launchpad.net/bugs/72505.
Ported from release25-maint branch.
........
r58550 | facundo.batista | 2007-10-19 12:25:57 -0700 (Fri, 19 Oct 2007) | 8 lines
The constructor from tuple was way too permissive: it allowed bad
coefficient numbers, floats in the sign, and other details that
generated directly the wrong number in the best case, or triggered
misfunctionality in the alorithms.
Test cases added for these issues. Thanks Mark Dickinson.
........
r58559 | georg.brandl | 2007-10-20 06:22:53 -0700 (Sat, 20 Oct 2007) | 2 lines
Fix code being interpreted as a target.
........
r58561 | georg.brandl | 2007-10-20 06:36:24 -0700 (Sat, 20 Oct 2007) | 2 lines
Document new "cmdoption" directive.
........
r58562 | georg.brandl | 2007-10-20 08:21:22 -0700 (Sat, 20 Oct 2007) | 2 lines
Make a path more Unix-standardy.
........
r58564 | georg.brandl | 2007-10-20 10:51:39 -0700 (Sat, 20 Oct 2007) | 2 lines
Document new directive "envvar".
........
r58567 | georg.brandl | 2007-10-20 11:08:14 -0700 (Sat, 20 Oct 2007) | 6 lines
* Add new toplevel chapter, "Using Python." (how to install,
configure and setup python on different platforms -- at least
in theory.)
* Move the Python on Mac docs in that chapter.
* Add a new chapter about the command line invocation, by stargaming.
........
r58568 | georg.brandl | 2007-10-20 11:33:20 -0700 (Sat, 20 Oct 2007) | 2 lines
Change title, for now.
........
r58569 | georg.brandl | 2007-10-20 11:39:25 -0700 (Sat, 20 Oct 2007) | 2 lines
Add entry to ACKS.
........
r58570 | georg.brandl | 2007-10-20 12:05:45 -0700 (Sat, 20 Oct 2007) | 2 lines
Clarify -E docs.
........
r58571 | georg.brandl | 2007-10-20 12:08:36 -0700 (Sat, 20 Oct 2007) | 2 lines
Even more clarification.
........
r58572 | andrew.kuchling | 2007-10-20 12:25:37 -0700 (Sat, 20 Oct 2007) | 1 line
Fix protocol name
........
r58573 | andrew.kuchling | 2007-10-20 12:35:18 -0700 (Sat, 20 Oct 2007) | 1 line
Various items
........
r58574 | andrew.kuchling | 2007-10-20 12:39:35 -0700 (Sat, 20 Oct 2007) | 1 line
Use correct header line
........
r58576 | armin.rigo | 2007-10-21 02:14:15 -0700 (Sun, 21 Oct 2007) | 3 lines
Add a crasher for the long-standing issue with closing a file
while another thread uses it.
........
r58577 | georg.brandl | 2007-10-21 03:01:56 -0700 (Sun, 21 Oct 2007) | 2 lines
Remove duplicate crasher.
........
r58578 | georg.brandl | 2007-10-21 03:24:20 -0700 (Sun, 21 Oct 2007) | 2 lines
Unify "byte code" to "bytecode". Also sprinkle :term: markup for it.
........
r58579 | georg.brandl | 2007-10-21 03:32:54 -0700 (Sun, 21 Oct 2007) | 2 lines
Add markup to new function descriptions.
........
r58580 | georg.brandl | 2007-10-21 03:45:46 -0700 (Sun, 21 Oct 2007) | 2 lines
Add :term:s for descriptors.
........
r58581 | georg.brandl | 2007-10-21 03:46:24 -0700 (Sun, 21 Oct 2007) | 2 lines
Unify "file-descriptor" to "file descriptor".
........
r58582 | georg.brandl | 2007-10-21 03:52:38 -0700 (Sun, 21 Oct 2007) | 2 lines
Add :term: for generators.
........
r58583 | georg.brandl | 2007-10-21 05:10:28 -0700 (Sun, 21 Oct 2007) | 2 lines
Add :term:s for iterator.
........
r58584 | georg.brandl | 2007-10-21 05:15:05 -0700 (Sun, 21 Oct 2007) | 2 lines
Add :term:s for "new-style class".
........
r58588 | neal.norwitz | 2007-10-21 21:47:54 -0700 (Sun, 21 Oct 2007) | 1 line
Add Chris Monson so he can edit PEPs.
........
r58594 | guido.van.rossum | 2007-10-22 09:27:19 -0700 (Mon, 22 Oct 2007) | 4 lines
Issue #1307, patch by Derek Shockey.
When "MAIL" is received without args, an exception happens instead of
sending a 501 syntax error response.
........
r58598 | travis.oliphant | 2007-10-22 19:40:56 -0700 (Mon, 22 Oct 2007) | 1 line
Add phuang patch from Issue 708374 which adds offset parameter to mmap module.
........
r58601 | neal.norwitz | 2007-10-22 22:44:27 -0700 (Mon, 22 Oct 2007) | 2 lines
Bug #1313, fix typo (wrong variable name) in example.
........
r58609 | georg.brandl | 2007-10-23 11:21:35 -0700 (Tue, 23 Oct 2007) | 2 lines
Update Pygments version from externals.
........
r58618 | guido.van.rossum | 2007-10-23 12:25:41 -0700 (Tue, 23 Oct 2007) | 3 lines
Issue 1307 by Derek Shockey, fox the same bug for RCPT.
Neal: please backport!
........
r58620 | raymond.hettinger | 2007-10-23 13:37:41 -0700 (Tue, 23 Oct 2007) | 1 line
Shorter name for namedtuple()
........
r58621 | andrew.kuchling | 2007-10-23 13:55:47 -0700 (Tue, 23 Oct 2007) | 1 line
Update name
........
r58622 | raymond.hettinger | 2007-10-23 14:23:07 -0700 (Tue, 23 Oct 2007) | 1 line
Fixup news entry
........
r58623 | raymond.hettinger | 2007-10-23 18:28:33 -0700 (Tue, 23 Oct 2007) | 1 line
Optimize sum() for integer and float inputs.
........
r58624 | raymond.hettinger | 2007-10-23 19:05:51 -0700 (Tue, 23 Oct 2007) | 1 line
Fixup error return and add support for intermixed ints and floats/
........
r58628 | vinay.sajip | 2007-10-24 03:47:06 -0700 (Wed, 24 Oct 2007) | 1 line
Bug #1321: Fixed logic error in TimedRotatingFileHandler.__init__()
........
r58641 | facundo.batista | 2007-10-24 12:11:08 -0700 (Wed, 24 Oct 2007) | 4 lines
Issue 1290. CharacterData.__repr__ was constructing a string
in response that keeped having a non-ascii character.
........
r58643 | thomas.heller | 2007-10-24 12:50:45 -0700 (Wed, 24 Oct 2007) | 1 line
Added unittest for calling a function with paramflags (backport from py3k branch).
........
r58645 | matthias.klose | 2007-10-24 13:00:44 -0700 (Wed, 24 Oct 2007) | 2 lines
- Build using system ffi library on arm*-linux*.
........
r58651 | georg.brandl | 2007-10-24 14:40:38 -0700 (Wed, 24 Oct 2007) | 2 lines
Bug #1287: make os.environ.pop() work as expected.
........
r58652 | raymond.hettinger | 2007-10-24 19:26:58 -0700 (Wed, 24 Oct 2007) | 1 line
Missing DECREFs
........
r58653 | matthias.klose | 2007-10-24 23:37:24 -0700 (Wed, 24 Oct 2007) | 2 lines
- Build using system ffi library on arm*-linux*, pass --with-system-ffi to CONFIG_ARGS
........
r58655 | thomas.heller | 2007-10-25 12:47:32 -0700 (Thu, 25 Oct 2007) | 2 lines
ffi_type_longdouble may be already #defined.
See issue 1324.
........
r58656 | kurt.kaiser | 2007-10-25 15:43:45 -0700 (Thu, 25 Oct 2007) | 3 lines
Correct an ancient bug in an unused path by removing that path: register() is
now idempotent.
........
r58660 | kurt.kaiser | 2007-10-25 17:10:09 -0700 (Thu, 25 Oct 2007) | 4 lines
1. Add comments to provide top-level documentation.
2. Refactor to use more descriptive names.
3. Enhance tests in main().
........
r58675 | georg.brandl | 2007-10-26 11:30:41 -0700 (Fri, 26 Oct 2007) | 2 lines
Fix new pop() method on os.environ on ignorecase-platforms.
........
r58696 | neal.norwitz | 2007-10-27 15:32:21 -0700 (Sat, 27 Oct 2007) | 1 line
Update URL for Pygments. 0.8.1 is no longer available
........
r58697 | hyeshik.chang | 2007-10-28 04:19:02 -0700 (Sun, 28 Oct 2007) | 3 lines
- Add support for FreeBSD 8 which is recently forked from FreeBSD 7.
- Regenerate IN module for most recent maintenance tree of FreeBSD 6 and 7.
........
r58698 | hyeshik.chang | 2007-10-28 05:38:09 -0700 (Sun, 28 Oct 2007) | 2 lines
Enable platform-specific tweaks for FreeBSD 8 (exactly same to FreeBSD 7's yet)
........
r58700 | kurt.kaiser | 2007-10-28 12:03:59 -0700 (Sun, 28 Oct 2007) | 2 lines
Add confirmation dialog before printing. Patch 1717170 Tal Einat.
........
r58706 | guido.van.rossum | 2007-10-29 13:52:45 -0700 (Mon, 29 Oct 2007) | 3 lines
Patch 1353 by Jacob Winther.
Add mp4 mapping to mimetypes.py.
........
r58709 | guido.van.rossum | 2007-10-29 15:15:05 -0700 (Mon, 29 Oct 2007) | 6 lines
Backport fixes for the code that decodes octal escapes (and for PyString
also hex escapes) -- this was reaching beyond the end of the input string
buffer, even though it is not supposed to be \0-terminated.
This has no visible effect but is clearly the correct thing to do.
(In 3.0 it had a visible effect after removing ob_sstate from PyString.)
........
r58710 | kurt.kaiser | 2007-10-29 19:38:54 -0700 (Mon, 29 Oct 2007) | 7 lines
check in Tal Einat's update to tabpage.py
Patch 1612746
M configDialog.py
M NEWS.txt
AM tabbedpages.py
........
r58715 | georg.brandl | 2007-10-30 10:51:18 -0700 (Tue, 30 Oct 2007) | 2 lines
Use correct markup.
........
r58716 | georg.brandl | 2007-10-30 10:57:12 -0700 (Tue, 30 Oct 2007) | 2 lines
Make example about hiding None return values at the prompt clearer.
........
r58728 | neal.norwitz | 2007-10-30 23:33:20 -0700 (Tue, 30 Oct 2007) | 1 line
Fix some compiler warnings for signed comparisons on Unix and Windows.
........
r58731 | martin.v.loewis | 2007-10-31 10:19:33 -0700 (Wed, 31 Oct 2007) | 2 lines
Adding Christian Heimes.
........
r58737 | raymond.hettinger | 2007-10-31 14:57:58 -0700 (Wed, 31 Oct 2007) | 1 line
Clarify the reasons why pickle is almost always better than marshal
........
r58739 | raymond.hettinger | 2007-10-31 15:15:49 -0700 (Wed, 31 Oct 2007) | 1 line
Sets are marshalable.
........
2007-11-01 17:32:30 -03:00
|
|
|
Increments bytecode counter by *delta*.
|
2007-08-15 11:28:22 -03:00
|
|
|
|
|
|
|
|
2009-02-24 22:25:04 -04:00
|
|
|
.. opcode:: POP_JUMP_IF_TRUE (target)
|
2007-08-15 11:28:22 -03:00
|
|
|
|
2009-02-24 22:25:04 -04:00
|
|
|
If TOS is true, sets the bytecode counter to *target*. TOS is popped.
|
2007-08-15 11:28:22 -03:00
|
|
|
|
2018-02-01 07:48:33 -04:00
|
|
|
.. versionadded:: 3.1
|
|
|
|
|
2007-08-15 11:28:22 -03:00
|
|
|
|
2009-02-24 22:25:04 -04:00
|
|
|
.. opcode:: POP_JUMP_IF_FALSE (target)
|
2007-08-15 11:28:22 -03:00
|
|
|
|
2009-02-24 22:25:04 -04:00
|
|
|
If TOS is false, sets the bytecode counter to *target*. TOS is popped.
|
|
|
|
|
2018-02-01 07:48:33 -04:00
|
|
|
.. versionadded:: 3.1
|
|
|
|
|
2020-01-14 06:12:45 -04:00
|
|
|
.. opcode:: JUMP_IF_NOT_EXC_MATCH (target)
|
|
|
|
|
2020-11-28 17:43:22 -04:00
|
|
|
Tests whether the second value on the stack is an exception matching TOS,
|
|
|
|
and jumps if it is not. Pops two values from the stack.
|
2020-01-14 06:12:45 -04:00
|
|
|
|
|
|
|
.. versionadded:: 3.9
|
|
|
|
|
2009-02-24 22:25:04 -04:00
|
|
|
|
|
|
|
.. opcode:: JUMP_IF_TRUE_OR_POP (target)
|
|
|
|
|
2015-03-02 10:31:40 -04:00
|
|
|
If TOS is true, sets the bytecode counter to *target* and leaves TOS on the
|
|
|
|
stack. Otherwise (TOS is false), TOS is popped.
|
2009-02-24 22:25:04 -04:00
|
|
|
|
2018-02-01 07:48:33 -04:00
|
|
|
.. versionadded:: 3.1
|
|
|
|
|
2009-02-24 22:25:04 -04:00
|
|
|
|
|
|
|
.. opcode:: JUMP_IF_FALSE_OR_POP (target)
|
|
|
|
|
2015-03-02 10:31:40 -04:00
|
|
|
If TOS is false, sets the bytecode counter to *target* and leaves TOS on the
|
|
|
|
stack. Otherwise (TOS is true), TOS is popped.
|
2007-08-15 11:28:22 -03:00
|
|
|
|
2018-02-01 07:48:33 -04:00
|
|
|
.. versionadded:: 3.1
|
|
|
|
|
2007-08-15 11:28:22 -03:00
|
|
|
|
|
|
|
.. opcode:: JUMP_ABSOLUTE (target)
|
|
|
|
|
#1370: Finish the merge r58749, log below, by resolving all conflicts in Doc/.
Merged revisions 58221-58741 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r58221 | georg.brandl | 2007-09-20 10:57:59 -0700 (Thu, 20 Sep 2007) | 2 lines
Patch #1181: add os.environ.clear() method.
........
r58225 | sean.reifschneider | 2007-09-20 23:33:28 -0700 (Thu, 20 Sep 2007) | 3 lines
Issue1704287: "make install" fails unless you do "make" first. Make
oldsharedmods and sharedmods in "libinstall".
........
r58232 | guido.van.rossum | 2007-09-22 13:18:03 -0700 (Sat, 22 Sep 2007) | 4 lines
Patch # 188 by Philip Jenvey.
Make tell() mark CRLF as a newline.
With unit test.
........
r58242 | georg.brandl | 2007-09-24 10:55:47 -0700 (Mon, 24 Sep 2007) | 2 lines
Fix typo and double word.
........
r58245 | georg.brandl | 2007-09-24 10:59:28 -0700 (Mon, 24 Sep 2007) | 2 lines
#1196: document default radix for int().
........
r58247 | georg.brandl | 2007-09-24 11:08:24 -0700 (Mon, 24 Sep 2007) | 2 lines
#1177: accept 2xx responses for https too, not only http.
........
r58249 | andrew.kuchling | 2007-09-24 16:45:51 -0700 (Mon, 24 Sep 2007) | 1 line
Remove stray odd character; grammar fix
........
r58250 | andrew.kuchling | 2007-09-24 16:46:28 -0700 (Mon, 24 Sep 2007) | 1 line
Typo fix
........
r58251 | andrew.kuchling | 2007-09-24 17:09:42 -0700 (Mon, 24 Sep 2007) | 1 line
Add various items
........
r58268 | vinay.sajip | 2007-09-26 22:34:45 -0700 (Wed, 26 Sep 2007) | 1 line
Change to flush and close logic to fix #1760556.
........
r58269 | vinay.sajip | 2007-09-26 22:38:51 -0700 (Wed, 26 Sep 2007) | 1 line
Change to basicConfig() to fix #1021.
........
r58270 | georg.brandl | 2007-09-26 23:26:58 -0700 (Wed, 26 Sep 2007) | 2 lines
#1208: document match object's boolean value.
........
r58271 | vinay.sajip | 2007-09-26 23:56:13 -0700 (Wed, 26 Sep 2007) | 1 line
Minor date change.
........
r58272 | vinay.sajip | 2007-09-27 00:35:10 -0700 (Thu, 27 Sep 2007) | 1 line
Change to LogRecord.__init__() to fix #1206. Note that archaic use of type(x) == types.DictType is because of keeping 1.5.2 compatibility. While this is much less relevant these days, there probably needs to be a separate commit for removing all archaic constructs at the same time.
........
r58288 | brett.cannon | 2007-09-30 12:45:10 -0700 (Sun, 30 Sep 2007) | 9 lines
tuple.__repr__ did not consider a reference loop as it is not possible from
Python code; but it is possible from C. object.__str__ had the issue of not
expecting a type to doing something within it's tp_str implementation that
could trigger an infinite recursion, but it could in C code.. Both found
thanks to BaseException and how it handles its repr.
Closes issue #1686386. Thanks to Thomas Herve for taking an initial stab at
coming up with a solution.
........
r58289 | brett.cannon | 2007-09-30 13:37:19 -0700 (Sun, 30 Sep 2007) | 3 lines
Fix error introduced by r58288; if a tuple is length 0 return its repr and
don't worry about any self-referring tuples.
........
r58294 | facundo.batista | 2007-10-02 10:01:24 -0700 (Tue, 02 Oct 2007) | 11 lines
Made the various is_* operations return booleans. This was discussed
with Cawlishaw by mail, and he basically confirmed that to these is_*
operations, there's no need to return Decimal(0) and Decimal(1) if
the language supports the False and True booleans.
Also added a few tests for the these functions in extra.decTest, since
they are mostly untested (apart from the doctests).
Thanks Mark Dickinson
........
r58295 | facundo.batista | 2007-10-02 11:21:18 -0700 (Tue, 02 Oct 2007) | 4 lines
Added a class to store the digits of log(10), so that they can be made
available when necessary without recomputing. Thanks Mark Dickinson
........
r58299 | mark.summerfield | 2007-10-03 01:53:21 -0700 (Wed, 03 Oct 2007) | 4 lines
Added note in footnote about string comparisons about
unicodedata.normalize().
........
r58304 | raymond.hettinger | 2007-10-03 14:18:11 -0700 (Wed, 03 Oct 2007) | 1 line
enumerate() is no longer bounded to using sequences shorter than LONG_MAX. The possibility of overflow was sending some newsgroup posters into a tizzy.
........
r58305 | raymond.hettinger | 2007-10-03 17:20:27 -0700 (Wed, 03 Oct 2007) | 1 line
itertools.count() no longer limited to sys.maxint.
........
r58306 | kurt.kaiser | 2007-10-03 18:49:54 -0700 (Wed, 03 Oct 2007) | 3 lines
Assume that the user knows when he wants to end the line; don't insert
something he didn't select or complete.
........
r58307 | kurt.kaiser | 2007-10-03 19:07:50 -0700 (Wed, 03 Oct 2007) | 2 lines
Remove unused theme that was causing a fault in p3k.
........
r58308 | kurt.kaiser | 2007-10-03 19:09:17 -0700 (Wed, 03 Oct 2007) | 2 lines
Clean up EditorWindow close.
........
r58309 | kurt.kaiser | 2007-10-03 19:53:07 -0700 (Wed, 03 Oct 2007) | 7 lines
textView cleanup. Patch 1718043 Tal Einat.
M idlelib/EditorWindow.py
M idlelib/aboutDialog.py
M idlelib/textView.py
M idlelib/NEWS.txt
........
r58310 | kurt.kaiser | 2007-10-03 20:11:12 -0700 (Wed, 03 Oct 2007) | 3 lines
configDialog cleanup. Patch 1730217 Tal Einat.
........
r58311 | neal.norwitz | 2007-10-03 23:00:48 -0700 (Wed, 03 Oct 2007) | 4 lines
Coverity #151: Remove deadcode.
All this code already exists above starting at line 653.
........
r58325 | fred.drake | 2007-10-04 19:46:12 -0700 (Thu, 04 Oct 2007) | 1 line
wrap lines to <80 characters before fixing errors
........
r58326 | raymond.hettinger | 2007-10-04 19:47:07 -0700 (Thu, 04 Oct 2007) | 6 lines
Add __asdict__() to NamedTuple and refine the docs.
Add maxlen support to deque() and fixup docs.
Partially fix __reduce__(). The None as a third arg was no longer supported.
Still needs work on __reduce__() to handle recursive inputs.
........
r58327 | fred.drake | 2007-10-04 19:48:32 -0700 (Thu, 04 Oct 2007) | 3 lines
move descriptions of ac_(in|out)_buffer_size to the right place
http://bugs.python.org/issue1053
........
r58329 | neal.norwitz | 2007-10-04 20:39:17 -0700 (Thu, 04 Oct 2007) | 3 lines
dict could be NULL, so we need to XDECREF.
Fix a compiler warning about passing a PyTypeObject* instead of PyObject*.
........
r58330 | neal.norwitz | 2007-10-04 20:41:19 -0700 (Thu, 04 Oct 2007) | 2 lines
Fix Coverity #158: Check the correct variable.
........
r58332 | neal.norwitz | 2007-10-04 22:01:38 -0700 (Thu, 04 Oct 2007) | 7 lines
Fix Coverity #159.
This code was broken if save() returned a negative number since i contained
a boolean value and then we compared i < 0 which should never be true.
Will backport (assuming it's necessary)
........
r58334 | neal.norwitz | 2007-10-04 22:29:17 -0700 (Thu, 04 Oct 2007) | 1 line
Add a note about fixing some more warnings found by Coverity.
........
r58338 | raymond.hettinger | 2007-10-05 12:07:31 -0700 (Fri, 05 Oct 2007) | 1 line
Restore BEGIN/END THREADS macros which were squashed in the previous checkin
........
r58343 | gregory.p.smith | 2007-10-06 00:48:10 -0700 (Sat, 06 Oct 2007) | 3 lines
Stab in the dark attempt to fix the test_bsddb3 failure on sparc and S-390
ubuntu buildbots.
........
r58344 | gregory.p.smith | 2007-10-06 00:51:59 -0700 (Sat, 06 Oct 2007) | 2 lines
Allows BerkeleyDB 4.6.x >= 4.6.21 for the bsddb module.
........
r58348 | gregory.p.smith | 2007-10-06 08:47:37 -0700 (Sat, 06 Oct 2007) | 3 lines
Use the host the author likely meant in the first place. pop.gmail.com is
reliable. gmail.org is someones personal domain.
........
r58351 | neal.norwitz | 2007-10-06 12:16:28 -0700 (Sat, 06 Oct 2007) | 3 lines
Ensure that this test will pass even if another test left an unwritable TESTFN.
Also use the safe unlink in test_support instead of rolling our own here.
........
r58368 | georg.brandl | 2007-10-08 00:50:24 -0700 (Mon, 08 Oct 2007) | 3 lines
#1123: fix the docs for the str.split(None, sep) case.
Also expand a few other methods' docs, which had more info in the deprecated string module docs.
........
r58369 | georg.brandl | 2007-10-08 01:06:05 -0700 (Mon, 08 Oct 2007) | 2 lines
Update docstring of sched, also remove an unused assignment.
........
r58370 | raymond.hettinger | 2007-10-08 02:14:28 -0700 (Mon, 08 Oct 2007) | 5 lines
Add comments to NamedTuple code.
Let the field spec be either a string or a non-string sequence (suggested by Martin Blais with use cases).
Improve the error message in the case of a SyntaxError (caused by a duplicate field name).
........
r58371 | raymond.hettinger | 2007-10-08 02:56:29 -0700 (Mon, 08 Oct 2007) | 1 line
Missed a line in the docs
........
r58372 | raymond.hettinger | 2007-10-08 03:11:51 -0700 (Mon, 08 Oct 2007) | 1 line
Better variable names
........
r58376 | georg.brandl | 2007-10-08 07:12:47 -0700 (Mon, 08 Oct 2007) | 3 lines
#1199: docs for tp_as_{number,sequence,mapping}, by Amaury Forgeot d'Arc.
No need to merge this to py3k!
........
r58380 | raymond.hettinger | 2007-10-08 14:26:58 -0700 (Mon, 08 Oct 2007) | 1 line
Eliminate camelcase function name
........
r58381 | andrew.kuchling | 2007-10-08 16:23:03 -0700 (Mon, 08 Oct 2007) | 1 line
Eliminate camelcase function name
........
r58382 | raymond.hettinger | 2007-10-08 18:36:23 -0700 (Mon, 08 Oct 2007) | 1 line
Make the error messages more specific
........
r58384 | gregory.p.smith | 2007-10-08 23:02:21 -0700 (Mon, 08 Oct 2007) | 10 lines
Splits Modules/_bsddb.c up into bsddb.h and _bsddb.c and adds a C API
object available as bsddb.db.api. This is based on the patch submitted
by Duncan Grisby here:
http://sourceforge.net/tracker/index.php?func=detail&aid=1551895&group_id=13900&atid=313900
See this thread for additional info:
http://sourceforge.net/mailarchive/forum.php?thread_name=E1GAVDK-0002rk-Iw%40apasphere.com&forum_name=pybsddb-users
It also cleans up the code a little by removing some ifdef/endifs for
python prior to 2.1 and for unsupported Berkeley DB <= 3.2.
........
r58385 | gregory.p.smith | 2007-10-08 23:50:43 -0700 (Mon, 08 Oct 2007) | 5 lines
Fix a double free when positioning a database cursor to a non-existant
string key (and probably a few other situations with string keys).
This was reported with a patch as pybsddb sourceforge bug 1708868 by
jjjhhhlll at gmail.
........
r58386 | gregory.p.smith | 2007-10-09 00:19:11 -0700 (Tue, 09 Oct 2007) | 3 lines
Use the highest cPickle protocol in bsddb.dbshelve. This comes from
sourceforge pybsddb patch 1551443 by w_barnes.
........
r58394 | gregory.p.smith | 2007-10-09 11:26:02 -0700 (Tue, 09 Oct 2007) | 2 lines
remove another sleepycat reference
........
r58396 | kurt.kaiser | 2007-10-09 12:31:30 -0700 (Tue, 09 Oct 2007) | 3 lines
Allow interrupt only when executing user code in subprocess
Patch 1225 Tal Einat modified from IDLE-Spoon.
........
r58399 | brett.cannon | 2007-10-09 17:07:50 -0700 (Tue, 09 Oct 2007) | 5 lines
Remove file-level typedefs that were inconsistently used throughout the file.
Just move over to the public API names.
Closes issue1238.
........
r58401 | raymond.hettinger | 2007-10-09 17:26:46 -0700 (Tue, 09 Oct 2007) | 1 line
Accept Jim Jewett's api suggestion to use None instead of -1 to indicate unbounded deques.
........
r58403 | kurt.kaiser | 2007-10-09 17:55:40 -0700 (Tue, 09 Oct 2007) | 2 lines
Allow cursor color change w/o restart. Patch 1725576 Tal Einat.
........
r58404 | kurt.kaiser | 2007-10-09 18:06:47 -0700 (Tue, 09 Oct 2007) | 2 lines
show paste if > 80 columns. Patch 1659326 Tal Einat.
........
r58415 | thomas.heller | 2007-10-11 12:51:32 -0700 (Thu, 11 Oct 2007) | 5 lines
On OS X, use os.uname() instead of gestalt.sysv(...) to get the
operating system version. This allows to use ctypes when Python
was configured with --disable-toolbox-glue.
........
r58419 | neal.norwitz | 2007-10-11 20:01:01 -0700 (Thu, 11 Oct 2007) | 1 line
Get rid of warning about not being able to create an existing directory.
........
r58420 | neal.norwitz | 2007-10-11 20:01:30 -0700 (Thu, 11 Oct 2007) | 1 line
Get rid of warnings on a bunch of platforms by using a proper prototype.
........
r58421 | neal.norwitz | 2007-10-11 20:01:54 -0700 (Thu, 11 Oct 2007) | 4 lines
Get rid of compiler warning about retval being used (returned) without
being initialized. (gcc warning and Coverity 202)
........
r58422 | neal.norwitz | 2007-10-11 20:03:23 -0700 (Thu, 11 Oct 2007) | 1 line
Fix Coverity 168: Close the file before returning (exiting).
........
r58423 | neal.norwitz | 2007-10-11 20:04:18 -0700 (Thu, 11 Oct 2007) | 4 lines
Fix Coverity 180: Don't overallocate. We don't need structs, but pointers.
Also fix a memory leak.
........
r58424 | neal.norwitz | 2007-10-11 20:05:19 -0700 (Thu, 11 Oct 2007) | 5 lines
Fix Coverity 185-186: If the passed in FILE is NULL, uninitialized memory
would be accessed.
Will backport.
........
r58425 | neal.norwitz | 2007-10-11 20:52:34 -0700 (Thu, 11 Oct 2007) | 1 line
Get this module to compile with bsddb versions prior to 4.3
........
r58430 | martin.v.loewis | 2007-10-12 01:56:52 -0700 (Fri, 12 Oct 2007) | 3 lines
Bug #1216: Restore support for Visual Studio 2002.
Will backport to 2.5.
........
r58433 | raymond.hettinger | 2007-10-12 10:53:11 -0700 (Fri, 12 Oct 2007) | 1 line
Fix test of count.__repr__() to ignore the 'L' if the count is a long
........
r58434 | gregory.p.smith | 2007-10-12 11:44:06 -0700 (Fri, 12 Oct 2007) | 4 lines
Fixes http://bugs.python.org/issue1233 - bsddb.dbshelve.DBShelf.append
was useless due to inverted logic. Also adds a test case for RECNO dbs
to test_dbshelve.
........
r58445 | georg.brandl | 2007-10-13 06:20:03 -0700 (Sat, 13 Oct 2007) | 2 lines
Fix email example.
........
r58450 | gregory.p.smith | 2007-10-13 16:02:05 -0700 (Sat, 13 Oct 2007) | 2 lines
Fix an uncollectable reference leak in bsddb.db.DBShelf.append
........
r58453 | neal.norwitz | 2007-10-13 17:18:40 -0700 (Sat, 13 Oct 2007) | 8 lines
Let the O/S supply a port if none of the default ports can be used.
This should make the tests more robust at the expense of allowing
tests to be sloppier by not requiring them to cleanup after themselves.
(It will legitamitely help when running two test suites simultaneously
or if another process is already using one of the predefined ports.)
Also simplifies (slightLy) the exception handling elsewhere.
........
r58459 | neal.norwitz | 2007-10-14 11:30:21 -0700 (Sun, 14 Oct 2007) | 2 lines
Don't raise a string exception, they don't work anymore.
........
r58460 | neal.norwitz | 2007-10-14 11:40:37 -0700 (Sun, 14 Oct 2007) | 1 line
Use unittest for assertions
........
r58468 | armin.rigo | 2007-10-15 00:48:35 -0700 (Mon, 15 Oct 2007) | 2 lines
test_bigbits was not testing what it seemed to.
........
r58471 | guido.van.rossum | 2007-10-15 08:54:11 -0700 (Mon, 15 Oct 2007) | 3 lines
Change a PyErr_Print() into a PyErr_Clear(),
per discussion in issue 1031213.
........
r58500 | raymond.hettinger | 2007-10-16 12:18:30 -0700 (Tue, 16 Oct 2007) | 1 line
Improve error messages
........
r58506 | raymond.hettinger | 2007-10-16 14:28:32 -0700 (Tue, 16 Oct 2007) | 1 line
More docs, error messages, and tests
........
r58507 | andrew.kuchling | 2007-10-16 15:58:03 -0700 (Tue, 16 Oct 2007) | 1 line
Add items
........
r58508 | brett.cannon | 2007-10-16 16:24:06 -0700 (Tue, 16 Oct 2007) | 3 lines
Remove ``:const:`` notation on None in parameter list. Since the markup is not
rendered for parameters it just showed up as ``:const:`None` `` in the output.
........
r58509 | brett.cannon | 2007-10-16 16:26:45 -0700 (Tue, 16 Oct 2007) | 3 lines
Re-order some functions whose parameters differ between PyObject and const char
* so that they are next to each other.
........
r58522 | armin.rigo | 2007-10-17 11:46:37 -0700 (Wed, 17 Oct 2007) | 5 lines
Fix the overflow checking of list_repeat.
Introduce overflow checking into list_inplace_repeat.
Backport candidate, possibly.
........
r58530 | facundo.batista | 2007-10-17 20:16:03 -0700 (Wed, 17 Oct 2007) | 7 lines
Issue #1580738. When HTTPConnection reads the whole stream with read(),
it closes itself. When the stream is read in several calls to read(n),
it should behave in the same way if HTTPConnection knows where the end
of the stream is (through self.length). Added a test case for this
behaviour.
........
r58531 | facundo.batista | 2007-10-17 20:44:48 -0700 (Wed, 17 Oct 2007) | 3 lines
Issue 1289, just a typo.
........
r58532 | gregory.p.smith | 2007-10-18 00:56:54 -0700 (Thu, 18 Oct 2007) | 4 lines
cleanup test_dbtables to use mkdtemp. cleanup dbtables to pass txn as a
keyword argument whenever possible to avoid bugs and confusion. (dbtables.py
line 447 self.db.get using txn as a non-keyword was an actual bug due to this)
........
r58533 | gregory.p.smith | 2007-10-18 01:34:20 -0700 (Thu, 18 Oct 2007) | 4 lines
Fix a weird bug in dbtables: if it chose a random rowid string that contained
NULL bytes it would cause the database all sorts of problems in the future
leading to very strange random failures and corrupt dbtables.bsdTableDb dbs.
........
r58534 | gregory.p.smith | 2007-10-18 09:32:02 -0700 (Thu, 18 Oct 2007) | 3 lines
A cleaner fix than the one committed last night. Generate random rowids that
do not contain null bytes.
........
r58537 | gregory.p.smith | 2007-10-18 10:17:57 -0700 (Thu, 18 Oct 2007) | 2 lines
mention bsddb fixes.
........
r58538 | raymond.hettinger | 2007-10-18 14:13:06 -0700 (Thu, 18 Oct 2007) | 1 line
Remove useless warning
........
r58539 | gregory.p.smith | 2007-10-19 00:31:20 -0700 (Fri, 19 Oct 2007) | 2 lines
squelch the warning that this test is supposed to trigger.
........
r58542 | georg.brandl | 2007-10-19 05:32:39 -0700 (Fri, 19 Oct 2007) | 2 lines
Clarify wording for apply().
........
r58544 | mark.summerfield | 2007-10-19 05:48:17 -0700 (Fri, 19 Oct 2007) | 3 lines
Added a cross-ref to each other.
........
r58545 | georg.brandl | 2007-10-19 10:38:49 -0700 (Fri, 19 Oct 2007) | 2 lines
#1284: "S" means "seen", not unread.
........
r58548 | thomas.heller | 2007-10-19 11:11:41 -0700 (Fri, 19 Oct 2007) | 4 lines
Fix ctypes on 32-bit systems when Python is configured --with-system-ffi.
See also https://bugs.launchpad.net/bugs/72505.
Ported from release25-maint branch.
........
r58550 | facundo.batista | 2007-10-19 12:25:57 -0700 (Fri, 19 Oct 2007) | 8 lines
The constructor from tuple was way too permissive: it allowed bad
coefficient numbers, floats in the sign, and other details that
generated directly the wrong number in the best case, or triggered
misfunctionality in the alorithms.
Test cases added for these issues. Thanks Mark Dickinson.
........
r58559 | georg.brandl | 2007-10-20 06:22:53 -0700 (Sat, 20 Oct 2007) | 2 lines
Fix code being interpreted as a target.
........
r58561 | georg.brandl | 2007-10-20 06:36:24 -0700 (Sat, 20 Oct 2007) | 2 lines
Document new "cmdoption" directive.
........
r58562 | georg.brandl | 2007-10-20 08:21:22 -0700 (Sat, 20 Oct 2007) | 2 lines
Make a path more Unix-standardy.
........
r58564 | georg.brandl | 2007-10-20 10:51:39 -0700 (Sat, 20 Oct 2007) | 2 lines
Document new directive "envvar".
........
r58567 | georg.brandl | 2007-10-20 11:08:14 -0700 (Sat, 20 Oct 2007) | 6 lines
* Add new toplevel chapter, "Using Python." (how to install,
configure and setup python on different platforms -- at least
in theory.)
* Move the Python on Mac docs in that chapter.
* Add a new chapter about the command line invocation, by stargaming.
........
r58568 | georg.brandl | 2007-10-20 11:33:20 -0700 (Sat, 20 Oct 2007) | 2 lines
Change title, for now.
........
r58569 | georg.brandl | 2007-10-20 11:39:25 -0700 (Sat, 20 Oct 2007) | 2 lines
Add entry to ACKS.
........
r58570 | georg.brandl | 2007-10-20 12:05:45 -0700 (Sat, 20 Oct 2007) | 2 lines
Clarify -E docs.
........
r58571 | georg.brandl | 2007-10-20 12:08:36 -0700 (Sat, 20 Oct 2007) | 2 lines
Even more clarification.
........
r58572 | andrew.kuchling | 2007-10-20 12:25:37 -0700 (Sat, 20 Oct 2007) | 1 line
Fix protocol name
........
r58573 | andrew.kuchling | 2007-10-20 12:35:18 -0700 (Sat, 20 Oct 2007) | 1 line
Various items
........
r58574 | andrew.kuchling | 2007-10-20 12:39:35 -0700 (Sat, 20 Oct 2007) | 1 line
Use correct header line
........
r58576 | armin.rigo | 2007-10-21 02:14:15 -0700 (Sun, 21 Oct 2007) | 3 lines
Add a crasher for the long-standing issue with closing a file
while another thread uses it.
........
r58577 | georg.brandl | 2007-10-21 03:01:56 -0700 (Sun, 21 Oct 2007) | 2 lines
Remove duplicate crasher.
........
r58578 | georg.brandl | 2007-10-21 03:24:20 -0700 (Sun, 21 Oct 2007) | 2 lines
Unify "byte code" to "bytecode". Also sprinkle :term: markup for it.
........
r58579 | georg.brandl | 2007-10-21 03:32:54 -0700 (Sun, 21 Oct 2007) | 2 lines
Add markup to new function descriptions.
........
r58580 | georg.brandl | 2007-10-21 03:45:46 -0700 (Sun, 21 Oct 2007) | 2 lines
Add :term:s for descriptors.
........
r58581 | georg.brandl | 2007-10-21 03:46:24 -0700 (Sun, 21 Oct 2007) | 2 lines
Unify "file-descriptor" to "file descriptor".
........
r58582 | georg.brandl | 2007-10-21 03:52:38 -0700 (Sun, 21 Oct 2007) | 2 lines
Add :term: for generators.
........
r58583 | georg.brandl | 2007-10-21 05:10:28 -0700 (Sun, 21 Oct 2007) | 2 lines
Add :term:s for iterator.
........
r58584 | georg.brandl | 2007-10-21 05:15:05 -0700 (Sun, 21 Oct 2007) | 2 lines
Add :term:s for "new-style class".
........
r58588 | neal.norwitz | 2007-10-21 21:47:54 -0700 (Sun, 21 Oct 2007) | 1 line
Add Chris Monson so he can edit PEPs.
........
r58594 | guido.van.rossum | 2007-10-22 09:27:19 -0700 (Mon, 22 Oct 2007) | 4 lines
Issue #1307, patch by Derek Shockey.
When "MAIL" is received without args, an exception happens instead of
sending a 501 syntax error response.
........
r58598 | travis.oliphant | 2007-10-22 19:40:56 -0700 (Mon, 22 Oct 2007) | 1 line
Add phuang patch from Issue 708374 which adds offset parameter to mmap module.
........
r58601 | neal.norwitz | 2007-10-22 22:44:27 -0700 (Mon, 22 Oct 2007) | 2 lines
Bug #1313, fix typo (wrong variable name) in example.
........
r58609 | georg.brandl | 2007-10-23 11:21:35 -0700 (Tue, 23 Oct 2007) | 2 lines
Update Pygments version from externals.
........
r58618 | guido.van.rossum | 2007-10-23 12:25:41 -0700 (Tue, 23 Oct 2007) | 3 lines
Issue 1307 by Derek Shockey, fox the same bug for RCPT.
Neal: please backport!
........
r58620 | raymond.hettinger | 2007-10-23 13:37:41 -0700 (Tue, 23 Oct 2007) | 1 line
Shorter name for namedtuple()
........
r58621 | andrew.kuchling | 2007-10-23 13:55:47 -0700 (Tue, 23 Oct 2007) | 1 line
Update name
........
r58622 | raymond.hettinger | 2007-10-23 14:23:07 -0700 (Tue, 23 Oct 2007) | 1 line
Fixup news entry
........
r58623 | raymond.hettinger | 2007-10-23 18:28:33 -0700 (Tue, 23 Oct 2007) | 1 line
Optimize sum() for integer and float inputs.
........
r58624 | raymond.hettinger | 2007-10-23 19:05:51 -0700 (Tue, 23 Oct 2007) | 1 line
Fixup error return and add support for intermixed ints and floats/
........
r58628 | vinay.sajip | 2007-10-24 03:47:06 -0700 (Wed, 24 Oct 2007) | 1 line
Bug #1321: Fixed logic error in TimedRotatingFileHandler.__init__()
........
r58641 | facundo.batista | 2007-10-24 12:11:08 -0700 (Wed, 24 Oct 2007) | 4 lines
Issue 1290. CharacterData.__repr__ was constructing a string
in response that keeped having a non-ascii character.
........
r58643 | thomas.heller | 2007-10-24 12:50:45 -0700 (Wed, 24 Oct 2007) | 1 line
Added unittest for calling a function with paramflags (backport from py3k branch).
........
r58645 | matthias.klose | 2007-10-24 13:00:44 -0700 (Wed, 24 Oct 2007) | 2 lines
- Build using system ffi library on arm*-linux*.
........
r58651 | georg.brandl | 2007-10-24 14:40:38 -0700 (Wed, 24 Oct 2007) | 2 lines
Bug #1287: make os.environ.pop() work as expected.
........
r58652 | raymond.hettinger | 2007-10-24 19:26:58 -0700 (Wed, 24 Oct 2007) | 1 line
Missing DECREFs
........
r58653 | matthias.klose | 2007-10-24 23:37:24 -0700 (Wed, 24 Oct 2007) | 2 lines
- Build using system ffi library on arm*-linux*, pass --with-system-ffi to CONFIG_ARGS
........
r58655 | thomas.heller | 2007-10-25 12:47:32 -0700 (Thu, 25 Oct 2007) | 2 lines
ffi_type_longdouble may be already #defined.
See issue 1324.
........
r58656 | kurt.kaiser | 2007-10-25 15:43:45 -0700 (Thu, 25 Oct 2007) | 3 lines
Correct an ancient bug in an unused path by removing that path: register() is
now idempotent.
........
r58660 | kurt.kaiser | 2007-10-25 17:10:09 -0700 (Thu, 25 Oct 2007) | 4 lines
1. Add comments to provide top-level documentation.
2. Refactor to use more descriptive names.
3. Enhance tests in main().
........
r58675 | georg.brandl | 2007-10-26 11:30:41 -0700 (Fri, 26 Oct 2007) | 2 lines
Fix new pop() method on os.environ on ignorecase-platforms.
........
r58696 | neal.norwitz | 2007-10-27 15:32:21 -0700 (Sat, 27 Oct 2007) | 1 line
Update URL for Pygments. 0.8.1 is no longer available
........
r58697 | hyeshik.chang | 2007-10-28 04:19:02 -0700 (Sun, 28 Oct 2007) | 3 lines
- Add support for FreeBSD 8 which is recently forked from FreeBSD 7.
- Regenerate IN module for most recent maintenance tree of FreeBSD 6 and 7.
........
r58698 | hyeshik.chang | 2007-10-28 05:38:09 -0700 (Sun, 28 Oct 2007) | 2 lines
Enable platform-specific tweaks for FreeBSD 8 (exactly same to FreeBSD 7's yet)
........
r58700 | kurt.kaiser | 2007-10-28 12:03:59 -0700 (Sun, 28 Oct 2007) | 2 lines
Add confirmation dialog before printing. Patch 1717170 Tal Einat.
........
r58706 | guido.van.rossum | 2007-10-29 13:52:45 -0700 (Mon, 29 Oct 2007) | 3 lines
Patch 1353 by Jacob Winther.
Add mp4 mapping to mimetypes.py.
........
r58709 | guido.van.rossum | 2007-10-29 15:15:05 -0700 (Mon, 29 Oct 2007) | 6 lines
Backport fixes for the code that decodes octal escapes (and for PyString
also hex escapes) -- this was reaching beyond the end of the input string
buffer, even though it is not supposed to be \0-terminated.
This has no visible effect but is clearly the correct thing to do.
(In 3.0 it had a visible effect after removing ob_sstate from PyString.)
........
r58710 | kurt.kaiser | 2007-10-29 19:38:54 -0700 (Mon, 29 Oct 2007) | 7 lines
check in Tal Einat's update to tabpage.py
Patch 1612746
M configDialog.py
M NEWS.txt
AM tabbedpages.py
........
r58715 | georg.brandl | 2007-10-30 10:51:18 -0700 (Tue, 30 Oct 2007) | 2 lines
Use correct markup.
........
r58716 | georg.brandl | 2007-10-30 10:57:12 -0700 (Tue, 30 Oct 2007) | 2 lines
Make example about hiding None return values at the prompt clearer.
........
r58728 | neal.norwitz | 2007-10-30 23:33:20 -0700 (Tue, 30 Oct 2007) | 1 line
Fix some compiler warnings for signed comparisons on Unix and Windows.
........
r58731 | martin.v.loewis | 2007-10-31 10:19:33 -0700 (Wed, 31 Oct 2007) | 2 lines
Adding Christian Heimes.
........
r58737 | raymond.hettinger | 2007-10-31 14:57:58 -0700 (Wed, 31 Oct 2007) | 1 line
Clarify the reasons why pickle is almost always better than marshal
........
r58739 | raymond.hettinger | 2007-10-31 15:15:49 -0700 (Wed, 31 Oct 2007) | 1 line
Sets are marshalable.
........
2007-11-01 17:32:30 -03:00
|
|
|
Set bytecode counter to *target*.
|
2007-08-15 11:28:22 -03:00
|
|
|
|
|
|
|
|
|
|
|
.. opcode:: FOR_ITER (delta)
|
|
|
|
|
2015-03-02 10:31:40 -04:00
|
|
|
TOS is an :term:`iterator`. Call its :meth:`~iterator.__next__` method. If
|
|
|
|
this yields a new value, push it on the stack (leaving the iterator below
|
2020-03-23 22:03:06 -03:00
|
|
|
it). If the iterator indicates it is exhausted, TOS is popped, and the byte
|
2015-03-02 10:31:40 -04:00
|
|
|
code counter is incremented by *delta*.
|
2007-08-15 11:28:22 -03:00
|
|
|
|
|
|
|
|
|
|
|
.. opcode:: LOAD_GLOBAL (namei)
|
|
|
|
|
|
|
|
Loads the global named ``co_names[namei]`` onto the stack.
|
|
|
|
|
|
|
|
|
2018-02-22 17:33:30 -04:00
|
|
|
.. opcode:: SETUP_FINALLY (delta)
|
2007-08-15 11:28:22 -03:00
|
|
|
|
2018-02-22 17:33:30 -04:00
|
|
|
Pushes a try block from a try-finally or try-except clause onto the block
|
|
|
|
stack. *delta* points to the finally block or the first except block.
|
2007-08-15 11:28:22 -03:00
|
|
|
|
|
|
|
|
|
|
|
.. opcode:: LOAD_FAST (var_num)
|
|
|
|
|
|
|
|
Pushes a reference to the local ``co_varnames[var_num]`` onto the stack.
|
|
|
|
|
|
|
|
|
|
|
|
.. opcode:: STORE_FAST (var_num)
|
|
|
|
|
|
|
|
Stores TOS into the local ``co_varnames[var_num]``.
|
|
|
|
|
|
|
|
|
|
|
|
.. opcode:: DELETE_FAST (var_num)
|
|
|
|
|
|
|
|
Deletes local ``co_varnames[var_num]``.
|
|
|
|
|
|
|
|
|
|
|
|
.. opcode:: LOAD_CLOSURE (i)
|
|
|
|
|
|
|
|
Pushes a reference to the cell contained in slot *i* of the cell and free
|
2015-03-02 10:31:40 -04:00
|
|
|
variable storage. The name of the variable is ``co_cellvars[i]`` if *i* is
|
|
|
|
less than the length of *co_cellvars*. Otherwise it is ``co_freevars[i -
|
2007-08-15 11:28:22 -03:00
|
|
|
len(co_cellvars)]``.
|
|
|
|
|
|
|
|
|
|
|
|
.. opcode:: LOAD_DEREF (i)
|
|
|
|
|
|
|
|
Loads the cell contained in slot *i* of the cell and free variable storage.
|
|
|
|
Pushes a reference to the object the cell contains on the stack.
|
|
|
|
|
|
|
|
|
2013-04-30 10:41:40 -03:00
|
|
|
.. opcode:: LOAD_CLASSDEREF (i)
|
|
|
|
|
|
|
|
Much like :opcode:`LOAD_DEREF` but first checks the locals dictionary before
|
|
|
|
consulting the cell. This is used for loading free variables in class
|
|
|
|
bodies.
|
|
|
|
|
2018-02-01 07:48:33 -04:00
|
|
|
.. versionadded:: 3.4
|
|
|
|
|
2013-04-30 10:41:40 -03:00
|
|
|
|
2007-08-15 11:28:22 -03:00
|
|
|
.. opcode:: STORE_DEREF (i)
|
|
|
|
|
|
|
|
Stores TOS into the cell contained in slot *i* of the cell and free variable
|
|
|
|
storage.
|
|
|
|
|
|
|
|
|
2010-09-10 18:39:53 -03:00
|
|
|
.. opcode:: DELETE_DEREF (i)
|
|
|
|
|
|
|
|
Empties the cell contained in slot *i* of the cell and free variable storage.
|
|
|
|
Used by the :keyword:`del` statement.
|
|
|
|
|
2018-02-01 07:48:33 -04:00
|
|
|
.. versionadded:: 3.2
|
|
|
|
|
2010-09-10 18:39:53 -03:00
|
|
|
|
2007-08-15 11:28:22 -03:00
|
|
|
.. opcode:: RAISE_VARARGS (argc)
|
|
|
|
|
2019-06-02 18:34:12 -03:00
|
|
|
Raises an exception using one of the 3 forms of the ``raise`` statement,
|
|
|
|
depending on the value of *argc*:
|
|
|
|
|
|
|
|
* 0: ``raise`` (re-raise previous exception)
|
|
|
|
* 1: ``raise TOS`` (raise exception instance or type at ``TOS``)
|
|
|
|
* 2: ``raise TOS1 from TOS`` (raise exception instance or type at ``TOS1``
|
|
|
|
with ``__cause__`` set to ``TOS``)
|
2007-08-15 11:28:22 -03:00
|
|
|
|
|
|
|
|
|
|
|
.. opcode:: CALL_FUNCTION (argc)
|
|
|
|
|
2018-09-17 09:15:03 -03:00
|
|
|
Calls a callable object with positional arguments.
|
|
|
|
*argc* indicates the number of positional arguments.
|
|
|
|
The top of the stack contains positional arguments, with the right-most
|
|
|
|
argument on top. Below the arguments is a callable object to call.
|
|
|
|
``CALL_FUNCTION`` pops all arguments and the callable object off the stack,
|
|
|
|
calls the callable object with those arguments, and pushes the return value
|
|
|
|
returned by the callable object.
|
2017-03-10 18:52:35 -04:00
|
|
|
|
|
|
|
.. versionchanged:: 3.6
|
|
|
|
This opcode is used only for calls with positional arguments.
|
|
|
|
|
|
|
|
|
|
|
|
.. opcode:: CALL_FUNCTION_KW (argc)
|
|
|
|
|
2018-09-17 09:15:03 -03:00
|
|
|
Calls a callable object with positional (if any) and keyword arguments.
|
|
|
|
*argc* indicates the total number of positional and keyword arguments.
|
2019-08-16 07:41:27 -03:00
|
|
|
The top element on the stack contains a tuple with the names of the
|
|
|
|
keyword arguments, which must be strings.
|
|
|
|
Below that are the values for the keyword arguments,
|
|
|
|
in the order corresponding to the tuple.
|
2018-09-17 09:15:03 -03:00
|
|
|
Below that are positional arguments, with the right-most parameter on
|
|
|
|
top. Below the arguments is a callable object to call.
|
|
|
|
``CALL_FUNCTION_KW`` pops all arguments and the callable object off the stack,
|
|
|
|
calls the callable object with those arguments, and pushes the return value
|
|
|
|
returned by the callable object.
|
2017-03-10 18:52:35 -04:00
|
|
|
|
|
|
|
.. versionchanged:: 3.6
|
|
|
|
Keyword arguments are packed in a tuple instead of a dictionary,
|
2018-09-17 09:15:03 -03:00
|
|
|
*argc* indicates the total number of arguments.
|
2017-03-10 18:52:35 -04:00
|
|
|
|
|
|
|
|
|
|
|
.. opcode:: CALL_FUNCTION_EX (flags)
|
|
|
|
|
2018-09-17 09:15:03 -03:00
|
|
|
Calls a callable object with variable set of positional and keyword
|
|
|
|
arguments. If the lowest bit of *flags* is set, the top of the stack
|
|
|
|
contains a mapping object containing additional keyword arguments.
|
|
|
|
Before the callable is called, the mapping object and iterable object
|
|
|
|
are each "unpacked" and their contents passed in as keyword and
|
|
|
|
positional arguments respectively.
|
|
|
|
``CALL_FUNCTION_EX`` pops all arguments and the callable object off the stack,
|
|
|
|
calls the callable object with those arguments, and pushes the return value
|
|
|
|
returned by the callable object.
|
2017-03-10 18:52:35 -04:00
|
|
|
|
|
|
|
.. versionadded:: 3.6
|
2007-08-15 11:28:22 -03:00
|
|
|
|
|
|
|
|
2017-01-16 04:23:30 -04:00
|
|
|
.. opcode:: LOAD_METHOD (namei)
|
|
|
|
|
2020-01-20 20:41:17 -04:00
|
|
|
Loads a method named ``co_names[namei]`` from the TOS object. TOS is popped.
|
|
|
|
This bytecode distinguishes two cases: if TOS has a method with the correct
|
|
|
|
name, the bytecode pushes the unbound method and TOS. TOS will be used as
|
|
|
|
the first argument (``self``) by :opcode:`CALL_METHOD` when calling the
|
|
|
|
unbound method. Otherwise, ``NULL`` and the object return by the attribute
|
|
|
|
lookup are pushed.
|
2017-01-16 04:23:30 -04:00
|
|
|
|
|
|
|
.. versionadded:: 3.7
|
|
|
|
|
|
|
|
|
|
|
|
.. opcode:: CALL_METHOD (argc)
|
|
|
|
|
2020-01-20 20:41:17 -04:00
|
|
|
Calls a method. *argc* is the number of positional arguments.
|
2017-01-16 04:23:30 -04:00
|
|
|
Keyword arguments are not supported. This opcode is designed to be used
|
|
|
|
with :opcode:`LOAD_METHOD`. Positional arguments are on top of the stack.
|
2020-01-20 20:41:17 -04:00
|
|
|
Below them, the two items described in :opcode:`LOAD_METHOD` are on the
|
|
|
|
stack (either ``self`` and an unbound method object or ``NULL`` and an
|
|
|
|
arbitrary callable). All of them are popped and the return value is pushed.
|
2017-01-16 04:23:30 -04:00
|
|
|
|
|
|
|
.. versionadded:: 3.7
|
|
|
|
|
|
|
|
|
2020-03-14 11:24:06 -03:00
|
|
|
.. opcode:: MAKE_FUNCTION (flags)
|
2007-08-15 11:28:22 -03:00
|
|
|
|
2013-10-12 13:41:18 -03:00
|
|
|
Pushes a new function object on the stack. From bottom to top, the consumed
|
2016-06-12 11:36:24 -03:00
|
|
|
stack must consist of values if the argument carries a specified flag value
|
|
|
|
|
2018-09-17 09:15:03 -03:00
|
|
|
* ``0x01`` a tuple of default values for positional-only and
|
|
|
|
positional-or-keyword parameters in positional order
|
2016-06-12 11:36:24 -03:00
|
|
|
* ``0x02`` a dictionary of keyword-only parameters' default values
|
2020-11-25 06:43:18 -04:00
|
|
|
* ``0x04`` a tuple of strings containing parameters' annotations
|
2016-06-12 11:36:24 -03:00
|
|
|
* ``0x08`` a tuple containing cells for free variables, making a closure
|
2013-10-12 13:41:18 -03:00
|
|
|
* the code associated with the function (at TOS1)
|
|
|
|
* the :term:`qualified name` of the function (at TOS)
|
2007-08-15 11:28:22 -03:00
|
|
|
|
2020-11-25 06:43:18 -04:00
|
|
|
.. versionchanged:: 3.10
|
|
|
|
Flag value ``0x04`` is a tuple of strings instead of dictionary
|
2007-08-15 11:28:22 -03:00
|
|
|
|
|
|
|
.. opcode:: BUILD_SLICE (argc)
|
|
|
|
|
|
|
|
.. index:: builtin: slice
|
|
|
|
|
|
|
|
Pushes a slice object on the stack. *argc* must be 2 or 3. If it is 2,
|
|
|
|
``slice(TOS1, TOS)`` is pushed; if it is 3, ``slice(TOS2, TOS1, TOS)`` is
|
Merged revisions 59605-59624 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r59606 | georg.brandl | 2007-12-29 11:57:00 +0100 (Sat, 29 Dec 2007) | 2 lines
Some cleanup in the docs.
........
r59611 | martin.v.loewis | 2007-12-29 19:49:21 +0100 (Sat, 29 Dec 2007) | 2 lines
Bug #1699: Define _BSD_SOURCE only on OpenBSD.
........
r59612 | raymond.hettinger | 2007-12-29 23:09:34 +0100 (Sat, 29 Dec 2007) | 1 line
Simpler documentation for itertools.tee(). Should be backported.
........
r59613 | raymond.hettinger | 2007-12-29 23:16:24 +0100 (Sat, 29 Dec 2007) | 1 line
Improve docs for itertools.groupby(). The use of xrange(0) to create a unique object is less obvious than object().
........
r59620 | christian.heimes | 2007-12-31 15:47:07 +0100 (Mon, 31 Dec 2007) | 3 lines
Added wininst-9.0.exe executable for VS 2008
Integrated bdist_wininst into PCBuild9 directory
........
r59621 | christian.heimes | 2007-12-31 15:51:18 +0100 (Mon, 31 Dec 2007) | 1 line
Moved PCbuild directory to PC/VS7.1
........
r59622 | christian.heimes | 2007-12-31 15:59:26 +0100 (Mon, 31 Dec 2007) | 1 line
Fix paths for build bot
........
r59623 | christian.heimes | 2007-12-31 16:02:41 +0100 (Mon, 31 Dec 2007) | 1 line
Fix paths for build bot, part 2
........
r59624 | christian.heimes | 2007-12-31 16:18:55 +0100 (Mon, 31 Dec 2007) | 1 line
Renamed PCBuild9 directory to PCBuild
........
2007-12-31 12:14:33 -04:00
|
|
|
pushed. See the :func:`slice` built-in function for more information.
|
2007-08-15 11:28:22 -03:00
|
|
|
|
|
|
|
|
|
|
|
.. opcode:: EXTENDED_ARG (ext)
|
|
|
|
|
2019-06-12 00:46:09 -03:00
|
|
|
Prefixes any opcode which has an argument too big to fit into the default one
|
|
|
|
byte. *ext* holds an additional byte which act as higher bits in the argument.
|
|
|
|
For each opcode, at most three prefixal ``EXTENDED_ARG`` are allowed, forming
|
|
|
|
an argument from two-byte to four-byte.
|
2007-08-15 11:28:22 -03:00
|
|
|
|
|
|
|
|
2015-11-03 14:09:01 -04:00
|
|
|
.. opcode:: FORMAT_VALUE (flags)
|
|
|
|
|
|
|
|
Used for implementing formatted literal strings (f-strings). Pops
|
|
|
|
an optional *fmt_spec* from the stack, then a required *value*.
|
|
|
|
*flags* is interpreted as follows:
|
|
|
|
|
2015-11-03 17:30:49 -04:00
|
|
|
* ``(flags & 0x03) == 0x00``: *value* is formatted as-is.
|
2015-11-03 14:09:01 -04:00
|
|
|
* ``(flags & 0x03) == 0x01``: call :func:`str` on *value* before
|
|
|
|
formatting it.
|
|
|
|
* ``(flags & 0x03) == 0x02``: call :func:`repr` on *value* before
|
|
|
|
formatting it.
|
|
|
|
* ``(flags & 0x03) == 0x03``: call :func:`ascii` on *value* before
|
|
|
|
formatting it.
|
|
|
|
* ``(flags & 0x04) == 0x04``: pop *fmt_spec* from the stack and use
|
|
|
|
it, else use an empty *fmt_spec*.
|
|
|
|
|
2015-11-04 08:11:13 -04:00
|
|
|
Formatting is performed using :c:func:`PyObject_Format`. The
|
|
|
|
result is pushed on the stack.
|
2015-11-03 14:09:01 -04:00
|
|
|
|
2015-11-03 17:30:49 -04:00
|
|
|
.. versionadded:: 3.6
|
|
|
|
|
2015-11-03 14:09:01 -04:00
|
|
|
|
2010-07-03 07:41:33 -03:00
|
|
|
.. opcode:: HAVE_ARGUMENT
|
2007-08-15 11:28:22 -03:00
|
|
|
|
2015-03-02 10:31:40 -04:00
|
|
|
This is not really an opcode. It identifies the dividing line between
|
2017-03-24 18:05:04 -03:00
|
|
|
opcodes which don't use their argument and those that do
|
|
|
|
(``< HAVE_ARGUMENT`` and ``>= HAVE_ARGUMENT``, respectively).
|
|
|
|
|
|
|
|
.. versionchanged:: 3.6
|
|
|
|
Now every instruction has an argument, but opcodes ``< HAVE_ARGUMENT``
|
|
|
|
ignore it. Before, only opcodes ``>= HAVE_ARGUMENT`` had an argument.
|
|
|
|
|
2007-08-15 11:28:22 -03:00
|
|
|
|
2013-05-06 10:59:20 -03:00
|
|
|
.. _opcode_collections:
|
|
|
|
|
|
|
|
Opcode collections
|
|
|
|
------------------
|
|
|
|
|
|
|
|
These collections are provided for automatic introspection of bytecode
|
|
|
|
instructions:
|
|
|
|
|
|
|
|
.. data:: opname
|
|
|
|
|
|
|
|
Sequence of operation names, indexable using the bytecode.
|
|
|
|
|
|
|
|
|
|
|
|
.. data:: opmap
|
|
|
|
|
|
|
|
Dictionary mapping operation names to bytecodes.
|
|
|
|
|
|
|
|
|
|
|
|
.. data:: cmp_op
|
|
|
|
|
|
|
|
Sequence of all compare operation names.
|
|
|
|
|
|
|
|
|
|
|
|
.. data:: hasconst
|
|
|
|
|
2018-09-17 09:15:03 -03:00
|
|
|
Sequence of bytecodes that access a constant.
|
2013-05-06 10:59:20 -03:00
|
|
|
|
|
|
|
|
|
|
|
.. data:: hasfree
|
|
|
|
|
2015-03-02 10:31:40 -04:00
|
|
|
Sequence of bytecodes that access a free variable (note that 'free' in this
|
|
|
|
context refers to names in the current scope that are referenced by inner
|
|
|
|
scopes or names in outer scopes that are referenced from this scope. It does
|
|
|
|
*not* include references to global or builtin scopes).
|
2013-05-06 10:59:20 -03:00
|
|
|
|
|
|
|
|
|
|
|
.. data:: hasname
|
|
|
|
|
|
|
|
Sequence of bytecodes that access an attribute by name.
|
|
|
|
|
|
|
|
|
|
|
|
.. data:: hasjrel
|
|
|
|
|
|
|
|
Sequence of bytecodes that have a relative jump target.
|
|
|
|
|
|
|
|
|
|
|
|
.. data:: hasjabs
|
|
|
|
|
|
|
|
Sequence of bytecodes that have an absolute jump target.
|
|
|
|
|
|
|
|
|
|
|
|
.. data:: haslocal
|
|
|
|
|
|
|
|
Sequence of bytecodes that access a local variable.
|
|
|
|
|
|
|
|
|
|
|
|
.. data:: hascompare
|
|
|
|
|
|
|
|
Sequence of bytecodes of Boolean operations.
|