[issue3077] h2py char literal doesn work

2008-06-11 Thread Gabriel

New submission from Gabriel <[EMAIL PROTECTED]>:

Tools/scripts/h2py.py doesn't work with char literals in a define. This
was first reported in the following post :

http://mail.python.org/pipermail/python-list/2005-September/340608.html

The fix works, I have included the patch as h2py.py.patch2.

Also, the current thing that is done when a char literal is encountered
is to use the char's ordinal value. I think that this is misleading,
since in C, if you use a char literal you are usually meaning to check
for an ascii char value like so :

#define EXIT_CHAR 'x'

/* . */

if(char_read == EXIT_CHAR)
   exit(0)

and not an integer/numeric value, and if you intend to do numerical
things then you'd use an integer/numeric value instead.

This is the way ctypes does it with their h2xml.py & xml2py.py scripts.

So currently, a defines like the following :

#define EXIT_CHAR 'x'
#define MASK 0xfe
#define LIMIT 4

give (after the h2py.py.patch2 being applied) :

EXIT_CHAR = 120
MASK = 0xfe
LIMIT = 4

and the second patch I am submitting (h2py.py.patch) makes it give :

EXIT_CHAR = 'x'
MASK = 0xfe
LIMIT = 4

which I think is a better interpretation of the intent of the defines.

So to resume :

h2py.py.patch2 : this fixes the bug, maintaining the way the original
h2py script tried to process a char literal.

h2py.py.patch : this fixes the bug, but makes a char literal become a
string literal in python instead of the ordinal value.

Gabriel

--
components: Demos and Tools
files: h2py.py.patch2
messages: 67943
nosy: grossetti
severity: normal
status: open
title: h2py char literal doesn work
type: behavior
versions: Python 2.5
Added file: http://bugs.python.org/file10578/h2py.py.patch2

___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue3077>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3077] h2py char literal doesn work

2008-06-11 Thread Gabriel

Changes by Gabriel <[EMAIL PROTECTED]>:


--
keywords: +patch
Added file: http://bugs.python.org/file10579/h2py.py.patch

___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue3077>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1731717] race condition in subprocess module

2009-02-24 Thread Gabriel

Gabriel  added the comment:

I had this happen to me today, I used Popen and os.waitpid(p.pid, 0) and
I got an "OSError: [Errno 10] No child processes". I haven't tried
adding a sleep, since it's unreliable. I'm using python 2.5.2, Windows
XP. I haven't tried this on linux yet as the problem arose while testing
my app for windows.

--
nosy: +grossetti

___
Python tracker 
<http://bugs.python.org/issue1731717>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1073] Mysterious failure under Windows

2007-08-31 Thread Gabriel Genellina

Gabriel Genellina added the comment:

Does the file exist before program is started, and remains after 
program finishes?
If it is your program which creates the file, you may have a race 
condition. Maybe some delays/retries will be enough, or perhaps you 
will have to use some other syncronization mechanisms.

Also, I see you use a relative path. Do you change the current 
directory (with os.chdir or similar)?

--
nosy: +gagenellina

__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1073>
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1045] Performance regression in 2.5

2007-08-31 Thread Gabriel Genellina

Gabriel Genellina added the comment:

I've narrowed the problem to the usage of generator expressions. 
Generator expressions appear to be MUCH slower on 2.5 than on 2.4.

>python -m timeit "tuple([1 for _ in xrange(3)])"
2.4 -> 2.23us
2.5 -> 2.31us (a bit slower, but not so much)

>python -m timeit "tuple(1 for _ in xrange(3))"
2.4 -> 3.32us
2.5 -> 8.03us (240% slower than 2.4)

It appears to be a fixed cost, or startup cost, of the generator 
expression; differences get smaller when building large tuples (but 
always Python 2.5 runs slower than 2.4)

--
components:  -Library (Lib)
nosy: +gagenellina

__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1045>
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1027] uudecoding (uu.py) does not supprt base64, patch attached

2007-08-31 Thread Gabriel Genellina

Gabriel Genellina added the comment:

I think the 2.4 version is in maintenance mode, so no new features are 
added.

You may target 2.5 or 2.6. But the patch is incorrect: the base64 name 
is undefined. You should include test cases and documentation changes 
also; please read http://www.python.org/dev/patches/

--
components: +Library (Lib) -Extension Modules
nosy: +gagenellina

__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1027>
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1139] PyFile_Encoding should be PyFile_SetEncoding

2007-09-09 Thread Gabriel Genellina

New submission from Gabriel Genellina:

Describing the PyFile C API, there is a typo: 
PyFile_Encoding function does not exist, 
should say PyFile_SetEncoding instead.
(This goes down to version 2.3 when the 
function was initially added).

http://docs.python.org/dev/c-api/
concrete.html#PyFile_Encoding

--
components: Documentation
messages: 55774
nosy: gagenellina
severity: normal
status: open
title: PyFile_Encoding should be PyFile_SetEncoding
type: behavior
versions: Python 2.5, Python 2.6, Python 3.0

__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1139>
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1168] complex arithmetic: strange results with "imag"

2007-09-16 Thread Gabriel Genellina

Gabriel Genellina added the comment:

Note that there are no complex literals in Python, only imaginary 
literals. 1-4j is an expression, not a literal.
So 1-4j.imag means 1-(4j.imag) = 1-4 = -3
See http://docs.python.org/ref/numbers.html#l2h-16

(I'd close this as not a bug)

--
nosy: +gagenellina

__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1168>
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1205] urllib fail to read URL contents, urllib2 crash Python

2007-09-26 Thread Gabriel Genellina

Gabriel Genellina added the comment:

This is a server bug. Internet Explorer 6 can't show the page either. 
The response is malformed; it uses chunked transfer, and RFC2616 
section 3.6.1 says "The chunk-size field is a string of hex digits 
indicating the size of the chunk. The chunked encoding is ended by any 
chunk whose size is zero[...]"

After the (first and only) chunk of around 63K, should come a 0-length 
chunk: a line with one or more digits "0" followed by CR+LF. But the 
server is not sending that last chunk, instead it sends lots of nul 
bytes, until eventually a CR,LF sequence arrives.
Neither IE nor Python can handle that (IE keeps requesting the page 
again and again). wget is apparently a lot more relaxed and decides 
that the first chunk is good enough. Perhaps urllib/urllib2 could 
handle the error and raise a more meaningful exception in this case, 
but just ignoring the error doesn't appear to be the right thing IMHO.

--
nosy: +gagenellina

__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1205>
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1346] Error using >>> from OpenGL.GLUT import *

2007-10-27 Thread Gabriel Genellina

Gabriel Genellina added the comment:

Looks like GLUT in special.py is None. You should ask the PyOpenGL 
author/community for help. This is not a Python bug.

--
nosy: +gagenellina

__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1346>
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1336] subprocess.Popen hangs when child writes to stderr

2007-10-27 Thread Gabriel Genellina

Changes by Gabriel Genellina:


--
nosy: +gagenellina

__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1336>
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1328] feature request: force BOM option

2007-10-27 Thread Gabriel Genellina

Changes by Gabriel Genellina:


--
nosy: +gagenellina

__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1328>
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1311] os.path.exists(os.devnull) regression on windows

2007-10-27 Thread Gabriel Genellina

Gabriel Genellina added the comment:

