[issue29992] Expose parse_string in JSONDecoder

2022-02-16 Thread Tobias Oberstein
Tobias Oberstein added the comment: > It's unlikely that you would want to parse every string that looks enough > like a decimal as a decimal, or that you would want to pay the cost of > checking every string in the whole document to see if it's a decimal. fwiw, yes, th

[issue24665] CJK support for textwrap

2021-09-03 Thread Tobias Bengfort
Change by Tobias Bengfort : -- nosy: +xi2 nosy_count: 10.0 -> 11.0 pull_requests: +26575 pull_request: https://github.com/python/cpython/pull/28136 ___ Python tracker <https://bugs.python.org/issu

[issue12499] textwrap.wrap: add control for fonts with different character widths

2021-09-03 Thread Tobias Bengfort
Change by Tobias Bengfort : -- pull_requests: +26574 pull_request: https://github.com/python/cpython/pull/28136 ___ Python tracker <https://bugs.python.org/issue12

[issue12499] textwrap.wrap: add control for fonts with different character widths

2021-09-03 Thread Tobias Bengfort
Change by Tobias Bengfort : -- nosy: +xi2 ___ Python tracker <https://bugs.python.org/issue12499> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44689] ctypes.util.find_library() does not find macOS 11+ system libraries when built on older macOS systems

2021-09-01 Thread Tobias Bergkvist
Tobias Bergkvist added the comment: I made a typo (forgetting the -D): clang -Wno-unused-result -Wsign-compare -g -O0 -Wall -arch x86_64 -mmacosx-version-min=10.9 -Wno-nullability-completeness -Wno-expansion-to-defined -Wno-undef-prefix -isysroot /Applications/Xcode_12.4.app/Contents

[issue44689] ctypes.util.find_library() does not find macOS 11+ system libraries when built on older macOS systems

2021-09-01 Thread Tobias Bergkvist
Tobias Bergkvist added the comment: It seems like _dyld_shared_cache_contains_path exists, while the define flag HAVE_DYLD_SHARED_CACHE_CONTAINS_PATH has not been set. Essentially, the define-flags being used does not seem to agree with the SDK version you are using. Could you try adding

[issue44863] Allow TypedDict to inherit from Generics

2021-08-17 Thread Tobias Burger
Change by Tobias Burger : -- nosy: +toburger ___ Python tracker <https://bugs.python.org/issue44863> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44689] MacOS: Python binaries not portable between Catalina and Big Sur

2021-08-06 Thread Tobias Bergkvist
Tobias Bergkvist added the comment: I realised that I needed to define HAVE_DYLD_SHARED_CACHE_CONTAINS_PATH_RUNTIME in the source file myself - as this is not defined after running the configure-script. I've updated the PR and its description to only focus on the legacy/deprecated app

[issue44689] MacOS: Python binaries not portable between Catalina and Big Sur

2021-08-05 Thread Tobias Bergkvist
Tobias Bergkvist added the comment: This makes a lot of sense now. Thank you so much for the thorough explanation Ned - and for highlighting where my assumptions were wrong! I didn’t realise I needed to specify MACOSX_DEPLOYMENT_TARGET to enable backwards compatibility. Is there a reason

[issue44689] MacOS: Python binaries not portable between Catalina and Big Sur

