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
Change by Jim Carroll :
Removed file: https://bugs.python.org/file48661/codecs.patch
___
Python tracker
<https://bugs.python.org/issue38482>
___
___
Python-bugs-list m
Change by Jim Carroll :
Added file: https://bugs.python.org/file48662/codecs.patch
___
Python tracker
<https://bugs.python.org/issue38482>
___
___
Python-bugs-list mailin
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
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
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
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
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
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
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.
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
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
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
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
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.
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
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
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
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
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
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('
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
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
Jim Carroll added the comment:
Thanks for all your work !
--
___
Python tracker
<http://bugs.python.org/issue23136>
___
___
Python-bugs-list mailing list
Unsub
24 matches
Mail list logo