All these tests on Windows XP SP4, executing os.stat("nul")

Python 2.1 thru 2.4  raises: 
OSError: [Errno 22] Invalid argument: 'nul'

Python 2.5 gives a different error:
WindowsError: [Error 87] El parámetro no es correcto: 'nul'

--
nosy: +gagenellina

__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1311>
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1366] popen spawned process may not write to stdout under windows

2007-11-07 Thread Gabriel Genellina

Gabriel Genellina added the comment:

(I think the title you meant was 
"popen spawned process may not 
write to stderr under windows")

The child is dying with IOError: 
[Errno 22] Invalid argument
at the sys.stderr.flush() call.

Neither the docs for os.popen nor 
the Linux man page for popen(3) 
say that stderr is redirected, so 
one would expect the handle to be 
inherited; the IOError looks like 
a bug.
Try using os.popen4 or 
popen2.popen4 or -the recommended 
choice- the subprocess module. 
Using the latter, this is the 
modified parent.py:

"""
import subprocess
cmd = 'python child.py'
p = subprocess.Popen(cmd, 
stdout=subprocess.PIPE)
for line in p.stdout:
  print ">>>", line,
print p.wait()
"""

and this is the output, as 
expected:

"""
2:stderr
>>> 1:stdout
>>> 3:stdout
0
"""

Note the 2:stderr line lacking the 
>>>, because it was printed 
directly by the child process onto 
the stderr handle inherited from 
its parent.

--
nosy: +gagenellina

__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1366>
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1343] XMLGenerator: nice elements

2007-11-07 Thread Gabriel Genellina

Gabriel Genellina added the comment:

Some (ugly) parsers insist on  when the element is not declared to 
be empty, so this should be optional (the 
default being generate )

--
nosy: +gagenellina

__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1343>
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1742669] "%d" format handling for long values

2007-11-07 Thread Gabriel Genellina

Gabriel Genellina added the comment:

Yes, I can reformulate it. In fact my original version was quite 
different, but the resulting diff was hard to understand so I rewrote 
it trying to keep as much as the original code as possible.
I'll submit a new patch next weekend.

_
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1742669>
_
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1417] Weakref not working properly

2007-11-13 Thread Gabriel Genellina

Gabriel Genellina added the comment:

I think this methodref function is simpler and much less intrusive

--
nosy: +gagenellina
Added file: http://bugs.python.org/file8744/methodref.py

__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1417>
__import weakref
import new

class methodref(weakref.ref):
def __new__(cls, method, callback=None):
if not isinstance(method, new.instancemethod):
raise TypeError, 'instancemethod expected; got %s instead' % type(method)
wr = super(methodref, cls).__new__(cls, method.im_self, callback)
wr.im_func = method.im_func 
wr.im_class = method.im_class
return wr

def __call__(self):
im_self = super(methodref, self).__call__()
if im_self is not None:
return new.instancemethod(self.im_func, im_self, self.im_class)

class cls1:
def giveTo(self, to):
to.take(self.bla)
def bla(self, arg):
print self, "says", arg

class cls2:
def take(self, what):
self.ref = methodref(what)

c1 = cls1()
c2 = cls2()
print weakref.getweakrefs(c1)
c1.giveTo(c2)
print weakref.getweakrefs(c1)
print c1.bla
print c2.ref
c1.bla("hi")
c2.ref()("hello")
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1431] pth files not loaded at startup

2007-11-13 Thread Gabriel Genellina

Changes by Gabriel Genellina:


--
nosy: +gagenellina

__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1431>
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1459] Bugs lost on migration from Sourceforge

2007-11-18 Thread Gabriel Genellina

New submission from Gabriel Genellina:

I can't 
find the 
issue this 
mail refers 
to:
http://
mail.python.org/
pipermail/
python-bugs-
list/2006-
April/
033139.html

As it was 
labeled 
"Bug item 
#1474680", 
I tried 
http://
bugs.python.org/
issue1474680
 and got a 
404 error.

Using the 
Search form 
(either 
searching 
into Title 
or All 
Text) 
didn't get 
any 
results. (I 
had to 
remember to 
set the 
Status 
field to 
"don't 
care" 
instead of 
"open" each 
time, but 
this is 
another 
issue).

--
components: None
messages: 57626
nosy: gagenellina
severity: normal
status: open
title: Bugs lost on migration from Sourceforge
versions: 3rd party

__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1459>
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1393] function comparing lacks NotImplemented error

2007-11-19 Thread Gabriel Genellina

Changes by Gabriel Genellina:


--
nosy: +gagenellina

__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1393>
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1477] UnicodeDecodeError that cannot be caught in narrow unicode builds

2007-11-21 Thread Gabriel Genellina

Changes by Gabriel Genellina:


--
nosy: +gagenellina

__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1477>
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1475] test_popen fails when the directory contains a space

2007-11-21 Thread Gabriel Genellina

Changes by Gabriel Genellina:


--
nosy: +gagenellina

__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1475>
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12274] "Print window" menu on IDLE aborts whole application

2011-06-06 Thread Gabriel Genellina

New submission from Gabriel Genellina :

On Windows, IDLE closes all open windows and exits completely, without any 
error message, when selecting the "Print window" menu command.

Starting IDLE from inside a console, one can see the error message:

Exception in Tkinter callback
Traceback (most recent call last):
  File "D:\apps\python32\lib\tkinter\__init__.py", line 1399, in __call__
return self.func(*args)
  File "D:\apps\python32\lib\idlelib\IOBinding.py", line 453, in print_window
command = idleConf.GetOption('main','General','print-command-win')
  File "D:\apps\python32\lib\idlelib\configHandler.py", line 245, in GetOption
type=type, raw=raw)
  File "D:\apps\python32\lib\idlelib\configHandler.py", line 54, in Get
return self.get(section, option, raw=raw)
  File "D:\apps\python32\lib\configparser.py", line 789, in get
d)
  File "D:\apps\python32\lib\configparser.py", line 391, in before_get
self._interpolate_some(parser, option, L, value, section, defaults, 1)
  File "D:\apps\python32\lib\configparser.py", line 440, in _interpolate_some
"found: %r" % (rest,))
configparser.InterpolationSyntaxError: '%' must be followed by '%' or '(', found
: '%s'


It is trying to read this entry from the config-main.def file:

[General]
print-command-posix=lpr %s
print-command-win=start /min notepad /p %s

For a ConfigParser file, those %s should be %%s instead. Previous IDLE versions 
(2.7 and 3.1) read the same entry without problem; I suspect they were using a 
RawConfigParser or processing the entry in a different way.

As a workaround, replacing %s with %%s in config-main.def is enough, until the 
code gets fixed.

--
components: IDLE
messages: 137789
nosy: gagenellina
priority: normal
severity: normal
status: open
title: "Print window" menu on IDLE aborts whole application
type: behavior
versions: Python 3.2

___
Python tracker 
<http://bugs.python.org/issue12274>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12274] "Print window" menu on IDLE aborts whole application

2011-06-06 Thread Gabriel Genellina

Gabriel Genellina  added the comment:

Note: There is a much bigger problem here: IDLE should not abort abruptly in 
such cases, without any error indication.

--

___
Python tracker 
<http://bugs.python.org/issue12274>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12276] 3.x ignores sys.tracebacklimit=0

2011-06-07 Thread Gabriel Genellina

New submission from Gabriel Genellina :

