[issue10254] unicodedata.normalize('NFC', s) regression

2010-10-30 Thread Merlijn van Deen
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

[issue10254] unicodedata.normalize('NFC', s) regression

2010-10-30 Thread Merlijn van Deen
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

[issue11236] getpass.getpass does not respond to ctrl-c or ctrl-z

2011-02-26 Thread Merlijn van Deen
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

[issue11236] getpass.getpass does not respond to ctrl-c or ctrl-z

2011-03-24 Thread Merlijn van Deen
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

[issue11236] getpass.getpass does not respond to ctrl-c or ctrl-z

2011-02-17 Thread Merlijn van Deen
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

[issue11236] getpass.getpass does not respond to ctrl-c or ctrl-z

2011-02-17 Thread Merlijn van Deen
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

[issue11236] getpass.getpass does not respond to ctrl-c or ctrl-z

2011-02-18 Thread Merlijn van Deen
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

[issue11236] getpass.getpass does not respond to ctrl-c or ctrl-z

2011-02-18 Thread Merlijn van Deen
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

[issue6784] byte/unicode pickle incompatibilities between python2 and python3

2012-02-14 Thread Merlijn van Deen
Changes by Merlijn van Deen : -- nosy: +valhallasw ___ Python tracker <http://bugs.python.org/issue6784> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue6784] byte/unicode pickle incompatibilities between python2 and python3

2012-02-18 Thread Merlijn van Deen
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=

[issue6784] byte/unicode pickle incompatibilities between python2 and python3

2012-02-19 Thread Merlijn van Deen
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

[issue6784] byte/unicode pickle incompatibilities between python2 and python3

2012-02-19 Thread Merlijn van Deen
Changes by Merlijn van Deen : Added file: http://bugs.python.org/file24567/test_bytestrpickle.py ___ Python tracker <http://bugs.python.org/issue6784> ___ ___ Python-bug

[issue6784] byte/unicode pickle incompatibilities between python2 and python3

2012-02-19 Thread Merlijn van Deen
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_

[issue6784] byte/unicode pickle incompatibilities between python2 and python3

2012-02-19 Thread Merlijn van Deen
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

[issue14118] _pickle.c structure cleanup

2012-02-24 Thread Merlijn van Deen
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

[issue14118] _pickle.c structure cleanup

2012-02-24 Thread Merlijn van Deen
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

[issue14118] _pickle.c structure cleanup

2012-02-25 Thread Merlijn van Deen
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

[issue6784] byte/unicode pickle incompatibilities between python2 and python3

2012-02-25 Thread Merlijn van Deen
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

[issue14124] _pickle.c comment/documentation improvement

2012-02-25 Thread Merlijn van Deen
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

[issue14124] _pickle.c comment/documentation improvement

2012-02-25 Thread Merlijn van Deen
Changes by Merlijn van Deen : -- nosy: +loewis ___ Python tracker <http://bugs.python.org/issue14124> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue6784] byte/unicode pickle incompatibilities between python2 and python3

2012-02-29 Thread Merlijn van Deen
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

[issue6784] byte/unicode pickle incompatibilities between python2 and python3

2012-03-02 Thread Merlijn van Deen
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

[issue6784] byte/unicode pickle incompatibilities between python2 and python3

2012-03-03 Thread Merlijn van Deen
Changes by Merlijn van Deen : Removed file: http://bugs.python.org/file24567/test_bytestrpickle.py ___ Python tracker <http://bugs.python.org/issue6784> ___ ___ Python-bug

[issue6784] byte/unicode pickle incompatibilities between python2 and python3

2012-03-03 Thread Merlijn van Deen
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

[issue6784] byte/unicode pickle incompatibilities between python2 and python3

2012-03-03 Thread Merlijn van Deen
Changes by Merlijn van Deen : Removed file: http://bugs.python.org/file24714/pickle_bytestr.patch ___ Python tracker <http://bugs.python.org/issue6784> ___ ___ Python-bug

[issue6147] multithreading.Pool.map() crashes Windows computer

2012-03-10 Thread Merlijn van Deen
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

[issue829370] math.signum(int)

2012-03-13 Thread Merlijn van Deen
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

[issue829370] math.signum(int)

2012-03-15 Thread Merlijn van Deen
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 >

[issue829370] math.signum(int)

2012-03-15 Thread Merlijn van Deen
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

[issue6784] byte/unicode pickle incompatibilities between python2 and python3

2012-03-17 Thread Merlijn van Deen
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

[issue6784] byte/unicode pickle incompatibilities between python2 and python3

2012-03-17 Thread Merlijn van Deen
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

[issue6566] json.dumps converts None to "null" (not null)

2012-03-17 Thread Merlijn van Deen
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)

[issue14361] No link to issue tracker on Python home page

2012-03-18 Thread Merlijn van Deen
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

[issue18870] eval() uses latin-1 to decode str

2013-08-28 Thread Merlijn van Deen
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'

