This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2007年08月08日 12:42 by christian.heimes, last changed 2022年04月11日 14:56 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| remove_stringio.patch | christian.heimes, 2007年08月08日 13:57 | py3k-struni r56829 | ||
| Messages (9) | |||
|---|---|---|---|
| msg53003 - (view) | Author: Christian Heimes (christian.heimes) * (Python committer) | Date: 2007年08月08日 12:42 | |
The patch removes the import of cStringIO from all Python files and disabled the cStringIO module. It leaves the file around. Open problems: * How should io.StringIO handle buffer objects? |
|||
| msg53004 - (view) | Author: Christian Heimes (christian.heimes) * (Python committer) | Date: 2007年08月08日 12:52 | |
File Added: stringio_deprecation.patch |
|||
| msg53005 - (view) | Author: Georg Brandl (georg.brandl) * (Python committer) | Date: 2007年08月08日 13:06 | |
I guess that if you want to handle buffer objects, you should be using io.BytesIO. |
|||
| msg53006 - (view) | Author: Christian Heimes (christian.heimes) * (Python committer) | Date: 2007年08月08日 13:57 | |
The new patch also removes StringIO and adds a facade cStringIO. Importing StringIO and cStringIO is deprecated and the imports fall back to io.StringIO. File Added: remove_stringio.patch |
|||
| msg53007 - (view) | Author: Guido van Rossum (gvanrossum) * (Python committer) | Date: 2007年08月08日 20:41 | |
I'll take this. Thanks for the work! There are a few tests that break due to this, I'll look into these. I'll probably kill StringIO and cStringIO hard rather than adding deprecations (there's already a 2to3 fixer that fixes most StringIO references). |
|||
| msg53008 - (view) | Author: Guido van Rossum (gvanrossum) * (Python committer) | Date: 2007年08月09日 01:04 | |
Thanks! Committed revision 56841. I had to change some places to use BytesIO instead of StringIO, and I had to work hard on a few modules, esp. uu.py. But now all tests pass (except the ones that didn't pass before). |
|||
| msg53009 - (view) | Author: Alexandre Vassalotti (alexandre.vassalotti) * (Python committer) | Date: 2007年08月09日 23:44 | |
As George said, io.BytesIO should be used for buffer objects. Thanks for your work, it will help me a lot for testing the new accelerator module for StringIO/BytesIO. |
|||
| msg53010 - (view) | Author: Christian Heimes (christian.heimes) * (Python committer) | Date: 2007年08月10日 00:49 | |
One unit test is still import StringIO although it doesn't use it: Index: Lib/ctypes/test/test_loading.py =================================================================== --- Lib/ctypes/test/test_loading.py (Revision 56879) +++ Lib/ctypes/test/test_loading.py (Arbeitskopie) @@ -1,6 +1,6 @@ from ctypes import * import sys, unittest -import os, StringIO +import os from ctypes.util import find_library from ctypes.test import is_resource_enabled |
|||
| msg53011 - (view) | Author: Guido van Rossum (gvanrossum) * (Python committer) | Date: 2007年08月10日 01:02 | |
Ow, thanks! Committed revision 56880. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:56:25 | admin | set | github: 45287 |
| 2008年01月06日 22:29:45 | admin | set | keywords:
- py3k versions: + Python 3.0 |
| 2007年08月08日 12:42:58 | christian.heimes | create | |