Python 3.x doesn't honor sys.tracebacklimit=0

According to 
http://docs.python.org/py3k/library/sys.html#sys.tracebacklimit
when set to 0, it should not print any stack trace, but it does.

Python 3.2 (r32:88445, Feb 20 2011, 21:29:02) [MSC v.1500 32 bit (Intel)] on win
32
Type "help", "copyright", "credits" or "license" for more information.
p3> import sys
p3> sys.tracebacklimit = 0
p3>
p3> def f(x):
...   return f(x-1) if x else 0/0
...
p3> f(5)
Traceback (most recent call last):
  File "", line 1, in 
  File "", line 2, in f
  File "", line 2, in f
  File "", line 2, in f
  File "", line 2, in f
  File "", line 2, in f
  File "", line 2, in f
ZeroDivisionError: division by zero
p3>

--
components: Interpreter Core
files: tracebacklimitbug.py
messages: 137792
nosy: gagenellina
priority: normal
severity: normal
status: open
title: 3.x ignores sys.tracebacklimit=0
versions: Python 3.1, Python 3.2
Added file: http://bugs.python.org/file22269/tracebacklimitbug.py

___
Python tracker 
<http://bugs.python.org/issue12276>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12276] 3.x ignores sys.tracebacklimit=0

2011-06-07 Thread Gabriel Genellina

Gabriel Genellina  added the comment:

Originally reported by Thorsten Kampe in comp.lang.python 2011-5-27
<http://permalink.gmane.org/gmane.comp.python.general/691496>

--

___
Python tracker 
<http://bugs.python.org/issue12276>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12276] 3.x ignores sys.tracebacklimit=0

2011-06-07 Thread Gabriel Genellina

Gabriel Genellina  added the comment:

Is this the intended behavior then? I don't get the rationale for that change.

There is no way to completely supress traceback information now; for 
sys.tracebacklimit to be of any significance, it must be >= 1; 0 and negative 
values behave the same as it not being set (that is, a full traceback is 
printed).

--

___
Python tracker 
<http://bugs.python.org/issue12276>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3079] sys.exit() called from optparse - bad, bad, bad

2008-06-12 Thread Gabriel Genellina

Changes by Gabriel Genellina <[EMAIL PROTECTED]>:


--
nosy: +gagenellina

___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue3079>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2517] Error when printing an exception containing a Unicode string

2008-06-12 Thread Gabriel Genellina

Changes by Gabriel Genellina <[EMAIL PROTECTED]>:


--
nosy: +gagenellina

___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue2517>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue839496] SimpleHTTPServer reports wrong content-length for text files

2008-06-13 Thread Gabriel Genellina

Gabriel Genellina <[EMAIL PROTECTED]> added the comment:

As noted by Leo Jay in this message 
<http://mail.python.org/pipermail/python-list/2008-June/495718.html>
this bug was supposedly fixed but it is still present.

Looks like the patch was only applied to release24-maint, not to the 
trunk. Both the 2.5 and the 2.6 sources don't have the patch applied. 
3.0 doesn't have this problem but probably it was fixed independently.

--
nosy: +gagenellina
versions: +Python 2.5, Python 2.6

___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue839496>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3711] docs still say to use .dll for compiled extensions

2008-08-28 Thread Gabriel Genellina

New submission from Gabriel Genellina <[EMAIL PROTECTED]>:

The "Extending and Embedding" document still says, in section "Building 
C and C++ Extensions on Windows":
http://docs.python.org/dev/extending/windows.html#a-cookbook-approach
that a C extension may be called spam.dll or spam_d.dll

Since version 2.5 the file must be called spam.pyd or spam_d.pyd - 
the .dll file extension isn't recognized anymore.

A proposed doc patch is attached.

--
assignee: georg.brandl
components: Documentation
files: windows.diff
keywords: patch
messages: 72071
nosy: gagenellina, georg.brandl
severity: normal
status: open
title: docs still say to use .dll for compiled extensions
versions: Python 2.5, Python 2.6, Python 3.0
Added file: http://bugs.python.org/file11284/windows.diff

___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue3711>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3766] socket.socket.recv broken (unbearably slow)

2008-09-11 Thread Gabriel Genellina

Gabriel Genellina <[EMAIL PROTECTED]> added the comment:

I've tested it on Windows XP. MSG_WAITALL is not supported, but I 
replaced it using a while loop. I didn't notice any extraneous delay.

500 packets @ 2 tokens each (500 very short lists)
0.140999794006
 16008 function calls in 0.146 CPU seconds

   Ordered by: internal time

   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
 15000.0360.0000.0360.000 {method 'recv' of 
'_socket.socket'
 objects}
 15000.0330.0000.0330.000 :1(sendall)
 15000.0160.0000.0650.000 Client.py:15(read_int)
 15000.0150.0000.0530.000 Client.py:7(send_int)
  5000.0090.0000.0770.000 
Client.py:22(read_int_list)
  5000.0070.0000.0600.000 
Client.py:10(send_int_list)
 15000.0070.0000.0100.000 struct.py:77(unpack)
 15000.0050.0000.0050.000 struct.py:54(pack)
  5000.0040.0000.1410.000 Client.py:31(spam)
 20010.0040.0000.0040.000 {len}
10.0030.0030.1460.146 runme.py:11(bench)
 15000.0030.0000.0030.000 {method 'unpack' of 
'Struct' objec
ts}
 10010.0030.0000.0030.000 {range}
 10000.0020.0000.0020.000 {method 'append' of 
'list' objects
}
10.0000.0000.0000.000 struct.py:35(_compile)
20.0000.0000.0000.000 {time.time}
10.0000.0000.1460.146 :1()
10.0000.0000.0000.000 {method 'disable' of 
'_lsprof.Prof
iler' objects}


None



1 packet @ 5 tokens (1 very long list)
4.8913242
 450019 function calls in 4.893 CPU seconds

   Ordered by: internal time

   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
500011.2120.0001.2120.000 :1(sendall)
500011.0620.0001.0620.000 {method 'recv' of 
'_socket.socket'
 objects}
500010.5940.0002.2820.000 Client.py:15(read_int)
500010.5170.0001.9820.000 Client.py:7(send_int)
10.3540.3542.7322.732 
Client.py:22(read_int_list)
500010.3350.0000.5240.000 struct.py:77(unpack)
500010.2530.0000.2530.000 struct.py:54(pack)
500010.1890.0000.1890.000 {method 'unpack' of 
'Struct' objec
ts}
10.1760.1762.1582.158 
Client.py:10(send_int_list)
500020.1020.0000.1020.000 {len}
50.0970.0000.0970.000 {method 'append' of 
'list' objects
}
20.0020.0010.0020.001 {range}
10.0020.0024.8934.893 runme.py:19(bench2)
10.0000.0004.8904.890 Client.py:31(spam)
20.0000.0000.0000.000 {time.time}
10.0000.0004.8934.893 :1()
10.0000.0000.0000.000 {method 'disable' of 
'_lsprof.Prof
iler' objects}

--
nosy: +gagenellina

___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue3766>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3916] layout of build directories for Windows not current

2008-09-20 Thread Gabriel Genellina

New submission from Gabriel Genellina <[EMAIL PROTECTED]>:

In the "Using Python on Windows" document, the 
various directories listed for building Python 
on Windows are not current. The attached patch 
fixes the documentation.

Also included a small fix in the PBbuild/
readme.txt file.

--
assignee: georg.brandl
components: Documentation
files: docwin.patch
keywords: patch
messages: 73473
nosy: gagenellina, georg.brandl
severity: normal
status: open
title: layout of build directories for Windows not current
versions: Python 2.6, Python 3.0
Added file: http://bugs.python.org/file11533/docwin.patch

___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue3916>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3912] unittest. assertAlmostEqual() documentation incomplete

