[issue24339] iso6937 encoding missing

2021-06-29 Thread Maarten Derickx
Maarten Derickx added the comment: Hi Marc-Andre Lemburg, Thanks for your responses and guidance. At least your pointers to charmap_encode and charmap_decode helped, since it shows at least what the general idea is on how to deal with these types of encodings. In the mean time I did

[issue24339] iso6937 encoding missing

2021-06-29 Thread Maarten Derickx
Maarten Derickx added the comment: The route via gencodec or more generally via charmap_encode and charmap_decode seems to be one that is not possible without some low level CPython code adjustments. The reason for this is that charmap_encode and charmap_decode only seem to support mappings

[issue24339] iso6937 encoding missing

2021-06-24 Thread Maarten Derickx
Maarten Derickx added the comment: Hi Marc-Andre Lemburg, Thanks for your reply. I tried using gencodec.py as could be downloaded from https://github.com/python/cpython/blob/main/Tools/unicode/gencodec.py as you mentioned. However the code in gencodec.py seems to be in a much worse shape

[issue24339] iso6937 encoding missing

2021-06-23 Thread Maarten Derickx
Maarten Derickx added the comment: Is there any way to contact John Helour? I would still very much like to put this package on github and pypi. And would like to ask him permission for licensing. Or is there some standard open source license under which all code uploaded to https

[issue7946] Convoy effect with I/O bound threads and New GIL

2021-01-15 Thread Maarten Breddels
Maarten Breddels added the comment: In case someone finds it useful, I've written a blog post on how to visualize the GIL: https://www.maartenbreddels.com/perf/jupyter/python/tracing/gil/2021/01/14/Tracing-the-Python-GIL.html In the comments (or at https://github.com/maartenbreddels

[issue42321] Limitations of building a static python library on Windows (MSVC)

2020-11-11 Thread Maarten
New submission from Maarten : `PCbuild/readme.txt` contains a little paragraph about how to build a static python library. The resulting static `python.lib` library contains all python C API functions. Windows DLL's don't allow missing symbols, so C extensions modules must link

[issue41630] Visual Studio does not build the curses and curses.panel module

2020-08-24 Thread Maarten
Change by Maarten : -- keywords: +patch pull_requests: +21060 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21950 ___ Python tracker <https://bugs.python.org/issu

[issue41630] Visual Studio does not build the curses and curses.panel module

2020-08-24 Thread Maarten
New submission from Maarten : When building python using Visual Studio, the curses and curses.module, are not getting built. -- components: Build, Library (Lib) messages: 375871 nosy: maarten priority: normal severity: normal status: open title: Visual Studio does not build the curses

[issue31526] Allow setting timestamp in gzip-compressed tarfiles

2020-08-24 Thread Maarten
Maarten added the comment: My previous comment should have contained: Because I noticed the timestamp was not included in the CRC, ... -- ___ Python tracker <https://bugs.python.org/issue31

[issue31526] Allow setting timestamp in gzip-compressed tarfiles

2020-08-24 Thread Maarten
Maarten added the comment: I have the same issue. The timestamp is inserted here: https://github.com/python/cpython/blob/802726acf6048338394a6a4750835c2cdd6a947b/Lib/tarfile.py#L419-L420 Because I noticed the timestamp was not included in the timestamp, I could zero it by doing: ``` with open

[issue1723038] Curses Menu

2020-08-20 Thread Maarten
Change by Maarten : -- pull_requests: +21047 pull_request: https://github.com/python/cpython/pull/21933 ___ Python tracker <https://bugs.python.org/issue1723

[issue1723038] Curses Menu

2020-08-20 Thread Maarten
Change by Maarten : -- pull_requests: -21045 ___ Python tracker <https://bugs.python.org/issue1723038> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41604] [curses.panel] Failed panel.set_userptr will decrement refcount of original userptr

2020-08-20 Thread Maarten
Change by Maarten : -- keywords: +patch pull_requests: +21046 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21933 ___ Python tracker <https://bugs.python.org/issu

[issue1723038] Curses Menu

2020-08-20 Thread Maarten
Change by Maarten : -- nosy: +maarten nosy_count: 5.0 -> 6.0 pull_requests: +21045 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/21933 ___ Python tracker <https://bugs.python.org/iss

[issue41604] [curses.panel] Failed panel.set_userptr will decrement refcount of original userptr

2020-08-20 Thread Maarten
New submission from Maarten : When ncurses' function `set_panel_userptr` fails, panel.set_userptr should not decrement the reference count of the previous userptr. -- components: Library (Lib) messages: 375738 nosy: maarten priority: normal severity: normal status: open title

[issue2889] curses for windows (alternative patch)

2020-08-19 Thread Maarten
Maarten added the comment: Current ncurses master is buildable on Visual Studio, using msys2. It should be possible to create a vcxproject and integrate it in the Visual Studio build. -- nosy: +maarten ___ Python tracker <https://bugs.python.

[issue41595] curses' window.chgat does not change color when specifying curses.A_COLOR

2020-08-19 Thread Maarten
Maarten added the comment: Equivalent c script of chgat.py Compile with: gcc chgat.c -lncurses -o chgat -- Added file: https://bugs.python.org/file49408/chgat.c ___ Python tracker <https://bugs.python.org/issue41

[issue41595] curses' window.chgat does not change color when specifying curses.A_COLOR

2020-08-19 Thread Maarten
New submission from Maarten : Or'ing curses.A_COLOR in the `attr` argument of curses.window.chgat ends of with the line not showing. Actual Problem: The text is invisible/hidden/not shown. Using only the attribute curses.A_BLINK is fine. Expected: The color of the line is changed +the text

[issue10486] http.server doesn't set all CGI environment variables

