Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0312494

Browse files
committed
Remove last traces of cStringIO.
1 parent b1ef673 commit 0312494

13 files changed

Lines changed: 7 additions & 119 deletions

File tree

Doc/library/csv.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ For all other encodings the following :class:`UnicodeReader` and
484484
parameter in their constructor and make sure that the data passes the real
485485
reader or writer encoded as UTF-8::
486486

487-
import csv, codecs, cStringIO
487+
import csv, codecs, io
488488

489489
class UTF8Recoder:
490490
"""
@@ -524,7 +524,7 @@ reader or writer encoded as UTF-8::
524524

525525
def __init__(self, f, dialect=csv.excel, encoding="utf-8", **kwds):
526526
# Redirect output to a queue
527-
self.queue = cStringIO.StringIO()
527+
self.queue = io.StringIO()
528528
self.writer = csv.writer(self.queue, dialect=dialect, **kwds)
529529
self.stream = f
530530
self.encoder = codecs.getincrementalencoder(encoding)()

Doc/library/email.message.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Here are the methods of the :class:`Message` class:
4848
:class:`Generator` instance and use its :meth:`flatten` method directly.
4949
For example::
5050

51-
from cStringIO import StringIO
51+
from io import StringIO
5252
from email.generator import Generator
5353
fp = StringIO()
5454
g = Generator(fp, mangle_from_=False, maxheaderlen=60)

Doc/library/pickle.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,7 @@ the referenced object.
555555
Here's a silly example that *might* shed more light::
556556

557557
import pickle
558-
from cStringIO import StringIO
558+
from io import StringIO
559559

560560
src = StringIO()
561561
p = pickle.Pickler(src)

Include/cStringIO.h

Lines changed: 0 additions & 70 deletions
This file was deleted.

Lib/test/test_sys.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ def test_attributes(self):
297297
self.assert_(isinstance(vi[4], int))
298298

299299
def test_43581(self):
300-
# Can't use sys.stdout, as this is a cStringIO object when
300+
# Can't use sys.stdout, as this is a StringIO object when
301301
# the test runs under regrtest.
302302
self.assertEqual(sys.__stdout__.encoding, sys.__stderr__.encoding)
303303

Modules/Setup.dist

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -339,9 +339,6 @@ _symtable symtablemodule.c
339339
# Fred Drake's interface to the Python parser
340340
#parser parsermodule.c
341341

342-
# cStringIO
343-
#cStringIO cStringIO.c
344-
345342

346343
# Lee Busby's SIGFPE modules.
347344
# The library to link fpectl with is platform specific.

PC/VS8.0/pythoncore.vcproj

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -690,10 +690,6 @@
690690
RelativePath="..\..\Include\complexobject.h"
691691
>
692692
</File>
693-
<File
694-
RelativePath="..\..\Include\cStringIO.h"
695-
>
696-
</File>
697693
<File
698694
RelativePath="..\..\Include\datetime.h"
699695
>

PC/os2emx/config.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ extern void init_symtable();
5050
extern void init_weakref();
5151
extern void initarray();
5252
extern void initbinascii();
53-
extern void initcStringIO();
5453
extern void initcollections();
5554
extern void initcmath();
5655
extern void initdatetime();
@@ -110,7 +109,6 @@ struct _inittab _PyImport_Inittab[] = {
110109
{"_weakref", init_weakref},
111110
{"array", initarray},
112111
{"binascii", initbinascii},
113-
{"cStringIO", initcStringIO},
114112
{"collections", initcollections},
115113
{"cmath", initcmath},
116114
{"datetime", initdatetime},

PC/os2emx/python26.def

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1218,9 +1218,6 @@ EXPORTS
12181218
; "initcPickle"
12191219
; "fast_save_leave"
12201220

1221-
; From python26_s.lib(cStringIO)
1222-
; "initcStringIO"
1223-
12241221
; From python26_s.lib(_csv)
12251222
; "init_csv"
12261223

PC/os2vacpp/config.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ extern void init_socket(void);
3434
extern void initstruct(void);
3535
extern void inittime(void);
3636
extern void init_thread(void);
37-
extern void initcStringIO(void);
3837
extern void initpcre(void);
3938
#ifdef WIN32
4039
extern void initmsvcrt(void);
@@ -78,7 +77,6 @@ struct _inittab _PyImport_Inittab[] = {
7877
#ifdef WITH_THREAD
7978
{"_thread", init_thread},
8079
#endif
81-
{"cStringIO", initcStringIO},
8280
{"pcre", initpcre},
8381
#ifdef WIN32
8482
{"msvcrt", initmsvcrt},

0 commit comments

Comments
 (0)