2008-09-20 Thread Gabriel Genellina

Gabriel Genellina <[EMAIL PROTECTED]> added the comment:

This patch documents the missing default value.

--
keywords: +patch
nosy: +gagenellina
Added file: http://bugs.python.org/file11535/unittest.diff

___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue3912>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3852] kqueue.control requires 2 params while docs say max_events (the second) defaults to 0

2008-09-20 Thread Gabriel Genellina

Gabriel Genellina <[EMAIL PROTECTED]> added the comment:

Attached a documentation patch, including the kqueue.control function 
docstring.

But I wonder if the code was incorrect instead - both the 
documentation and the function docstring specified a default value for 
max_events=0, and the corresponding variable was initialized to 0.
Perhaps the author meant to use PyArg_ParseTuple(args, "O|
iO:control",...) instead of the current "Oi|O:control"

--
keywords: +patch
nosy: +gagenellina
Added file: http://bugs.python.org/file11536/select.diff

___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue3852>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3826] Self-reference in BaseHTTPRequestHandler descendants causes stuck connections

2008-09-20 Thread Gabriel Genellina

Gabriel Genellina <[EMAIL PROTECTED]> added the comment:

3.0rc1 still fails.
The diagnostic is correct, the connection should be closed after 
sending the response, but isn't.
The attached unittest reproduces the error without requiring a browser.

--
nosy: +gagenellina

___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue3826>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1578269] Add os.link() and os.symlink() and os.path.islink() support for Windows

2010-01-19 Thread Gabriel Genellina

Changes by Gabriel Genellina :


--
nosy: +gagenellina

___
Python tracker 
<http://bugs.python.org/issue1578269>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7749] pydoc error - "No module named tempfile"

2010-01-21 Thread Gabriel Genellina

Gabriel Genellina  added the comment:

On Windows, trying with different Python versions:

D:\temp>python24 -m pydoc sys
[works as expected]

D:\temp>python25 -m pydoc sys
No module named tempfile

D:\temp>python26 -m pydoc sys
No module named tempfile

D:\temp>python27 -m pydoc sys
[works as expected]


If tempfile.py is in the current directory, it works:

D:\temp>cd \apps\python26\lib

D:\apps\Python26\Lib>dir /b tempfile.py
tempfile.py

D:\apps\Python26\Lib>python26 -m pydoc sys
Help on built-in module sys:
...


Directly executing pydoc.py works fine too:

D:\temp>d:\apps\Python26\lib\pydoc.py sys
Help on built-in module sys:
...


so this may be a runpy issue, not directly related to pydoc.

--
nosy: +gagenellina

___
Python tracker 
<http://bugs.python.org/issue7749>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7749] pydoc error - "No module named tempfile"

2010-01-21 Thread Gabriel Genellina

Gabriel Genellina  added the comment:

This happens to be a duplicate of issue #7328 -- pydoc used to remove the 
Python standard library from sys.path (!) when run with -m

Fixed in r76312 (2.7). I think the fix should be backported to 2.6

@gib: you may patch your Python 2.5 installation yourself, it's very simple, 
you'll have to add a single line and reindent a block, that's all. See r76312

--

___
Python tracker 
<http://bugs.python.org/issue7749>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5680] Command-line arguments when running in IDLE

2010-02-04 Thread Gabriel Genellina

Gabriel Genellina  added the comment:

A different patch to solve the same issue.
This one uses a standard tkSimpleDialog to prompt for the command line, and 
follows the directives found at the top of the source (only took 8 years to 
implement... not so bad :) )

XXX GvR Redesign this interface (yet again) as follows:

- Present a dialog box for ``Run Module''

- Allow specify command line arguments in the dialog box

--
nosy: +gagenellina
Added file: http://bugs.python.org/file16139/issue5680-patch2.diff

___
Python tracker 
<http://bugs.python.org/issue5680>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8036] Interpreter crashes on invalid arg to spawnl on Windows

2010-03-08 Thread Gabriel Genellina

Gabriel Genellina  added the comment:

In case it matters, 3.0.1 does NOT crash.

--
nosy: +gagenellina

___
Python tracker 
<http://bugs.python.org/issue8036>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8077] cgi handling of POSTed files is broken

2010-03-16 Thread Gabriel Genellina

Gabriel Genellina  added the comment:

This doesn't look like a documentation bug to me - handling of uploaded files 
via CGI *should* work, even if CGI is not the best way to do that.

--
nosy: +gagenellina

___
Python tracker 
<http://bugs.python.org/issue8077>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5879] multiprocessing - example "pool of http servers " fails on windows "socket has no attribute fromfd"

2010-03-16 Thread Gabriel Genellina

Changes by Gabriel Genellina :


--
nosy: +gagenellina

___
Python tracker 
<http://bugs.python.org/issue5879>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7347] Add {Create|Delete}KeyEx to _winreg, doc and test updates

2010-03-19 Thread Gabriel Genellina

Gabriel Genellina  added the comment:

Why the *Ex names? Can't we just add additional arguments to the original names?

The Python names do not necesarily have to match the API calls. Having 
QueryValue and QueryValueEx was a mistake in the first place, and I would 
prefer not continuing doing such things.

--
nosy: +gagenellina

___
Python tracker 
<http://bugs.python.org/issue7347>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6701] Make custom xmlrpc extension easier

2010-03-24 Thread Gabriel Genellina

Gabriel Genellina  added the comment:

Just a few comments on the code itself:

if type_ in self.__dispatch.keys():
should be:
if type_ in self.__dispatch:

Previously, error reporting of recursive data stated the type of the offending 
value; with this patch, this hint is lost (see _add_memo)

Caching of bound methods in local variables is a common optimization 
(dump=self._dump); why did you remove it everywhere?

Why Marshaller.dispatch was renamed to __dispatch but Unmarshaller.dispatch 
stays the same? (btw, why the double underscore?)

--
nosy: +gagenellina

___
Python tracker 
<http://bugs.python.org/issue6701>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6701] Make custom xmlrpc extension easier

2010-03-24 Thread Gabriel Genellina

Gabriel Genellina  added the comment:

Just a few comments on the code itself:

if type_ in self.__dispatch.keys():
should be:
if type_ in self.__dispatch:

Previously, error reporting of recursive data stated the type of the offending 
value; with this patch, this hint is lost (see _add_memo)

Caching of bound methods in local variables is a common optimization 
(dump=self._dump); why did you remove it everywhere?

Why Marshaller.dispatch was renamed to __dispatch but Unmarshaller.dispatch 
stays the same? (btw, why the double underscore?)

--

___
Python tracker 
<http://bugs.python.org/issue6701>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1553375] Add traceback.print_full_exception()

2010-03-24 Thread Gabriel Genellina

Changes by Gabriel Genellina :


--
nosy: +gagenellina

