New submission from Merlijn van Deen :
Summary: Somewhere between 2.6.5 r79063 and 3.1 r79147 a regression in the
unicode NFC normalization has been introduces. This regression leads to bot
edit wars on wikipedia [1]. It is reproducable with a simple script [2].
Mediawiki/PHP [3] and C# [4
Merlijn van Deen added the comment:
Please note: The bug might very well be present in python 3.2 and 3.3. However,
I do not have these versions installed, so I cannot confirm this.
--
___
Python tracker
<http://bugs.python.org/issue10
Merlijn van Deen added the comment:
No, I do not, for several reasons.
First of all, this is not a change *from* previous behaviour, but a change
*back to* previous behaviour. And sensible behaviour, too.
Secondly, I have tested what getpass does on windows (Python 2.7.1 (r271:86832,
Nov 27
Merlijn van Deen added the comment:
@orsenthil
> Close similarity with getpass.c 's behavior had lent some to support to this
> change in 2.6. Changing now in older codeline has some chances of breaking
> others code.
> Someone who has been affected by this change in behavi
New submission from Merlijn van Deen :
In python 2.5, entering ^C in a getpass prompt yields a KeyboardInterrupt. In
later versions, nothing happens, and '\x03' is returned after pressing return.
In python 2.5, entering ^Z in a getpass prompt suspends the process. In later
version
Merlijn van Deen added the comment:
To allow people to cancel at the password prompt, we added a manual post-check.
Although this check runs after return is pressed, it's better than nothing.
Index: branches/rewrite/pywikibot/userinterfaces/terminal_interfa
Merlijn van Deen added the comment:
Sorry, I'm not going to run my patch through the entire test suite, I've got
better things to do with my time than setting up a working
python-development-test-bench. Especially for a one-line-revert.
The result now is:
valhallasw@dortho
Merlijn van Deen added the comment:
Linux-2.6.22.18-co-0.7.4-i686-with-Ubuntu-10.04-lucid (the 'on linux2'
versions) and Solaris-2.10-i86pc-i386-32bit-ELF (the 'on sunos5').
--
___
Python tracker
<http://bug
Changes by Merlijn van Deen :
--
nosy: +valhallasw
___
Python tracker
<http://bugs.python.org/issue6784>
___
___
Python-bugs-list mailing list
Unsubscribe:
Merlijn van Deen added the comment:
Any news on this?
Just as a note, pickletools.py also does not reflect the current behaviour;
pickle types STRING, BINSTRING and SHORT_BINSTRING are all defined with
stack_after=[pystring]:
[1, line 992]
I(name='STRING',
code=
Merlijn van Deen added the comment:
Last night, I hacked together a wrapper to do what loewis suggested [1]. It
pickles bytes to str (for protocol <= 2), and unpickles str to bytes.
If I (ever) get the build system and tests of python itself to work, I'll try
and see if I can imp
Changes by Merlijn van Deen :
Added file: http://bugs.python.org/file24567/test_bytestrpickle.py
___
Python tracker
<http://bugs.python.org/issue6784>
___
___
Python-bug
Merlijn van Deen added the comment:
OK, this is the pickle.py patch. A new parameter 'bytestr' has been added to
both _Pickler and _Unpickler to toggle the pickle.string<=>bytes behaviour:
_Pickler:
IF protocol <= 2 AND bytestr=True
THEN bytes are stored as STRING/SHORT_
Merlijn van Deen added the comment:
P.S. (sorry for forgetting this in the original post ;-))
Both
./python -m test -G -v test_pickle
and
./python test_bytestrpickle.py
pass, but I have not run the entire test suite, as that takes ~90 minutes on my
laptop
The test script should of
New submission from Merlijn van Deen :
While working on #6784, I've looked at _pickle.c and found it quite...
daunting: 6500 lines and 185kB. I have been working on a bit of cleanup, and
I'd like some comments on this.
I'm working on adapting
_pickle.c into the following struct
Merlijn van Deen added the comment:
That makes sense. The goal was not so much cleaning up the module per se;
rather, it was a result of trying to understand the general structure of
_pickler.c specifically.
However, is there an intermediate level of 'modularization' you would pro
Merlijn van Deen added the comment:
See https://bitbucket.org/valhallasw/cpython/src/ee0d2beaf6a4/Modules/_pickle.c
for a rough structure overview - which maybe also explains why I thought
restructuring made sense in the first place.
However, I'm not the person who has to maintain the m
Merlijn van Deen added the comment:
Ok, this is my first attempt at the Pickler part of the C implementation. I'll
have to adapt the python implementation to match this one.
All BytestrPicklerTests in test_bytestrpickle.py pass, and ./python -m test -G
-v test_pickle passes.
Commen
New submission from Merlijn van Deen :
As suggested by loewis in msg154233, I created some documentation to help
people get started with _pickle.c.
--
assignee: docs@python
components: Documentation, Extension Modules
files: _pickle_c_doc.diff
keywords: patch
messages: 154284
nosy
Changes by Merlijn van Deen :
--
nosy: +loewis
___
Python tracker
<http://bugs.python.org/issue14124>
___
___
Python-bugs-list mailing list
Unsubscribe:
Merlijn van Deen added the comment:
Added tests in Lib/test format.
After applying pickle.py.patch and BytestrPickler_c.diff,
./python -m test -v -m PyPicklerBytestrTests test_pickle
returns 12 tests, no errors, while
./python -m test -v -m CPicklerBytestrTests test_pickle
only
Merlijn van Deen added the comment:
And a complete patch that implements the tests, the python implementation and
the C implementation. I'm not completely happy with the code duplication in
read_string/read_binstring/read_short_binstring C implementation, so that might
be an improv
Changes by Merlijn van Deen :
Removed file: http://bugs.python.org/file24567/test_bytestrpickle.py
___
Python tracker
<http://bugs.python.org/issue6784>
___
___
Python-bug
Merlijn van Deen added the comment:
OK, and now a version that's not broken... I forgot to initialize self->bytestr
for PicklerObject/UnpicklerObject. *puts on the you-broke-the-build-hat*
Except for test_packaging.test_caches, this version passes all tests --
test_packaging.tes
Changes by Merlijn van Deen :
Removed file: http://bugs.python.org/file24714/pickle_bytestr.patch
___
Python tracker
<http://bugs.python.org/issue6784>
___
___
Python-bug
Merlijn van Deen added the comment:
Two questions:
(1) can this be at least be added as a big fat warning in the documentation?
(2) would it be a reasonable option to let either
(a) the creation of a Pool
(b) executing something using the Pool
cause an exception when it happens during the
Merlijn van Deen added the comment:
numpy.sign does this:
http://docs.scipy.org/doc/numpy/reference/generated/numpy.sign.html
--
nosy: +valhallasw
___
Python tracker
<http://bugs.python.org/issue829
Merlijn van Deen added the comment:
I'm not quite sure why that formula would be "elegant" in the first place, and
I most certainly don't understand why
0.5*sign((100*YY)+MM-190002.5) + 0.5
is more elegant than
((100*YY)+MM > 190002.5)
or
(((YY = 1900) and (MM >
Merlijn van Deen added the comment:
Although there is one use case which I now realise due to your post: easier
1-on-1 implementation of existing algorithms.
Another possible reason to implement it is that it's not that hard to implement
the sign() function wrongly, if it also has to
Merlijn van Deen added the comment:
Based on the discussion on python-dev [1], this is an updated implementation
that uses encoding='bytes' to signal str->bytes behaviour.
http://mail.python.org/pipermail/python-dev/2012-March/117536.html
--
Added file: http://bu
Merlijn van Deen added the comment:
...and the tests to go with that.
--
Added file: http://bugs.python.org/file24907/pickle_bytes_tests.diff
___
Python tracker
<http://bugs.python.org/issue6
Merlijn van Deen added the comment:
JSON does not have the distinction between bytes and unicode; py2 strings are
coerced into unicode.
I think it would be better to speak about 'JSON string' or 'JSON string
element' if it's JSON and about 'unicode' (2.7)
Merlijn van Deen added the comment:
Maybe, but python.org also is the host of CPython itself (and this issue
tracker is also for issues on the programming language).
I think the "Core development" page makes sense, but having it in a sidebar
instead of somewhere at the bottom o
New submission from Merlijn van Deen:
Steps to reproduce:
---
>>> eval("u'รค'")
# in an utf-8 console, so this is equivalent to
>>> eval("u'\xc3\xa4'")
Actual result:
u'\xc3\xa4'
# i.e.: u'
Merlijn van Deen added the comment:
On the lowest level, this affects exec, eval(), compile() and input() (!). On a
higher level, more modules are affected:
modules ast, codeop, compiler, cProfile, dis, distutils (not sure), doctest,
idlelib, ihooks, pdb, pkgutil, plat-mac, py_compile, rexec
Merlijn van Deen added the comment:
To confirm this behaviour is still current:
Python 3.3.0a1+ (default:958a98bf924e+, May 21 2012, 22:18:16)
[GCC 4.5.2] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> impo
New submission from Merlijn van Deen :
The amount of errors in the solution during the windows build was surprising to
me - I interpreted it as if python was not built correctly. Upon further
inspection, just some extension modules were not built due to missing
dependencies, and the
Merlijn van Deen added the comment:
Thanks for your responses!
@Ezio:
1) I can see your point. On the other hand, I also think it is helpful to have
a prominent note on this - the first thing people see after following the
instructions is a huge list of build errors (see the bottom of this
Merlijn van Deen added the comment:
OK, I did some quick tests. Given a samba share with the following files
A (contents: 'test: A')
a (contents: 'test: a')
B (contents: 'test: B')
1) opening \\share\files\A or \\share\files\a opens the same file - in my
cas
New submission from Merlijn van Deen :
http://docs.python.org/library/threading.html#importing-in-threaded-code
Currently, the documentation states
"Firstly, other than in the main module, an import should not have the side
effect of spawning a new thread and then waiting for that thre
Changes by Merlijn van Deen :
Removed file: http://bugs.python.org/file26037/deadlock.py
___
Python tracker
<http://bugs.python.org/issue15097>
___
___
Python-bugs-list m
Changes by Merlijn van Deen :
Added file: http://bugs.python.org/file26038/deadlock.py
___
Python tracker
<http://bugs.python.org/issue15097>
___
___
Python-bugs-list m
Merlijn van Deen added the comment:
First off, thank you for your response.
> The existence of an import lock is deliberately omitted from the text,
> and the reader is supposed to abide by the restriction as written
> regardless of the motivation behind it.
> The entire notion
New submission from Merlijn van Deen:
Which would make sense, but email.policy.Compat32 is *actually* the default
policy. This patch adapts the documentation to reflect this.
--
assignee: docs@python
components: Documentation
files: defaultpolicy.diff
keywords: patch
messages: 216783
New submission from Merlijn van Deen:
Bugzilla sends e-mail in a format where =?UTF-8 is not preceded by whitespace.
This makes email.headerregistry.UnstructuredHeader (and
email._header_value_parser on the background) not recognise the structure.
>>> import email.headerregistry, ppr
Changes by Merlijn van Deen :
--
keywords: +patch
type: -> behavior
Added file:
http://bugs.python.org/file34985/unstructured_ew_without_whitespace.diff
___
Python tracker
<http://bugs.python.org/issu
Merlijn van Deen added the comment:
Small typo that slipped in:
'udpate' instead of 'update' on the following lines:
http://hg.python.org/cpython/rev/63fa945119cb#l2.18
http://hg.python.org/cpython/rev/63fa945119cb#l2.43
http://hg.python.org/cpython/re
Changes by Merlijn van Deen :
Removed file: http://bugs.python.org/file24640/BytestrPickler_c.diff
___
Python tracker
<http://bugs.python.org/issue6784>
___
___
Python-bug
Changes by Merlijn van Deen :
Removed file: http://bugs.python.org/file24688/test_pickle.diff
___
Python tracker
<http://bugs.python.org/issue6784>
___
___
Python-bug
Changes by Merlijn van Deen :
Removed file: http://bugs.python.org/file24719/pickle_bytestr.patch
___
Python tracker
<http://bugs.python.org/issue6784>
___
___
Python-bug
Changes by Merlijn van Deen :
Removed file: http://bugs.python.org/file24906/pickle_bytes_code.diff
___
Python tracker
<http://bugs.python.org/issue6784>
___
___
Pytho
Changes by Merlijn van Deen :
Removed file: http://bugs.python.org/file24907/pickle_bytes_tests.diff
___
Python tracker
<http://bugs.python.org/issue6784>
___
___
Pytho
Changes by Merlijn van Deen :
Removed file: http://bugs.python.org/file24568/pickle.py.patch
___
Python tracker
<http://bugs.python.org/issue6784>
___
___
Python-bug
Merlijn van Deen added the comment:
Hi Alexandre,
Attached is a diff based on r87793:0c508d87f80b.
Merlijn
--
Added file: http://bugs.python.org/file33011/bytestrpickle.diff
___
Python tracker
<http://bugs.python.org/issue6
Merlijn van Deen added the comment:
I have fixed most of the nits in this patch, except for:
1) the intermediate bytes object being created; inlining is an option, as
storchaka suggested, but I'd rather have you decide what it should become
before implementing it;
2) make clinic giv
Merlijn van Deen added the comment:
My error is slightly different:
$ ./python -i -c "from test.test_ssl import *;
support.run_unittest(NetworkedTests)"
(...)
==
FAIL: test_connect_ex_error (test.test_ssl.Netw
Merlijn van Deen added the comment:
Yes, they are.
>>> errno.EWOULDBLOCK
11
EAGAIN and EWOULDBLOCK are the only two with that errno:
>>> [(k,v) for (k,v) in errno.__dict__.items() if v==11]
[('EWOULDBLOCK', 11), ('EAGAIN', 11)]
111 is just ECONNREFUSED:
Merlijn van Deen added the comment:
OK. I did some network sniffing; inside the VM, this is what I see:
$ sudo tshark host 82.94.164.164
tshark: Lua: Error during loading:
[string "/usr/share/wireshark/init.lua"]:45: dofile has been disabled
Running as user "root" and grou
Merlijn van Deen added the comment:
> so perhaps ntpath.join('c:/x', 'd:/y', 'c:z') should return 'c:/x\\z', not
> 'c:/z'.
'c:z' is consistent with what .NET's System.IO.Path.Combine does:
via http://ironpython.net/t
Merlijn van Deen added the comment:
Sorry, I was a bit too quick - I forgot to create c:\x\z. Now this is the
result:
c:\x\z>cd c:/x
c:\x>cd e:/y
c:\x>cd c:z
c:\x\z>
However, the behavior does not work in, for example, a 'Save as...' window,
where c:z will always re
Merlijn van Deen added the comment:
I'm not sure whether that question was aimed at me -- I think both options have
their merits, but I'd suggest to adopt the .NET semantics. The semantics are
also explicitly defined [1] and the behavior seems to be acceptable for the
.NET world.
Merlijn van Deen added the comment:
As Zachary explained, the behavior is correct. There are three issues in play
here.
1) The rounding method. With the ROUND_HALF_EVEN rounding mode, .5 is rounded
to the nearest *even* number, so 1.65 is rounded to 1.6, while 1.75 is rounded
to 1.8.
2
Merlijn van Deen added the comment:
As far as I can see, the regex is correct:
\Z
Matches only at the end of the string.
(?iLmsux)
The group matches the empty string; the letters set the corresponding flags:
(...)
- re.M (multi-line),
- re.S (dot matches all)
See https://docs.python.org
Merlijn van Deen added the comment:
They are subtly different; the new regex also matches filenames with newlines,
the old one doesn't (see Issue #6665 [1]).
Patch (although crazily minor) attached. With some fuzz, it applies on
everything from 2.6..default.
[1] https://bugs.pytho
64 matches
Mail list logo