[issue29657] os.symlink: FileExistsError shows wrong message

2017-02-26 Thread Wolfgang Rohdewald
New submission from Wolfgang Rohdewald: execute the attached script. It should return FileExistsError: [Errno 17] File exists: 'a_link' -> 'a' but it returns FileExistsError: [Errno 17] File exists: 'a' -> 'a_link' -- components: Library (Lib) files: x.py messages: 28859

[issue29551] unittest: TestSuite.debug() does not like subTest()

2017-02-13 Thread Wolfgang Rohdewald
New submission from Wolfgang Rohdewald: the main code is appended in main.py if a test uses with self.subTest(), subTest() fails right in its first statement "if not self._outcome ..." because _outcome is None. In main.py, the commented runner.run(suite) would work

[issue27742] Random.randint generates different values in Python2 and Python3

2016-08-12 Thread Wolfgang Rohdewald
Wolfgang Rohdewald added the comment: @SilentGhost: Sorry, I did not see the latest messages, I was referring to msg272511 Having to re-implement everything but rnd.random is not very user friendly. I will do that now for my project. -- ___ Python

[issue27742] Random.seed(5, version=1) generates different values in PYthon2 and Python3

2016-08-12 Thread Wolfgang Rohdewald
Wolfgang Rohdewald added the comment: There seems to be more to it, _randbelow already returns different values. And _randbelow is used by other user helpers like randrange, choice, select, shuffle, sample -- ___ Python tracker <

[issue27742] Random.seed(5, version=1) generates different values in PYthon2 and Python3

2016-08-12 Thread Wolfgang Rohdewald
New submission from Wolfgang Rohdewald: The documentation promises backwards compatible seeders. I understand this as such that they generate the same random sequences. But for Python 2.7.12 and 3.5.2 this is not so, even if I pass an integer as seed value. The attached script returns

[issue22746] cgitb html: wrong encoding for utf-8

2014-10-28 Thread Wolfgang Rohdewald
Wolfgang Rohdewald added the comment: What about open(..., encoding='latin-1', errors='xmlcharrefreplace') That works fine. I tested with a chinese character 与 But I do not think the application should work around something that cgitb is supposed to handle. More so since the documentation

[issue22746] cgitb html: wrong encoding for utf-8

2014-10-28 Thread Wolfgang Rohdewald
Wolfgang Rohdewald added the comment: correction: A bug for everyone using non-ascii characters. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22746

[issue22746] cgitb html: wrong encoding for utf-8

2014-10-28 Thread Wolfgang Rohdewald
Wolfgang Rohdewald added the comment: You need to use codecs.open instead of open No, why? in python3 open() supports the errors handler. right, but not in python2 which has the same problem. I need my code to run with both. Do you have a use case for xmlcharrefreplace in the HTML context

[issue22745] cgitb with Py3: TypeError: 'str' does not support the buffer interface

2014-10-27 Thread Wolfgang Rohdewald
New submission from Wolfgang Rohdewald: The attached script works with Python2.7. With Python3.4, it produces Traceback (most recent call last): File /usr/lib/python3.4/cgitb.py, line 268, in __call__ self.handle((etype, evalue, etb)) File cgibug.py, line 12, in handle

[issue22746] cgitb html: wrong encoding for utf-8

2014-10-27 Thread Wolfgang Rohdewald
New submission from Wolfgang Rohdewald: The attached script shows the non-ascii characters wrong wherever they occur, including the exception message and the comment in the source code. Looking at the produced .html, I can say that cgitb simply passes the single byte utf-8 codes without

[issue22746] cgitb html: wrong encoding for utf-8

2014-10-27 Thread Wolfgang Rohdewald
Wolfgang Rohdewald added the comment: If you cannot offer a solution for arbitrary unicode, you have no solution at all. Afer all, that is what unicode is about: support ALL languages, not only your own. I do not quite understand why you think this is not a bug. If cgitb encodes unicode like

[issue22746] cgitb html: wrong encoding for utf-8

2014-10-27 Thread Wolfgang Rohdewald
Changes by Wolfgang Rohdewald wolfg...@rohdewald.de: -- resolution: - remind ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22746 ___ ___ Python

[issue22745] cgitb with Py3: TypeError: 'str' does not support the buffer interface

2014-10-27 Thread Wolfgang Rohdewald
Wolfgang Rohdewald added the comment: This now works with mode 'w' and after reinstalling the packages. My Python is 3.4.0 (ubuntu). -- resolution: - not a bug status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org

[issue11717] conflicting definition of ssize_t in pyconfig.h

2011-03-30 Thread Wolfgang Rohdewald
Wolfgang Rohdewald wolfg...@rohdewald.de added the comment: types.h is from kdewin/include/msvc/sys git clone git://anongit.kde.org/kdewin types.h uses SSIZE_T but that is nowhere defined in KDE, so it must be the original one from msvc

[issue11717] conflicting definition of ssize_t in pyconfig.h

2011-03-30 Thread Wolfgang Rohdewald
Changes by Wolfgang Rohdewald wolfg...@rohdewald.de: -- nosy: +mhammond ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11717 ___ ___ Python-bugs

[issue11717] conflicting definition of ssize_t in pyconfig.h

2011-03-29 Thread Wolfgang Rohdewald
New submission from Wolfgang Rohdewald wolfg...@rohdewald.de: compiling pykde on windows with msvc2010 on a 32bit Windows 7: sipdnssdpart0.cpp R:\include\msvc\sys/types.h(52) : error C2371: 'ssize_t' : redefinition; different basic types c:\python27\include\pyconfig.h(201) : see