[issue8960] 2.6 README

2010-06-11 Thread Georg Brandl

Georg Brandl  added the comment:

Fixed in 2.7 r81933, 2.6 r81934.

--
nosy: +georg.brandl
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



[issue7463] PyDateTime_IMPORT() causes compiler warnings

2010-06-11 Thread Alexander Belopolsky

Changes by Alexander Belopolsky :


--
status: pending -> closed

___
Python tracker 

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



[issue8904] quick example how to fix docs

2010-06-11 Thread Georg Brandl

Georg Brandl  added the comment:

Hmm, I thought the Doc/README covered this?

--
nosy: +georg.brandl

___
Python tracker 

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



[issue8968] token type constants are not documented

2010-06-11 Thread Georg Brandl

Georg Brandl  added the comment:

Five comments:

* I would list them all in one directive, like this:

.. data:: FOO
  BAR
  BAZ

  which makes the display more compact.

* There is no description in that directive.  Best move part of the
  description above them in it.

* NL and COMMENT are defined in tokenize because they are neither 
  defined nor used by the Python tokenizer.

--
nosy: +georg.brandl

___
Python tracker 

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



[issue6280] calendar.timegm() belongs in time module, next to time.gmtime()

2010-06-11 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

Mark, reassigning this to you for commit review.

--
assignee: belopolsky -> mark.dickinson

___
Python tracker 

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



[issue5207] extend strftime/strptime format for RFC3339 and RFC2822

2010-06-11 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

%O is used by POSIX spec to indicate alternative locale format.

Gnu date uses %:z 

   %:z+hh:mm numeric timezone (e.g., -04:00)

  %::z +hh:mm:ss numeric time zone (e.g., -04:00:00) %:::z numeric
  time  zone  with : to necessary precision (e.g., -04, +05:30)

--
assignee:  -> belopolsky
nosy: +belopolsky

___
Python tracker 

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



[issue1520662] support all of strftime(3)

2010-06-11 Thread Alexander Belopolsky

Changes by Alexander Belopolsky :


Removed file: http://bugs.python.org/file13373/unnamed

___
Python tracker 

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



[issue4086] support %z format in time.strftime and _strptime?

2010-06-11 Thread Alexander Belopolsky

Changes by Alexander Belopolsky :


--
assignee:  -> belopolsky
dependencies: +No obvious and correct way to get the time zone offset
nosy: +belopolsky

___
Python tracker 

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



[issue5907] repr of time.struct_time type does not eval

2010-06-11 Thread Alexander Belopolsky

Changes by Alexander Belopolsky :


--
assignee:  -> belopolsky
nosy: +belopolsky
versions: +Python 3.2 -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



[issue8968] token type constants are not documented

2010-06-11 Thread Ilya Sandler

Ilya Sandler  added the comment:

I'm attaching a documentation patch.

Do note that there is also a bit of code-level inconsistency: a few tokens 
(COMMENT, NL) are defined in tokenize module which is strange and inconvenient.

Should that be fixed too? (by moving token definitions into token module)

--
keywords: +patch
Added file: http://bugs.python.org/file17641/token.rst.patch

___
Python tracker 

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



[issue5094] datetime lacks concrete tzinfo impl. for UTC

2010-06-11 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

There is a separate issue #5288 asking to support sub-minute offsets.  This is 
not hard, but the C code still has a few interfaces left from the time when 
offset was an integer # of minutes.  I am +1 to fix that, but not as a part of 
this issue.

On str(tz), I definitely want an invariant str(tz) == tz.tzname(None).  I am 
open to changes to tzname(), but we are very close to bikesheding here.  Let's 
settle for 'UTC±HH:MM'.  This seems to be the most common spelling for numeric 
timezones in various tables on the web.

--

___
Python tracker 

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



[issue8981] _struct.__version__ should be string, not bytes

2010-06-11 Thread Alexander Belopolsky

New submission from Alexander Belopolsky :

>>> import _struct
>>> _struct.__version__
b'0.3'

I would rather simply remove this since it is no longer exposed in struct.

Yes, it does cause problems in real life code: I have applications that keep 
track of versions of modules that they use and expect __version__ to be string 
if defined.

Same problem in _curses, but I have never used that module - just grepped the 
sources.

--
components: Extension Modules
keywords: easy
messages: 107627
nosy: belopolsky, mark.dickinson
priority: normal
severity: normal
status: open
title: _struct.__version__ should be string, not bytes
type: behavior
versions: Python 3.2

___
Python tracker 

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



[issue8502] proposal: encourage xgettext rather than pygettext.py in gettext docs

2010-06-11 Thread jhg

jhg  added the comment:

A simple test case for the earlier changes.

run pygettext.py and msgfmt.py and move the .mo file to 
./locale/de/LC_MESSAGES/helloworld.mo 
to see that it prints the localized strings.

--
Added file: http://bugs.python.org/file17640/helloworld.py

___
Python tracker 

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



[issue8502] proposal: encourage xgettext rather than pygettext.py in gettext docs

2010-06-11 Thread jhg

jhg  added the comment:

Since the GNU tools work fine I had no reason to look into pygettext.py.
Now I did it anyway...

I added ngettext to the default keywords.
Any function that is keyworded and supplied more than 2 keywords is treated 
like ngettext.
Also simple constructs like _("foo" + 10*"bar") are now possible.

Patch attached.

--
Added file: http://bugs.python.org/file17639/pygettext.py.patch

___
Python tracker 

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



[issue8142] libffi update to 3.0.9

2010-06-11 Thread Ronald Oussoren

Changes by Ronald Oussoren :


--
nosy:  -ronaldoussoren

___
Python tracker 

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



[issue8980] distutils.tests.test_register.RegisterTestCase.test_strict fails

2010-06-11 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis :


Removed file: http://bugs.python.org/file17637/distutils.patch

___
Python tracker 

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



[issue8980] distutils.tests.test_register.RegisterTestCase.test_strict fails

