Walter Dörwald added the comment:
I dug up an ancient email about that subject:
>>> However, I've discovered that BufferedIncrementalEncoder.getstate()
>>> doesn't match the specification (i.e. it returns the buffer, not an
>>> int). However this class is
Walter Dörwald added the comment:
"\n \r\n \r \u2028".split() should have been "\n \r\n \r \u2028".split(" "),
i.e. a list of different line ends.
> The purpose of these tests is not entirely clear, so I'm not sure that it is
> properly grasped t
Walter Dörwald added the comment:
True, here's an updated patch.
--
Added file: http://bugs.python.org/file33933/fix_linetests2.diff
___
Python tracker
<http://bugs.python.org/is
Changes by Walter Dörwald :
--
nosy: -doerwalter
___
Python tracker
<http://bugs.python.org/issue2636>
___
___
Python-bugs-list mailing list
Unsubscribe:
Walter Dörwald added the comment:
Here is a stacktrace of the crash with the system Python 2.6.1 on Mac OS
X 10.6.1:
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x00010100
0x7fff810f96b8 in XML_SetEncoding ()
(gdb) bt
#0
Walter Dörwald added the comment:
http://docs.python.org/library/csv.html#module-csv states:
This version of the csv module doesn’t support Unicode input. Also,
there are currently some issues regarding ASCII NUL characters.
Accordingly, all input should be UTF-8 or printable ASCII to be safe
Walter Dörwald added the comment:
Then the solution should simply be to use "utf-8-sig" as the encoding,
instead of "utf-8".
--
___
Python tracker
<http://bu
Walter Dörwald added the comment:
Done: issue 7300.
--
___
Python tracker
<http://bugs.python.org/issue7267>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Walter Dörwald :
str.format() doesn't handle unicode arguments:
Python 2.6.4 (r264:75706, Oct 27 2009, 15:18:04)
[GCC 4.2.1 (Apple Inc. build 5646)] on darwin
Type "help", "copyright", "credits" or "license" for more information
Walter Dörwald added the comment:
>> I'm not sure what the functions should do when start and end are
>> out of range.
>
> I think the best approach would be to prevent these values to be out of
> range in the first place.
The start and end values should be clipped,
Walter Dörwald added the comment:
IMHO this is the wrong approach.
As Martin v. Löwis suggested here
http://mail.python.org/pipermail/python-dev/2010-January/094841.html the best
solution would be a new codec (which he named sniff), that autodetects the
encoding on reading. This doesn
Walter Dörwald added the comment:
I can confirm this problem in the current version in the py3k branch.
This seems to be a problem in the CJK codecs. Assigning to Hye Shik Chang.
--
assignee: -> hyeshik.chang
nosy: +doerwalter, hyeshik.chang
stage: -> needs
Walter Dörwald added the comment:
Indeed this patch does fix the bug. Go ahead and check it in.
--
___
Python tracker
<http://bugs.python.org/issue5640>
___
___
Walter Dörwald added the comment:
test_quopri has a decorator that calls a test using both the C and
Python version of the tested function. This decorator looks like this:
def withpythonimplementation(testfunc):
def newtest(self):
# Test default implementation
testfunc(self
New submission from Walter Dörwald :
This patchs makes it possible to use tabs for indenting the output of
json.dumps(). With this patch the indent argument can now be either an
integer specifying the number of spaces per indent level or a string
specifying the indent string directly
Walter Dörwald added the comment:
The problem with your patch is that it calls PyUnicode_DecodeUTF8()
twice. It would be better if step 1 in the code would include the %s
format specifiers and step 3 would then call PyUnicode_DecodeUTF8() and
put the result into the callresults buffer.
BTW, I
Walter Dörwald added the comment:
It *does* return u'\u1d79' for me on Python 2.5.2:
>>> u'\u1d79'.lower()
u'\u1d79'
>>> import sys
>>> sys.version
'2.5.2 (r252:60911, Apr 8 2008, 18:54:00) \n[GCC 3.3.5 (Debian
1:3.3.5-13)]
Walter Dörwald added the comment:
The following patch fixes the problem for me, however it breaks the test
suite. The change seems to have been introduced in r66362.
Assigning to Martin.
--
assignee: -> loewis
nosy: +loewis
stage: -> patch review
Added file: http://bugs.pyth
Walter Dörwald added the comment:
Updated the patch (diff2.txt) as requested by Amaury.
--
Added file: http://bugs.python.org/file13759/diff2.txt
___
Python tracker
<http://bugs.python.org/issue5
Walter Dörwald added the comment:
There's an EnvironmentVarGuard context manager in support.py that IMHO
should be used for recording changes to the environment variables. Or a
new context manager that does what your patch does could be put into
support.py. There might be other tests
Walter Dörwald added the comment:
Here is a third version of the patch. AFAICT the logic of the unicode
database is as follows:
* If the NODELTA_MASK is not set, delta is an offset.
* If NODELTA_MASK is set and delta is != 0, delta is the
upper/lower/title case character.
* If NODELTA_MASK is
Walter Dörwald added the comment:
Hmm, EnvironmentVarGuard seems to be broken:
import os
from test import support
with support.EnvironmentVarGuard() as env:
env.unset("HOME")
env.set("HOME", "bar")
print(os.environ.get("HOME"))
I would have
New submission from Walter Dörwald :
support.EnvironmentVarGuard seems to be broken:
import os
from test import support
print(os.environ.get("HOME"))
with support.EnvironmentVarGuard() as env:
env.unset("HOME")
env.set("HOME", "foo")
print(os.e
Walter Dörwald added the comment:
Here's a patch that changes EnvironmentVarGuard to make a copy of
os.environ at the start. The set and unset methods are useless now, but
I left them in for backwards compatibility. Should they be removed?
--
Added file: http://bugs.pytho
Walter Dörwald added the comment:
That's exactly what I was thinking too. Here's the patch. Running the
test suite now.
--
Added file: http://bugs.python.org/file13764/diff2.txt
___
Python tracker
<http://bugs.python.
Walter Dörwald added the comment:
If you want to restore only those environment variables that have change
you somehow have to record which *do* have changed, i.e. you'd have to
go through EnvironmentVarGuard again. I'm working on a patch that
Walter Dörwald added the comment:
OK, I'll remove the clear method (which is a new feature) and then check
it in.
--
___
Python tracker
<http://bugs.python.org/i
Walter Dörwald added the comment:
This might have something to do with the _keymap hook.
--
___
Python tracker
<http://bugs.python.org/issue5837>
___
___
Pytho
Walter Dörwald added the comment:
You're right checking both in unset() and __exit__() fixes the importlib
failures. I'll check in the fix.
--
___
Python tracker
<http://bugs.python.
Walter Dörwald added the comment:
Checked in:
r71875 (trunk)
r71876 (release26-maint)
r71881 (py3k)
r71885 (release30-maint)
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/
Walter Dörwald added the comment:
I've merged your version of the patch with my changes to the test suite
and regenerated the Unicode database. Attached is the resulting patch
(diff4.txt)
--
Added file: http://bugs.python.org/file13768/diff
Walter Dörwald added the comment:
Checked in:
r71894 (trunk)
r71895 (release26-maint)
--
___
Python tracker
<http://bugs.python.org/issue5828>
___
___
Python-bug
Walter Dörwald added the comment:
Checked in:
r71896 (py3k)
r71897 (release30-maint)
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/
Walter Dörwald added the comment:
BTW, are the steps to regenerate the Unicode database documented
somewhere? What I did was:
cp /Volumes/ftp.unicode.org/Public/5.1.0/ucd/UnicodeData.txt .
cp /Volumes/ftp.unicode.org/Public/5.1.0/ucd/CompositionExclusions.txt .
cp /Volumes/ftp.unicode.org
Changes by Walter Dörwald :
--
assignee: doerwalter -> loewis
___
Python tracker
<http://bugs.python.org/issue5828>
___
___
Python-bugs-list mailing list
Un
Walter Dörwald added the comment:
This is not a bug in Python.
In Python 3.0 "print" is a function, so
print buildConnectionString(myParams)
should read
print(buildConnectionString(myParams))
Closing as invalid.
--
nosy: +doerwalter
resolution: -> invalid
Walter Dörwald added the comment:
Checked in:
r72260 (trunk)
r72262 (release26-maint)
r72265 (py3k)
r72266 (release30-maint)
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/
Walter Dörwald added the comment:
Checked in:
r72404,72406 (trunk)
r72408 (py3k)
As IMHO this is somewhat between a feature and a bugfix, I didn't check
it into release26-maint and release30-maint.
--
resolution: -> fixed
status: open -
Walter Dörwald added the comment:
The patch no longer applies cleanly to the trunk.
--
nosy: +doerwalter
___
Python tracker
<http://bugs.python.org/issue1
Walter Dörwald added the comment:
Any custom mapping class should have a repr test anyway, so IMHO it
doesn't matter whether the base test has a repr test or not.
The suggested fixes for TestMappingProtocol.test_fromkeys() and
TestHashMappingProtocol.test_mutatingiteration() sound OK ho
Walter Dörwald added the comment:
This was done because the codec state is part of the return value of
tell(). To have a reasonable return value (i.e. one with just the
position itself) in as many cases as possible it makes sense to design
the codec state in such a way, that the most common
Walter Dörwald added the comment:
AFAICR the difference is: 2.x may return any object in getstate(), but
py3k must return a (buffered input, integer) tuple. Simply moving py3ks
getstate/setstate implementation over to 2.x might do the trick
New submission from Walter Dörwald :
This patch adds a function unicodedata.script() that returns information
about the script of the Unicode character.
--
components: Unicode
files: unicode-script.diff
keywords: patch
messages: 89642
nosy: doerwalter
severity: normal
status: open
title
Walter Dörwald added the comment:
http://bugs.python.org/6331 is a patch that adds unicode script info to
the unicode database.
--
nosy: +doerwalter
___
Python tracker
<http://bugs.python.org/issue2
Walter Dörwald added the comment:
Martin v. Löwis wrote:
> Martin v. Löwis added the comment:
>
> I think the patch is incorrect: the default value for the script
> property ought to be Unknown, not Common (despite UCD.html saying the
> contrary; see UTR#24 and Scripts.txt).
Changes by Walter Dörwald :
Added file: http://bugs.python.org/file14356/unicode-script-2.diff
___
Python tracker
<http://bugs.python.org/issue6331>
___
___
Python-bug
Walter Dörwald added the comment:
I was comparing apples and oranges: The 229 entries for the trunk where
for an UCS2 build (the patched version was UCS4), with UCS4 there are
317 entries for the trunk.
size unicodedata.o gives:
__TEXT __DATA __OBJC others dec hex
13622 587057 0
Walter Dörwald added the comment:
Here is a new version that includes a new function scriptl() that
returns the script name in lowercase.
--
Added file: http://bugs.python.org/file14418/unicode-script-3.diff
___
Python tracker
<h
Walter Dörwald added the comment:
> > I’d be grateful if someone could post links to discussion
> > about the removal of codecs like hex and rot13
> r55932 (~3 years ago):
That was my commit. ;)
> Thanks for the link. Do you have a pointer to the PEP or ML thread
> d
Walter Dörwald added the comment:
The code for case 's'/'z' in py3k is indeed the same as for case 'U'. The patch
looks good to me.
IMHO removing 'U' should only be done once Py2 is dead.
--
___
Python tr
Walter Dörwald added the comment:
Yes, I think you should apply the patch.
--
___
Python tracker
<http://bugs.python.org/issue8848>
___
___
Python-bugs-list m
New submission from Walter Dörwald:
I'm trying to compile Python 3.6 from source on MacOS X Sierra. However it
seems that the _ssl module doesn't get built. Attached is the complete output.
Note that I have openssl installed via homebrew:
~/ ▸ brew list openssl
/usr/local/Cell
Walter Dörwald added the comment:
No, neither CFLAGS nor LDFLAGS are set, the only "FLAGS" environment variable I
have set is ARCHFLAGS='-arch x86_64' (I can't remember why). However unsetting
this variable doesn't change the result.
--
Walter Dörwald added the comment:
OK, I've set CFLAGS and LDFLAGS as you suggested. However the ssl module still
doesn't get built. Attached is the new build log (Python3.6-build2.log)
--
Added file: http://bugs.python.org/file46073/Python3.6-
Walter Dörwald added the comment:
OK, with the fixed CFLAGS definition I do indeed get a working ssl module.
I wonder whether the link Ned posted should be put into the README file.
Anyway I think the issue can be closed. Thanks for the help
Walter Dörwald added the comment:
The point of using a function is to allow the function special hanling of the
encoding name, which goes beyond a simple map lookup, i.e. you could do the
following:
import codecs
def search_function(encoding):
if not encoding.startswith("a
Changes by Walter Dörwald :
--
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue19834>
___
___
Python-bugs-list mailing list
Unsubscrib
New submission from Walter Dörwald:
inspect.Signature.bind() doesn't add values for parameters that are unspecified
but have a default value. The documentation at
https://docs.python.org/3/library/inspect.html#inspect.BoundArguments.arguments
includes an example how to add default values
Walter Dörwald added the comment:
The following doesn't work::
import inspect
def foo(*args, **kwargs):
return (args, kwargs)
# Code from
https://docs.python.org/3/library/inspect.html#inspect.BoundArguments.arguments
to fill in the defaults
sig = inspect.signatur
Walter Dörwald added the comment:
The updated code in the documentation still doesn't set the * and **
parameters. I would have preferred the following code:
for param in sig.parameters.values():
if param.name not in ba.arguments:
if param.kind is inspect.Parameter.VAR_POSIT
Walter Dörwald added the comment:
That analysis seems correct to me.
Stateless and stream codecs were the original implementation. 2006 I
implemented incremental codecs: http://bugs.python.org/issue1436130
The intent was to have stateful codecs that can work with iterators and
generators
New submission from Walter Dörwald:
When an exception is raised by inspect.Signature.bind() in some cases the
exception has a StopIteration as its __context__:
import inspect
try:
inspect.signature(lambda x:None).bind()
except Exception as exc:
print(repr(exc))
print(repr(exc
Walter Dörwald added the comment:
Don't worry, I've switched to using Python 3 in 2012, where this isn't a
problem. ;)
--
___
Python tracker
<http://bugs.py
Walter Dörwald added the comment:
> Who's talking about latin-1 in Python3? Of course str() needs to return
> decode('utf-8').
So that would mean that:
print(b"\xff")
will always fail!
--
nosy: +doerwalter
__
Walter Dörwald added the comment:
But this leads to uninspectable objects.
--
___
Python tracker
<http://bugs.python.org/issue26151>
___
___
Python-bugs-list m
Walter Dörwald added the comment:
The linked code at https://github.com/vadmium/python-iview/commit/68b0559 seems
strange to me:
try:
text.encode(encoding, textio.errors or "strict")
except UnicodeEncodeError:
text = text.encode(encoding, errors).decod
Walter Dörwald added the comment:
The patch does indeed fix the segmentation fault. However the exception message
looks confusing:
TypeError: don't know how to handle UnicodeEncodeError in error callback
--
___
Python tracker
Walter Dörwald added the comment:
Looks much better. However shouldn't:
exc->ob_type->tp_name
be:
Py_TYPE(exc)->tp_name
(although there are still many spots in the source that still use
ob_type->tp_name)
--
___
Pyth
Walter Dörwald added the comment:
I don't think that's necessary. What's the use case for this?
And if we want to to this, wouldn't it be better to enhance datetime, so that
this use case is supported too?
--
___
P
101 - 169 of 169 matches
Mail list logo