Python-Dev
Threads by month
- ----- 2024 -----
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2003 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2002 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2001 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2000 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1999 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
August 2014
- 83 participants
- 42 discussions
Re: [Python-Dev] [Python-checkins] cpython: Issue #22003: When initialized from a bytes object, io.BytesIO() now
by Zachary Ware 03 Aug '14
by Zachary Ware 03 Aug '14
03 Aug '14
I'd like to point out a couple of compiler warnings on Windows:
On Tue, Jul 29, 2014 at 6:45 PM, antoine.pitrou
<python-checkins(a)python.org> wrote:
> diff --git a/Modules/_io/bytesio.c b/Modules/_io/bytesio.c
> --- a/Modules/_io/bytesio.c
> +++ b/Modules/_io/bytesio.c
> @@ -33,6 +37,45 @@
> return NULL; \
> }
>
> +/* Ensure we have a buffer suitable for writing, in the case that an initvalue
> + * object was provided, and we're currently borrowing its buffer. `size'
> + * indicates the new buffer size allocated as part of unsharing, to avoid a
> + * redundant reallocation caused by any subsequent mutation. `truncate'
> + * indicates whether truncation should occur if `size` < self->string_size.
> + *
> + * Do nothing if the buffer wasn't shared. Returns 0 on success, or sets an
> + * exception and returns -1 on failure. Existing state is preserved on failure.
> + */
> +static int
> +unshare(bytesio *self, size_t preferred_size, int truncate)
> +{
> + if (self->initvalue) {
> + Py_ssize_t copy_size;
> + char *new_buf;
> +
> + if((! truncate) && preferred_size < self->string_size) {
..\Modules\_io\bytesio.c(56): warning C4018: '<' : signed/unsigned mismatch
> + preferred_size = self->string_size;
> + }
> +
> + new_buf = (char *)PyMem_Malloc(preferred_size);
> + if (new_buf == NULL) {
> + PyErr_NoMemory();
> + return -1;
> + }
> +
> + copy_size = self->string_size;
> + if (copy_size > preferred_size) {
..\Modules\_io\bytesio.c(67): warning C4018: '>' : signed/unsigned mismatch
> + copy_size = preferred_size;
> + }
> +
> + memcpy(new_buf, self->buf, copy_size);
> + Py_CLEAR(self->initvalue);
> + self->buf = new_buf;
> + self->buf_size = preferred_size;
> + self->string_size = (Py_ssize_t) copy_size;
> + }
> + return 0;
> +}
>
> /* Internal routine to get a line from the buffer of a BytesIO
> object. Returns the length between the current position to the
--
Zach
2
1
ACTIVITY SUMMARY (2014-07-25 - 2014-08-01)
Python tracker at http://bugs.python.org/
To view or respond to any of the issues listed below, click on the issue.
Do NOT respond to this message.
Issues counts and deltas:
open 4592 ( +1)
closed 29297 (+49)
total 33889 (+50)
Open issues with patches: 2163
Issues opened (34)
==================
#11271: concurrent.futures.ProcessPoolExecutor.map() doesn't batch fun
http://bugs.python.org/issue11271 reopened by pitrou
#22063: asyncio: sock_xxx() methods of event loops should check ath so
http://bugs.python.org/issue22063 reopened by haypo
#22069: TextIOWrapper(newline="\n", line_buffering=True) mistakenly tr
http://bugs.python.org/issue22069 opened by akira
#22070: Use the _functools module to speed up functools.total_ordering
http://bugs.python.org/issue22070 opened by ncoghlan
#22071: Remove long-time deprecated attributes from smtpd
http://bugs.python.org/issue22071 opened by zvyn
#22077: Improve the error message for various sequences
http://bugs.python.org/issue22077 opened by Claudiu.Popa
#22079: Ensure in PyType_Ready() that base class of static type is sta
http://bugs.python.org/issue22079 opened by serhiy.storchaka
#22080: Add windows_helper module helper
http://bugs.python.org/issue22080 opened by Claudiu.Popa
#22083: Refactor PyShell's breakpoint related methods
http://bugs.python.org/issue22083 opened by sahutd
#22086: Tab indent no longer works in interpreter
http://bugs.python.org/issue22086 opened by Azendale
#22087: _UnixDefaultEventLoopPolicy should either create a new loop or
http://bugs.python.org/issue22087 opened by dan.oreilly
#22088: base64 module still ignores non-alphabet characters
http://bugs.python.org/issue22088 opened by Julian
#22090: Decimal and float formatting treat '%' differently for infinit
http://bugs.python.org/issue22090 opened by mark.dickinson
#22091: __debug__ in compile(optimize=1)
http://bugs.python.org/issue22091 opened by arigo
#22092: Executing some tests inside Lib/unittest/test individually thr
http://bugs.python.org/issue22092 opened by vajrasky
#22093: Compiling python on OS X gives warning about compact unwind
http://bugs.python.org/issue22093 opened by vajrasky
#22094: oss_audio_device.write(data) produces short writes
http://bugs.python.org/issue22094 opened by akira
#22095: Use of set_tunnel with default port results in incorrect post
http://bugs.python.org/issue22095 opened by demian.brecht
#22097: Linked list API for ordereddict
http://bugs.python.org/issue22097 opened by pitrou
#22098: Behavior of Structure inconsistent with BigEndianStructure whe
http://bugs.python.org/issue22098 opened by Florian.Dold
#22100: Use $HOSTPYTHON when determining candidate interpreter for $PY
http://bugs.python.org/issue22100 opened by shiz
#22102: Zipfile generates Zipfile error in zip with 0 total number of
http://bugs.python.org/issue22102 opened by Guillaume.Carre
#22103: bdist_wininst does not run install script
http://bugs.python.org/issue22103 opened by mb_
#22104: test_asyncio unstable in refleak mode
http://bugs.python.org/issue22104 opened by pitrou
#22105: Hang during File "Save As"
http://bugs.python.org/issue22105 opened by Joe
#22107: tempfile module misinterprets access denied error on Windows
http://bugs.python.org/issue22107 opened by rupole
#22110: enable extra compilation warnings
http://bugs.python.org/issue22110 opened by neologix
#22112: '_UnixSelectorEventLoop' object has no attribute 'create_task'
http://bugs.python.org/issue22112 opened by pydanny
#22113: memoryview and struct.pack_into
http://bugs.python.org/issue22113 opened by stangelandcl
#22114: You cannot call communicate() safely after receiving an except
http://bugs.python.org/issue22114 opened by amrith
#22115: Add new methods to trace Tkinter variables
http://bugs.python.org/issue22115 opened by serhiy.storchaka
#22116: Weak reference support for C function objects
http://bugs.python.org/issue22116 opened by pitrou
#22117: Rewrite pytime.h to work on nanoseconds
http://bugs.python.org/issue22117 opened by haypo
#22118: urljoin fails with messy relative URLs
http://bugs.python.org/issue22118 opened by Mike.Lissner
Most recent 15 issues with no replies (15)
==========================================
#22116: Weak reference support for C function objects
http://bugs.python.org/issue22116
#22115: Add new methods to trace Tkinter variables
http://bugs.python.org/issue22115
#22107: tempfile module misinterprets access denied error on Windows
http://bugs.python.org/issue22107
#22105: Hang during File "Save As"
http://bugs.python.org/issue22105
#22103: bdist_wininst does not run install script
http://bugs.python.org/issue22103
#22102: Zipfile generates Zipfile error in zip with 0 total number of
http://bugs.python.org/issue22102
#22098: Behavior of Structure inconsistent with BigEndianStructure whe
http://bugs.python.org/issue22098
#22095: Use of set_tunnel with default port results in incorrect post
http://bugs.python.org/issue22095
#22092: Executing some tests inside Lib/unittest/test individually thr
http://bugs.python.org/issue22092
#22088: base64 module still ignores non-alphabet characters
http://bugs.python.org/issue22088
#22086: Tab indent no longer works in interpreter
http://bugs.python.org/issue22086
#22083: Refactor PyShell's breakpoint related methods
http://bugs.python.org/issue22083
#22080: Add windows_helper module helper
http://bugs.python.org/issue22080
#22077: Improve the error message for various sequences
http://bugs.python.org/issue22077
#22071: Remove long-time deprecated attributes from smtpd
http://bugs.python.org/issue22071
Most recent 15 issues waiting for review (15)
=============================================
#22117: Rewrite pytime.h to work on nanoseconds
http://bugs.python.org/issue22117
#22115: Add new methods to trace Tkinter variables
http://bugs.python.org/issue22115
#22110: enable extra compilation warnings
http://bugs.python.org/issue22110
#22104: test_asyncio unstable in refleak mode
http://bugs.python.org/issue22104
#22100: Use $HOSTPYTHON when determining candidate interpreter for $PY
http://bugs.python.org/issue22100
#22097: Linked list API for ordereddict
http://bugs.python.org/issue22097
#22095: Use of set_tunnel with default port results in incorrect post
http://bugs.python.org/issue22095
#22092: Executing some tests inside Lib/unittest/test individually thr
http://bugs.python.org/issue22092
#22087: _UnixDefaultEventLoopPolicy should either create a new loop or
http://bugs.python.org/issue22087
#22083: Refactor PyShell's breakpoint related methods
http://bugs.python.org/issue22083
#22080: Add windows_helper module helper
http://bugs.python.org/issue22080
#22077: Improve the error message for various sequences
http://bugs.python.org/issue22077
#22071: Remove long-time deprecated attributes from smtpd
http://bugs.python.org/issue22071
#22068: tkinter: avoid reference loops with Variables and Fonts
http://bugs.python.org/issue22068
#22065: Update turtledemo menu creation
http://bugs.python.org/issue22065
Top 10 most discussed issues (10)
=================================
#21308: PEP 466: backport ssl changes
http://bugs.python.org/issue21308 13 msgs
#22097: Linked list API for ordereddict
http://bugs.python.org/issue22097 13 msgs
#22114: You cannot call communicate() safely after receiving an except
http://bugs.python.org/issue22114 9 msgs
#9529: Make re match object iterable
http://bugs.python.org/issue9529 8 msgs
#15986: memoryview: expose 'buf' attribute
http://bugs.python.org/issue15986 8 msgs
#20170: Derby #1: Convert 137 sites to Argument Clinic in Modules/posi
http://bugs.python.org/issue20170 8 msgs
#21933: Allow the user to change font sizes with the text pane of turt
http://bugs.python.org/issue21933 8 msgs
#22087: _UnixDefaultEventLoopPolicy should either create a new loop or
http://bugs.python.org/issue22087 8 msgs
#17620: Python interactive console doesn't use sys.stdin for input
http://bugs.python.org/issue17620 7 msgs
#18174: Make regrtest with --huntrleaks check for fd leaks
http://bugs.python.org/issue18174 7 msgs
Issues closed (49)
==================
#11969: Can't launch multiproccessing.Process on methods
http://bugs.python.org/issue11969 closed by pitrou
#11990: redirected output - stdout writes newline as \n in windows
http://bugs.python.org/issue11990 closed by haypo
#15152: test_subprocess failures on awfully slow builtbots
http://bugs.python.org/issue15152 closed by neologix
#15398: intermittence on UnicodeFileTests.test_rename at test_pep277 o
http://bugs.python.org/issue15398 closed by ned.deily
#16005: smtplib.SMTP().sendmail() and rset()
http://bugs.python.org/issue16005 closed by r.david.murray
#16383: Python 3.3 Permission Error with User Library on Windows
http://bugs.python.org/issue16383 closed by zach.ware
#17172: Add turtledemo to IDLE menu
http://bugs.python.org/issue17172 closed by terry.reedy
#17371: Mismatch between Python 3.3 build environment and distutils co
http://bugs.python.org/issue17371 closed by loewis
#17634: Win32: shutil.copy leaks file handles to child processes
http://bugs.python.org/issue17634 closed by haypo
#18395: Make _Py_char2wchar() and _Py_wchar2char() public
http://bugs.python.org/issue18395 closed by haypo
#19612: test_subprocess: sporadic failure of test_communicate_epipe()
http://bugs.python.org/issue19612 closed by haypo
#19875: test_getsockaddrarg occasional failure
http://bugs.python.org/issue19875 closed by neologix
#19923: OSError: [Errno 512] Unknown error 512 in test_multiprocessing
http://bugs.python.org/issue19923 closed by neologix
#20093: Wrong OSError message from os.rename() when dst is a non-empty
http://bugs.python.org/issue20093 closed by doko
#20466: Example in Doc/extending/embedding.rst fails to compile cleanl
http://bugs.python.org/issue20466 closed by zach.ware
#21580: PhotoImage(data=...) apparently has to be UTF-8 or Base-64 enc
http://bugs.python.org/issue21580 closed by serhiy.storchaka
#21591: "exec(a, b, c)" not the same as "exec a in b, c" in nested fun
http://bugs.python.org/issue21591 closed by djc
#21704: _multiprocessing module builds incorrectly when POSIX semaphor
http://bugs.python.org/issue21704 closed by Arfrever
#21867: Turtle returns TypeError when undobuffer is set to 0 (aka no u
http://bugs.python.org/issue21867 closed by berker.peksag
#21958: Allow python 2.7 to compile with Visual Studio 2013
http://bugs.python.org/issue21958 closed by zach.ware
#21990: saxutils defines an inner class where a normal one would do
http://bugs.python.org/issue21990 closed by rhettinger
#22003: BytesIO copy-on-write
http://bugs.python.org/issue22003 closed by pitrou
#22018: signal.set_wakeup_fd() should accept sockets on Windows
http://bugs.python.org/issue22018 closed by haypo
#22023: PyUnicode_FromFormat is broken on python 2
http://bugs.python.org/issue22023 closed by haypo
#22033: Subclass friendly reprs
http://bugs.python.org/issue22033 closed by serhiy.storchaka
#22041: http POST request with python 3.3 through web proxy
http://bugs.python.org/issue22041 closed by ned.deily
#22044: Premature Py_DECREF while generating a TypeError in call_tzinf
http://bugs.python.org/issue22044 closed by rhettinger
#22054: Add os.get_blocking() and os.set_blocking() functions
http://bugs.python.org/issue22054 closed by haypo
#22058: datetime.datetime() should accept a datetime.date as init para
http://bugs.python.org/issue22058 closed by rhettinger
#22066: subprocess.communicate() does not receive full output from the
http://bugs.python.org/issue22066 closed by ezio.melotti
#22072: Fix typos in SSL's documentation
http://bugs.python.org/issue22072 closed by python-dev
#22073: Reference links in PEP466 are broken
http://bugs.python.org/issue22073 closed by ned.deily
#22074: Lib/test/make_ssl_certs.py fails with NameError
http://bugs.python.org/issue22074 closed by pitrou
#22075: Lambda, Enumerate and List comprehensions crash
http://bugs.python.org/issue22075 closed by ned.deily
#22076: csv module bad grammar in exception message
http://bugs.python.org/issue22076 closed by berker.peksag
#22078: io.BufferedReader hides ResourceWarnings when garbage collecte
http://bugs.python.org/issue22078 closed by serhiy.storchaka
#22081: Backport repr(socket.socket) from Python 3.5 to Python 2.7
http://bugs.python.org/issue22081 closed by haypo
#22082: Clear interned strings listed in slotdefs
http://bugs.python.org/issue22082 closed by loewis
#22084: Mutating while iterating
http://bugs.python.org/issue22084 closed by ncoghlan
#22085: Drop support of Tk 8.3
http://bugs.python.org/issue22085 closed by serhiy.storchaka
#22089: collections.MutableSet does not provide update method
http://bugs.python.org/issue22089 closed by rhettinger
#22096: Argument Clinic: add ability to specify an existing impl funct
http://bugs.python.org/issue22096 closed by zach.ware
#22099: Two "Save As" Windows
http://bugs.python.org/issue22099 closed by ned.deily
#22101: collections.abc.Set doesn't provide copy() method
http://bugs.python.org/issue22101 closed by rhettinger
#22106: Python 2 docs 'control flow/pass' section contains bad example
http://bugs.python.org/issue22106 closed by rhettinger
#22108: python c api wchar_t*/char* passing contradiction
http://bugs.python.org/issue22108 closed by loewis
#22109: Python failing in markupsafe module when running ansible
http://bugs.python.org/issue22109 closed by r.david.murray
#22111: Improve imaplib testsuite.
http://bugs.python.org/issue22111 closed by pitrou
#1508864: threading.Timer/timeouts break on change of win32 local time
http://bugs.python.org/issue1508864 closed by haypo
1
0