[issue6231] ElementInclude may drop text

2009-06-07 Thread Jeremy Thurgood

Changes by Jeremy Thurgood :


--
nosy: +jerith

___
Python tracker 

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



[issue6230] ElementTree.Element and cElementTree.Element have slightly different repr

2009-06-07 Thread Jeremy Thurgood

Changes by Jeremy Thurgood :


--
nosy: +jerith

___
Python tracker 

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



[issue2746] ElementTree ProcessingInstruction uses character entities in content

2009-06-07 Thread Jeremy Thurgood

Changes by Jeremy Thurgood :


--
nosy: +jerith

___
Python tracker 

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



[issue6237] Build errors when using LDFLAGS="-Wl,--no-undefined"

2009-06-07 Thread Funda Wang

New submission from Funda Wang :


gcc -pthread -Wl,--as-needed -Wl,--no-undefined -Wl,-z,relro -lstdc++ -
Xlinker -export-dynamic -o python \
Modules/python.o \
-L. -lpython2.6 -lpthread -ldl  -lutil   -lm
build/temp.linux-i686-2.6/home/fwang/rpm/BUILD/Python-2.6.2/Modules/
_ctypes/_ctypes_test.o: In function `my_sqrt':
/home/fwang/rpm/BUILD/Python-2.6.2/Modules/_ctypes/_ctypes_test.c:83: 
undefined reference to `sqrt'
collect2: ld returned 1 exit status
build/temp.linux-i686-2.6/home/fwang/rpm/BUILD/Python-2.6.2/Modules/
audioop.o: In function `audioop_rms':
/home/fwang/rpm/BUILD/Python-2.6.2/Modules/audioop.c:419: undefined 
reference to `sqrt'
collect2: ld returned 1 exit status
build/temp.linux-i686-2.6/home/fwang/rpm/BUILD/Python-2.6.2/Modules/
dlmodule.o: In function `dl_open':
/home/fwang/rpm/BUILD/Python-2.6.2/Modules/dlmodule.c:187: undefined 
reference to `dlopen'
/home/fwang/rpm/BUILD/Python-2.6.2/Modules/dlmodule.c:189: undefined 
reference to `dlerror'
build/temp.linux-i686-2.6/home/fwang/rpm/BUILD/Python-2.6.2/Modules/
dlmodule.o: In function `dl_close':
/home/fwang/rpm/BUILD/Python-2.6.2/Modules/dlmodule.c:49: undefined 
reference to `dlclose'
build/temp.linux-i686-2.6/home/fwang/rpm/BUILD/Python-2.6.2/Modules/
dlmodule.o: In function `dl_sym':
/home/fwang/rpm/BUILD/Python-2.6.2/Modules/dlmodule.c:68: undefined 
reference to `dlsym'
build/temp.linux-i686-2.6/home/fwang/rpm/BUILD/Python-2.6.2/Modules/
dlmodule.o: In function `dl_call':
/home/fwang/rpm/BUILD/Python-2.6.2/Modules/dlmodule.c:96: undefined 
reference to `dlsym'
/home/fwang/rpm/BUILD/Python-2.6.2/Modules/dlmodule.c:100: undefined 
reference to `dlerror'
build/temp.linux-i686-2.6/home/fwang/rpm/BUILD/Python-2.6.2/Modules/
dlmodule.o: In function `dl_dealloc':
/home/fwang/rpm/BUILD/Python-2.6.2/Modules/dlmodule.c:41: undefined 
reference to `dlclose'
collect2: ld returned 1 exit status