2020-08-11 Thread Maarten
Maarten added the comment: The CGI examples of urwid (see http://urwid.org/manual/displaymodules.html#cgi-web-display-module-web-display) don't work on http.server because of missing meta variables. Using cgitb, I found out that the webdriver expects the environment variable

[issue17088] ElementTree incorrectly refuses to write attributes without namespaces when default_namespace is used

2019-10-07 Thread Maarten ter Huurne
Maarten ter Huurne added the comment: Can I please get a review of the pull request? -- ___ Python tracker <https://bugs.python.org/issue17088> ___ ___ Pytho

[issue21970] Broken code for handling file://host in urllib.request.FileHandler.file_open

2019-10-07 Thread Maarten ter Huurne
Maarten ter Huurne added the comment: Another problem with the current code is that when passed a URL with a host name that is not empty or "localhost", but is one of the alternative names for localhost returned by get_names(), file_open() returns None implicitly instead of openin

[issue37965] CCompiler has_function displays warning

2019-08-28 Thread Maarten
Maarten added the comment: I have submitted a PR to github: https://github.com/python/cpython/pull/15560 -- ___ Python tracker <https://bugs.python.org/issue37

[issue37965] CCompiler has_function displays warning

2019-08-28 Thread Maarten
Change by Maarten : -- pull_requests: +15233 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15560 ___ Python tracker <https://bugs.python.org/issu

[issue37965] CCompiler has_function displays warning

2019-08-27 Thread Maarten
New submission from Maarten : When using the `has_function` method of a CCompiler object, the compiler will emit a warning because the main function has no return type specified. https://github.com/python/cpython/blob/8c9e9b0cd5b24dfbf1424d1f253d02de80e8f5ef/Lib/distutils/ccompiler.py#L784

[issue17088] ElementTree incorrectly refuses to write attributes without namespaces when default_namespace is used

2018-12-09 Thread Maarten ter Huurne
Maarten ter Huurne added the comment: I think I have a good solution now, see the pull request for details. It does touch a lot of code, but I split all the changes into small consistent units, so it should be easier to verify whether they are correct

[issue17088] ElementTree incorrectly refuses to write attributes without namespaces when default_namespace is used

2018-12-09 Thread Maarten ter Huurne
Change by Maarten ter Huurne : -- pull_requests: +10286 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue17088> ___ ___ Python-bugs-lis

[issue17088] ElementTree incorrectly refuses to write attributes without namespaces when default_namespace is used

2018-12-08 Thread Maarten ter Huurne
Maarten ter Huurne added the comment: I was working on what I thought would be an elegant solution to this problem: for non-qualified attributes, add the element's namespace before accessing the cache and strip the namespace prefix after accessing the cache if it's equal to the element's

[issue30839] Larger and/or configurable _MAX_LENGTH for unittest messages

2017-07-03 Thread Maarten ter Huurne
New submission from Maarten ter Huurne: In a unit test for one of my projects I am comparing tree-structured objects using assertEqual(). Because there can be a few nested levels, the repr() string can exceed the _MAX_LENGTH which is just 80 characters. Not by much, but enough to get

[issue1711] socket functions that should return unsigned int return signed int

2008-01-01 Thread Maarten Thibaut
Maarten Thibaut added the comment: Guido, the problem is that my python foo is severely lacking - but I'll have a stab at it. Python believes that the number coming back from the C library is negative. We can fool it by packing the signed short into a system-native format, and then unpacking

[issue1711] socket functions that should return unsigned int return signed int

2007-12-30 Thread Maarten Thibaut
New submission from Maarten Thibaut: Socket library functions such as ntohs() return uint16_t, but inside Python these return values show up as negative numbers. One possible fix is to convert these return values using pack: struct.unpack('H', struct.pack('h', ntohs(number)))[0] 0x

[issue1711] socket functions that should return unsigned int return signed int

2007-12-30 Thread Maarten Thibaut
Maarten Thibaut added the comment: Numbers returned from ntohs() turn up as negative. But ntohs() is typed as uint16_t, so they shouldn't be. This is on solaris. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1711

[issue1711] socket functions that should return unsigned int return signed int

2007-12-30 Thread Maarten Thibaut
Maarten Thibaut added the comment: Try this on Linux and Solaris: --- from socket import ntohs, htons print ntohs(htons(55000)) --- On Linux: 55000 On Solaris: -10536 __ Tracker [EMAIL PROTECTED] http://bugs.python.org

[issue1506] func alloca inside ctypes lib needs #include alloca.h on solaris

2007-11-27 Thread Maarten Thibaut
Changes by Maarten Thibaut: -- components: Library (Lib) nosy: mthibaut severity: normal status: open title: func alloca inside ctypes lib needs #include alloca.h on solaris type: compile error versions: Python 2.5 __ Tracker [EMAIL PROTECTED] http

[issue1506] func alloca inside ctypes lib needs #include alloca.h on solaris

2007-11-27 Thread Maarten Thibaut
New submission from Maarten Thibaut: On Solaris, alloca() is a #define which is inside alloca.h. Ctypes fails to compile because the #define is missing. Please fix by adding the following at the front of these 2 files: #if defined (__SVR4) defined (__sun) # include alloca.h #endif

[issue1506] func alloca inside ctypes lib needs #include alloca.h on solaris

2007-11-27 Thread Maarten Thibaut
Changes by Maarten Thibaut: -- components: +Extension Modules -Library (Lib) __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1506 __ ___ Python-bugs-list mailing list

[issue1506] func alloca inside ctypes lib needs #include alloca.h on solaris

2007-11-27 Thread Maarten Thibaut
Maarten Thibaut added the comment: forgot to mention the files: Modules/_ctypes/callproc.c Modules/_ctypes/libffi/src/sparc/ffi.c __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1506