2010-06-11 Thread Arfrever Frehtes Taifersar Arahesis

Arfrever Frehtes Taifersar Arahesis  added the comment:

I noticed that register_module.raw_input also should be renamed to 
register_module.input. The test passes with the new patch.

--
Added file: http://bugs.python.org/file17638/distutils.patch

___
Python tracker 

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



[issue8980] distutils.tests.test_register.RegisterTestCase.test_strict fails

2010-06-11 Thread Arfrever Frehtes Taifersar Arahesis

New submission from Arfrever Frehtes Taifersar Arahesis 
:

$ python3.2 -m distutils.tests.test_register
...E
==
ERROR: test_strict (__main__.RegisterTestCase)
--
Traceback (most recent call last):
  File "/usr/lib64/python3.2/distutils/tests/test_register.py", line 227, in 
test_strict
inputs = RawInputs('1', 'tarek', 'y')
NameError: global name 'RawInputs' is not defined

--
Ran 8 tests in 0.242s

FAILED (errors=1)

After replacing RawInputs with Inputs:
$ python3.2 -m distutils.tests.test_register
...E
==
ERROR: test_strict (__main__.RegisterTestCase)
--
Traceback (most recent call last):
  File "/usr/lib64/python3.2/distutils/tests/test_register.py", line 231, in 
test_strict
cmd.run()
  File "/usr/lib64/python3.2/distutils/command/register.py", line 53, in run
self.run_command(cmd_name)
  File "/usr/lib64/python3.2/distutils/cmd.py", line 315, in run_command
self.distribution.run_command(command)
  File "/usr/lib64/python3.2/distutils/dist.py", line 965, in run_command
cmd_obj.run()
  File "/usr/lib64/python3.2/distutils/command/check.py", line 72, in run
raise DistutilsSetupError('The docutils package is needed.')
distutils.errors.DistutilsSetupError: The docutils package is needed.

--
Ran 8 tests in 0.245s

FAILED (errors=1)

After fixing import, the test interactively asks for username.

--
assignee: tarek
components: Distutils, Tests
files: distutils.patch
keywords: patch
messages: 107623
nosy: Arfrever, tarek
priority: normal
severity: normal
status: open
title: distutils.tests.test_register.RegisterTestCase.test_strict fails
versions: Python 3.1, Python 3.2
Added file: http://bugs.python.org/file17637/distutils.patch

___
Python tracker 

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



[issue8947] Provide as_integer_ratio() method to Decimal

2010-06-11 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

Nice implementation.  I wonder if the /5 loop can be eliminated by noting that 
/5 is *2 followed by decimal shift. (Probably not without fast decimal 
arithmetics.)

A few documentation nits:

1. In Decimal methods there is no consistency in referring to self.  I see  
"given Decimal", "the number", and "the argument" in three entries around 
as_integer_ratio().

2. Is there a reason that docstring is more detailed than manual entry?  I 
think the manual should describe exceptions.

3. Is there a reason to use different language for float.as_integer_ratio() and 
Decimal.as_integer_ratio()?

I know, ""A foolish consistency is the hobgoblin of little minds..." - feel 
free to ignore my observations.

A tiny code nit: to me it would be clearer to start with d2 = d5 = -self._exp 
after the "# Find d2, d5 ..." comment.  For a moment I was puzzled why you 
promise d2 and d5, but then process d5 only.

Also, by the time of the "if not self" check, special case has been eliminated, 
so you can simply check self._int == 0.

--

___
Python tracker 

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



[issue8912] `make patchcheck` should check the whitespace of .c/.h files

2010-06-11 Thread Alexander Belopolsky

Changes by Alexander Belopolsky :


--
nosy: +belopolsky

___
Python tracker 

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



[issue8887] “pydoc str” works but not “ pydoc str.translate”

2010-06-11 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

Note that

>>> help(str.translate)
Help on method_descriptor:

translate(...)
S.translate(table) -> str

Return a copy of the string S, where all characters have been mapped
..

but
>>> help('str.translate')
no Python documentation found for 'str.translate'

--
nosy: +belopolsky

___
Python tracker 

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



[issue5845] rlcompleter should be enabled automatically

2010-06-11 Thread Alexander Belopolsky

Changes by Alexander Belopolsky :


--
nosy: +belopolsky

___
Python tracker 

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



[issue8979] OptParse __getitem__

2010-06-11 Thread Bryan Ward

New submission from Bryan Ward :

It would be convenient to be able to access the resultant options from optparse 
using the syntax

options['some_option']

instead of options.some_option

Or additionally it would be nice to have a way to produce a dictionary of the 
options.  This would be nice to have to do something to the effect of

dictOptions = options.to_dict()

obj = SomeObject(**dictOptions)

--
components: Extension Modules
messages: 107620
nosy: bcward
priority: normal
severity: normal
status: open
title: OptParse __getitem__
type: feature request
versions: Python 2.6

___
Python tracker 

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



[issue8845] Expose sqlite3 connection inTransaction as read-only in_transaction attribute

2010-06-11 Thread STINNER Victor

STINNER Victor  added the comment:

Same error on builder "PPC Leopard 3.x".

http://www.python.org/dev/buildbot/builders/PPC%20Leopard%203.x/builds/87/steps/test/logs/stdio

test_sqlite
test test_sqlite failed -- Traceback (most recent call last):
  File 
"/Users/buildbot/buildarea/3.x.parc-leopard-1/build/Lib/sqlite3/test/dbapi.py", 
line 152, in CheckInTransaction
self.assertEqual(cx.in_transaction, True)
AssertionError: False != True

--

___
Python tracker 

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



[issue8142] libffi update to 3.0.9

2010-06-11 Thread STINNER Victor

STINNER Victor  added the comment:

Reopen the issue: libffi compilation fails on "x86 FreeBSD 3.x" buildbot.

http://www.python.org/dev/buildbot/builders/x86%20FreeBSD%203.x/builds/349/steps/compile/logs/stdio

