Guido van Rossum
52cc1d838f
Implement PEP 3115 -- new metaclass syntax and semantics.
...
The compiler package hasn't been updated yet; test_compiler.py fails.
Otherwise all tests seem to be passing now. There are no occurrences
of __metaclass__ left in the standard library.
Docs have not been updated.
2007-03-18 15:41:51 +00:00
Guido van Rossum
ef17c16b36
Bug 1679498: remove unused instance variables _readable, _writable and
...
_seekable.
2007-03-18 03:42:15 +00:00
Guido van Rossum
bb09b21250
Bug 1679498: unset variable 'bs'.
2007-03-18 03:36:28 +00:00
Guido van Rossum
c819dea40d
Add some XXX comments and fix BufferedReader signature.
2007-03-15 18:59:31 +00:00
Georg Brandl
e32b4224d0
Patch #1591665 : implement the __dir__() special function lookup in PyObject_Dir.
2007-03-10 22:13:27 +00:00
Collin Winter
7afaa88ebc
Move test_unittest, test_doctest and test_doctest2 higher up in the test order
2007-03-08 19:54:43 +00:00
Guido van Rossum
49dc35ba73
Fix another unittest that broke due to dict views (more precisely, due
...
to the cowboy way they are currently hacked in).
2007-03-08 01:17:51 +00:00
Guido van Rossum
de3bc7c565
Fix embarrassing syntax mix.
2007-03-08 01:02:00 +00:00
Guido van Rossum
a9e2024b84
Check in Daniel Stutzbach's _fileio.c and test_fileio.py
...
(see SF#1671314) with small tweaks.
The io module now uses this instead of its own implementation
of the FileIO class, if it can import _fileio.
2007-03-08 00:43:48 +00:00
Guido van Rossum
4d0f5a4934
Delete TESTFN after the test.
2007-03-07 22:59:39 +00:00
Guido van Rossum
00efeadbcf
Change the specs for readinto() -- it should *not* shorten the buffer to
...
the amount of data read.
2007-03-07 05:23:25 +00:00
Guido van Rossum
01a2752d19
New version from Mike Verdone (sat in my inbox since 2/27).
...
I cleaned up whitespace but otherwise didn't change it.
This will need work to reflect the tentative decision to drop nonblocking I/O
support from the buffering layers.
2007-03-07 01:00:12 +00:00
Georg Brandl
c78855465f
Addendum of patch #1669633 : additional tests for bytes methods.
2007-03-06 19:16:20 +00:00
Guido van Rossum
2e65f892c2
Final part of SF# 1607548 by Tony Lownds: fix pydoc and inspect.
2007-02-28 22:03:49 +00:00
Jack Diederich
4b7f3179ea
regenerated to reflect the addition of 'nonlocal' and removal of 'print'
2007-02-28 20:21:30 +00:00
Guido van Rossum
4573942161
Regenerate symbol.py.
...
This fixes test_compiler, test_transformer, and test_parser.
2007-02-28 00:40:24 +00:00
Brett Cannon
3695bf316f
Use __builtin__, not __builtins__.
2007-02-28 00:32:07 +00:00
Brett Cannon
4af7dcf10d
Fix test_pep352 to deal with the removal of the 'exceptions' module.
2007-02-28 00:01:43 +00:00
Brett Cannon
6f8fe151da
Fix httplib for removal of slicing from exceptions.
2007-02-27 20:16:38 +00:00
Neal Norwitz
6968b056ef
SF patch #1669633 , add methods for bytes from Pete Shinners.
2007-02-27 19:02:19 +00:00
Neal Norwitz
fa04e1a090
Fix breakage from removing exceptions module
2007-02-27 18:58:52 +00:00
Guido van Rossum
68bbcd2a71
Mike Verdone's checkpoint, cleaned up.
...
Also implemented Neal's suggestion (add fileno() to SocketIO)
and some unrelated changes, e.g. remove Google copyright
and make BytesIO a subclass of BufferedIOBase.
2007-02-27 17:19:33 +00:00
Guido van Rossum
17e43e582c
Added some comments and docstrings. More is needed.
2007-02-27 15:45:13 +00:00
Georg Brandl
0b9b9e0483
Implement bytes.fromhex(), with tests.
2007-02-27 08:40:54 +00:00
Jeremy Hylton
81e9502df6
Provisional implementation of PEP 3104.
...
Add nonlocal_stmt to Grammar and Nonlocal node to AST. They both
parallel the definitions for globals. The symbol table treats
variables declared as nonlocal just like variables that are free
implicitly.
This change is missing the language spec changes, but makes some
decisions about what the spec should say via the unittests. The PEP
is silent on a number of decisions, so we should review those before
claiming that nonlocal is complete.
Thomas Wouters made the grammer and ast changes. Jeremy Hylton added
the symbol table changes and the tests. Pete Shinners and Neal
Norwitz helped review the code.
2007-02-27 06:50:52 +00:00
Neal Norwitz
8b41c3dc28
Add some XXX comments for Guido to look at.
2007-02-27 06:26:14 +00:00
Guido van Rossum
28524c7f10
Checkpoint for new I/O library.
2007-02-27 05:47:44 +00:00
Neal Norwitz
b69b2e59f6
Remove duplicate refs to int from int/long unification presumably. (There might be more refs like these.)
2007-02-27 03:41:04 +00:00
Brett Cannon
ba7bf49a54
Remove the ability to slice/index on exceptions per PEP 352.
2007-02-27 00:15:55 +00:00
Brett Cannon
44c526174d
Tweak the fix for test_traceback since the fix for it to run on its own broke
...
it under regrtest. 'traceback' likes to strip out the module name if it is
__main__ or __builtin__ but not in other cases.
2007-02-27 00:12:43 +00:00
Brett Cannon
dfb2a8a7c1
Fix a broken test in test_traceback where the module name was being tacked on
...
needlessly.
2007-02-26 23:33:27 +00:00
Neal Norwitz
2633c69fae
Remove the exceptions builtin module, all the exceptions are already builtin.
2007-02-26 22:22:47 +00:00
Guido van Rossum
f543348fff
Fix another loop over a dict that may change... :-(
2007-02-26 22:21:25 +00:00
Guido van Rossum
ce4a475efb
Add -d/--debug option to print traceback without -v/--verbose.
2007-02-26 22:01:28 +00:00
Guido van Rossum
0240b92a6c
Two more patches by Tony Lownds (SF# 1607548).
...
(1)
Combines the code paths for MAKE_FUNCTION and MAKE_CLOSURE.
Fixes a crash where functions with closures and either annotations or
keyword-only arguments result in MAKE_CLOSURE, but only
MAKE_FUNCTION has the code to handle annotations or keyword-only
arguments.
Includes enough tests to trigger the bug.
(2)
Change peepholer to not bail in the presence of EXTENDED_ARG +
MAKE_FUNCTION.
Enforce the natural 16-bit limit of annotations in compile.c.
Also update Misc/NEWS with the "input = raw_input" change.
2007-02-26 21:23:50 +00:00
Brett Cannon
f74225d63b
You can no longer catch non-BaseException objects; TypeError is raised if such
...
an object is listed in an 'except' clause.
2007-02-26 21:10:16 +00:00
Guido van Rossum
a88a0331b7
Add raw_input() back, named input(). Revive the old unittests too.
2007-02-26 16:59:55 +00:00
Guido van Rossum
e8ef4e1190
Add a partial list of limitations, stripping out some corresponding XXX comments.
2007-02-26 16:57:52 +00:00
Guido van Rossum
4f7ac2e800
Change a test to be more predictable.
...
The problem with using random.random is that several modules and tests do
"from random in random" which confuses pickle.whichmodule().
2007-02-26 15:59:50 +00:00
Guido van Rossum
c145ef3728
Use better idiom to sort keys.
2007-02-26 14:08:27 +00:00
Georg Brandl
b79b78111c
Fix token.py main code vs. dict views.
2007-02-26 09:41:19 +00:00
Guido van Rossum
634e53fad4
Fix a bizarre error where test_pickletools fails if preceded by test_pyclbr.
...
The fix is in neither, but in pickle.py where a loop over sys.modules.items()
could modify sys.modules, occasionally.
2007-02-26 07:07:02 +00:00
Guido van Rossum
5dc0d9708c
Fix merge bug (lost line causing syntax error).
2007-02-25 22:37:36 +00:00
Guido van Rossum
5c0a6de79a
Use Glyph's trick to ensure that __globals__ is set properly.
2007-02-25 21:22:21 +00:00
Guido van Rossum
55b4a4a1a9
Add a proper unit test for xreload.py.
2007-02-25 21:03:54 +00:00
Neal Norwitz
221085de89
Change all the function attributes from func_* -> __*__. This gets rid
...
of func_name, func_dict and func_doc as they already exist as __name__,
__dict__ and __doc__.
2007-02-25 20:55:47 +00:00
Guido van Rossum
9a7e77401b
Add support for static and class methods.
2007-02-25 16:19:20 +00:00
Neal Norwitz
88470ec348
Fix typo
2007-02-25 15:02:38 +00:00
Guido van Rossum
ebbc01ef50
First draft of a different solution to the reload() problem.
2007-02-25 05:08:26 +00:00
Georg Brandl
ee91be45df
Make bytes_repr return a string containing a b"" literal.
2007-02-24 19:41:35 +00:00