[issue30449] Improve __slots__ datamodel documentation

2017-12-31 Thread mpb
mpb added the comment: @rhettinger I disagree (but you're the boss). If a function can take type X as a parameter, I believe docs should also say what the expected behavior is when you call the function and pass it type X, especially when type X is fundamentally different from every

[issue30449] Improve __slots__ datamodel documentation

2017-12-29 Thread mpb
mpb added the comment: Can __slots__ be assigned a string? If so, what are the consequences? I find the current docs lack clarity. For example from the docs for 3.7.0a3: https://docs.python.org/3.7/reference/datamodel.html#slots > 3.3.2.4. __slots__ > > [snip] > > o

[issue17145] memoryview(array.array)

2013-11-21 Thread mpb
Changes by mpb : -- nosy: +mpb ___ Python tracker <http://bugs.python.org/issue17145> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/m

[issue19530] cross thread shutdown of UDP socket exhibits unexpected behavior

2013-11-15 Thread mpb
mpb added the comment: > It's just a patch to avoid returning garbage in the address. Right, which is why I pursued the point. recvfrom should not return ambiguous data (the ambiguity being between shutdown and receiving a zero length message). It is now possible to distinguish th

[issue19530] cross thread shutdown of UDP socket exhibits unexpected behavior

2013-11-14 Thread mpb
mpb added the comment: Someone wrote a kernel patch based on my bug report. http://www.spinics.net/lists/netdev/msg257653.html -- ___ Python tracker <http://bugs.python.org/issue19

[issue19577] memoryview bind (the opposite of release)

2013-11-13 Thread mpb
mpb added the comment: It would be nice in terms of avoiding malloc()s and free()s. I could estimate it in terms of memoryview creations per message parse. I'll be creating 10-20 memoryviews to parse each ~100 byte message. So... I guess I'd have to build a test to see how long a

[issue19577] memoryview bind (the opposite of release)

2013-11-13 Thread mpb
New submission from mpb: I'm writing Python code to parse binary (byte oriented) data. I am (at least somewhat) aware of the performance implications of various approaches to doing the parsing. With performance in mind, I would like to avoid unnecessary creation/destruction/copying of m

[issue18240] hmac unnecessarily restricts input to "bytes"

2013-11-12 Thread mpb
Changes by mpb : -- nosy: +mpb ___ Python tracker <http://bugs.python.org/issue18240> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/m

[issue19530] cross thread shutdown of UDP socket exhibits unexpected behavior

2013-11-11 Thread mpb
mpb added the comment: > "Connecting" a UDP socket doesn't established a duplex connection like > in TCP: Stream and duplex are orthogonal concepts. I still contend that connected UDP sockets are a duplex communication channel (under every definition of duplex I have read

[issue19530] cross thread shutdown of UDP socket exhibits unexpected behavior

2013-11-09 Thread mpb
mpb added the comment: After some research... > Which is normal, since UDP sockets aren't connected. But UDP sockets can be connected! If I connect the UDP sockets, then shutdown succeeds (no exception is raised), but recvfrom still appears to succeed, returning a zero length messag

[issue19530] cross thread shutdown of UDP socket exhibits unexpected behavior

2013-11-08 Thread mpb
New submission from mpb: I have a multi-threaded application. A background thread is blocked, having called recvfrom on a UDP socket. The main thread wants to cause the background thread to unblock. With TCP sockets, I can achieve this by calling: sock.shutdown (socket.SHUT_RD) When I try this

[issue19438] Where is NoneType in Python 3?

2013-10-29 Thread mpb
mpb added the comment: Regarding http://www.python.org/dev/peps/pep-0294/ ... Complete removal of the types module makes more sense to me than letting types continue, but removing NoneType from it! If type(None) is the one_true_way, then the docs should say that, possibly in multiple

[issue19438] Where is NoneType in Python 3?

2013-10-29 Thread mpb
mpb added the comment: Of your 4 suggestions, I mentioned #3 and #4 in my post. They are less readable, IMO. 1 and 2 are nicer, but both have an "extra" set of nested parenthesis. While I appreciate the suggestions, I submitted this as a documentation bug, because I think I shou

[issue19438] Where is NoneType in Python 3?

2013-10-29 Thread mpb
New submission from mpb: types.NoneType seems to have disappeared in Python 3. This is probably intentional, but I cannot figure out how to test if a variable is of type NoneType in Python 3. Specifically, I want to write: assert type (v) in ( bytes, types.NoneType ) Yes, I could write

[issue19167] sqlite3 cursor.description varies across Linux (3.3.1), Win32 (3.3.2), when selecting from a view.

2013-10-08 Thread mpb
mpb added the comment: No, I have not checked to see if it is a bug in the Windows version of SQLite. How would I even test that? I just tried running the command line version of SQLite (version 3.8.0.2 2013-09-03) on Windows (XP SP2, in VirtualBox). I manually ran the same statements from

[issue19167] sqlite3 cursor.description varies across Linux (3.3.1), Win32 (3.3.2), when selecting from a view.

2013-10-04 Thread mpb
New submission from mpb: On Win32, when I select from an SQLite view, and enclose the column name in double quotes in the select query, the cursor description (erroneously?) contains the double quotes. On Linux (or on Win32 when selecting from a table rather than a view) the cursor

[issue18915] ssl.wrap_socket, pass in certfile and keyfile as PEM strings

2013-09-03 Thread mpb
New submission from mpb: It would be nice to be able to pass ssl.wrap_socket the key and certificate as PEM encoded strings, rather than as paths to files. Similarly for SSLContext.load_cert_chain. -- components: Library (Lib) messages: 196878 nosy: mpb priority: normal severity

[issue18293] ssl.wrap_socket (cert_reqs=...), getpeercert, and unvalidated certificates

2013-06-25 Thread mpb
mpb added the comment: Christian wrote: > sslsocket gives you access to the peer's cert and chain (with > #18233). Very interesting (and useful). I've mostly been working with Python 2.7, and I had not fully noticed that Python 3.2+ has a ssl.SSLContext class. > I'

[issue18293] ssl.wrap_socket (cert_reqs=...), getpeercert, and unvalidated certificates

2013-06-24 Thread mpb
mpb added the comment: Oh, I see. getpeercert (binary_form) is not DER vs. PEM, it is DER vs. dict. -- ___ Python tracker <http://bugs.python.org/issue18

[issue18293] ssl.wrap_socket (cert_reqs=...), getpeercert, and unvalidated certificates

2013-06-24 Thread mpb
mpb added the comment: Hi Christian, thanks for the prompt response. Sorry about choosing the wrong versions - I wasn't thinking that enhancements should target future versions, but of course that makes sense. After submitting the enhancement request, I did dig into the OpenSSL docs, and

[issue8109] Server-side support for TLS Server Name Indication extension

2013-06-24 Thread mpb
Changes by mpb : -- nosy: +mpb ___ Python tracker <http://bugs.python.org/issue8109> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/m

[issue18293] ssl.wrap_socket (cert_reqs=...), getpeercert, and unvalidated certificates

2013-06-24 Thread mpb
mpb added the comment: (Oops, I changed the title when I meant to do a search. Changing it back now.) -- title: ssl sni -> ssl.wrap_socket (cert_reqs=...), getpeercert, and unvalidated certificates ___ Python tracker <http://bugs.pyth

[issue18293] ssl sni

2013-06-24 Thread mpb
Changes by mpb : -- title: ssl.wrap_socket (cert_reqs=...), getpeercert, and unvalidated certificates -> ssl sni ___ Python tracker <http://bugs.python.org/issu

[issue18293] ssl.wrap_socket (cert_reqs=...), getpeercert, and unvalidated certificates

2013-06-24 Thread mpb
New submission from mpb: At present (Python 2.7.[45] and 3.3.[12]), the cert_reqs parameter of ssl.wrap_socket can be one of: ssl.CERT_NONE ssl.CERT_OPTIONAL ssl.CERT_REQUIRED I would find the following additional modes to be useful: ssl.CERT_OPTIONAL_NO_VERIFY ssl.CERT_REQUIRED_NO_VERIFY In