[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 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

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

2014-05-23 Thread Tobias Oberstein
Changes by Tobias Oberstein tobias.oberst...@tavendo.de: -- nosy: +oberstet ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21356 ___ ___ Python

[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', netloc='example.com', path='/somewhere', params

[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

[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

[issue13244] WebSocket schemes in urllib.parse

2011-10-28 Thread Tobias Oberstein
Tobias Oberstein tobias.oberst...@tavendo.de 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\serverspython Python 2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32

[issue13244] WebSocket schemes in urllib.parse

2011-10-27 Thread Tobias Oberstein
Tobias Oberstein tobias.oberst...@tavendo.de 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', '', '', '')) The path component

[issue13244] WebSocket schemes in urllib.parse

2011-10-25 Thread Tobias Oberstein
Tobias Oberstein tobias.oberst...@tavendo.de 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

[issue13244] WebSocket schemes in urlparse

2011-10-24 Thread Tobias Oberstein
Tobias Oberstein tobias.oberst...@tavendo.de 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

[issue13244] WebSocket schemes in urlparse

2011-10-22 Thread Tobias Oberstein
New submission from Tobias Oberstein tobias.oberst...@tavendo.de: 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 wsschemes = [ws, wss

[issue13244] WebSocket schemes in urlparse

2011-10-22 Thread Tobias Oberstein
Tobias Oberstein tobias.oberst...@tavendo.de 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
Tobias Oberstein tobias.oberst...@tavendo.de 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 tobias.oberst...@tavendo.de 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

[issue13244] WebSocket schemes in urlparse

2011-10-22 Thread Tobias Oberstein
Tobias Oberstein tobias.oberst...@tavendo.de added the comment: I'll ask (to be sure) and link. However, after rereading the Hybi 17 section, it says path = path-abempty, defined in [RFC3986], Section 3.3 And http://tools.ietf.org/html/rfc3986 says: The path is terminated by the first

[issue13244] WebSocket schemes in urlparse

2011-10-22 Thread Tobias Oberstein
Tobias Oberstein tobias.oberst...@tavendo.de 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

[issue13244] WebSocket schemes in urlparse

2011-10-22 Thread Tobias Oberstein
Tobias Oberstein tobias.oberst...@tavendo.de 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