gcc -pthread -fPIC -fno-strict-aliasing -g -O2 -g -O0 -Wall -Wstrict-prototypes 
-Ibuild/temp.freebsd-6.4-RELEASE-i386-3.2-pydebug/libffi/include 
-Ibuild/temp.freebsd-6.4-RELEASE-i386-3.2-pydebug/libffi 
-I/usr/home/db3l/buildarea/3.x.bolen-freebsd/build/Modules/_ctypes/libffi/src 
-IInclude -I./Include -I/usr/local/include 
-I/usr/home/db3l/buildarea/3.x.bolen-freebsd/build/Include -I. -c 
/usr/home/db3l/buildarea/3.x.bolen-freebsd/build/Modules/_ctypes/libffi/src/x86/sysv.S
 -o 
build/temp.freebsd-6.4-RELEASE-i386-3.2-pydebug/usr/home/db3l/buildarea/3.x.bolen-freebsd/build/Modules/_ctypes/libffi/src/x86/sysv.o
/usr/home/db3l/buildarea/3.x.bolen-freebsd/build/Modules/_ctypes/libffi/src/x86/sysv.S:
 Assembler messages:
/usr/home/db3l/buildarea/3.x.bolen-freebsd/build/Modules/_ctypes/libffi/src/x86/sysv.S:360:
 Error: junk at end of line, first unrecognized character is `@'
/usr/home/db3l/buildarea/3.x.bolen-freebsd/build/Modules/_ctypes/libffi/src/x86/sysv.S:387:
 Error: junk at end of line, first unrecognized character is `@'