___
Python tracker 
<http://bugs.python.org/issue1553375>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6716] Windows install error when choosing to compile .py files

2010-03-26 Thread Gabriel Genellina

Gabriel Genellina  added the comment:

r78994 (exclude 2to3 tests from compileall) should be backported to trunk and 
the 2.6 branch, but I don't see them (yet).

--
nosy: +gagenellina

___
Python tracker 
<http://bugs.python.org/issue6716>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6716] Windows install error when choosing to compile .py files

2010-03-26 Thread Gabriel Genellina

Gabriel Genellina  added the comment:

Sorry for being so terse and not filling in the gaps! In the end, I changed my 
mind on this bug - it's not an installer issue.

The 2.6.5 MSI installer, when asked to compile .pyc files, exits with an error 
as reported here:
http://mail.python.org/pipermail/python-list/2010-March/1240182.html

Both Problem#1 and Problem#3 (as reported in this issue) apply to the 2.6.5 
installer. Properly quoting the -x argument fixed Problem#1 (already done). But 
Problem#3 still applies: compileall fails on one test case in lib2to3 because 
of a syntax error (this was not so clearly stated in the c.l.p. post). The 
error is:

SyntaxError: ('invalid syntax', 
('d:\\apps\\python26\\Lib\\lib2to3\\tests\\data\\py2_test_grammar.py', 936, 23, 
'with manager(), manager():\n'))

That syntax is not 2.6 compatible (but 2.7 does allow it).

My initial idea was to completely exclude lib2to3\tests from being precompiled, 
as done in r78994 for py3k, and both for 2.6 and 2.7. But after looking more 
closely to the error (and noticing that it is legal in 2.7) I'd leave the 
installer as it is, and report the issue in py2_test_grammar.py as a separate 
bug.

--

___
Python tracker 
<http://bugs.python.org/issue6716>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8241] py2_test_grammar.py contains invalid syntax for 2.6

2010-03-26 Thread Gabriel Genellina

New submission from Gabriel Genellina :

Lib\lib2to3\tests\data\py2_test_grammar.py, in test_with_statement, requires a 
variant of the with statement (multiple targets) that is not available in 
Python 2.6.  Compiling py2_test_grammar.py raises a SyntaxError.  This makes 
the 2.6.5 installer exit with an error message when asked to pre-compile all 
.pyc files, as reported in issue6716.

The fix is simply to remove the last three 'with' statements in function 
test_with_statement, around line 923 in 
Lib\lib2to3\tests\data\py2_test_grammar.py, as this is invalid code for this 
Python version.

--
components: 2to3 (2.x to 3.0 conversion tool)
messages: 101779
nosy: gagenellina
severity: normal
status: open
title: py2_test_grammar.py contains invalid syntax for 2.6
type: behavior
versions: Python 2.6

___
Python tracker 
<http://bugs.python.org/issue8241>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4749] Issue with RotatingFileHandler logging handler on Windows

2010-03-26 Thread Gabriel Genellina

Gabriel Genellina  added the comment:

@jpfarias: could you be more specific? Which error(s) do you have? in which 
scenario?

--

___
Python tracker 
<http://bugs.python.org/issue4749>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8262] bad wording in error message attempting to start a Thread twice

2010-03-29 Thread Gabriel Genellina

New submission from Gabriel Genellina :

Steve Holden, in <http://permalink.gmane.org/gmane.comp.python.general/658347>, 
about the RuntimeError you get when  a Thread object is started twice:

«"thread already started" implies that the thread is running, but you
actually get the same message if you try to start any terminated thread
(including a canceled one), so "threads cannot be restarted" might be a
better message. Or, better still, "Threads can only be started once".»

This patch fixes the wording as suggested.

--
components: Library (Lib)
files: threading.diff
keywords: patch
messages: 101918
nosy: gagenellina
severity: normal
status: open
title: bad wording in error message attempting to start a Thread twice
type: behavior
versions: Python 2.7, Python 3.2, Python 3.3
Added file: http://bugs.python.org/file16695/threading.diff

___
Python tracker 
<http://bugs.python.org/issue8262>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1723] Respuesta automática de Yahoo!

2008-01-02 Thread Gabriel Genellina

New submission from Gabriel Genellina:

Estoy de vacaciones hasta el 15 de enero!

On holiday until Jan 15!

--
messages: 59110
nosy: gagenellina
severity: normal
status: open
title: Respuesta automática de Yahoo!

__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1723>
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1675] Race condition in os.makedirs

2008-01-20 Thread Gabriel Genellina

Changes by Gabriel Genellina:


--
nosy: +gagenellina

__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1675>
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1927] raw_input behavior incorrect if readline not enabled

2008-01-24 Thread Gabriel Genellina

Gabriel Genellina added the comment:

GNU readline is configured as to prompt the user using standard output, 
and read input from standard input; if this is the desired behavior it 
would be easy to provide a simple patch so input/raw_input behave that 
way even when readline is not used.

--
nosy: +gagenellina

__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1927>
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1742669] "%d" format handling for long values

2008-02-18 Thread Gabriel Genellina

Gabriel Genellina added the comment:

An updated patch, along the lines given by Travis Oliphant.

Added file: http://bugs.python.org/file9458/floatfmt.diff

_
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1742669>
_
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1518] Fast globals/builtins access (patch)

2008-02-18 Thread Gabriel Genellina

Changes by Gabriel Genellina:


--
nosy: +gagenellina

__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1518>
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1450] make modulator more general

2008-03-11 Thread Gabriel Wicke

Gabriel Wicke <[EMAIL PROTECTED]> added the comment:

Slightly adjusted and from top dir.

--
nosy: +gwicke
Added file: http://bugs.python.org/file9659/modulator-top.patch

__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1450>
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2304] subprocess under windows fails to quote properly when shell=True

2008-03-16 Thread Gabriel Genellina

Gabriel Genellina <[EMAIL PROTECTED]> added the comment:

You aren't testing the modified code, the Popen call should say 
shell=True.

I think that a more PEP8-compliant style would be nice (removing the 
spaces after open and read, and using consistent indentation)

--
nosy: +gagenellina

__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue2304>
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2483] int and float accept bytes, complex does not

2008-03-25 Thread Gabriel Genellina

Gabriel Genellina <[EMAIL PROTECTED]> added the comment:

Are numbers so special to break 
the rules? why stopping here? 
what about other types that may 
want to accept ASCII bytes 
instead of characters? Isn't 
this like going back to the 2.x 
world?

The protocol with embedded ASCII 
numbers isn't a very convincing 
case for me. One can read a 
binary integer in C using a 
single function call. In Python 
2.X this can't be done in a 
single call, one has to use 
struct.unpack to decode the 
bytes read, and there was no 
complains that I know of. 
In 3.0 the same happens for 
ASCII numbers too, one will have 
to decode them first. The 
conversion may look like a 
stupid step, but it's as stupid 
as having to use struct.unpack 
to convert some bits to the 
*same* bits inside the integer 
object.

Writing int(str(value,'ascii')) 
doesn't look so terrible.

And one may argue that 
int(b'1234') should return 
0x34333231 instead of 1234; 
b'1234' is the binary 
representation of 0x34333231 in 
little-endian format.

--
nosy: +gagenellina

__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue2483>
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4267] sqlite3 documentation

2008-11-05 Thread Gabriel Genellina

New submission from Gabriel Genellina <[EMAIL PROTECTED]>:

Three small changes to sqlite3 documentation:

1) (mostly cosmetic) In the second example, changed what was "a tuple 
of tuples" to "a list of tuples" to follow common practice.

2) "DEFERRED", "IMMEDIATE" and "EXLUSIVE" (possible values for 
Connection.isolation_level) are strings, not module constants, so 
should be surrounded with quotes.

2) The iterdump example is not well written. Currently says:

   con = sqlite3.connect('existing_db.db')
   full_dump = os.linesep.join(con.iterdump())
   f = open('dump.sql', 'w')
   f.writelines(full_dump)
   f.close()

Using os.linesep to join lines to be written to a text file has strange 
results in non-Unix systems; joining the *whole* database dump into a 
big string isn't a good idea; and finally, writelines(some_string) will 
write the text one char at a time (!). 
I've rewritten it as:

   with open('dump.sql', 'w') as f:
   for line in con.iterdump():
   f.write('%s\n' % line)

to take advantage of iterdump's lazy nature.

--
assignee: georg.brandl
components: Documentation
files: sqlite3.diff
keywords: patch
messages: 75548
nosy: gagenellina, georg.brandl
severity: normal
status: open
title: sqlite3 documentation
versions: Python 2.6, Python 3.0
Added file: http://bugs.python.org/file11949/sqlite3.diff

___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue4267>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4268] functions in email package listed under wrong module

2008-11-06 Thread Gabriel Genellina

New submission from Gabriel Genellina <[EMAIL PROTECTED]>:

Functions message_from_string and message_from_file are documented as 
belonging to the email.parser module, but in fact they live at the top 
of the email package.

The .rst source looks fine, but the rendered html says  
`email.parser.message_from_string`. 
http://docs.python.org/library/email.parser.html#parser-class-api

Perhaps it's the `module:: email.parser` directive at the top?

A similar problem is in email.mime.rst; all the documented classes are 
exposed at the top of the email package (i.e. should be email.MIMEBase, 
not email.mime.MIMEBase)

--
assignee: georg.brandl
components: Documentation
messages: 75554
nosy: gagenellina, georg.brandl
severity: normal
status: open
title: functions in email package listed under wrong module
versions: Python 2.6, Python 3.0

___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue4268>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1755388] Problem with socket.gethostbyaddr() and KeyboardInterrupt

2008-11-24 Thread Gabriel Genellina

Gabriel Genellina <[EMAIL PROTECTED]> added the comment:

I think that closing it as wontfix is not the proper thing to do. It 
is a real bug; closing it will hide it from anybody that could 
potentially fix it. Also it won't appear on bug listings unless you 
explicitely ask for closed ones. 

Setting the right categories might help.

--
components: +Interpreter Core -Extension Modules
type:  -> behavior
versions: +Python 2.6, Python 3.0 -Python 2.5
Added file: http://bugs.python.org/file12117/bug1755388.py

___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1755388>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1755388] Problem with socket.gethostbyaddr() and KeyboardInterrupt

2008-11-24 Thread Gabriel Genellina

Changes by Gabriel Genellina <[EMAIL PROTECTED]>:


--
components: +Library (Lib) -Interpreter Core

___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1755388>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1755388] Problem with socket.gethostbyaddr() and KeyboardInterrupt

2008-11-26 Thread Gabriel Genellina

Gabriel Genellina <[EMAIL PROTECTED]> added the comment:

Yes, I know it's a bug, and certainly closing this report won't help 
solve it. I can't reopen this.

___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1755388>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4309] ctypes documentation

2008-11-27 Thread Gabriel Genellina

Changes by Gabriel Genellina <[EMAIL PROTECTED]>:


--
nosy: +gagenellina

___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue4309>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4022] 2.6 dependent on c:\python26\ on windows

2008-11-27 Thread Gabriel Genellina

Changes by Gabriel Genellina <[EMAIL PROTECTED]>:


--
nosy: +gagenellina

___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue4022>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4315] On some Python builds, exec in a function can't create shadows of variables if these are declared "global" in another function of the same module

2008-11-27 Thread Gabriel Genellina

Changes by Gabriel Genellina <[EMAIL PROTECTED]>:


--
nosy: +gagenellina

___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue4315>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3826] BaseHTTPRequestHandler depends on GC to close connections

2008-11-29 Thread Gabriel Genellina

Gabriel Genellina <[EMAIL PROTECTED]> added the comment:

--- El vie 28-nov-08, Gregory P. Smith <[EMAIL PROTECTED]> escribió:

> P.S.  Gabriel Genellina (gagenellina)  -  Your comment
> sounded like you
> had a unit test for this but it never got attached.  Still
> have it?

I've found it; it uses BaseHTTPRequestHandler as in the original bug report. 
I'm not sure it is still relevant, but I'm attaching it here anyway.

Added file: http://bugs.python.org/file12166/test_httpclose_py3k.py

___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue3826>
___import socket
import http.server
import threading
import unittest
from time import sleep

RESPONSE_TEXT = b'Expected response'
PORT = 8123

class DummyRequestHandler(http.server.BaseHTTPRequestHandler):
def log_message(self, *args):
# no log messages
pass

def do_GET(self):
self.send_response(200)
self.send_header('Content-Type', 'text/plain')
self.send_header('Content-Length', len(RESPONSE_TEXT))
self.send_header('Connection', 'close')
self.end_headers()
self.wfile.write(RESPONSE_TEXT)

class DummyRequestHandlerWithCycle(DummyRequestHandler):
def do_GET(self):
# this cycle makes the server not to close the connection
self.foo = self
DummyRequestHandler.do_GET(self)

class TestHttpClose(unittest.TestCase):

  def run_server_bg(self, handler_class):
httpd = http.server.HTTPServer(('127.0.0.1', PORT), handler_class)
httpd.handle_request() # only 1 request!

  def _test(self, handler_class):
t = threading.Thread(target=self.run_server_bg, args=(handler_class,))
t.start()
sleep(1)
s = socket.socket()
s.settimeout(5)
s.connect(('127.0.0.1', PORT))
req = b'GET / HTTP/1.0\r\n\r\n'
s.sendall(req)
resp = b''
while True:
  d = s.recv(100)
  if not d: break
  resp += d
self.assert_(RESPONSE_TEXT in resp)
self.assert_(s.recv(1)==b'', "Connection should be closed by now")

  def testCloseNoCycle(self):
self._test(handler_class=DummyRequestHandler)

  def testCloseWithCycle(self):
self._test(handler_class=DummyRequestHandlerWithCycle)

if __name__=='__main__':
   unittest.main()

___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4335] inspect.getsourcelines ignores last line in module

2008-12-05 Thread Gabriel Genellina

Changes by Gabriel Genellina <[EMAIL PROTECTED]>:


--
nosy: +gagenellina

___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue4335>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4426] UTF7 decoding is far too strict

2008-12-05 Thread Gabriel Genellina

Changes by Gabriel Genellina <[EMAIL PROTECTED]>:


--
nosy: +gagenellina

___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue4426>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3166] Make conversions from long to float correctly rounded.

2008-12-09 Thread Gabriel Genellina

Changes by Gabriel Genellina <[EMAIL PROTECTED]>:


--
nosy: +gagenellina

___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue3166>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4566] 2.6.1 breaks many applications that embed Python on Windows

