Guido van Rossum
b04281592e
Make it possible to instantiate a _FileIO() with an integer file descriptor
...
instead of a filename.
Add a 'closed' attribute.
2007-04-08 17:44:42 +00:00
Guido van Rossum
b8551ae68f
Somehow this contained a bogus reference to "exceptions" which caused
...
"import exceptions" to behave bizarrely.
2007-04-07 03:14:46 +00:00
Guido van Rossum
756aa93763
A class used as an exception should inherit from Exception.
...
(Should be backported to 2.6, really.)
2007-04-07 03:04:01 +00:00
Guido van Rossum
9be5597abf
Add some backwards compatibility stuff.
...
This now appears to work when io.open is substituted for the real open
in fileinput.py -- at least the latter's unit tests pass.
2007-04-07 02:59:27 +00:00
Guido van Rossum
76c5d4d72d
Checkpoint.
...
Some cleanup of test_io.py and io.py.
Added seeking to buffered reader and writer, but no tests yet.
2007-04-06 19:10:29 +00:00
Guido van Rossum
186685905c
Get rid of duplicate definition of BufferedIOBase.
2007-04-06 18:11:47 +00:00
Guido van Rossum
78892e4613
Added a working Text I/O layer, by Mark Russell.
...
This is essentially a checkpoint.
2007-04-06 17:31:18 +00:00
Fred Drake
0e074483e7
make the markup match that of the trunk to avoid insane spread of
...
mystery italics
2007-03-29 23:11:24 +00:00
Guido van Rossum
6b18a5bb32
Fix refcounting bug reported by Amaury Forgeot d'Arc.
2007-03-29 20:49:57 +00:00
Collin Winter
42dae6a89b
Make readonly members defined in C throw an AttributeError on modification. This brings them into sync with Python-level attributes. Fixes bug #1687163 .
2007-03-28 21:44:53 +00:00
Guido van Rossum
d84da1b67a
More fixes related to removal of exception slicing.
2007-03-28 21:03:48 +00:00
Guido van Rossum
782ff275b8
Fix errors in bsddb3 tests due to removal of exception slicing.
...
(There was also a segfault but it disappeared when the tests
stopped erroring out; I presume the segfault is a pre-existing
problem somewhere in a destructor.)
2007-03-28 21:02:43 +00:00
Guido van Rossum
cef2098cfa
Moving xreload to the sandbox for now.
2007-03-28 00:30:15 +00:00
Guido van Rossum
e27dc72308
By default, != returns the opposite of ==, unless the latter returns
...
NotImplemented.
(Is this worth backporting to 2.6? It seems so useful...!)
2007-03-27 22:37:34 +00:00
Guido van Rossum
a4335b1e6b
Looks like this file wasn't checked in.
2007-03-27 22:34:34 +00:00
Collin Winter
e33761dcaa
Fix two bugs related to the remove of exception subscripting.
2007-03-27 04:55:27 +00:00
Collin Winter
3e81ec8c7c
Address some XXXs from Neal Norwitz.
2007-03-23 22:46:49 +00:00
Brett Cannon
ca477b2280
When removing indexing/slicing on exceptions some places were changed
...
inappropriately from ``e[0]`` to ``e.message`` instead of ``e.args[0]``. The
reason it needs to be the last option is the dichotomy of 'message' and 'args':
'message' can be the empty string but args[0] can have a value if more than one
argument was passed.
2007-03-21 22:26:20 +00:00
Guido van Rossum
3a38362592
Fix refleak in compiler.
...
(A symbol table entry was leaked every time a class was compiled.)
2007-03-21 21:26:58 +00:00
Collin Winter
390d29ca74
Remove isCallable() and sequenceIncludes() from the operator module.
2007-03-21 20:10:51 +00:00
Neal Norwitz
7d71fb8132
Little fixes:
...
* make some module variables static to prevent name pollution
* Add some comments to clarify what's going on and some XXXs to address
* Add a space after "for" before (
* exc_value and tb can be NULL in some cases
* Get working on Windows (I think)
2007-03-21 04:45:04 +00:00
Collin Winter
670e692134
Patch #1680961 : remove sys.exitfunc and replace it with a private C API. Also, reimplement atexit in C so it can take advantage of this private API.
2007-03-21 02:57:17 +00:00
Collin Winter
450ee81b22
Use the local python binary to build the docs, not whatever 'python' is on the PATH (which is probably Python 2.x, and we need 3.x).
2007-03-21 02:14:12 +00:00
Collin Winter
65d09d4ee9
Run 2to3 over Doc/tools/.
2007-03-21 02:11:39 +00:00
Guido van Rossum
89df245607
Make test_socket_ssl.py pass by fixing some code that was
...
incorrectly assuming that err.message was the Py3k way of
writing err[0] in 2.x. The correct spelling is err.args[0].
2007-03-19 22:26:27 +00:00
Guido van Rossum
7cba8508af
Use input() now that it is available.
2007-03-19 22:23:59 +00:00
Georg Brandl
e66c8c7c12
"from ... import x" should not be a syntax error... make
...
import_stmt accept ELLIPSes and DOTs.
2007-03-19 18:56:50 +00:00
Guido van Rossum
d16e81aabe
Fix the compiler package w.r.t. the new metaclass syntax.
...
(It is still broken w.r.t. the new nonlocal keyword.)
Remove a series of debug prints I accidentally left in test_ast.py.
2007-03-19 17:56:01 +00:00
Georg Brandl
801dd73653
NEWS item for PEP 3115.
2007-03-18 20:18:31 +00:00
Georg Brandl
d35e970b58
Refactor astgen.py with 2to3.
2007-03-18 19:52:24 +00:00
Georg Brandl
dde002899d
Make ELLIPSIS a separate token. This makes it a syntax error to write ". . ." for Ellipsis.
2007-03-18 19:01:53 +00:00
Georg Brandl
428f0641ec
Remove the deprecated and useless "pend" argument from
...
PyFloat_FromString. (fixes bug #1650903 )
2007-03-18 18:35:15 +00:00
Guido van Rossum
9091e3a423
Update the silly version number.
2007-03-18 16:10:35 +00:00
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
Guido van Rossum
44d7bee296
Add Mike Verdone (co-author of io.py and PEP 3116).
...
Daniel Stutzbach (already in) is main author of _fileio.c.
2007-03-15 18:09:35 +00:00
Georg Brandl
ed3b838988
Check the keys of the locals dict -- they need not be a list.
2007-03-12 13:15:14 +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
af334387d1
Add a missing forward declaration for PyFileIO_Type. The _fileio module now compiles with --with-pydebug.
2007-03-08 21:46:15 +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