New submission from Dmitry Dvoinikov:
The following script
---
import email.header
print(email.header.decode_header("foo =?windows-1251?Q?bar?="))
---
produces
[(b'foo', None), (b'bar', 'windows-1251')]
in Python 3.2 but
[(b'foo ', N
New submission from Dmitry Dvoinikov:
For the following script
import xmlrpc.client; from xmlrpc.client import escape
text = "...\u043c..<"
print(escape(text))
Python 3.3.0b1 produces
...ь..<...<
New submission from Dmitry Dvoinikov:
The following line prints different things each time you run it:
python3 -c "print(', '.join({ '1': '2', '3': '4' }.keys()))"
The output is either "1, 3" or "3, 1". Is such ind
New submission from Dmitry Dvoinikov :
Using Python 3.3.0a2 (default, Apr 1 2012, 19:34:58) [MSC v.1500 64 bit
(AMD64)] on win32.
This line of code
"{0:s}{1:s}".format("ABC", "\u0410\u0411\u0412")
results in
SystemError: Cannot copy UCS2 characters int
Dmitry Dvoinikov added the comment:
You are right, sorry. It's Windows XP Prof, Python 3.2a2.
The differences in OS may be the cause, but the problem doesn't appear in 3.1
on the same machine.
--
___
Python tracker
<http://bu
New submission from Dmitry Dvoinikov :
If you request Event.wait(x), the call consistently returns in less than x
seconds.
Sample:
-
from threading import Event
from time import time
e = Event()
before = time()
e.wait(0.1)
after = time
Dmitry Dvoinikov added the comment:
Checked out and built revision 80956 of py3k against OpenSSL 0.9.8n. Here is
the banner:
Python 3.2a0 (py3k:80956, May 8 2010, 11:31:45) [MSC v.1500 32 bit (Intel)] on
win32
Now, the breaking script appears not to be breaking any more, even though I
Dmitry Dvoinikov added the comment:
Well, I'm sorry to bring this up again, but the problem persists
with Python 3.1.2 (x86, Windows XP). The difference with the
test script behaviour is that now it doesn't break every time.
Perhaps this is the reason I said the problem was gone.
In
Dmitry Dvoinikov added the comment:
The problem does not reproduce in 3.1.1 nor in 3.1.2
(either x86 or x64).
Antoine Pitrou пишет:
> Antoine Pitrou added the comment:
>
> What happens if you remove the call to settimeout()?
> Also, it would be nice if you could try with the
Dmitry Dvoinikov <[EMAIL PROTECTED]> added the comment:
1.py == test.py obviously :)
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue4171>
___
_
Dmitry Dvoinikov <[EMAIL PROTECTED]> added the comment:
Same thing on Python 3.0rc2:
C:\TEMP>python test.py
worked so far
Traceback (most recent call last):
File "1.py", line 23, in
test_handshake(address, False)
File "1.py", line 17, in test_handshake
New submission from Dmitry Dvoinikov <[EMAIL PROTECTED]>:
If I connect a TCP socket s using regular s.connect(), then wrap it
using ssl.wrap_socket(s) and call do_handshake on the resulting SSL
socket, handshake fails in ssl.py:320 with
AttributeError: 'NoneType' object
Changes by Dmitry Dvoinikov <[EMAIL PROTECTED]>:
--
nosy: +ddvoinikov
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue3890>
___
__
Dmitry Dvoinikov <[EMAIL PROTECTED]> added the comment:
> I think it probably is correct to NOT accept a string
I agree.
> it should be renamed to encodestring
Huh ? It is already called that :) IMO it should be renamed to
encodebytes or simply encode if the module is only (or mos
New submission from Dmitry Dvoinikov <[EMAIL PROTECTED]>:
In xmlrpc.client:1204:
---
headers = {}
if extra_headers:
for key, val in extra_headers:
header[key] = val
---
shouldn't it read
---
headers[key] = val
^
---
?
Otherwise it bails out with
--
New submission from Dmitry Dvoinikov <[EMAIL PROTECTED]>:
This quote from base64.py:
---
bytes_types = (bytes, bytearray) # Types acceptable as binary data
...
def encodestring(s):
"""Encode a string into multiple lines of base-64 data.
Argument and r
New submission from Dmitry Dvoinikov <[EMAIL PROTECTED]>:
If a context manager is used within exception handling block, the active
exception is silenced after the context block completes and __exit__ exits.
try:
raise Exception("foo")
except:
with SomeContextManager
New submission from Dmitry Dvoinikov <[EMAIL PROTECTED]>:
Stack trace information extracted with traceback.extract_stack is
incorrect in that the #-*- line causes double counting. For example:
#comment
from traceback import extract_stack
print("this is line", extract_stack()
18 matches
Mail list logo