2008-12-09 Thread Gabriel Genellina

Changes by Gabriel Genellina <[EMAIL PROTECTED]>:


--
nosy: +gagenellina

___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue4566>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4622] SequenceMatcher bug with long sequences

2008-12-10 Thread Gabriel Genellina

Gabriel Genellina <[EMAIL PROTECTED]> added the comment:

Python 2.3.4 and later have this bug. But release 2.1.3 doesn't:

Python 2.1.3 (#35, Apr  8 2002, 17:47:50) [MSC 32 bit (Intel)] on win32
Type "copyright", "credits" or "license" for more information.
>>> import difflib
>>> difflib.SequenceMatcher(None, [4] + [5] * 500, [5] * 500).ratio()
0.99900099900099903
>>> difflib.SequenceMatcher(None, [4] + [5] * 200, [5] * 200).ratio()
0.99750623441396513
>>> difflib.SequenceMatcher(None, [4] + [5] * 100, [5] * 100).ratio()
0.99502487562189057

I don't have any 2.2 release to test right now.

--
nosy: +gagenellina

___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue4622>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4622] SequenceMatcher bug with long sequences

2008-12-10 Thread Gabriel Genellina

Gabriel Genellina <[EMAIL PROTECTED]> added the comment:

#2986 may be a duplicate of this; #1528074 is relevant too.

___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue4622>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3999] Real segmentation fault handler

2008-12-10 Thread Gabriel Genellina

Changes by Gabriel Genellina <[EMAIL PROTECTED]>:


--
nosy: +gagenellina

___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue3999>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4620] Memory leak with datetime used with time.strptime

2008-12-10 Thread Gabriel Genellina

Gabriel Genellina <[EMAIL PROTECTED]> added the comment:

After running for more than 2 hours, I could not see any memory growth 
with 2.5.2 on WinXP.

--
nosy: +gagenellina

___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue4620>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4216] subprocess.Popen hangs at communicate() when child exits

2008-12-15 Thread Gabriel Genellina

Gabriel Genellina  added the comment:

I think communicate() works as documented now: reads stdout/stderr 
until EOF, *and* waits for subprocess to terminate.