2021-07-22 Thread Tobias Bergkvist
Tobias Bergkvist added the comment: Okay, I decided to look into how I could do dynamic loading as you suggested. Here is a POC (executable) for using _dyld_shared_cache_contains_path when available: ``` #include #include void* libsystemb_handle; typedef bool

[issue44689] MacOS: Python binaries not portable between Catalina and Big Sur

2021-07-22 Thread Tobias Bergkvist
Tobias Bergkvist added the comment: You are absolutely right! From the manpage of dlopen(3) on MacOS Big Sur: > dlopen() examines the mach-o file specified by path. If the file is > compatible with the current process and has not already been loaded into the > current process, it

[issue44689] MacOS: Python binaries not portable between Catalina and Big Sur

2021-07-21 Thread Tobias Bergkvist
Tobias Bergkvist added the comment: An alternative to using _dyld_shared_cache_contains_path is to use dlopen to check for library existence (which is what Apple recommends in their change notes: https://developer.apple.com/documentation/macos-release-notes/macos-big-sur-11_0_1-release

[issue44689] MacOS: Python binaries not portable between Catalina and Big Sur

2021-07-20 Thread Tobias Bergkvist
New submission from Tobias Bergkvist : Python-binaries compiled on either Big Sur or Catalina - and moved to the other MacOS-version will not work as expected when code depends on ctypes.util.find_library. Example symptom of this issue: https://github.com/jupyterlab/jupyterlab/issues/9863 I

[issue43104] csv package in class

2021-02-02 Thread Tobias Müllner
New submission from Tobias Müllner : Hello I want to use the csv package in a class. If I use the writer instance as local variable in the class it works perfectly but if I use it as class-variable (self.writer) it does not work anymore. Does anyone have the same behaviour? Yours Toby By

[issue42860] Incompatible types in Python grammar

2021-01-08 Thread Tobias Kohn
Tobias Kohn added the comment: Great, thanks a lot! -- ___ Python tracker <https://bugs.python.org/issue42860> ___ ___ Python-bugs-list mailing list Unsub

[issue42860] Incompatible types in Python grammar

2021-01-07 Thread Tobias Kohn
New submission from Tobias Kohn : There seems to be a small type error in the Python grammar in the rule `invalid_parameters`: ``` invalid_parameters: | param_no_default* (slash_with_default | param_with_default+) param_no_default ``` While the `slash_with_default` returns a single

[issue42533] Document encodings.idna limitations

2020-12-02 Thread Tobias Kunze
New submission from Tobias Kunze : The documentation for the encodings.idna module contains no indicator that the RFC it supports has been obsoleted by another RFC: https://docs.python.org/3.10/library/codecs.html#module-encodings.idna I'm sure this is obvious when you know your RFCs

[issue35862] Change the environment for a new process

2019-02-02 Thread Tobias Däullary
Tobias Däullary added the comment: Alright, thanks for pointing me in the right direction. I have to conclude that this issue is not present on a current operating system, as I now tried to reproduce with Windows 10 (I came across it on an ancient Windows XP (sic) system - I can just imagine

[issue35853] Extend the functools module with more higher order function combinators

2019-02-01 Thread Tobias Pleyer
Tobias Pleyer added the comment: Thank you for your quick and detailed answer. It appears I slightly misunderstood the purpose of the functools module. However kudos for your great effort to push the Python language forward. Best regards Tobias

[issue35862] Change the environment for a new process

2019-01-31 Thread Tobias Däullary
Tobias Däullary added the comment: Because sometimes when a process is implicitly started by some 3rd party library (i.e. COM via pythonwin here) the "old", unchanged environment is retained as the process itself doesn't care if os.environ was changed or not, the original env

[issue35862] Change the environment for a new process

2019-01-30 Thread Tobias Däullary
Change by Tobias Däullary : -- keywords: +patch, patch, patch pull_requests: +11558, 11559, 11560 stage: -> patch review ___ Python tracker <https://bugs.python.org/issu

[issue35862] Change the environment for a new process

2019-01-30 Thread Tobias Däullary
Change by Tobias Däullary : -- keywords: +patch, patch, patch, patch pull_requests: +11558, 11559, 11560, 11561 stage: -> patch review ___ Python tracker <https://bugs.python.org/issu

[issue35862] Change the environment for a new process

2019-01-30 Thread Tobias Däullary
Change by Tobias Däullary : -- keywords: +patch, patch pull_requests: +11558, 11559 stage: -> patch review ___ Python tracker <https://bugs.python.org/issu

[issue35862] Change the environment for a new process

2019-01-30 Thread Tobias Däullary
Change by Tobias Däullary : -- keywords: +patch pull_requests: +11558 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue35862> ___ ___ Py

[issue35862] Change the environment for a new process

2019-01-30 Thread Tobias Däullary
New submission from Tobias Däullary : There should be a possibility to change the environment of a process created with multiprocessing. For subprocess this is possible thanks to the "env" attribute. Elaboration: While it is trivial to change os.environ manually, in some cases t

[issue35853] Extend the functools module with more higher order function combinators

2019-01-29 Thread Tobias Pleyer
Change by Tobias Pleyer : -- keywords: +patch pull_requests: +11546 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue35853> ___ ___ Py

[issue35853] Extend the functools module with more higher order function combinators

2019-01-29 Thread Tobias Pleyer
New submission from Tobias Pleyer : The partial function is a typical example of a higher order function: It takes a function as argument and returns a function. As the name of the functools module suggests its purpose is to provide tools for working with functions. This should, in my

[issue22021] shutil.make_archive() root_dir do not work

2018-11-06 Thread Tobias Kunze
Tobias Kunze added the comment: Yes, this is a documentation issue: A patch clarifying what root_dir and base_dir do, and how they interact (or how they are to be used in combination) would be sufficient to close this issue. -- ___ Python tracker

[issue27902] pstats.Stats: strip_dirs() method cannot handle file paths from different OS

2018-06-01 Thread Tobias Kunze
Change by Tobias Kunze : -- keywords: +patch pull_requests: +6924 stage: needs patch -> patch review ___ Python tracker <https://bugs.python.org/issu

[issue32392] subprocess.run documentation does not have **kwargs

2018-05-31 Thread Tobias Kunze
Change by Tobias Kunze : -- keywords: +patch pull_requests: +6916 stage: needs patch -> patch review ___ Python tracker <https://bugs.python.org/issu

[issue22021] shutil.make_archive() root_dir do not work

2018-05-30 Thread Tobias Kunze
Tobias Kunze added the comment: Thank you, that's what I figured out later last evening. To my understanding, the docs don't give any indication that base_dir is supposed to be relative to root_dir, so I'd add this information, and maybe add a similar example to the one a

[issue22021] shutil.make_archive() root_dir do not work

2018-05-29 Thread Tobias Kunze
Tobias Kunze added the comment: I'm similarly confused by this issue. If somebody can help me understand what's going on, I'll put my understanding into a documentation patch. I have created this minimal example to demonstrate what I don't understand: I've crea

[issue29992] Expose parse_string in JSONDecoder

2017-04-05 Thread Tobias Oberstein
Tobias Oberstein added the comment: I agree, my use case is probably exotic: transparent roundtripping of binaries over JSON using a beginning \0 byte marker to distinguish plain string and base64 encoded binaries. FWIW, I do think however that adding "parse_string" kw param to t

[issue29992] Expose parse_string in JSONDecoder

2017-04-05 Thread Tobias Oberstein
New submission from Tobias Oberstein: Though the JSONDecoder already has all the hooks internally to allow for a custom parse_string (https://github.com/python/cpython/blob/master/Lib/json/decoder.py#L330), this currently is not exposed in the constructor JSONDecoder.__init__. It would be

[issue5322] Python 2.6 object.__new__ argument calling autodetection faulty

2016-12-10 Thread Tobias Hansen
Tobias Hansen added the comment: This change breaks backward compatibility in Python 2.7. This is the example that also broke in #25731. In that case the change was reverted. See https://bugs.python.org/issue25731#msg262922 $ cat foo.pxd cdef class B: cdef object b $ cat foo.pyx cdef

[issue28355] wsgiref simple_server PATH_INFO treats slashes and %2F the same

2016-10-04 Thread Tobias Dammers
New submission from Tobias Dammers: The WSGI reference implementation does not provide any means for application code to distinguish between the following request lines: GET /foo/bar HTTP/1.1 GET /foo%2Fbar HTTP/1.1 Now, the relevant RFC-1945 (https://tools.ietf.org/html/rfc1945#section-3.2

[issue27433] Missing "as err" in Lib/socket.py

2016-07-01 Thread Tobias Burnus (PDF)
New submission from Tobias Burnus (PDF): Cf. https://hg.python.org/cpython/file/tip/Lib/socket.py#l261 In _sendfile_use_sendfile, one has: try: fsize = os.fstat(fileno).st_size except OSError: raise _GiveupOnSendfile(err) # not a regular

[issue22129] Please add an equivalent to QString::simplified() to Python strings

2014-08-03 Thread Tobias Leupold
New submission from Tobias Leupold: It would be nice if a function equivalent to Qt's QString::simplified() would be added to Python's strings (cf. http://qt-project.org/doc/qt-4.8/qstring.html#simplified ). I'm not sure if my approach is good or fast, but I added this funct

[issue21356] Support LibreSSL (instead of OpenSSL): make RAND_egd optional

2014-05-23 Thread Tobias Oberstein
Changes by Tobias Oberstein : -- nosy: +oberstet ___ Python tracker <http://bugs.python.org/issue21356> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue20344] subprocess.check_output() docs misrepresent what shell=True does

2014-03-27 Thread Tobias Klausmann
Tobias Klausmann added the comment: Hi! On Tue, 25 Mar 2014, Tuomas Savolainen wrote: > Created a patch that adds notice of using shell=True and iterable to the > documentation. Please do comment if the formatting is wrong (this my first > documentation patch). I'd use article

[issue20344] subprocess.check_output() docs misrepresent what shell=True does

2014-01-22 Thread Tobias Klausmann
New submission from Tobias Klausmann: The subprocess docs state that the first argument can be either a string or an iterable that contains the program and arguments to run. It also points out that using shell=True allows for shell constructs. It does not mention a subtlety that is introduced

[issue19832] XML version is ignored

2013-11-29 Thread Tobias Kuhn
New submission from Tobias Kuhn: The first line of an XML file should be something like this: The XML parser of xml.sax, however, seems to ignore the value of "version": This should give an error, but it doesn't. It's not a very serious problem, but this shou

[issue13244] WebSocket schemes in urllib.parse

2013-11-24 Thread Tobias Oberstein
Tobias Oberstein added the comment: FWIW, WebSocket URL parsing is still wrong on Python 2.7.6 - in fact, it's broken in multiple ways: >>> from urlparse import urlparse >>> urlparse("ws://example.com/somewhere?foo=bar#dgdg") ParseResult(scheme='ws&#x

[issue19278] zlib compressobj: expose missing knobs

2013-10-17 Thread Tobias Oberstein
New submission from Tobias Oberstein: The zlib library provides a couple of knobs to control the behavior and resource consumption of compression: ZEXTERN int ZEXPORT deflateInit2 OF((z_streamp strm, int level

[issue19277] zlib compressobj: missing parameter doc strings

2013-10-17 Thread Tobias Oberstein
New submission from Tobias Oberstein: Currently the `zlib` module documents zlib.compressobj([level]) However, there are more parameters present already today: zlib.compressobj([level, method, wbits]) These other parameters are used in at least 2 deployed libraries (in the context

[issue18427] str.replace causes segfault for long strings

2013-07-11 Thread Tobias Marschall
New submission from Tobias Marschall: Running the following two lines of code causes a segfault: s = 'A' * 3142044943 t = s.replace('\n','') My setup: Python 2.7.5 (default, Jul 11 2013, 11:17:50) [GCC 4.6.3] on linux2 Linux 3.2.0-45-generic #70-Ubuntu SMP Wed M

[issue18182] xml.dom.createElement() does not take implicit namespaces into account

2013-06-10 Thread Alexander Tobias Heinrich
New submission from Alexander Tobias Heinrich: First of all, I am not sure, if this is a bug in python itself - it could as well be a bug in the py-dom-xpath module (http://code.google.com/p/py-dom-xpath) or not a bug at all (but I find the latter to be highly unlikely). Consider an XML

[issue17363] Argument Mixup in PyState_AddModule

2013-03-05 Thread Tobias Becker
New submission from Tobias Becker: http://docs.python.org/3.3/c-api/module.html?highlight=pymodule#PyState_AddModule the arguments of PyState_AddModule are in wrong order: currently: int PyState_AddModule(PyModuleDef *def, PyObject *module) correct: int PyState_AddModule(PyObject *module

[issue14709] http.client fails sending read()able Object

2012-05-03 Thread Tobias Steinrücken
New submission from Tobias Steinrücken : It seems that http.client's send() function lacks an else/return statement in Line 772. If this method is called with an read()able Object, it jumps into L 750: if hasattr( data,"read"): processes this data correctly, but then falls

[issue13244] WebSocket schemes in urllib.parse

2011-10-28 Thread Tobias Oberstein
Tobias Oberstein added the comment: Is that patch supposed to be in Python 2.7.2? If so, it doesn't work for "ws": "ws://example.com/somewhere?foo=bar#dgdg" F:\scm\Autobahn\testsuite\websockets\servers>python Python 2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.15

[issue13244] WebSocket schemes in urllib.parse

2011-10-27 Thread Tobias Oberstein
Tobias Oberstein added the comment: The patch as it stands will result in wrong behavior: +self.assertEqual(urllib.parse.urlparse("ws://example.com/stuff#ff"), + ('ws', 'example.com', '/stuff#ff', '', '&#x

[issue13244] WebSocket schemes in urllib.parse

2011-10-25 Thread Tobias Oberstein
Tobias Oberstein added the comment: > I’d say that urlparse should raise an exception when a ws/wss URI contains a > fragment part. Yep, better. > I’m not sure this will be possible; from a glance at the source and a quick > test, urlparse will happily break the Generic URI Sy

[issue13244] WebSocket schemes in urlparse

2011-10-24 Thread Tobias Oberstein
Tobias Oberstein added the comment: ok, there was feedback on Hybi list: http://www.ietf.org/mail-archive/web/hybi/current/msg09270.html """ 1. ws://example.com/something#somewhere 2. ws://example.com/something#somewhere/ 3. ws://example.com/something#somewher

[issue13244] WebSocket schemes in urlparse

2011-10-22 Thread Tobias Oberstein
Tobias Oberstein added the comment: sorry for "throw" .. somewhat bad habit (stemming from wandering between languages). uses_fragment extended: [autobahn@autobahnhub ~/Autobahn]$ python Python 2.7.1 (r271:86832, Dec 13 2010, 15:52:15) [GCC 4.2.1 20070719 [FreeBSD]] on freebsd8

[issue13244] WebSocket schemes in urlparse

2011-10-22 Thread Tobias Oberstein
Tobias Oberstein added the comment: here the links to the question on the Hybi list: http://www.ietf.org/mail-archive/web/hybi/current/msg09257.html and http://www.ietf.org/mail-archive/web/hybi/current/msg09258.html http://www.ietf.org/mail-archive/web/hybi/current/msg09243.html == I&#x

[issue13244] WebSocket schemes in urlparse

2011-10-22 Thread Tobias Oberstein
Tobias Oberstein added the comment: I'll ask (to be sure) and link. However, after rereading the Hybi 17 section, it says """ path = """ And http://tools.ietf.org/html/rfc3986 says: """ The path is terminated by the first question mark (&

[issue13244] WebSocket schemes in urlparse

2011-10-22 Thread Tobias Oberstein
Tobias Oberstein added the comment: I see how you interpret that sentence in the spec, but I would have read it differently: invalid: 1. ws://example.com/something#somewhere 2. ws://example.com/something#somewhere/ 3. ws://example.com/something#somewhere/foo 4. ws://example.com/something

[issue13244] WebSocket schemes in urlparse

2011-10-22 Thread Tobias Oberstein
Tobias Oberstein added the comment: Well, thinking about it, %23 can also appear in a percent encoded path component. I don't get the conditional "..if used as part of the query component" in the spec. -- ___ Python

[issue13244] WebSocket schemes in urlparse

2011-10-22 Thread Tobias Oberstein
Tobias Oberstein added the comment: fragment identifiers: the spec says: "Fragment identifiers are meaningless in the context of WebSocket URIs, and MUST NOT be used on these URIs. The character "#" in URIs MUST be escaped as %23 if used as part of the query component."

[issue13244] WebSocket schemes in urlparse

2011-10-22 Thread Tobias Oberstein
New submission from Tobias Oberstein : The urlparse module currently does not support the new "ws" and "wss" schemes used for the WebSocket protocol. As a workaround, we currently use the following code (which is a hack of course): import urlparse wss

[issue10570] curses.tigetstr() returns bytes, but curses.tparm() expects a string

2011-08-05 Thread Tobias Klausmann
Tobias Klausmann added the comment: This bug is still not fixed and basically makes the curses module unusable except for very narrow use cases. Unfortunately, my C-fu is very weak, otherwise I'd try to make a patch. -- nosy: +klausman ___ P

[issue12595] python.h redundant redeclarations

2011-07-20 Thread Tobias Pfaff
New submission from Tobias Pfaff : Compiling 'Python.h' with g++ and -Wredundant-decls produces warnings Testcase: test.cpp: #include int main() { return 0; } g++ test.cpp -I/usr/include/python3.2mu/ -Wredundant-decls In file included from /usr/include/python3.2mu/Py

[issue11271] concurrent.futures.ProcessPoolExecutor.map() slower than multiprocessing.Pool.map() for fast function argument

2011-05-31 Thread Tobias Brink
Tobias Brink added the comment: I can confirm an overhead of 2 ms to 3 ms using a relatively recent Intel Core i5 CPU. I (personally) believe these 3 ms to be a pretty big overhead on modern computers and I also believe that it would be relatively simple to reduce it. I don't have much

[issue11324] ConfigParser(interpolation=None) doesn't work

2011-03-01 Thread Tobias Brink
Tobias Brink added the comment: I added a test but I am not too familiar with the Python test suite. Please check if the "test_init_takes_interpolation_none" test is necessary because the test suite also fails without it if my patch is not applied. Feel free to remove i

[issue11324] ConfigParser(interpolation=None) doesn't work

2011-02-25 Thread Tobias Brink
New submission from Tobias Brink : The docs for Python 3.2 say that p = configparser.ConfigParser(interpolation=None) disables interpolation. Instead it gives this traceback when calling p.read(): Traceback (most recent call last): File "", line 1, in File "/us

[issue11271] concurrent.futures.ProcessPoolExecutor.map() slower than multiprocessing.Pool.map() for fast function argument

2011-02-21 Thread Tobias Brink
Tobias Brink added the comment: Playing around a bit I wrote the attached implementation which works with all iterables. -- Added file: http://bugs.python.org/file20826/new_processpoolexecutor.py ___ Python tracker <http://bugs.python.

[issue11271] concurrent.futures.ProcessPoolExecutor.map() slower than multiprocessing.Pool.map() for fast function argument

2011-02-21 Thread Tobias Brink
New submission from Tobias Brink : I tested the new concurrent.futures.ProcessPoolExecutor.map() in 3.2 with the is_prime() function from the documentation example. This was significantly slower than using multiprocessing.Pool.map(). Quick look at the source showed that multiprocessing sends

[issue9447] Python 3.1.2 test suite segfaults on the alpha architecture

2010-08-01 Thread Tobias Klausmann
Tobias Klausmann added the comment: Nevermind, we messed this up ourselves. Sorry for the noise. -- status: open -> closed ___ Python tracker <http://bugs.python.org/iss

[issue9447] Python 3.1.2 test suite segfaults on the alpha architecture

2010-08-01 Thread Tobias Klausmann
New submission from Tobias Klausmann : During testing for inclusion in the Gentoo distribution, we ran into a test failure (actually a SEGV) when running the test suite on the alpha architecture. Log of test failure and backtrace in gdb is here: http://dev.gentoo.org/~klausman/python-3.1.2

[issue7874] logging.basicConfig should raise warning/exception on second call

2010-02-07 Thread Tobias
New submission from Tobias : logging.basicConfig should raise warning/eception on second call. Why? logging.basicConfig(filename="/tmp/works.log") logging.basicConfig(filename="/tmp/worksnot.log") what do you think does happen? Right - logging goes to "/tmp/worksnot.l

[issue6712] sys._getframe is not available on all Python implementations

2009-08-16 Thread Tobias Ivarsson
Tobias Ivarsson added the comment: While it is true that not all Python implementations support sys._getframe() in some or all execution modes, Jython does support it, even IronPython supports it with the proper startup parameters these days. More importantly sys._getframe() [or something

[issue4953] cgi module cannot handle POST with multipart/form-data in 3.0

2009-08-10 Thread tobias
tobias added the comment: Actually, I think this whole issue is more complex. For example, consider a (fictious) CGI script where users can upload an image and a description and the script sends a success/error message in return. In this case, one has to: - read the HTTP request header from