[issue38482] BUG in codecs.BufferedIncrementalDecoder

2019-10-15 Thread Jim Carroll
New submission from Jim Carroll : While working with codecs.iterdecode(), encountered "can't concat int to bytes". The source of the problem is BufferedIncrementalDecoder stores it's internal buffer as a bytes (ie: b""), but decode() can be passed either a

[issue38482] BUG in codecs.BufferedIncrementalDecoder

2019-10-15 Thread Jim Carroll
Change by Jim Carroll : Removed file: https://bugs.python.org/file48661/codecs.patch ___ Python tracker <https://bugs.python.org/issue38482> ___ ___ Python-bugs-list m

[issue38482] BUG in codecs.BufferedIncrementalDecoder

2019-10-15 Thread Jim Carroll
Change by Jim Carroll : Added file: https://bugs.python.org/file48662/codecs.patch ___ Python tracker <https://bugs.python.org/issue38482> ___ ___ Python-bugs-list mailin

[issue38482] BUG in codecs.BufferedIncrementalDecoder

2019-10-15 Thread Jim Carroll
Jim Carroll added the comment: According to the documentation (https://docs.python.org/3.7/library/codecs.html#codecs.iterdecode), the first parameter is a bytes object to decode (not an iterable of bytes). Which is also consistent with it's companion iterencode() which accepts a str o

[issue38485] BUG Modules/_io/texio.c

2019-10-15 Thread Jim Carroll
New submission from Jim Carroll : The io.TextIOWrapper class initializes a codec.IncrementalEncoder and uses it to encode str, but it never calls the encoder's encode('', final=True). According to the docs https://docs.python.org/3.5/library/codecs.html#codecs.Incrementa

[issue38482] BUG in codecs.BufferedIncrementalDecoder

2019-10-15 Thread Jim Carroll
Jim Carroll added the comment: I understand. btw; I did a deep dive on cpython codebase, and the only references to codecs.iterencode()/iterdecode() is in ./Lib/tests/test_codecs.py. I suspect functions are not used by many people. The patch I proposed was a three line change that would

[issue38611] Bug in traceback.py

2019-10-28 Thread Jim Carroll
New submission from Jim Carroll : _elementtree.c defines a custom exception 'xml.etree.ElementTree.ParseError' that inherits from SyntaxError. According to the docs https://docs.python.org/3/library/exceptions.html#SyntaxError ``Instances of this class have attributes filena

[issue38611] ElementTree.ParseError does not implement SyntaxError interface as expected

2019-10-29 Thread Jim Carroll
Jim Carroll added the comment: This patch solves the issue diff --git a/Modules/_elementtree.c b/Modules/_elementtree.c index c3f30c9339..d265021f75 100644 --- a/Modules/_elementtree.c +++ b/Modules/_elementtree.c @@ -2782,6 +2782,7 @@ treebuilder_handle_start(TreeBuilderObject* self

[issue23407] os.walk always follows Windows junctions

2019-11-15 Thread Jim Carroll
Jim Carroll added the comment: I can confirm the os.walk() behavior still exists on 3.8. Just curious on the status of the patch? -- nosy: +jamercee ___ Python tracker <https://bugs.python.org/issue23

[issue40771] python3 fromtimestamp generates OSError

2020-05-25 Thread Jim Carroll
New submission from Jim Carroll : We encountered an interesting mtime problem in the field, that I believe represents a bug in python's datetime timestamp handling. A file stored on a windows server had the last-modified date '1/1/4501' (that's the year 4501). os.path.

[issue40771] python3 fromtimestamp generates OSError

2020-05-26 Thread Jim Carroll
Jim Carroll added the comment: My bad. I read the docs, but mistakenly believed platform support meant OS. I figured since Windows maketh then Windows should taketh. I've spent the day studying the _datetimemodule.c code and now realize my error. Question -- it seems to me an unnece

[issue35789] Typo in unittest.mock docs

2019-01-20 Thread Jim Carroll
New submission from Jim Carroll : There is a typo in the unittest.mock documentation found at https://docs.python.org/3/library/unittest.mock.html. There are seven(7) instances of the word assret, where the author clearly intended assert. -- assignee: docs@python components

[issue35789] Typo in unittest.mock docs

2019-01-20 Thread Jim Carroll
Jim Carroll added the comment: Never mindi see this issue has been reported previously and the typo is considered intentional. -- stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/i

[issue18341] enhancements zlib.compress/decompress to accept Py_buffer

2013-07-01 Thread Jim Carroll
New submission from Jim Carroll: We were looking to squeak maximum performance out of zlib.compress. We noticed in py3k, zlib.compress already accepts Py_buffer’s, but in 2.x, compress required strings. We’ve modified the compress (and decompress for orthogonal completeness), see the

[issue22199] Embedding Python documentation error

2014-08-14 Thread Jim Carroll
New submission from Jim Carroll: On the page https://docs.python.org/2/extending/embedding.html#compiling-and-linking-under-unix-like-systems The documentation makes the following reference: "...(use sysconfig.get_makefile_filename() to find its location)..." But this is incorrect.

[issue19998] Python 2.7.6 fails to build _ctypes on GCC 2.x toolchain

2013-12-16 Thread Jim Carroll
New submission from Jim Carroll: When building Python 2.7.6 on older GCC 2.x, the _ctypes module fails to build. The failure is caused due to a header file reference to __builtin_expect (the author expected this to be available when the module was built with gcc, but did not take into account

[issue19998] Python 2.7.6 fails to build _ctypes on GCC 2.x toolchain

2013-12-17 Thread Jim Carroll
Jim Carroll added the comment: As requested, I've opened the issue with the libffi project: https://github.com/atgreen/libffi/issues/63 -- ___ Python tracker <http://bugs.python.org/is

[issue23129] sqlite3 COMMIT nested in SELECT returns unexpected results

2014-12-29 Thread Jim Carroll
New submission from Jim Carroll: I reported this to the sqlite mailing list, and the comments I received suggested the problem may by the python sqlite connector issue, so I'm opening this as a bug report. I understand that performing a SELECT and nested COMMIT on the same table is

[issue23129] sqlite3 COMMIT nested in SELECT returns unexpected results

2014-12-29 Thread Jim Carroll
Jim Carroll added the comment: Hi David, One more data point. Although I demonstrated the bug using the .execute() method associated with a connection object -- you can also create the exact problem using the .execute() method associated with cursors. This leaves no means to COMMIT inside a

[issue23129] sqlite3 COMMIT nested in SELECT returns unexpected results

2014-12-30 Thread Jim Carroll
Jim Carroll added the comment: Completely understood. I recently found a workaround. Setting isolation_level to None seems to mitigate the issue, ie: db = sq.connect(':memory:', isolation_level=None) I'm hoping to put some time in scrutinizing the c-api code later this w

[issue23136] BUG in how _strptime() handles week 0

2014-12-30 Thread Jim Carroll
New submission from Jim Carroll: The following bit of code demonstrates a bug in how _strptime handles week 0. The bug is an edge condition that specifically affects how it handles two days before the first day of the new year >>> for i in range(7): ... datetime.strptime('

[issue23136] BUG in how _strptime() handles week 0

2014-12-31 Thread Jim Carroll
Jim Carroll added the comment: I understand. Actually, raising an exception would be perfectly acceptable as well (possibly even more desirable). I too experimented with the c-lib strptime() and discovered the negative values of tm_mday. These results are good too -- as they clearly show the

[issue23136] BUG in how _strptime() handles week 0

2015-01-02 Thread Jim Carroll
Jim Carroll added the comment: All the proposed patches are acceptable from my point of view, but it would be really great if we could get the fix in the 2.x line. It seems unlikely there could be any legacy code that would depend on the bug to exist (ie: to only be wrong when then date

[issue23136] BUG in how _strptime() handles week 0

2015-03-19 Thread Jim Carroll
Jim Carroll added the comment: Thanks for all your work ! -- ___ Python tracker <http://bugs.python.org/issue23136> ___ ___ Python-bugs-list mailing list Unsub