You're asking for a different method, or perhaps an optional 
parameter "return_when_died" to communicate, so it returns as soon as 
the child process terminates (I don't like the parameter name...)

I think this is more a feature request than a crash, targeted to 
2.7/3.1 - 2.4 only gets security fixes anyway.

--
nosy: +gagenellina
type: crash -> feature request
versions: +Python 2.7, Python 3.1 -Python 2.4

___
Python tracker 
<http://bugs.python.org/issue4216>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4640] optparse - dosn't distinguish between '--option' and '-option'

2008-12-15 Thread Gabriel Genellina

Gabriel Genellina  added the comment:

could you provide a test case / code fragment showing the bug?

--
components: +Library (Lib) -Extension Modules
nosy: +gagenellina

___
Python tracker 
<http://bugs.python.org/issue4640>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4643] cgitb.html fails if getattr call raises exception

2008-12-15 Thread Gabriel Genellina

Changes by Gabriel Genellina :


--
nosy: +gagenellina

___
Python tracker 
<http://bugs.python.org/issue4643>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4708] os.pipe should return inheritable descriptors (Windows)

2008-12-21 Thread Gabriel Genellina

Gabriel Genellina  added the comment:

>From the thread in c.l.p: 

Pros (of changing os.pipe() to return inheritable pipes):
 
- as it isn't explicitely documented whether os.pipe() returns 
inheritable pipes or not, both versions are "right" according to the 
documentation.

- if someone relies on pipes being non-inheritable on Windows (why?), 
this is undocumented behaviour, and Python has the right to change it.

- would improve POSIX compatibility, it mimics what os.pipe()
does on those OS

- inheritable pipes are less surprising for guys coming from other OS

- inheritable pipes are a lot more useful than non-inheritable ones 
when doing IPC (probably its main usage).
 
Cons:
 
- os.pipe has behaved that way since long time ago.

- some programs *might* break, if they relied on pipes being 
non-inheritable on Windows, even if that was undocumented behaviour.

--
nosy: +gagenellina

___
Python tracker 
<http://bugs.python.org/issue4708>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4747] SyntaxError executing a script containing non-ASCII characters in its name or path

2008-12-25 Thread Gabriel Genellina

New submission from Gabriel Genellina :

Attempting to directly execute a script containing non-ASCII 
characters in its name or path raises SyntaxError.

The script contents are mostly irrelevant, except it must contain an 
encoding declaration (with *any* encoding, real or inexistent).

Running "python foo.py" works, but invoking it directly as "foo.py" 
raises `SyntaxError: None`, or sometimes `SyntaxError: encoding 
problem: with BOM` (no BOM is present in the source file, a plain 
ASCII text file).

C:\TEMP>cd áéíóú

C:\TEMP\áéíóú>type test.py
# -*- coding: ascii -*-

C:\TEMP\áéíóú>C:\Apps\Python30\python.exe test.py

C:\TEMP\áéíóú>test.py
SyntaxError: None

To avoid any doubt, the file has no strange characters:

C:\TEMP\áéíóú>python -c "print(repr(open('test.py','rb').read()))"
'# -*- coding: ascii -*-\r\n'

and .py files are associated with the same interpreter:

C:\TEMP\áéíóú>assoc .py
.py=Python.File

C:\TEMP\áéíóú>ftype Python.File
Python.File="C:\Apps\Python30\python.exe" "%1" %*

The same thing happens if the file name contains any non-ASCII 
character (the path may be pure ASCII).

--
components: Interpreter Core, Windows
messages: 78286
nosy: gagenellina
severity: normal
status: open
title: SyntaxError executing a script containing non-ASCII characters in its 
name or path
type: compile error
versions: Python 3.0

___
Python tracker 
<http://bugs.python.org/issue4747>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4746] Misguiding wording 3.0 c-api reference

2008-12-25 Thread Gabriel Genellina

Gabriel Genellina  added the comment:

Also, it isn't clear that the returned string must not be modified, 
and that the pointer lifetime is of the original string object itself.
(This applies to all string and unicode formats).

--
nosy: +gagenellina

___
Python tracker 
<http://bugs.python.org/issue4746>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4722] _winreg.QueryValue fault while reading mangled registry values

2008-12-26 Thread Gabriel Genellina

Changes by Gabriel Genellina :


--
nosy: +gagenellina

___
Python tracker 
<http://bugs.python.org/issue4722>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4726] doctest gets line numbers wrong due to quotes in comments

2008-12-26 Thread Gabriel Genellina

Gabriel Genellina  added the comment:

I could not reproduce the behaviour you describe.
Could you provide a test case? That fails with the current code and is 
fixed after applying your patch.

(BTW, the r.e. should be a raw string literal, even the original one)

--
nosy: +gagenellina

___
Python tracker 
<http://bugs.python.org/issue4726>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4716] Python 3.0 halts on shutdown when settrace is set

2008-12-26 Thread Gabriel Genellina

Gabriel Genellina  added the comment:

Yes, this is exactly the problem. The execution never goes beyond print
('here'); if you print frame.f_lineno you'll see it blocks at io.py 
line 1036, waiting for a Lock for the second time.

So the trace function cannot use print, not write to regular files 
(because io.py is written in Python). This is a severe limitation.

As a workaround, you can use the _fileio module (written in C):

import _fileio
f = _fileio._FileIO("output.txt", "w", True)

def tracing_func(frame, event, arg):
f.write('%s %s %d\n' % (frame.f_code.co_filename, frame.f_code.co_
name, frame.f_lineno))
return tracing_func

A possible fix would be to use an RLock instead of a Lock object, but 
I haven't investigated it.

--
components: +Library (Lib)
nosy: +gagenellina

___
Python tracker 
<http://bugs.python.org/issue4716>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4708] os.pipe should return inheritable descriptors (Windows)

2008-12-26 Thread Gabriel Genellina

Gabriel Genellina  added the comment:

Patch to posixmodule.c including test case and documentation updates.
Note: I've only run the tests on Windows.

--
keywords: +patch
Added file: http://bugs.python.org/file12460/inheritable_pipes.diff

___
Python tracker 
<http://bugs.python.org/issue4708>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4710] [PATCH] zipfile.ZipFile does not extract directories properly

2008-12-26 Thread Gabriel Genellina

Gabriel Genellina  added the comment:

Your usage of os.sep is incorrect, both when reading and writing 
directories.

Zip files are (more-or-less) platform independent. The specification 
*requires* forward slashes in paths [1], and the zipfile module 
already writes them that way. Checking for os.sep is wrong - at least 
on Windows. 

I've never encountered malformed entries of that kind (like "directory
\" instead of "directory/") but if you want to suport such beasts, 
check for "/" *and* os.sep explicitely.

[1] See APPNOTE.TXT (there is a link near the top of zipfile.py)

--
nosy: +gagenellina

___
Python tracker 
<http://bugs.python.org/issue4710>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4756] zipfile.is_zipfile: added support for file-like objects

2008-12-26 Thread Gabriel Genellina

New submission from Gabriel Genellina :

Patch to zipfile.is_zipfile, adding support for file and file-like 
objects. Includes test cases and documentation updates.

This fixes issue4241 too.

--
components: Library (Lib)
files: is_zipfile_filelike.diff
keywords: patch
messages: 78342
nosy: gagenellina
severity: normal
status: open
title: zipfile.is_zipfile: added support for file-like objects
type: behavior
versions: Python 2.7, Python 3.1
Added file: http://bugs.python.org/file12470/is_zipfile_filelike.diff

___
Python tracker 
<http://bugs.python.org/issue4756>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4241] zipfile.py -> is_zipfile leaves file open when error

2008-12-26 Thread Gabriel Genellina

Gabriel Genellina  added the comment:

The patch for issue4756 fixes this too.

--
nosy: +gagenellina

___
Python tracker 
<http://bugs.python.org/issue4241>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3618] possible deadlock in IO library (Lib/io.py)

2008-12-26 Thread Gabriel Genellina

Changes by Gabriel Genellina :


--
nosy: +gagenellina

___
Python tracker 
<http://bugs.python.org/issue3618>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4643] cgitb.html fails if getattr call raises exception

2008-12-29 Thread Gabriel Genellina

Gabriel Genellina  added the comment:

I believe a patch against the trunk would be enough, but should include 
a test case.

___
Python tracker 
<http://bugs.python.org/issue4643>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3023] Problem with invalidly-encoded command-line arguments (Unix)

2008-12-31 Thread Gabriel Genellina

Changes by Gabriel Genellina :


--
nosy: +gagenellina

___
Python tracker 
<http://bugs.python.org/issue3023>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4781] The function, Threading.Timer.run(), may be Inappropriate

2008-12-31 Thread Gabriel Genellina

Gabriel Genellina  added the comment:

Note that doing this would change the class semantics.
Timer "[...] represents an action that should be run only after a 
certain amount of time has passed — a timer." and the example clearly 
shows that the action is run *once*. 

Timer is basically an example of how to write custom Thread 
subclasses; if you want a "repetitive action", you may easily write a 
subclass based on the code you posted. Not every useful class must be 
in the standard library...

--
nosy: +gagenellina

___
Python tracker 
<http://bugs.python.org/issue4781>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4811] invalid reST markup in several documents

2009-01-02 Thread Gabriel Genellina

New submission from Gabriel Genellina :

Several documents contain invalid reST markup that "leaks" into the 
html output (missing ``, incorrect indentation, etc.)
This patch fixes the obvious ones.

--
assignee: georg.brandl
components: Documentation
files: invalid-doc-markup.diff
keywords: patch
messages: 78866
nosy: gagenellina, georg.brandl
severity: normal
status: open
title: invalid reST markup in several documents
versions: Python 2.6, Python 2.7, Python 3.0, Python 3.1
Added file: http://bugs.python.org/file12543/invalid-doc-markup.diff

___
Python tracker 
<http://bugs.python.org/issue4811>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4811] invalid reST markup in several documents

2009-01-02 Thread Gabriel Genellina

Gabriel Genellina  added the comment:

I did a search on the .html files using a regular expression, and 
manually filtered out the false positives.
The expression used was this "::[^=]|:[a-zA-Z][a-zA-Z0-9]+|`|\.\.\s*\w
+:"
I'll try to come up with a useable tool.

___
Python tracker 
<http://bugs.python.org/issue4811>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4811] invalid reST markup in several documents

2009-01-03 Thread Gabriel Genellina

Gabriel Genellina  added the comment:

This patch includes some (sort of) checker for suspicious constructs 
that resembles markup that has leaked into the final output.

It's a new Builder for Sphinx, and works with the docutils nodes, not 
the source files directly.

"doc-Makefile.diff" updates both make.bat and the Makefile, adding a 
new target "suspicious".

The "ignored.csv" file contains the rules to discard false positives.

"builder.diff" updates builder.py in Sphinx, adding a new builder 
implemented in suspicious.py; the source code has some comments 
explaining how it's used.

Execute `make suspicious`, a "suspicious.csv" file is created in build/
suspicious containing one line per issue found.

Currently, the only relevant message I get is about the :makevar: role 
usage in c-api/init.rst -- looks like docutils doesn't properly 
processes it.

There is something I don't like in the code -- suspicious.py is 
generic, lives inside the Sphinx directory, but knows not to process 
the "documenting" directory inside Python [there are too much false 
positives there -- most of the examples contain actual reST markup]. 
But I don't know enough of Sphinx to make it better :(

___
Python tracker 
<http://bugs.python.org/issue4811>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4811] invalid reST markup in several documents

2009-01-04 Thread Gabriel Genellina

Changes by Gabriel Genellina :


Added file: http://bugs.python.org/file12579/suspicious.rar

___
Python tracker 
<http://bugs.python.org/issue4811>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4905] Use INVALID_FILE_ATTRIBUTES instead of magic numbers

2009-01-12 Thread Gabriel Genellina

Gabriel Genellina  added the comment:

The patch looks fine to me

--
nosy: +gagenellina

___
Python tracker 
<http://bugs.python.org/issue4905>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4903] binascii.crc32() - document signed vs unsigned results

2009-01-12 Thread Gabriel Genellina

Gabriel Genellina  added the comment:

Just a small note on the wording: "will have" and "will always be" look 
too strong to me. I'd just use is, are. Present tense seems to be --in 
general-- the preferred style in the documentation.

--
nosy: +gagenellina

___
Python tracker 
<http://bugs.python.org/issue4903>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



  1   2   3   4   >