build/temp.linux-i686-2.6/home/fwang/rpm/BUILD/Python-2.6.2/Modules/
_ctypes/_ctypes.o: In function `CDataType_in_dll':
/home/fwang/rpm/BUILD/Python-2.6.2/Modules/_ctypes/_ctypes.c:600: 
undefined reference to `dlsym'
/home/fwang/rpm/BUILD/Python-2.6.2/Modules/_ctypes/_ctypes.c:608: 
undefined reference to `dlerror'
build/temp.linux-i686-2.6/home/fwang/rpm/BUILD/Python-2.6.2/Modules/
_ctypes/_ctypes.o: In function `CFuncPtr_FromDll':
/home/fwang/rpm/BUILD/Python-2.6.2/Modules/_ctypes/_ctypes.c:3285: 
undefined reference to `dlsym'
/home/fwang/rpm/BUILD/Python-2.6.2/Modules/_ctypes/_ctypes.c:3293: 
undefined reference to `dlerror'
/usr/bin/ld: Dwarf Error: Offset (2614) greater than or equal 
to .debug_str size (815).
build/temp.linux-i686-2.6/home/fwang/rpm/BUILD/Python-2.6.2/Modules/
_ctypes/callproc.o: In function `py_dl_sym':
/home/fwang/rpm/BUILD/Python-2.6.2/Modules/_ctypes/callproc.c:1448: 
undefined reference to `dlsym'
/home/fwang/rpm/BUILD/Python-2.6.2/Modules/_ctypes/callproc.c:1451: 
undefined reference to `dlerror'
build/temp.linux-i686-2.6/home/fwang/rpm/BUILD/Python-2.6.2/Modules/
_ctypes/callproc.o: In function `py_dl_close':
/home/fwang/rpm/BUILD/Python-2.6.2/Modules/_ctypes/callproc.c:1430: 
undefined reference to `dlclose'
/home/fwang/rpm/BUILD/Python-2.6.2/Modules/_ctypes/callproc.c:1432: 
undefined reference to `dlerror'
build/temp.linux-i686-2.6/home/fwang/rpm/BUILD/Python-2.6.2/Modules/
_ctypes/callproc.o: In function `py_dl_open':
/home/fwang/rpm/BUILD/Python-2.6.2/Modules/_ctypes/callproc.c:1412: 
undefined reference to `dlopen'
/home/fwang/rpm/BUILD/Python-2.6.2/Modules/_ctypes/callproc.c:1414: 
undefined reference to `dlerror'
collect2: ld returned 1 exit status




Failed to find the necessary bits to build these modules:
bsddb185   sunaudiodev
To find the necessary bits, look in setup.py in detect_modules() for 
the module's name.


Failed to build these modules:
_ctypes_ctypes_test   audioop
dl



I've attached the detail build log.

--
components: Build
files: build.0.20090608003719.log.bz2
messages: 89066
nosy: fundawang
severity: normal
status: open
title: Build errors when using LDFLAGS="-Wl,--no-undefined"
type: compile error
versions: Python 2.6
Added file: http://bugs.python.org/file14224/build.0.20090608003719.log.bz2

___
Python tracker 

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



[issue6236] os.popen causes illegal seek on AIX in Python 3.1rc

2009-06-07 Thread nestor

New submission from nestor :

Python 2.6.2 (r262:71600, Jun  4 2009, 16:07:26) [C] on aix5
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> os.popen('cat','w')




Python 3.0.1 (r301:69556, Jun  4 2009, 16:07:22) [C] on aix5
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> os.popen('cat','w')

 

Python 3.1rc1 (r31rc1:73054, Jun  1 2009, 10:49:24) [C] on aix5
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> os.popen('cat','w')

Traceback (most recent call last):
  File "", line 1, in 
  File "/Python-3.1rc1/Lib/os.py", line 641, in popen
return _wrap_close(io.TextIOWrapper(proc.stdin), proc)
IOError: [Errno 29] Illegal seek 

This in turn causes help not to work:

Python 3.1rc1 (r31rc1:73054, Jun  1 2009, 10:49:24) [C] on aix5
Type "help", "copyright", "credits" or "license" for more information.
>>> help(open)

Traceback (most recent call last):
  File "", line 1, in 
  File "/Python-3.1rc1/Lib/site.py", line 429, in __call__
return pydoc.help(*args, **kwds)
  File "/Python-3.1rc1/Lib/pydoc.py", line 1709, in __call__
self.help(request)
  File "/Python-3.1rc1/Lib/pydoc.py", line 1756, in help
else: doc(request, 'Help on %s:')
  File "/Python-3.1rc1/Lib/pydoc.py", line 1505, in doc
pager(render_doc(thing, title, forceload))
  File "/Python-3.1rc1/Lib/pydoc.py", line 1320, in pager
pager(text)
  File "/Python-3.1rc1/Lib/pydoc.py", line 1340, in 
return lambda text: pipepager(text, 'less')
  File "/Python-3.1rc1/Lib/pydoc.py", line 1359, in pipepager
pipe = os.popen(cmd, 'w')
  File "/Python-3.1rc1/Lib/os.py", line 641, in popen
return _wrap_close(io.TextIOWrapper(proc.stdin), proc)
IOError: [Errno 29] Illegal seek

--
components: Library (Lib)
messages: 89065
nosy: nestor
severity: normal
status: open
title: os.popen causes illegal seek on AIX in Python 3.1rc
versions: Python 3.1

___
Python tracker 

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



[issue6235] \d missing from effects of re.ASCII flag

2009-06-07 Thread Mitchell Model

New submission from Mitchell Model :

In the documentation of the re module the ASCII flag is described as
"Make \w, \W, \b, \B, \s and \S perform ASCII-only matching instead of
full Unicode matching." This should also include \d and \D.

--
assignee: georg.brandl
components: Documentation
messages: 89064
nosy: MLModel, georg.brandl
severity: normal
status: open
title: \d missing from effects of re.ASCII flag
versions: Python 3.0, Python 3.1

___
Python tracker 

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



[issue6136] Make logging configuration files easier to use

2009-06-07 Thread Vinay Sajip

Vinay Sajip  added the comment:

"If it was never intended for end users, then perhaps you could rename
this request as "provide an end-user-friendly log configuration format"
(that would live alongside the current one). It's hardly unusual that
users should be able to troubleshoot systems themselves by requesting
more (or different) logging, is it?"

It's unlikely that this would be provided as part of the Python stdlib:
requirements which are truly end-user-friendly are also likely to be
application-specific. When the configuration format was devised I did
seek feedback - but people with strong opinions on the issue told me
they'd prefer to roll their own. I'm fine with that; you can't please
all of the people all of the time and I sadly can't devote much time to
this at the moment.

"For example, log4py's format looked like this:
[my_logger]
LogLevel: Normal
Target: my_filename.log"

Looks fine for logging to files only. Does log4py support the wide range
of output sinks that Python logging does? If not, then the more
complicated logging configuration would seem reasonable as there are
more options in Python logging.

"As for mentions of this issue online, I linked to one such on my
comp.lang.python posting."

I'm not sure which posting you mean - I didn't see any recent postings
by you on c.l.py (I look at it via the corresponding Google group).

Re. the links you posted - Richard Jones' thread came out shortly after
logging was released and was largely about documentation and the need
for casual-use functionality which was subsequently provided by
basicConfig(). The MarkMail thread which you linked to doesn't appear to
raise the same points you did - Steve Hindle's original post of 17 May
2006 mentions only in point 4 about "crufty config file syntax", with no
specifics, and I can only find 3 messages in that thread - 2 by Steve
Hindle and one by Aahz which simply suggests moving the discussion to
c.l.py. I checked the Baypiggies archive on mail.python.org - same thing.

My suggestion would be - if you want to promote a simpler config file
syntax for logging, implement one and upload it on PyPI, and post
announcements on c.l.py and c.l.py.announce. If there is demand for this
functionality, people can easily download your package from PyPI and use
it. After all, logging.config is a separate sub-module and need not be
loaded at all.

--
status: open -> pending

___
Python tracker 

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



[issue6192] add disable_nagle_algorithm to SocketServer.TCPServer

2009-06-07 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

This patch should be committed to py3k after 3.1 is released.

--
assignee:  -> krisvale
status: closed -> open
versions: +Python 3.2 -Python 2.7

___
Python tracker 

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



[issue6221] Windows buildbot failure in test_winreg

2009-06-07 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

r73273 seems to have done the trick. (Thanks Martin!)

--
nosy: +benjamin.peterson
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue6234] cgi.FieldStorage is broken when given POST data

2009-06-07 Thread Evan Fosmark

New submission from Evan Fosmark :

Right now, it seems impossible to use cgi.FieldStorage in 3.0 if you're
giving it environ['wsgi.input'] like so:

post_data = cgi.FieldStorage(
fp=environ["wsgi.input"],
environ=environ,
keep_blank_values=True
)


It gives the following error:

  File "/usr/local/lib/python3.0/cgi.py", line 489, in __init__
self.read_urlencoded()
  File "/usr/local/lib/python3.0/cgi.py", line 589, in read_urlencoded
self.strict_parsing):
  File "/usr/local/lib/python3.0/urllib/parse.py", line 377, in
parse_qsl
pairs = [s2 for s1 in qs.split('&') for s2 in s1.split(';')]
TypeError: Type str doesn't support the buffer API

--
components: Library (Lib)
messages: 89060
nosy: efosmark
severity: normal
status: open
title: cgi.FieldStorage is broken when given POST data
type: behavior
versions: Python 3.0

___
Python tracker 

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



[issue6233] ElementTree (py3k) doesn't properly encode characters that can't be represented in the specified encoding

2009-06-07 Thread Neil Muller

Neil Muller  added the comment:

Simple possible patch uploaded

This doesn't give the expected answer for the test above, but does work
when starting from an XML file in utf-8 encoding. I still need to
determine why this happens.

--
keywords: +patch
Added file: http://bugs.python.org/file14223/issue6233_py3k.diff

___
Python tracker 

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



[issue6233] ElementTree (py3k) doesn't properly encode characters that can't be represented in the specified encoding

2009-06-07 Thread Neil Muller

New submission from Neil Muller :

In py3k, ElementTree no longer correctly converts characters to entities
when they can't be represented in the requested output encoding.

Python 2:

>>> import xml.etree.ElementTree as ET
>>> e = ET.XML("t\xe3t")
>>> ET.tostring(e, 'ascii')
"\ntãt"

Python 3:

>>> import xml.etree.ElementTree as ET
>>> e = ET.XML("t\xe3t")
>>> ET.tostring(e, 'ascii')
.
UnicodeEncodeError: 'ascii' codec can't encode characters in position
1-2: ordinal not in range(128)


It looks like _encode_entity isn't ever called inside ElementTree
anymore - it probably should be called as part of _encode for characters
that can't be represented.

--
components: Library (Lib)
messages: 89058
nosy: Neil Muller, effbot, hodgestar
severity: normal
status: open
title: ElementTree (py3k) doesn't properly encode characters that can't be 
represented in the specified encoding
type: behavior
versions: Python 3.0, Python 3.1

___
Python tracker 

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



[issue2746] ElementTree ProcessingInstruction uses character entities in content

2009-06-07 Thread Neil Muller

Neil Muller  added the comment:

Previous upload of issue_2746 was corrupt. Fixed version uploaded.

--
Added file: http://bugs.python.org/file14222/issue-2746.diff

___
Python tracker 

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



[issue2746] ElementTree ProcessingInstruction uses character entities in content

2009-06-07 Thread Neil Muller

Changes by Neil Muller :


Removed file: http://bugs.python.org/file14213/issue-2746.diff

___
Python tracker 

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



[issue2746] ElementTree ProcessingInstruction uses character entities in content

2009-06-07 Thread Neil Muller

Changes by Neil Muller :


Removed file: http://bugs.python.org/file14211/issue-2746.diff

___
Python tracker 

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



[issue2746] ElementTree ProcessingInstruction uses character entities in content

2009-06-07 Thread Neil Muller

Neil Muller  added the comment:

Issue also effects p3k. Adapted patch attached.

--
versions: +Python 2.6, Python 2.7, Python 3.0, Python 3.1
Added file: http://bugs.python.org/file14221/issue-2746_py3k.diff

___
Python tracker 

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



[issue2977] truncation of text in tables in Library Reference PDF

2009-06-07 Thread R. David Murray

R. David Murray  added the comment:

The (2.6) docs have changed enough that I can't find the tables at issue
from your page numbers.  Is this still a problem and if so can you
please identify the tables rather than the page numbers?  Thanks.

--
nosy: +r.david.murray
type: performance -> behavior

___
Python tracker 

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



[issue6231] ElementInclude may drop text

2009-06-07 Thread Neil Muller

Neil Muller  added the comment:

Same issue affects python 3k. Modified patch (print statement needed
changing) added

--
Added file: http://bugs.python.org/file14220/ElementInclude_py3k.diff

___
Python tracker 

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



[issue6230] ElementTree.Element and cElementTree.Element have slightly different repr

2009-06-07 Thread Neil Muller

Neil Muller  added the comment:

Same issue affects python 3k - the patch applies there cleanly as well.

--

___
Python tracker 

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



[issue6154] Python 3.1 rc1 will not build on OS X 10.5.7 with macports libintl

2009-06-07 Thread Brett Cannon

Changes by Brett Cannon :


--
status: open -> closed

___
Python tracker 

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



[issue6154] Python 3.1 rc1 will not build on OS X 10.5.7 with macports libintl

2009-06-07 Thread Brett Cannon

Brett Cannon  added the comment:

OK, committed by configure.in patch along with Ronald's Makefile.pre.in
patch in r73274. Thanks to everyone who helped out with this. Building
sucks and autoconf doesn't always help.

--
resolution:  -> fixed
stage: needs patch -> committed/rejected

___
Python tracker 

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



[issue1184112] Missing trailing newline with comment raises SyntaxError

2009-06-07 Thread Pablo Torres Navarrete

Changes by Pablo Torres Navarrete :


--
versions: +Python 3.1

___
Python tracker 

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



[issue1184112] Missing trailing newline with comment raises SyntaxError

2009-06-07 Thread Pablo Torres Navarrete

Pablo Torres Navarrete  added the comment:

Confirmed on versions 2.6.2, 3.0.1 and 3.1rc1.  On the three of them, I
tried this:

>>> import parser 
>>> test = 'def foo():\n\tpass\n\n# comment'
>>> parser.suite(test)
Traceback (most recent call last):
  File "", line 1, in 
  File "", line 4
# comment
   ^
SyntaxError: invalid syntax
>>>

--
nosy: +ptn

___
Python tracker 

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



[issue6136] Make logging configuration files easier to use

2009-06-07 Thread Geoffrey Bache

Geoffrey Bache  added the comment:

If it was never intended for end users, then perhaps you could rename
this request as "provide an end-user-friendly log configuration format"
(that would live alongside the current one). It's hardly unusual that
users should be able to troubleshoot systems themselves by requesting
more (or different) logging, is it?

For example, log4py's format looked like this:
[my_logger]
LogLevel: Normal
Target: my_filename.log

Pretty much anyone can edit a bunch of sections that look like that
(with optional extras such as formatting where appropriate).



As for mentions of this issue online, I linked to one such on my
comp.lang.python posting. It isn't recent, but the points about the
config file still apply as it hasn't substantially changed since then as
far as I can see. 3 different users raise essentially the same point
(and you also contributed to this thread)

http://www.mechanicalcat.net/richard/log/Python/Simple_usage_of_Python_s_logging_module

Here's another (only some of the discussion is relevant, but this exact
point is raised by the original poster and agreed with by the responder):

http://markmail.org/message/amxocg2nskd72qaf

--
status: pending -> open

___
Python tracker 

___
___
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

2009-06-07 Thread Frans

Frans  added the comment:

Hi Vinay,

Thanks for your info. I have just shared my experience. I ran into a problem
(apperently, there is one)  and found a work-around that fits my needs.
If I find the real fix, I will surely follow up on it.

Regards,

Frans

2009/6/7 Vinay Sajip 

>
> Vinay Sajip  added the comment:
>
> ConcurrentLogHandler is for multiple *processes* writing to the same
> file, not multiple threads in a single process. Python logging does not
> support multiple processes writing to the same file because there is no
> portable IPC locking across all platforms supported by Python.
> ConcurrentLogHandler uses portalocker to achieve interprocess
> synchronization, and there is no equivalent mechanism which is part of
> the Python stdlib. AFAIK portalocker works on Windows and Linux - I'm
> not sure about other platforms.
>
> Python logging *does* support multiple threads in a single process
> writing to the same file, which is why I asked Robert if it was
> definitely a single-process environment he was working in.
>
> --
>
> ___
> Python tracker 
> 
> ___
>

--
Added file: http://bugs.python.org/file14219/unnamed

___
Python tracker 

___Hi Vinay, Thanks for your info. I have just shared my experience. I ran 
into a problem (apperently, there is one)  and found a work-around that fits 
my needs.If I find the real fix, I will surely follow up on it.
Regards,Frans2009/6/7 Vinay 
Sajip rep...@bugs.python.org>

Vinay Sajip vinay_sa...@yahoo.co.uk> added the 
comment:

ConcurrentLogHandler is for multiple *processes* writing to the same
file, not multiple threads in a single process. Python logging does not
support multiple processes writing to the same file because there is no
portable IPC locking across all platforms supported by Python.
ConcurrentLogHandler uses portalocker to achieve interprocess
synchronization, and there is no equivalent mechanism which is part of
the Python stdlib. AFAIK portalocker works on Windows and Linux - I'm
not sure about other platforms.

Python logging *does* support multiple threads in a single process
writing to the same file, which is why I asked Robert if it was
definitely a single-process environment he was working in.

--

___
Python tracker rep...@bugs.python.org>
http://bugs.python.org/issue4749>
___

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



[issue6202] Obsolete default file encoding "mac-roman" on OS X, not influenced by locale env variables

2009-06-07 Thread Ned Deily

Ned Deily  added the comment:

(and committed to trunk in r73270 by Benjamin)

--

___
Python tracker 

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



[issue2947] subprocess (Replacing popen) - add a warning / hint

2009-06-07 Thread R. David Murray

R. David Murray  added the comment:

Patch attached that adds an example that shows how to translate return
code handling, loosely based on Helmut's example.  I also turned the
function references in the section titles into links because I think
that would be very useful to someone wanting to do a translation
(provides easy access to the docs for the old functions).  The font size
looks a bit weird in the generated docs, though, so perhaps that is why
this wasn't done originally.  If putting references in section titles is
a no-no let me know and I'll remove them from the patch.

Also included in the patch is a fix for the cross reference link from
the os.spawn section to the 'replacing functions' section of the
subprocess docs.

--
keywords: +easy, patch
nosy: +r.david.murray
priority:  -> normal
stage:  -> patch review
type:  -> feature request
versions: +Python 2.7, Python 3.0, Python 3.1
Added file: http://bugs.python.org/file14218/issue2947-doc.patch

___
Python tracker 

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



[issue6192] add disable_nagle_algorithm to SocketServer.TCPServer

2009-06-07 Thread Kristján Valur Jónsson

Kristján Valur Jónsson  added the comment:

Committed in revision 73272

--
resolution:  -> accepted
status: open -> closed

___
Python tracker 

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



[issue6136] Make logging configuration files easier to use

2009-06-07 Thread Vinay Sajip

Vinay Sajip  added the comment:

"Who said anything about not supporting users who want the hierarchy?
I'm talking about making "qualname" optional, not removing it
entirely!"

Ok, I see - sorry for the misunderstanding on my part.

"... these files need to be read and edited by non-coders and they're a
lot scarier (and harder to tweak) than the old ones were. Basically
they're full of abstract technical concepts ("qualname", "handler") and
bits of python code to be eval'ed."

The configuration format is not (and was never) intended for
non-technical end users. Because of the way it works, typos in the
elements which are eval'd can throw exceptions, which is obviously
undesirable. If you want such users to be able to change the logging
configuration, I would advise you implement your own layer which does
not use any technical terminology such as "handler" or "qualname", and
from that layer either update the logging configuration via the logging
API, or write a standard logging config file.

"It's not particularly hard to find people out there raising this if you
google a bit."

Well, I did do a search for "+python +logging +config +problems" which
didn't throw up much (other than this issue). I'd be grateful for some
specific links to recent items which you have found.

--
status: open -> pending

___
Python tracker 

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



[issue6232] Improve test coverage of ElementTree and cElementTree

2009-06-07 Thread Simon Cross

Changes by Simon Cross :


--
nosy: +hodgestar

___
Python tracker 

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



[issue6230] ElementTree.Element and cElementTree.Element have slightly different repr

2009-06-07 Thread Simon Cross

Changes by Simon Cross :


--
nosy: +hodgestar

___
Python tracker 

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



[issue6154] Python 3.1 rc1 will not build on OS X 10.5.7 with macports libintl

2009-06-07 Thread Ronald Oussoren

Ronald Oussoren  added the comment:

The attached file libintl-framework-ronald.patch should do the trick.

Could someone who is affected by this issue test this patch (and feel free 
to commit it if it works). I don't have libintl on my system and hence 
cannot test right now.

--
Added file: http://bugs.python.org/file14217/libintl-framework-ronald.patch

___
Python tracker 

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



[issue6232] Improve test coverage of ElementTree and cElementTree

2009-06-07 Thread Russell Cloran

Changes by Russell Cloran :


--
nosy: +russell

___
Python tracker 

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



[issue6231] ElementInclude may drop text

2009-06-07 Thread Russell Cloran

Changes by Russell Cloran :


--
nosy: +russell

___
Python tracker 

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



[issue6230] ElementTree.Element and cElementTree.Element have slightly different repr

2009-06-07 Thread Russell Cloran

Changes by Russell Cloran :


--
nosy: +russell

___
Python tracker 

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



[issue2746] ElementTree ProcessingInstruction uses character entities in content

2009-06-07 Thread Russell Cloran

Changes by Russell Cloran :


--
nosy: +russell

___
Python tracker 

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



[issue6202] Obsolete default file encoding "mac-roman" on OS X, not influenced by locale env variables

2009-06-07 Thread Ronald Oussoren

Ronald Oussoren  added the comment:

The patch looks good, and tests pass on 10.5.7.

I've committed this as r73268

--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue2922] "No windows home dir" doc error

2009-06-07 Thread R. David Murray

R. David Murray  added the comment:

Closing as 'works for me' since the OP hasn't responded with any counter
argument to Martin's assertion and it's been open for more than a year.

--
nosy: +r.david.murray
priority:  -> normal
resolution:  -> works for me
stage:  -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue5308] cannot marshal objects with more than 2**31 elements

2009-06-07 Thread Mark Dickinson

Changes by Mark Dickinson :


--
assignee: marketdickinson -> 

___
Python tracker 

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



[issue1869] Builtin round function is sometimes inaccurate for floats

2009-06-07 Thread Mark Dickinson

Mark Dickinson  added the comment:

See also issue 6228.

--

___
Python tracker 

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



[issue6228] round() error

2009-06-07 Thread Mark Dickinson

Mark Dickinson  added the comment:

See also issue 1869 and the issues it links to for additional discussions 
about round.

--

___
Python tracker 

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



[issue6232] Improve test coverage of ElementTree and cElementTree

2009-06-07 Thread Neil Muller

Neil Muller  added the comment:

This adds the same tests for cElementTree, disabling them in a few cases
were the behaviour differs.

(Tests include work from Russell Cloran, Jeremy Thurgood, Simon Cross,
Adrianna Pinksa and Graham Poulter)

--
Added file: http://bugs.python.org/file14216/test_xml_etree_c.py

___
Python tracker 

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



[issue6232] Improve test coverage of ElementTree and cElementTree

2009-06-07 Thread Neil Muller

New submission from Neil Muller :

The test coverage for ElementTree and cElementTree could be improved.

The attached file adds several more tests for ElementTree (including a
number from the ElementTree 1.2.7 pre-release).

This excludes the tests suggested in:
http://bugs.python.org/issue6230
http://bugs.python.org/issue6231
http://bugs.python.org/issue2746

--
components: Tests
files: test_xml_etree.py
messages: 89038
nosy: Neil Muller, effbot
severity: normal
status: open
title: Improve test coverage of ElementTree and cElementTree
versions: Python 2.7
Added file: http://bugs.python.org/file14215/test_xml_etree.py

___
Python tracker 

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



[issue6231] ElementInclude may drop text

2009-06-07 Thread Neil Muller

New submission from Neil Muller :

In some cases, ElementInclude will not include the tail from the current
node.

Test case and patch against trunk attached (from Simon Cross).

--
components: Library (Lib)
files: ElementInclude.diff
keywords: patch
messages: 89037
nosy: Neil Muller, effbot, hodgestar
severity: normal
status: open
title: ElementInclude may drop text
type: behavior
versions: Python 2.7, Python 3.1
Added file: http://bugs.python.org/file14214/ElementInclude.diff

___
Python tracker 

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



[issue2746] ElementTree ProcessingInstruction uses character entities in content

2009-06-07 Thread Neil Muller

Neil Muller  added the comment:

Previous patch was missing two lines in the test case. Correct fix uploaded

--
Added file: http://bugs.python.org/file14213/issue-2746.diff

___
Python tracker 

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



[issue6230] ElementTree.Element and cElementTree.Element have slightly different repr

2009-06-07 Thread Neil Muller

New submission from Neil Muller :

ElementTree and cElementTree give slightly different results for
repr(Element):

>>> import xml.etree.ElementTree as ET
>>> import xml.etree.cElementTree as cET
>>> repr(ET.ElementTree('tag'))
''
>>> repr(cET.ElementTree('tag')
""

The quoting around the tag name is missing from ElementTree.

This inconsistency seems pointless.

Attached patch changes ElementTree to match cElementTree behaviour, and
adds a test.

--
components: Library (Lib)
files: repr-fix.diff
keywords: patch
messages: 89035
nosy: Neil Muller, effbot
severity: normal
status: open
title: ElementTree.Element and cElementTree.Element have slightly different repr
type: behavior
versions: Python 2.6, Python 2.7, Python 3.1
Added file: http://bugs.python.org/file14212/repr-fix.diff

___
Python tracker 

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



[issue2746] ElementTree ProcessingInstruction uses character entities in content

2009-06-07 Thread Neil Muller

Changes by Neil Muller :


--
nosy: +effbot

___
Python tracker 

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



[issue6228] round() error

2009-06-07 Thread Mark Dickinson

Mark Dickinson  added the comment:

Thanks for the report.

This is fixed in Python 3.1 (except on a few unusual hardware/OS 
combinations):

Python 3.1rc1+ (py3k:73252, Jun  6 2009, 10:35:36) 
[GCC 4.0.1 (Apple Computer, Inc. build 5367)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> round(697.04157958254996, 10)
697.0415795825

It's a "won't fix" for Python 2.x.  Rounding to 10 decimal places 
involves multiplying by 10**10., rounding to the nearest integer, then 
dividing by 10**10. again;  the problem in this case is that 
multiplication by 10.**10 is inexact, and the error involved in the 
multiplication by 10**10. pushes the value from the 'round down' region 
into the 'round up region':

Python 2.7a0 (trunk:73252, Jun  6 2009, 10:16:08) 
[GCC 4.0.1 (Apple Computer, Inc. build 5367)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> 697.04157958254996 * 10**10
6970415795825.5
[38623 refs]

There's no easy way to fix this, short of using multiple-precision 
arithmetic to do the rounding (which is what Python 3.1 does).


By the way, Python's float can't represent the number

697.04157958254996

exactly (assuming IEEE 754 arithmetic):  the closest it gets is the 
value:

697.041579582549957194714806973934173583984375

but the repr of a float (in Python 3.0 and 2.x) only produces 17 
significant digits, since that's enough to guarantee that the
repr() value evaluates back to the correct float (assuming correct
rounding).

--
nosy: +marketdickinson
resolution:  -> wont fix
status: open -> closed

___
Python tracker 

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



[issue2746] ElementTree ProcessingInstruction uses character entities in content

2009-06-07 Thread Neil Muller

Neil Muller  added the comment:

Patch which includes the given fix and adds a test case to cover this
(test case from Russell Cloran)

--
keywords: +patch
nosy: +Neil Muller
Added file: http://bugs.python.org/file14211/issue-2746.diff

___
Python tracker 

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



[issue6229] Installation python on mac

2009-06-07 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

Please ask this question on a mailing list like comp.lang.python.

--
nosy: +benjamin.peterson
resolution:  -> invalid
status: open -> closed

___
Python tracker 

___
___
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

2009-06-07 Thread Vinay Sajip

Vinay Sajip  added the comment:

ConcurrentLogHandler is for multiple *processes* writing to the same
file, not multiple threads in a single process. Python logging does not
support multiple processes writing to the same file because there is no
portable IPC locking across all platforms supported by Python.
ConcurrentLogHandler uses portalocker to achieve interprocess
synchronization, and there is no equivalent mechanism which is part of
the Python stdlib. AFAIK portalocker works on Windows and Linux - I'm
not sure about other platforms.

Python logging *does* support multiple threads in a single process
writing to the same file, which is why I asked Robert if it was
definitely a single-process environment he was working in.

--

___
Python tracker 

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



[issue6229] Installation python on mac

2009-06-07 Thread eric

New submission from eric :

Hello
i wan't to install the python 3.0 on my mac. the python image, .dmg
file, i download from this site, run the installation. After this, the
framework doesn't installation in the folder
/System/Library/Frameworks/Python.framework.
How can i change the installation folder?

thx kostonstyle

--
messages: 89030
nosy: kostonstyle
severity: normal
status: open
title: Installation python on mac
versions: Python 3.0

___
Python tracker 

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



[issue6228] round() error

2009-06-07 Thread steve21

New submission from steve21 :

I wish to round the float 697.04157958254996 to 10 decimal digits after
the decimal point.

$ python3.0
Python 3.0.1 (r301:69556, Jun  7 2009, 14:51:41)
[GCC 4.3.2 20081105 (Red Hat 4.3.2-7)] on linux2
Type "help", "copyright", "credits" or "license" for more information.

>>> 697.04157958254996
697.04157958254996  # python float can represent this number exactly

>>> 697.0415795825  # this is the expected result
697.04157958250005  # this is the closest python float representation

>>> round(697.04157958254996, 10)
697.04157958259998  # error

round() gives a result that is closer to
697.0415795826
than the expected result of
697.0415795825
- it has not rounded to the closest 10th decimal digit after the decimal
point.

(python 2.6.2 has the same problem)

--
messages: 89029
nosy: steve21
severity: normal
status: open
title: round() error
type: behavior
versions: Python 2.6, Python 3.0

___
Python tracker 

___
___
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

2009-06-07 Thread Frans

Frans  added the comment:

I ran into the same problem with RotatingFileHandler from a
multithreaded daemon under Ubuntu. I Googled around and found the
ConcurrentLogHandler on pypi
(http://pypi.python.org/pypi/ConcurrentLogHandler). It solved the problem.

--
nosy: +Frans

___
Python tracker 

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