/usr/home/db3l/buildarea/3.x.bolen-freebsd/build/Modules/_ctypes/libffi/src/x86/sysv.S:423:
 Error: junk at end of line, first unrecognized character is `@'

--
nosy: +haypo
resolution: fixed -> 
status: closed -> open

___
Python tracker 

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



[issue8845] Expose sqlite3 connection inTransaction as read-only in_transaction attribute

2010-06-11 Thread STINNER Victor

STINNER Victor  added the comment:

Reopen the issue: the test fails on Sparc.

http://www.python.org/dev/buildbot/builders/sparc%20Ubuntu%203.x/builds/222

==
FAIL: CheckInTransaction (sqlite3.test.dbapi.ConnectionTests)
--
Traceback (most recent call last):
  File 
"/home/pybot/buildarea/3.x.klose-ubuntu-sparc/build/Lib/sqlite3/test/dbapi.py", 
line 152, in CheckInTransaction
self.assertEqual(cx.in_transaction, True)
AssertionError: False != True

--
nosy: +haypo
resolution: accepted -> 
status: closed -> open

___
Python tracker 

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



[issue8592] 'y' does not check for embedded NUL bytes

2010-06-11 Thread STINNER Victor

STINNER Victor  added the comment:

Attached patch fixes the initial problem: raise an error if the byte strings 
embeds a NUL-byte.

--
keywords: +patch
Added file: http://bugs.python.org/file17636/y_format.patch

___
Python tracker 

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



[issue5115] Extend subprocess.kill to be able to kill process groups

2010-06-11 Thread STINNER Victor

STINNER Victor  added the comment:

erickt: can you fix your patch?

--

___
Python tracker 

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



[issue7739] time.strftime may hung while trying to open /etc/localtime but does not release GIL

2010-06-11 Thread STINNER Victor

STINNER Victor  added the comment:

> I understand your last comment as wanting to keep the GIL while calling
> tzset(), but release it around the strftime() call.

Yes

> You still want to apply your patch, right?

http://sourceware.org/bugzilla/show_bug.cgi?id=4350 describes a crash. This 
issue is not a crash but a concurrency problem. I don't know if my patch fixes 
the initial problem: dorontal didn't try it and he doesn't explain us how to 
reproduce it.

I also not sure that releasing the GIL may not introduce a new concurrency 
issue: it might crash if a thread calls strftime() and another thread calls 
setenv("TZ", "...") (if I understood correctly the GNU libc bug 4350).

--

___
Python tracker 

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



[issue8959] WINFUNCTYPE wrapped ctypes callbacks not functioning correctly in Python 2.7

2010-06-11 Thread Michael Curran

Michael Curran  added the comment:

Tested on Windows 7 x64, with Python 2.7 rc1 [amd64]: both examples work fine.
So it seems the issue is specific to x86.

--

___
Python tracker 

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



[issue850997] mbcs encoding ignores errors

2010-06-11 Thread STINNER Victor

Changes by STINNER Victor :


Removed file: http://bugs.python.org/file17622/mbcs_errors-py3k-2.patch

___
Python tracker 

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



[issue850997] mbcs encoding ignores errors

2010-06-11 Thread STINNER Victor

Changes by STINNER Victor :


Removed file: http://bugs.python.org/file17456/mbcs_errors-py3k.patch

___
Python tracker 

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



[issue850997] mbcs encoding ignores errors

2010-06-11 Thread STINNER Victor

STINNER Victor  added the comment:

Update the patch (I commited the patch on tarfile module): version 3.

--
Added file: http://bugs.python.org/file17635/mbcs_errors-py3k-3.patch

___
Python tracker 

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



[issue850997] mbcs encoding ignores errors

2010-06-11 Thread STINNER Victor

STINNER Victor  added the comment:

Tim: are you interested in testing this patch?

--
nosy: +tim.golden

___
Python tracker 

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



[issue8969] Windows: use (mbcs in) strict mode to encode/decode filenames, and enable os.fsencode()

2010-06-11 Thread STINNER Victor

STINNER Victor  added the comment:

Patch commited as r81927 (3.2).

--

___
Python tracker 

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



[issue8784] tarfile/Windows: Don't use mbcs as the default encoding

2010-06-11 Thread STINNER Victor

Changes by STINNER Victor :


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



[issue8784] tarfile/Windows: Don't use mbcs as the default encoding

2010-06-11 Thread STINNER Victor

STINNER Victor  added the comment:

Ok. I commited the patch to set the default encoding to utf-8 on Windows: 
r81925.

--

___
Python tracker 

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



[issue5094] datetime lacks concrete tzinfo impl. for UTC

2010-06-11 Thread akira

akira <4kir4...@gmail.com> added the comment:

Minor notes:

msg107186:
   1. The constructor now accepts only whole number of minutes in [-23:59, 
23:59] range.

rfc 3339 provides the following example:

   1937-01-01T12:00:27.87+00:20

   This represents the same instant of time as noon, January 1, 1937,
   Netherlands time.  Standard time in the Netherlands was exactly 19
   minutes and 32.13 seconds ahead of UTC by law from 1909-05-01 through
   1937-06-30.  This time zone cannot be represented exactly using the
   HH:MM format, and this timestamp uses the closest representable UTC
   offset.

The presence of fractions of seconds in time zone is an exception so
it might not be worth to support it but it exists.


msg107552:
   Similarly, should str(timezone.utc) be '+' or 'UTC' or '+00:00'?

Excerpts in favor for '+00:00' from rfc 3339:

   Attempts to label local offsets with alphabetic
   strings have resulted in poor interoperability in the past [IMAIL],
   [HOST-REQ].  As a result, RFC2822 [IMAIL-UPDATE] has made numeric
   offsets mandatory.

   If the time in UTC is known, but the offset to local time is unknown,
   this can be represented with an offset of "-00:00".  This differs
   semantically from an offset of "Z" or "+00:00", which imply that UTC
   is the preferred reference point for the specified time.

--
nosy: +akira

___
Python tracker 

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



[issue8951] PyArg_Parse*(): factorize code of 's' and 'z' formats, and 'u' and 'Z' formats

2010-06-11 Thread STINNER Victor

Changes by STINNER Victor :


--
dependencies: +PyArg_Parse*(): "z" should not accept bytes

___
Python tracker 

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



[issue8939] Use C type names (PyUnicode etc;) in the C API docs

2010-06-11 Thread STINNER Victor

STINNER Victor  added the comment:

"PyUnicodeObject*" is not the best choice for the description of the function, 
and I don't really like "PyUnicode". Can't we use C types in the function 
prototype and Python types in the description?

Example:
---
s (PyUnicodeObject* or None) [char *]
Convert a null-terminated C string to a Python unicode object using 'utf-8' 
encoding. If the C string pointer is NULL, None is used.
-
PyUnicodeObject will be a link to the C type, and unicode a link to the  Python 
type.

--

___
Python tracker 

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



[issue8939] Use C type names (PyUnicode etc;) in the C API docs

2010-06-11 Thread STINNER Victor

STINNER Victor  added the comment:

I commited a first part of the patch: r81923 (3.2), r81924 (3.1).

--

___
Python tracker 

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



[issue6608] asctime does not check its input

2010-06-11 Thread STINNER Victor

Changes by STINNER Victor :


--
nosy: +haypo

___
Python tracker 

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



[issue6608] asctime does not check its input

2010-06-11 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

That's what CERT recommends.  Their code can be reused as is:

int validate_tm(struct tm* time) {
  /* 
   * The range of valid values of the tm_sec member is [0, 60] 
   * inclusive (to allow for leap seconds).
   */
  if (time->tm_sec < 0 || time->tm_sec > 60) return 0;
  if (time->tm_min < 0 || time->tm_min >= 60) return 0;
  if (time->tm_hour < 0 || time->tm_hour >= 24) return 0;
  if (time->tm_mday <= 0 || time->tm_mday > 31) return 0;
  if (time->tm_mon < 0 || time->tm_mon >= 12) return 0;
  /* While other years are legit, they may overflow asctime()'s buffer */
  if (time->tm_year < -999 || time->tm_year > ) return 0;
  if (time->tm_wday < 0 || time->tm_wday >= 7) return 0;
  if (time->tm_yday < 0 || time->tm_yday >= 366) return 0;
  return 1;
}

--

___
Python tracker 

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



[issue8976] subprocess module causes segmentation fault

2010-06-11 Thread Stefan Krah

Stefan Krah  added the comment:

> python version: 2.4.3

I'd suggest to try this with Python 2.6 or later. 2.4 and 2.5 are in
security-fix only mode.

--
nosy: +skrah
versions:  -Python 2.5

___
Python tracker 

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



[issue8977] Globalize lonely augmented assignment

2010-06-11 Thread Guido van Rossum

Guido van Rossum  added the comment:

Because the latter (n += 1) is more fundamental, since it uses integers 
(arguably the most fundamental type).

This is why we've never done it before.

--

___
Python tracker 

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



[issue8965] test_imp fails on OSX when LANG is set

2010-06-11 Thread STINNER Victor

STINNER Victor  added the comment:

One more patch to check sys.getfilesystemencoding() on any OS (r81920).

--

___
Python tracker 

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



[issue8924] Error in error message in logging

2010-06-11 Thread Éric Araujo

Éric Araujo  added the comment:

Suggestion: To help people involved in the discussion or landing here from a 
Web search, you can write “fixed in rNNN” to make Roundup produce a link link 
this one: r81919 Thanks!

--
nosy: +merwok
stage:  -> committed/rejected

___
Python tracker 

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



[issue8949] PyArg_Parse*(): "z" should not accept bytes

2010-06-11 Thread STINNER Victor

STINNER Victor  added the comment:

I patched readline (r81918) and locale (r81914) modules to use 
PyUnicode_FSConverter(). They don't use "z" format anymore to parse a filename.

I checked last functions using "z" format (not "z#" or "z*", only "z") and I 
think that it's ok ("z" can be patched to reject bytes). You can get the full 
list using:

grep -n 'PyArg_Parse[^(]*([^"]*"[^";:]*z[^#*]' */*.c

--

About the difference between s/z and s*/s#/z*/z#: I don't understand why they 
are different, but I think that it's too late to change that. Too much 
functions (and third party modules?) suppose that s*/s#/z*/z# supports buffer 
compatible objects.

--

___
Python tracker 

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



[issue8502] proposal: encourage xgettext rather than pygettext.py in gettext docs

2010-06-11 Thread Éric Araujo

Éric Araujo  added the comment:

What about the more ambitious approach, fixing pygettext?

--

___
Python tracker 

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



[issue8924] Error in error message in logging

2010-06-11 Thread Vinay Sajip

Vinay Sajip  added the comment:

Fix checked into trunk and release26-maint.

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



[issue8502] proposal: encourage xgettext rather than pygettext.py in gettext docs

2010-06-11 Thread jhg

jhg  added the comment:

It looks like msgfmt.py now parses 'msgid_plural' but pygettext.py does not 
produce these. It is still oblivious to plurals as produced by ngettext(). My 
originally proposed change to the documentation was to point people to the GNU 
xgettext/msgfmt tools rather than the pygettext.py/msgfmt.py pair because of 
this limitation.

This has not changed.

--

___
Python tracker 

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



[issue6608] asctime does not check its input

2010-06-11 Thread Alexandre Vassalotti

Alexandre Vassalotti  added the comment:

How about checking the preconditions before calling asctime()? If the check 
fails, then we can raise an exception without crashing.

--

___
Python tracker 

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



[issue8965] test_imp fails on OSX when LANG is set

2010-06-11 Thread STINNER Victor

STINNER Victor  added the comment:

I commited issue8965-test-1.diff (r81916) with a minor changes: .strip() => 
.rstrip() and use @unittest.skipUnless().

--

___
Python tracker 

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



[issue8977] Globalize lonely augmented assignment

2010-06-11 Thread Mark Dickinson

Mark Dickinson  added the comment:

True.  I guess there's a mismatch either way around:  currently,
"A += [4]" and "A.append(4)" behave differently for (e.g.,) a list A.  With the 
proposed change, "n += 3" and "n = n + 3" behave differently for a integer n.  
I'm not sure why I find the latter idea more disturbing than the former.

--

___
Python tracker 

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



[issue8515] idle "Run Module" (F5) does not set __file__ variable

2010-06-11 Thread Tal Einat

Tal Einat  added the comment:

Why doesn't execfile() set __file__? I would be surprised if this is due to an 
oversight by the Python devs. In both execfile and IDLE's "Run Module" I can't 
think of a reason not to set __file__, but perhaps this was intentional? 
Googling a bit hasn't brought up much.

I am currently of the opinion that both IDLE and execfile() should set __file__ 
(with execfile() perhaps requiring more thinking about edge-cases, since it can 
be passes locals and globals dictionaries).

--

___
Python tracker 

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



[issue8978] "tarfile.ReadError: file could not be opened successfully" if compiled without zlib

2010-06-11 Thread Florent Xicluna

Changes by Florent Xicluna :


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

___
Python tracker 

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



[issue8978] "tarfile.ReadError: file could not be opened successfully" if compiled without zlib

2010-06-11 Thread Florent Xicluna

Florent Xicluna  added the comment:

something like :
  raise CompressionError("zlib module is not available")

--

___
Python tracker 

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



[issue8966] ctypes: remove implicit conversion between unicode and bytes

2010-06-11 Thread STINNER Victor

Changes by STINNER Victor :


Removed file: http://bugs.python.org/file17613/ctypes_tests.patch

___
Python tracker 

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



[issue8966] ctypes: remove implicit conversion between unicode and bytes

2010-06-11 Thread STINNER Victor

STINNER Victor  added the comment:

Update ctypes_tests.patch against last changes: ctypes_tests-2.patch.

--
Added file: http://bugs.python.org/file17634/ctypes_tests-2.patch

___
Python tracker 

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



[issue8978] "tarfile.ReadError: file could not be opened successfully" if compiled without zlib

2010-06-11 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
assignee:  -> lars.gustaebel
nosy: +lars.gustaebel

___
Python tracker 

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



[issue8966] ctypes: remove implicit conversion between unicode and bytes

2010-06-11 Thread STINNER Victor

STINNER Victor  added the comment:

I commited ctypes_s_set.patch in Python 3.2 (r81911) because it does fix a real 
bug.

--

___
Python tracker 

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



[issue8978] "tarfile.ReadError: file could not be opened successfully" if compiled without zlib

2010-06-11 Thread STINNER Victor

STINNER Victor  added the comment:

Which message do you suggest?

--
nosy: +haypo

___
Python tracker 

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



[issue8941] utf-32be codec failing on UCS-2 python build for 32-bit value

2010-06-11 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Fixed in r81907 (trunk), r81908 (py3k), r81909 (2.6), r81910 (3.1).

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



[issue8978] "tarfile.ReadError: file could not be opened successfully" if compiled without zlib

2010-06-11 Thread Florent Xicluna

New submission from Florent Xicluna :

When Python is compiled without zlib support, the error message is not very 
helpful when trying to untar an archive.

>>> tarfile.open('sample.tar.gz')
tarfile.ReadError: file could not be opened successfully

It happens when you run "python distribute_setup.py", for example.
 ( http://s3.pixane.com/pip_distribute.png )

--
components: Extension Modules
messages: 107587
nosy: flox
priority: low
severity: normal
status: open
title: "tarfile.ReadError: file could not be opened successfully" if compiled 
without zlib
type: behavior
versions: Python 2.7, Python 3.2

___
Python tracker 

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



[issue8977] Globalize lonely augmented assignment

2010-06-11 Thread Guido van Rossum

Guido van Rossum  added the comment:

It's not that much more evil than this:

A = []

def f(x):
  A.append(x)

print(A)  # []
f(4)
print(A)  # [4]

I've always thought this is a borderline case.

--
nosy: +gvanrossum

___
Python tracker 

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



[issue8515] idle "Run Module" (F5) does not set __file__ variable

2010-06-11 Thread Éric Araujo

Changes by Éric Araujo :


Removed file: http://bugs.python.org/file17632/unnamed

___
Python tracker 

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



[issue8976] subprocess module causes segmentation fault

2010-06-11 Thread R. David Murray

R. David Murray  added the comment:

Well, without a non-proprietary way to reproduce the failure it is going to be 
a little hard to debug.  You could try debugging it with gdb.

--
nosy: +r.david.murray
stage:  -> unit test needed

___
Python tracker 

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



[issue8977] Globalize lonely augmented assignment

2010-06-11 Thread Mark Dickinson

Mark Dickinson  added the comment:

This seems evil to me, when you consider the effect of this patch on immutable 
types:

>>> A = 3
>>> def f():
... A += 5
... 
>>> f()
>>> A
8

I find the possibility that a function can implicitly (i.e., without any 
'global' declarations) mutate my global module constants... disturbing.

Anyway, such a fundamental change would need proper discussion;  the right 
place for that is the python-ideas mailing list rather than the tracker:

http://mail.python.org/mailman/listinfo/python-ideas

Note also that there's a moratorium on core language changes in effect at the 
moment, so the earliest this could change is Python 3.3.

I'm going to close this issue for now;  if the idea gets a good reception on 
python-ideas it can be reopened.

--
nosy: +mark.dickinson
resolution:  -> rejected
status: open -> closed
versions: +Python 3.3 -Python 3.1

___
Python tracker 

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



[issue8949] PyArg_Parse*(): "z" should not accept bytes

2010-06-11 Thread STINNER Victor

STINNER Victor  added the comment:

> I tried to reject types different than str for "z": 
> most tests of the test suite fail

Wait, what? No. I modified the wrong line of code :-) The whole test suite pass 
without any error if "z" doesn't accept bytes anymore.

--

___
Python tracker 

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



[issue8977] Globalize lonely augmented assignment

2010-06-11 Thread Demur Rumed

Changes by Demur Rumed :


--
type: feature request -> behavior

___
Python tracker 

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



[issue8977] Globalize lonely augmented assignment

2010-06-11 Thread Demur Rumed

Demur Rumed  added the comment:

A note on the patch, ste->ste_tmpname... lines, along with changes to 
Lambda_kind, were not added by me. The additional newlines prior to 
symtable_visit_stmt's declaration are accidental, apologies. I'll avoid 
patching a snapshot and then pull the old version from hg after realizing I 
need the old version to run diff on next time

--

___
Python tracker 

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



[issue8977] Globalize lonely augmented assignment

2010-06-11 Thread Demur Rumed

New submission from Demur Rumed :

A=[1,2,3]
def f(x):
A+=x,

This throws an error. The solution: state "global a". I find it odd that 
augmented assignment should be viewed the same as assignment in descerning 
local variables. This patch repairs such to maintain a as a variable of the 
global namespace

Some might find the following an issue

def f(x):
if x:
A+=4,
else:
A=[3]
print("f",x,A)
def g(x):
if not x:
A=[3]
else:
A+=4,
print("g",x,A)

In f, A is a global variable. In g, A is a local variable. Thus g(1) throws 
UnboundLocalError while f(1) appends 4 to A

--
components: Interpreter Core
files: symtable.diff
keywords: patch
messages: 107581
nosy: serprex
priority: normal
severity: normal
status: open
title: Globalize lonely augmented assignment
type: feature request
versions: Python 3.1
Added file: http://bugs.python.org/file17633/symtable.diff

___
Python tracker 

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



[issue8515] idle "Run Module" (F5) does not set __file__ variable

2010-06-11 Thread Bruce Frederiksen

Bruce Frederiksen  added the comment:

No, IDLE compiles the module (with the 'compile' built-in using the 'exec'
option) and then does an 'exec' on the code (in PyShell.py).  It has several
lines of code that it runs before this exec to prepare the environment that
the code is run in.  It appears to be an oversight that the __file__
variable is not being set as a part of this preparation code to match the
behavior of the python CLI.  The patch that I included only changes one line
of this preparation code to also set the __file__ variable and that fixes
the problem.  If you examine the IDLE code in the immediate vicinity of my
patch you will see this.

I have several use cases where I'm relying on the __file__ variable in my
module so that it can find other non .py files that it needs in the same
directory that it's in.  This works under all combinations of uses from the
CLI, but fails in IDLE using Run Module.

The language reference
manualstates
under "Module":

Predefined (writable) attributes: __name__ is the module’s name; __doc__ is
> the module’s documentation string, or None if unavailable; __file__ is the
> pathname of the file from which the module was loaded, if it was loaded from
> a file. The __file__ attribute is not present for C modules that are
> statically linked into the interpreter; for extension modules loaded
> dynamically from a shared library, it is the pathname of the shared library
> file.
>

The python CLI honors this definition in all cases, but IDLE/Run Module does
not.

On Fri, Jun 11, 2010 at 11:11 AM, Tal Einat  wrote:

>
> Tal Einat  added the comment:
>
> I believe IDLE runs modules via execfile(), so I would expect the behavior
> to be similar, and execfile() does not set __file__. Doing "Run Module" is
> also IMO equivalent to doing execfile(), so this behavior retains
> consistency.
>
> However, I would expect __file__ to be set when running IDLE -r 

[issue8949] PyArg_Parse*(): "z" should not accept bytes

2010-06-11 Thread STINNER Victor

STINNER Victor  added the comment:

Some examples of functions using "s" format:
 * str.encode(encoding, errors), bytes.decode(encoding, errors): both arguments 
have to be unicode strings
 * compile(source, filename, mode, ...): filename and mode have to be unicode 
strings
 * crypt.crypt(word, salt): both arguments have to be unicode strings

I think that crypt() should also accept bytes, but not str.encode() nor 
bytes.decode().

Some examples of functions using "z" format:
 * _locale.bindtextdomain(domain, dirname): dirname uses "z" format and so 
accepts str, bytes or buffer compatible object. It should use 
PyUnicode_FSConverter() instead. But I agree that bytes is welcomed here.
 * readline.(write_history_file|read_init_file|read_history_file) functions do 
use "z" to parse a filename. PyUnicode_FSConverter() would also be better, but 
in this case "z" is better than "s" :-)

I don't know why "s" and "z" are different about bytes, but it will be 
difficult to change it without changing a lot ot code (all functions using 
these formats). I tried to reject types different than str for "z": most tests 
of the test suite fail. I tried to accept bytes for "s" format: 
"unicode".encode(b'abc') does segfault.

--

___
Python tracker 

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



[issue8959] WINFUNCTYPE wrapped ctypes callbacks not functioning correctly in Python 2.7

2010-06-11 Thread Thomas Heller

Thomas Heller  added the comment:

Problem in py3k branch also.

--
versions: +Python 3.2

___
Python tracker 

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



[issue8959] WINFUNCTYPE wrapped ctypes callbacks not functioning correctly in Python 2.7

2010-06-11 Thread Thomas Heller

Thomas Heller  added the comment:

The commit that breaks the examples is revision 80761.

Tested on WinXP 32 bit.

Someone should test on Win 64bit too ;-).

--
priority: normal -> release blocker

___
Python tracker 

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



[issue8362] Add Misc/maintainers.rst to 2.x branch

2010-06-11 Thread Éric Araujo

Éric Araujo  added the comment:

We’ve agreed on that :) Thanks.

--
stage:  -> committed/rejected

___
Python tracker 

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



[issue2892] improve cElementTree iterparse error handling

2010-06-11 Thread Fredrik Lundh

Fredrik Lundh  added the comment:

Note that this was fixed in upstream 1.3 (and verified by the selftests), but 
the fix and test was apparently lost when that code was merged into 2.7.  Since 
2.7 is supposed to ship with 1.3, this is a regression, not a feature request.

(But 2.7 is in rc, and I'm on vacation, so I guess it's a bit too late to do 
anything about that.  I'll leave the final decision to flox and the python-dev 
crowd.)

--
assignee: effbot -> flox
versions: +Python 2.7

___
Python tracker 

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



[issue8362] Add Misc/maintainers.rst to 2.x branch

2010-06-11 Thread STINNER Victor

STINNER Victor  added the comment:

I added Misc/maintainers.rst in 2.7 (r81899). But I don't want to maintain it, 
so merwork, will have to send me your patches ;-)

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



[issue2892] improve cElementTree iterparse error handling

2010-06-11 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +flox

___
Python tracker 

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



[issue8976] subprocess module causes segmentation fault

2010-06-11 Thread Chris Blazick

New submission from Chris Blazick :

platform: Linux x86_64 (CentOS)
kernel: 2.6.18-128.1.10.el5.centos.plus
python version: 2.4.3
PyQt versin: 4.7.3

subprocess is generating a segmentation fault.

I am running a proprietary quicktime generating script inside my own (Qt) 
script using the subprocess module.  I am piping both stdout and stderr into my 
script.  I have tried reading these two with .communicate() and with the 
.stdout / .stderr properties.  Both end up generating the 
following error:

*** glibc detected *** /usr/bin/python: corrupted double-linked list: 
0x161c5c50 ***
Segmentation fault

running my script, and using os.system() to run the proprietary script works 
just fine

The (C++ compiled) proprietary script does not appear to have any problems 
crashing under normal circumstances, and I am assuming if there was a problem 
with the proprietary script, it wouldn't cascade to crashing my own script

--
components: Extension Modules
messages: 107573
nosy: Chris.Blazick
priority: normal
severity: normal
status: open
title: subprocess module causes segmentation fault
type: crash
versions: Python 2.5

___
Python tracker 

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



[issue6608] asctime does not check its input

2010-06-11 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Hmm... it's still a crash, though. I really think this should be fixed. 
Crashing on invalid input is bad.

--
type: behavior -> crash

___
Python tracker 

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



[issue3129] struct allows repeat spec. without a format specifier

2010-06-11 Thread Mark Dickinson

Mark Dickinson  added the comment:

On second thoughts, I think I *would* like to see this backported to 2.7.  Not 
to the maintenance branches, though.

--

___
Python tracker 

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



[issue6608] asctime does not check its input

2010-06-11 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

Downgrading further.  If anyone has interest in supplying a patch, please step 
in.  Otherwise I plan to add a note to documentation and leave the code as is.

--
priority: critical -> low
title: asctime causing python to crash -> asctime does not check its input
type: crash -> behavior
versions:  -Python 2.6, Python 2.7, Python 3.1

___
Python tracker 

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



[issue5094] datetime lacks concrete tzinfo impl. for UTC

2010-06-11 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

I am attaching a new patch, issue5094e.diff which addresses most of Mark's 
comments.  I left out repr() because two opinions were voiced on IRC with 
respect to datetime. prefix.  I would like to give it some more thought even 
though I am leaning towards compatibility with existing reprs.

I did not make td argument optional and did not allow timezone o be subclassed 
because these seem to be mutually exclusive options.  (If td is optional in 
base class, it must be optional in subclasses per Liskov's principle severely 
limiting utility of subclasses.)  Let's address this separately.

--
Added file: http://bugs.python.org/file17631/issue5094e.diff

___
Python tracker 

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



[issue8975] Bug in cookiejar

2010-06-11 Thread Éric Araujo

Éric Araujo  added the comment:

Could you provide a minimal usable script? We can’t run your excerpt to
reproduce the bug, and reproducing is the first step to debugging. I
think we’ll also need the site address, or the cookie header, or the
cookies file that provoke the bug.

--

___
Python tracker 

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



[issue8362] Add Misc/maintainers.rst to 2.x branch

2010-06-11 Thread Éric Araujo

Éric Araujo  added the comment:

Updating the files. haypo, your move! :)

--

___
Python tracker 

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



[issue8362] Add Misc/maintainers.rst to 2.x branch

2010-06-11 Thread Éric Araujo

Changes by Éric Araujo :


Added file: http://bugs.python.org/file17630/maintainers.diff

___
Python tracker 

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



[issue8362] Add Misc/maintainers.rst to 2.x branch

2010-06-11 Thread Éric Araujo

Changes by Éric Araujo :


Added file: http://bugs.python.org/file17629/maintainers.rst

___
Python tracker 

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



[issue8362] Add Misc/maintainers.rst to 2.x branch

2010-06-11 Thread Éric Araujo

Changes by Éric Araujo :


Removed file: http://bugs.python.org/file16854/maintainers.diff

___
Python tracker 

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



[issue8362] Add Misc/maintainers.rst to 2.x branch

2010-06-11 Thread Éric Araujo

Changes by Éric Araujo :


Removed file: http://bugs.python.org/file16853/maintainers.rst

___
Python tracker 

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



[issue8975] Bug in cookiejar

2010-06-11 Thread Popa Claudiu

Popa Claudiu  added the comment:

"""CHttp.__init__(self,1,proxy = 
shared.setts.currentGoogleProxy)
self.timeout = shared.setts.cGglHttpTimeout

self.proxy = 
globShare.currentGoogleProxy[globShare.currentGoogleIndex]
if self.proxy:
proxy_support = 
urllib.request.ProxyHandler({'http':self.proxy,'https':self.proxy,'ftp':self.proxy})
else:
proxy_support = urllib.request.ProxyHandler({})
#socket.setdefaulttimeout(30)

#self._cp = 
urllib.request.HTTPCookieProcessor(http.cookiejar.CookieJar())

self._cj = http.cookiejar.MozillaCookieJar()
self._opener1 = 
urllib.request.build_opener(proxy_support,self._cp)
. openedUrl = self._opener1.open(req)"""

The script was a crawler that searches for pdf's on internet. One thread 
printed the untreated exception.

--

___
Python tracker 

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



[issue8971] Tkinter Litmus Test

2010-06-11 Thread Éric Araujo

Changes by Éric Araujo :


--
resolution:  -> rejected

___
Python tracker 

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



[issue8971] Tkinter Litmus Test

2010-06-11 Thread Éric Araujo

Changes by Éric Araujo :


--
status: open -> closed

___
Python tracker 

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



[issue8971] Tkinter Litmus Test

2010-06-11 Thread Éric Araujo

Changes by Éric Araujo :


--
nosy: +merwok
resolution: rejected -> 
status: closed -> open

___
Python tracker 

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



[issue8975] Bug in cookiejar

2010-06-11 Thread Éric Araujo

Éric Araujo  added the comment:

Thanks for your report. Can you copy the code provoking the bug?

--
nosy: +merwok

___
Python tracker 

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



[issue8975] Bug in cookiejar

2010-06-11 Thread Popa Claudiu

New submission from Popa Claudiu :

Hello. This is my first report, sorry if I won't do it right.
I found a bug in cookielib, which looks like this(a traceback):

"""C:\Python31\lib\http\cookiejar.py:1586: UserWarning: http.cookiejar bug!
Traceback (most recent call last):
  File "C:\Python31\lib\http\cookiejar.py", line 1584, in make_cookies
parse_ns_headers(ns_hdrs), request)
  File "C:\Python31\lib\http\cookiejar.py", line 1541, in _cookies_from_attrs_se
t
cookie = self._cookie_from_cookie_tuple(tup, request)
  File "C:\Python31\lib\http\cookiejar.py", line 1460, in _cookie_from_cookie_tu
ple
version = int(version)
ValueError: invalid literal for int() with base 10: '1.0'

  _warn_unhandled_exception()"""

--
components: Library (Lib)
messages: 107564
nosy: Popa.Claudiu
priority: normal
severity: normal
status: open
title: Bug in cookiejar
type: crash
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



[issue8974] svnmerge errors in msgfmt.py

2010-06-11 Thread Éric Araujo

New submission from Éric Araujo :

svnmerge for r81698 introduced incorrect print(sys.stderr, ...) calls. Attached 
patch fixes it. Apply with patch -p1.

--
assignee: loewis
components: Demos and Tools
files: strange-print.diff
keywords: patch
messages: 107563
nosy: loewis, merwok
priority: normal
severity: normal
status: open
title: svnmerge errors in msgfmt.py
type: behavior
versions: Python 3.2
Added file: http://bugs.python.org/file17628/strange-print.diff

___
Python tracker 

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



[issue1288056] pygettext - provide comments to help translators

2010-06-11 Thread Éric Araujo

Éric Araujo  added the comment:

Translator comments seem to me nicer than contexts 
(http://bugs.python.org/issue2504), but I’m not sure which one is recommended 
when they overlap.

I’m -1 on the same line restriction. Python style is to put comments on the 
previous line.

The 2.x line does not accept new features, so your patch needs to be ported to 
3.x (branch name py3k).

FWIW, Babel uses a different style of comments, on the preceding line: 
http://babel.edgewall.org/wiki/Documentation/messages.html#translator-comments

--
nosy: +merwok

___
Python tracker 

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



[issue4391] optparse: use proper gettext plurals forms

2010-06-11 Thread Éric Araujo

Éric Araujo  added the comment:

Thanks for your patch. I have some remarks:
1) please produce a patch from the top level of a Python checkout (cf. 
http://www.python.org/dev/patches/);
2) wrap lines under 80 characters;
3) bug with %-formatting: the singular message takes one arg, the plural two 
(optparse bug, not your patch’s bug, but the patch should fix it too);
4) “usage” has been used for decades in command line parsing, it’s fine.

I’m adding Armin to the nosy list since he’s listed in py3k/Misc/maintainers.rst

--
nosy: +aronacher, merwok

___
Python tracker 

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



  1   2   >