[issue18870] eval() uses latin-1 to decode str

2013-08-29 Thread Merlijn van Deen
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

[issue4198] os.path.normcase gets fooled on windows with mapped linux network drive

2012-05-21 Thread Merlijn van Deen
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

[issue14873] Windows devguide: clarification for build errors due to missing optional dependencies

2012-05-21 Thread Merlijn van Deen
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

[issue14873] Windows devguide: clarification for build errors due to missing optional dependencies

2012-05-21 Thread Merlijn van Deen
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

[issue4198] os.path.normcase gets fooled on windows with mapped linux network drive

2012-05-22 Thread Merlijn van Deen
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

[issue15097] Improving wording on the thread-safeness of import

2012-06-17 Thread Merlijn van Deen
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

[issue15097] Improving wording on the thread-safeness of import

2012-06-17 Thread Merlijn van Deen
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

[issue15097] Improving wording on the thread-safeness of import

2012-06-17 Thread Merlijn van Deen
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

[issue15097] Improving wording on the thread-safeness of import

2012-06-17 Thread Merlijn van Deen
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

[issue21300] Docs (incorrectly) suggest email.policy.default is the default policy

2014-04-18 Thread Merlijn van Deen
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

[issue21315] email._header_value_parser does not recognise in-line encoding changes

2014-04-20 Thread Merlijn van Deen
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

[issue21315] email._header_value_parser does not recognise in-line encoding changes

2014-04-20 Thread Merlijn van Deen
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

[issue21300] Docs (incorrectly) suggest email.policy.default is the default policy

2014-05-08 Thread Merlijn van Deen
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

[issue6784] byte/unicode pickle incompatibilities between python2 and python3

2013-12-06 Thread Merlijn van Deen
Changes by Merlijn van Deen : Removed file: http://bugs.python.org/file24640/BytestrPickler_c.diff ___ Python tracker <http://bugs.python.org/issue6784> ___ ___ Python-bug

[issue6784] byte/unicode pickle incompatibilities between python2 and python3

2013-12-06 Thread Merlijn van Deen
Changes by Merlijn van Deen : Removed file: http://bugs.python.org/file24688/test_pickle.diff ___ Python tracker <http://bugs.python.org/issue6784> ___ ___ Python-bug

[issue6784] byte/unicode pickle incompatibilities between python2 and python3

2013-12-06 Thread Merlijn van Deen
Changes by Merlijn van Deen : Removed file: http://bugs.python.org/file24719/pickle_bytestr.patch ___ Python tracker <http://bugs.python.org/issue6784> ___ ___ Python-bug

[issue6784] byte/unicode pickle incompatibilities between python2 and python3

2013-12-06 Thread Merlijn van Deen
Changes by Merlijn van Deen : Removed file: http://bugs.python.org/file24906/pickle_bytes_code.diff ___ Python tracker <http://bugs.python.org/issue6784> ___ ___ Pytho

[issue6784] byte/unicode pickle incompatibilities between python2 and python3

2013-12-06 Thread Merlijn van Deen
Changes by Merlijn van Deen : Removed file: http://bugs.python.org/file24907/pickle_bytes_tests.diff ___ Python tracker <http://bugs.python.org/issue6784> ___ ___ Pytho

[issue6784] byte/unicode pickle incompatibilities between python2 and python3

2013-12-06 Thread Merlijn van Deen
Changes by Merlijn van Deen : Removed file: http://bugs.python.org/file24568/pickle.py.patch ___ Python tracker <http://bugs.python.org/issue6784> ___ ___ Python-bug

[issue6784] byte/unicode pickle incompatibilities between python2 and python3

2013-12-06 Thread Merlijn van Deen
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

[issue6784] byte/unicode pickle incompatibilities between python2 and python3

2013-12-06 Thread Merlijn van Deen
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

[issue19919] SSL: test_connect_ex_error fails with EWOULDBLOCK

2013-12-07 Thread Merlijn van Deen
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

[issue19919] SSL: test_connect_ex_error fails with EWOULDBLOCK

2013-12-07 Thread Merlijn van Deen
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:

[issue19919] SSL: test_connect_ex_error fails with EWOULDBLOCK

2013-12-07 Thread Merlijn van Deen
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

[issue19456] ntpath doesn't join paths correctly when a drive is present

2014-01-11 Thread Merlijn van Deen
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

[issue19456] ntpath doesn't join paths correctly when a drive is present

2014-01-11 Thread Merlijn van Deen
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

[issue19456] ntpath doesn't join paths correctly when a drive is present

2014-01-26 Thread Merlijn van Deen
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.

[issue24827] round(1.65, 1) return 1.6 with decimal

2015-08-08 Thread Merlijn van Deen
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

[issue24108] fnmatch.translate('*.txt') fails

2015-05-01 Thread Merlijn van Deen
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

[issue24108] fnmatch.translate('*.txt') fails

2015-05-01 Thread Merlijn van Deen
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