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
-
bounces+tobias.oberstein=tavendo...@python.org] Im Auftrag von Tobias
Oberstein
Gesendet: Freitag, 3. Januar 2014 13:08
An: python-list@python.org
Betreff: WebSocket for Python 2 and 3 on Twisted and asyncio
Hi,
Autobahn provides open-source implementations of
* The WebSocket Protocol
Hi,
Autobahn provides open-source implementations of
* The WebSocket Protocol
* The Web Application Messaging Protocol (WAMP)
https://github.com/tavendo/AutobahnPython
https://pypi.python.org/pypi/autobahn
Starting with the release 0.7.0, Autobahn now fully supports (with all
features) both
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
I am trying to convince Python to open more than 32k files .. this is on
FreeBSD.
Now I know I have to set appropriate limits .. I did:
$ sysctl kern.maxfiles
kern.maxfiles: 204800
$ sysctl kern.maxfilesperproc
kern.maxfilesperproc: 20
$ sysctl kern.maxvnodes
kern.maxvnodes: 20
$ ulimit
I'm not familiar with BSD but Linux has similar Kernel options. The kernel
options might be *global* flags to set the total upper limit of open file
descriptors for the entire system, not for a single process.
Also on Linux ulimit doesn't display the fd limit. You have to use ulimit
-n.
I need 50k sockets + 100 files.
Thus, this is even more strange: the Python (a Twisted service) will
happily accept 50k sockets, but as soon as you do open() a file, it'll bail
out.
A limit of 32k smells like a overflow in a signed int. Perhaps your system is
able and configured to
I need 50k sockets + 100 files.
Thus, this is even more strange: the Python (a Twisted service)
will happily accept 50k sockets, but as soon as you do open() a file,
it'll
bail out.
A limit of 32k smells like a overflow in a signed int. Perhaps your
system is able and
I just confirmed that the bug is even there for FreeBSD 9 RC1 !
This is most unfortunate. Seriously.
W00t, that sucks! You could migrate to another BSD (NetBSD) or Linux ... :)
No, thanks;)
I am running out of options, since I am willing to make my stuff
Python 3 compatible, but
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
25 matches
Mail list logo