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, that's
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
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
Changes by Tobias Oberstein tobias.oberst...@tavendo.de:
--
nosy: +oberstet
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21356
___
___
Python
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
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
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
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
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
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
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
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
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
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
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
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
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
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
18 matches
Mail list logo