[issue15644] after _bytesio.seek(0), _bytesio.getvalue() returned reversed data.

2012-08-14 Thread Ned Deily

Ned Deily added the comment:

The program works as expected.  After the first two writes, the buffer contains 
 b'abcdef'.  Then the seek(0) moves the stream pointer to the beginning of the 
buffer and the next write overwrites buffer positions 0 through 2, replacing 
b'abc' with b'xyz'. So now the buffer is b'xyzdef'.  The next read starts at 
position 3 (following the last byte written), reading b'de'.

--
nosy: +ned.deily
resolution:  - works for me
stage:  - committed/rejected
status: open - closed
type: behavior - 

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



[issue15634] synchronized decorator for the threading module

2012-08-14 Thread Juan Javier

Juan Javier added the comment:

Ok, you are right, serialized is the right name. Also, passing the lock to the 
decorator will the correct option.

--

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



[issue15634] synchronized decorator for the threading module

2012-08-14 Thread Juan Javier

Juan Javier added the comment:

What about this?

def serialized(lock):
def _serialized(func):
def __serialized(*args, **kwds):
with lock:
return func(*args, **kwds)
__serialized.__doc__ = func.__doc__
return __serialized
return _serialized

--

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



[issue15645] 2to3 Grammar pickles not created when upgrading to 3.3.0b2

2012-08-14 Thread Stefan Holek

New submission from Stefan Holek:

After upgrading 3.3.0b1 to b2 (make install to same location) I noticed that 
the Grammar pickles for beta.2 were missing (the beta.1 pickles still being 
there).

The result is permission errors and/or virtualenv SandboxViolations, when 2to3 
is used for the first time. E.g.:

SandboxViolation: 
open('/usr/local/python3.3/lib/python3.3/lib2to3/Grammar3.3.0.beta.2.pickle', 
'wb') {}

This is because users of Python (as opposed to root) may of course not write to 
the library dir.

The pickles are created fine on a fresh install of Python 3.3.0b2 (make install 
to new location).

--
components: 2to3 (2.x to 3.x conversion tool)
messages: 168180
nosy: stefanholek
priority: normal
severity: normal
status: open
title: 2to3 Grammar pickles not created when upgrading to 3.3.0b2
versions: Python 3.3

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



[issue14935] PEP 384 Refactoring applied to _csv module

2012-08-14 Thread Robin Schreiber

Robin Schreiber added the comment:

Fixed the dealloc-methods of the types, for proper type dereferencing.

--
Added file: http://bugs.python.org/file26797/csv_pep384_v2.patch

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



[issue14935] PEP 384 Refactoring applied to _csv module

2012-08-14 Thread Robin Schreiber

Changes by Robin Schreiber robin.schrei...@me.com:


--
versions: +Python 3.4 -Python 3.3

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



[issue15632] regrtest.py: spurious leaks with -R option

2012-08-14 Thread Stefan Krah

Stefan Krah added the comment:

Should we go all the way and also explicitly fill the small int cache?

Integers 0-255 should be initialized already, but I'm not sure
about [-5..-1] and 256. I haven't been able to create a test case
for integers though.

--
Added file: http://bugs.python.org/file26798/issue15632.diff

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



[issue15269] Document dircmp.left and dircmp.right

2012-08-14 Thread Senthil Kumaran

Senthil Kumaran added the comment:

Hi Chris  Eli, - Sorry that I missed this issue.

Chris - agree to your rationale. I can see how having self.left and self.right 
documented can add value, The diff example was useful. Initially, I did have 
some doubts in terms how it could be useful when the args are sent by the user, 
your example clarified. Thanks!.

As Eli has looked at this one too, I shall commit the patch. Everything is good.

--

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



[issue15631] Python 3.3 beta 1 installation issue lib/lib64 folders

2012-08-14 Thread Matthias Klose

Matthias Klose added the comment:

the configure step sets LIBDIR to /usr/local/lib64. Please find out why this is 
not set to /usr/local/lib.

--

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



[issue15269] Document dircmp.left and dircmp.right

2012-08-14 Thread Senthil Kumaran

Senthil Kumaran added the comment:

As this is not adding any feature, but just an additional clarification to the 
existing attribute together with some useful documentation, I believe this can 
go in 2.7, 3.2 and 3.3

Please correct me if I am wrong here.

--
versions: +Python 2.7, Python 3.2, Python 3.3 -Python 3.4

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



[issue15269] Document dircmp.left and dircmp.right

2012-08-14 Thread Chris Jerdonek

Chris Jerdonek added the comment:

Thanks a lot, Senthil.  I appreciate it.

--

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



[issue15543] central documentation for 'universal newlines'

2012-08-14 Thread Chris Jerdonek

Chris Jerdonek added the comment:

Updating patch to tip again.

--
Added file: http://bugs.python.org/file26799/issue-15543-5.patch

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



[issue15573] Support unknown formats in memoryview comparisons

2012-08-14 Thread Stefan Krah

Stefan Krah added the comment:

Here is a patch implementing by-value comparisons for all format strings
understood by the struct module. It is slightly longer than promised, since
for larger arrays it is necessary to cache an unpacking object for acceptable
performance. The fast path for identical single element native format strings
is unchanged.

The new comparison rules are stated in the memoryview docs.


For Georg's benefit, here are the memoryobject.c changes and the reasons why
I think the patch can go into 3.3:

  o cmp_structure() is split into cmp_format() and cmp_shape(), with
unchanged semantics.

  o The new section unpack using the struct module is largely identical
to existing parts of _testbuffer.c:

  - struct_get_unpacker()  == see _testbuffer.c:ndarray_as_list()

  - struct_unpack_single() == see base case in _testbuffer.c:unpack_rec()

  o The new code is only called in the previous default case of unpack_cmp().

  o The new code has 100% coverage.



Performance:


Identical format, bytes:


$ ./python -m timeit -n 1000 -s import array; x = array.array('B', [1]*1); 
y = array.array('B', [1]*1); x == y
1000 loops, best of 3: 116 usec per loop

$ ./python -m timeit -n 1000 -s import array; x = array.array('B', [1]*1); 
y = array.array('B', [1]*1); a = memoryview(x); b = memoryview(y) a == b
1000 loops, best of 3: 49.1 usec per loop


Identical format, double:
-

$ ./python -m timeit -n 1000 -s import array; x = array.array('d', 
[1.0]*1); y = array.array('d', [1.0]*1); x == y
1000 loops, best of 3: 319 usec per loop

$ ./python -m timeit -n 1000 -s import array; x = array.array('d', 
[1.0]*1); y = array.array('d', [1.0]*1); a = memoryview(x); b = 
memoryview(y) a == b
1000 loops, best of 3: 65.7 usec per loop


Different format ('B', 'b'):


$ ./python -m timeit -n 100 -s import array; x = array.array('B', [1]*1); 
y = array.array('b', [1]*1); x == y
100 loops, best of 3: 131 usec per loop

$ ./python -m timeit -n 1000 -s import array; x = array.array('B', [1]*1); 
y = array.array('b', [1]*1); a = memoryview(x); b = memoryview(y) a == b
1000 loops, best of 3: 3.42 msec per loop


Different format ('d', 'f'):


$ ./python -m timeit -n 1000 -s import array; x = array.array('d', 
[1.0]*1); y = array.array('f', [1.0]*1); x == y
1000 loops, best of 3: 315 usec per loop

$ ./python -m timeit -n 1000 -s import array; x = array.array('d', 
[1.0]*1); y = array.array('f', [1.0]*1); a = memoryview(x); b = 
memoryview(y) a == b
1000 loops, best of 3: 3.59 msec per loop

--
Added file: http://bugs.python.org/file26800/issue15573-struct.diff

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



[issue15646] multiprocessing can do equivalent of a fork bomb on Windows

2012-08-14 Thread Richard Oudkerk

New submission from Richard Oudkerk:

If the if __name__ == '__main__' idiom is not used on Windows you can get the 
recursive starting of new processes.

This is because importing the main module in a child process starts a new child 
process as a side effect.

There is a test intended to prevent this and raise RuntimeError instead, but it 
is currently ineffective.

--
messages: 168189
nosy: sbt
priority: normal
severity: normal
status: open
title: multiprocessing can do equivalent of a fork bomb on Windows
type: behavior
versions: Python 2.7, Python 3.2, Python 3.3

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



[issue15647] isdir should be a local symbol, not exported

2012-08-14 Thread Matthias Klose

New submission from Matthias Klose:

2.7 only:

isdir should not be exported, but a local symbol instead (this was accidentally 
changed after the 2.7.3 release.

currently defined and used in Modules/getpath.c and Python/import.c, and used 
in Python/bltinmodule.c

proposal to rename the implementation in import.c to _Py_isdir and use it in 
import.c and bltinmodule.c.

as an alternative, make the isdir implementation static for windows and posix 
builds.

--
components: Interpreter Core
files: local-isdir-symbol.diff
keywords: needs review, patch
messages: 168190
nosy: doko
priority: normal
severity: normal
status: open
title: isdir should be a local symbol, not exported
versions: Python 2.7
Added file: http://bugs.python.org/file26801/local-isdir-symbol.diff

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



[issue6135] subprocess seems to use local encoding and give no choice

2012-08-14 Thread Chris Jerdonek

Chris Jerdonek added the comment:

  only one Popen instance (for the iconv call), but different encodings
  for stdin and stdout.
 Isn't that the exception rather than the rule? I think it actually makes
 sense, in at least 99.83% of cases ;-), to have a common encoding
 setting for all streams.

FWIW, I recently encountered a scenario (albeit in a test situation) where the 
ability to set different encodings for stdout and stderr would have been useful 
to me.  It was while creating a test case for issue 15595.  I was changing the 
locale encoding for stdout, but I also wanted to leave it unchanged for stderr 
because there didn't seem to be a way to control the encoding that the child 
used for stderr.

--
nosy: +cjerdonek

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



[issue15648] stderr refs output does not respect PYTHONIOENCODING

2012-08-14 Thread Chris Jerdonek

New submission from Chris Jerdonek:

The --help documentation for the python executable says--

PYTHONIOENCODING: Encoding[:errors] used for stdin/stdout/stderr.

However, PYTHONIOENCODING doesn't seem to be respected for the python 
executable's refs output to stderr.  For example, this--

args = [sys.executable, '-c', print('[100 refs]')]

env = {'PYTHONIOENCODING': 'utf-8'}
popen = Popen(args, universal_newlines=False, stdin=PIPE, stdout=PIPE, 
stderr=PIPE, env=env)
print(repr(popen.communicate()))

env = {'PYTHONIOENCODING': 'utf-16'}
popen = Popen(args, universal_newlines=False, stdin=PIPE, stdout=PIPE, 
stderr=PIPE, env=env)
print(repr(popen.communicate()))

yields--

(b'[10 refs]\n', b'[41761 refs]\n')
(b'[\x001\x000\x00 \x00r\x00e\x00f\x00s\x00]\x00\n\x00', b'[42367 refs]\n')

--
messages: 168192
nosy: cjerdonek
priority: normal
severity: normal
status: open
title: stderr refs output does not respect PYTHONIOENCODING
versions: Python 3.3

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



[issue15645] 2to3 Grammar pickles not created when upgrading to 3.3.0b2

2012-08-14 Thread R. David Murray

Changes by R. David Murray rdmur...@bitdance.com:


--
nosy: +benjamin.peterson

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



[issue15646] multiprocessing can do equivalent of a fork bomb on Windows

2012-08-14 Thread Roundup Robot

Roundup Robot added the comment:

New changeset e4fe1daef9f7 by Richard Oudkerk in branch '2.7':
Issue #15646: Prevent equivalent of a fork bomb when using multiprocessing
http://hg.python.org/cpython/rev/e4fe1daef9f7

New changeset 20f8a2455ffb by Richard Oudkerk in branch '3.2':
Issue #15646: Prevent equivalent of a fork bomb when using multiprocessing
http://hg.python.org/cpython/rev/20f8a2455ffb

--
nosy: +python-dev

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



[issue15639] csv.Error description is incorrectly broad

2012-08-14 Thread Xavier Morel

Xavier Morel added the comment:

Correction: csv also seems to raise csv.Error if the file contains NUL bytes:

Error: line contains NULL byte

--

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



[issue14167] document return statement in finally blocks

2012-08-14 Thread Roundup Robot

Roundup Robot added the comment:

New changeset e0e8e70e4035 by Andrew Svetlov in branch '3.2':
Issue #14167: Document return statement in finally blocks.
http://hg.python.org/cpython/rev/e0e8e70e4035

New changeset 05714e9811fa by Andrew Svetlov in branch 'default':
Issue #14167: Document return statement in finally blocks.
http://hg.python.org/cpython/rev/05714e9811fa

New changeset bef098bd3fa5 by Andrew Svetlov in branch '2.7':
Issue #14167: Document return statement in finally blocks.
http://hg.python.org/cpython/rev/bef098bd3fa5

--
nosy: +python-dev

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



[issue14167] document return statement in finally blocks

2012-08-14 Thread Andrew Svetlov

Andrew Svetlov added the comment:

Fixed. Thanks.

--
resolution:  - fixed
stage: needs patch - committed/rejected
status: open - closed

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



[issue15633] httplib.response is not closed after all data has been read

2012-08-14 Thread Nikolaus Rath

Nikolaus Rath added the comment:

The call should be read(size), with size a number. I will make sure to check 
size, fp, length, chunked and chunk_left when it happens the next time.

--

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



[issue15586] Provide some examples for usage of ElementTree methods/attributes

2012-08-14 Thread Daniel Ellis

Daniel Ellis added the comment:

Thank you for the review Eli.  I've made your changes and attached the updated 
patch.  I did run all of the code snippets that are being added on 2.7, and the 
only thing I found different was the changed print statement.  I don't believe 
I overlooked anything, but I may have made a mistake.

--
Added file: http://bugs.python.org/file26802/2.7_branch_etree_doc_2.patch

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



[issue9161] add_option in optparse no longer accepts unicode string

2012-08-14 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ffd70c371fee by R David Murray in branch '2.7':
#9161: Fix test to use standard optparse test pattern (what was I thinking?)
http://hg.python.org/cpython/rev/ffd70c371fee

--

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



[issue15642] Integrate pickle protocol version 4 GSoC work by Stefan Mihaila

2012-08-14 Thread Stefan Mihaila

Stefan Mihaila added the comment:

Maybe we could postpone the review process for a few days
until I fix some known issues

--

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



[issue15644] after _bytesio.seek(0), _bytesio.getvalue() returned reversed data.

2012-08-14 Thread umedoblock

umedoblock added the comment:

thanks Ned.
I understood your comment.
I'm happy!

--

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



[issue15573] Support unknown formats in memoryview comparisons

2012-08-14 Thread Stefan Krah

Stefan Krah added the comment:

I didn't get my own comments as mail, so this is just a notification that I've 
answered Nick's comments.

--

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



[issue13370] test_ctypes fails when building python with clang

2012-08-14 Thread Stan Seibert

Stan Seibert added the comment:

FYI: This bug still exists using the version of clang shipped with OS X 10.8.

Tested with Python 3.3.0b2 and:
Apple clang version 4.0 (tags/Apple/clang-421.0.57) (based on LLVM 3.1svn)
Target: x86_64-apple-darwin12.0.0
Thread model: posix

--
nosy: +Stan.Seibert

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



[issue15646] multiprocessing can do equivalent of a fork bomb on Windows

2012-08-14 Thread Richard Oudkerk

Changes by Richard Oudkerk shibt...@gmail.com:


--
resolution:  - fixed
stage:  - committed/rejected
status: open - closed

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



[issue15647] isdir should be a local symbol, not exported

2012-08-14 Thread Matthias Klose

Matthias Klose added the comment:

fixed for 2.7, made isdir static on windows and posix

--
resolution:  - fixed
status: open - closed

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



[issue15649] subprocess.Popen.communicate: accept str for input parameter if universal_newlines is False

2012-08-14 Thread Andrew Svetlov

New submission from Andrew Svetlov:

Currently Popen.communicate accept str is universal_newlines==True and bytes if 
universal_newlines==False.

I like to accept both str and bytes if universal_newlines is False and raise 
explicit exception for bytes if universal_newlines is True.

Looks like universal_newlines for bytes doesn't make sense, also we prefer to 
use str everywhere. Bytes should be used if it is really byte-stream or if 
unicode cannot be passed by some limitations of underlying OS etc.

There are couple dark corners:
1. What to do if stdin doesn't have `encoding` attribute? Convert to bytes 
using filesystemencoding? Raise explicit exception? Adding `encode` parameter 
for .communicate doesn't looks elegant.
2. How .communicate works on Windows? I see completely different implementation 
of this method for win32.

--
messages: 168207
nosy: asvetlov
priority: normal
severity: normal
stage: needs patch
status: open
title: subprocess.Popen.communicate: accept str for input parameter if 
universal_newlines is False
type: enhancement
versions: Python 3.4

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



[issue15592] subprocess.communicate() breaks on no input with universal newlines true

2012-08-14 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 839bd8f98539 by Andrew Svetlov in branch '3.2':
Add test to explicit check the absence regression in subprocess (issue #15592).
http://hg.python.org/cpython/rev/839bd8f98539

New changeset 9d86480cc177 by Andrew Svetlov in branch 'default':
Issue #15592. Fix regression: subprocess.communicate() breaks on no input with 
universal newlines true.
http://hg.python.org/cpython/rev/9d86480cc177

--
nosy: +python-dev

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



[issue15647] isdir should be a local symbol, not exported

2012-08-14 Thread Roundup Robot

Roundup Robot added the comment:

New changeset bdd1b2228c14 by Matthias Klose in branch '2.7':
- Issue #15647: Make isdir static for windows and posix
http://hg.python.org/cpython/rev/bdd1b2228c14

--
nosy: +python-dev

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



[issue15649] subprocess.Popen.communicate: accept str for input parameter if universal_newlines is False

2012-08-14 Thread Andrew Svetlov

Changes by Andrew Svetlov andrew.svet...@gmail.com:


--
components: +Library (Lib)

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



[issue15592] subprocess.communicate() breaks on no input with universal newlines true

2012-08-14 Thread Andrew Svetlov

Andrew Svetlov added the comment:

Close the issue. Thanks, Chris.
It was the real regression, 3.2 works fine.

See also #15649 for accepting str if not universal_newlines.

--

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



[issue15204] Deprecate the 'U' open mode

2012-08-14 Thread Andrew Svetlov

Changes by Andrew Svetlov andrew.svet...@gmail.com:


--
nosy: +asvetlov

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



[issue15592] subprocess.communicate() breaks on no input with universal newlines true

2012-08-14 Thread Chris Jerdonek

Chris Jerdonek added the comment:

Thanks, Andrew!

--
resolution:  - fixed
stage: patch review - committed/rejected
status: open - closed

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



[issue15623] Init time relative imports no longer work from __init__.so modules

2012-08-14 Thread Brett Cannon

Brett Cannon added the comment:

I had a minute free so I just tried inserting an empty module into sys.modules 
and then importing an extension module to see if it would get reused. It 
doesn't. imp.load_dynamic() actually just blindly overwrites what is in 
sys.modules. I'm willing to bet it just assumes whatever is in the special 
extensions module cache is the canonical module and just re-inserts blindly 
into sys.modules.

So that leaves needing to diagnose where Python 3.3 inserts an extension into 
sys.modules and if it can somehow be moved up. Probably should also see how the 
heck 3.2 is doing it to know where the difference occurs to make sure that it 
isn't some silly oversight somehow.

--

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



[issue15649] subprocess.Popen.communicate: accept str for input parameter if universal_newlines is False

2012-08-14 Thread Chris Jerdonek

Chris Jerdonek added the comment:

 What to do if stdin doesn't have `encoding` attribute? Convert to bytes using 
 filesystemencoding?

If choosing an encoding, it probably makes sense to default to the same as for 
when universal_newlines=True, namely locale.getpreferredencoding(False).

 Adding `encode` parameter for .communicate doesn't looks elegant.

Also see issue 6135 (to allow setting encoding).

--
nosy: +cjerdonek

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



[issue14649] doctest.DocTestSuite error misleading when module has no docstrings

2012-08-14 Thread Andrew Svetlov

Andrew Svetlov added the comment:

I think current behavior is correct.
Every doctest is docstring from tested module, but not every docstring is a 
valid doctest.

--

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



[issue6135] subprocess seems to use local encoding and give no choice

2012-08-14 Thread Chris Jerdonek

Chris Jerdonek added the comment:

To my previous comment, issue 15648 shows the case where I was able to change 
the encoding for stdout in the child process but not stderr (which would 
require supporting two encodings in Popen to handle).

--

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



[issue14649] doctest.DocTestSuite error misleading when module has no docstrings

2012-08-14 Thread R. David Murray

R. David Murray added the comment:

Chris isn't suggesting changing the behavior, just the error message.  I agree 
with his change for exactly the reason you say: currently doctest doesn't 
complain if a module does have docstrings but none of those docstrings are 
tests.  So a module could have no tests without the error being raised.

However, I suspect that the current behavior is a bug.  I suspect the intent 
was to raise an error if there were no *tests*, not if there were no 
docstrings.  I don't think it is a bug that should be fixed, though.  I have a 
couple of test runners in various projects that run doctest on *all* modules, 
the goal being to pick up any doctests that there are or that I may add, even 
though not all modules have docstrings that contain doctests.  The doctest 
version of TestCase-based discovery.

So if anything I think this exception should be dropped.  If the report is that 
no tests are run, that should be enough of an indication that something is 
wrong, without raising an error, as it has been for the case where there are 
docstrings but no tests (we do not as far as I know have a bug or feature 
request that the current behavior is inadequate).

--

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



[issue15390] PEP 3121, 384 refactoring applied to datetime module

2012-08-14 Thread Robin Schreiber

Robin Schreiber added the comment:

Fixed _dealloc methods. Also: Init now returns the previously initialized 
module if available.

--
Added file: 
http://bugs.python.org/file26803/_datetimemodule_pep3121-384_v1.patch

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



[issue15650] PEP 3121, 384 refactoring applied to dbm module

2012-08-14 Thread Robin Schreiber

New submission from Robin Schreiber:

Changes proposed in PEP3121 and PEP384 have now been applied to the dbm module!

--
components: Extension Modules
files: _dbmmodule_pep3121-384_v0.patch
keywords: patch
messages: 168216
nosy: Robin.Schreiber
priority: normal
severity: normal
status: open
title: PEP 3121, 384 refactoring applied to dbm module
versions: Python 3.4
Added file: http://bugs.python.org/file26804/_dbmmodule_pep3121-384_v0.patch

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



[issue15390] PEP 3121, 384 refactoring applied to datetime module

2012-08-14 Thread Andrew Svetlov

Andrew Svetlov added the comment:

Add Alexander Belopolsky to nosy list as maintainer of datetime module.

--
nosy: +belopolsky

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



[issue15651] PEP 3121, 384 refactoring applied to elementtree module

2012-08-14 Thread Robin Schreiber

New submission from Robin Schreiber:

Changes proposed in PEP3121 and PEP384 have now been applied to the elementtree 
module!

--
components: Extension Modules
files: _elementtree_pep3121-384_v0.patch
keywords: patch
messages: 168217
nosy: Robin.Schreiber
priority: normal
severity: normal
status: open
title: PEP 3121, 384 refactoring applied to elementtree module
type: resource usage
versions: Python 3.4
Added file: http://bugs.python.org/file26805/_elementtree_pep3121-384_v0.patch

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



[issue15651] PEP 3121, 384 refactoring applied to elementtree module

2012-08-14 Thread Robin Schreiber

Changes by Robin Schreiber robin.schrei...@me.com:


--
nosy: +effbot

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



[issue15652] PEP 3121, 384 refactoring applied to gdbm module

2012-08-14 Thread Robin Schreiber

New submission from Robin Schreiber:

Changes proposed in PEP3121 and PEP384 have now been applied to the gdbm module!

--
components: Extension Modules
files: _gdbm_pep3121-384_v0.patch
keywords: patch
messages: 168219
nosy: Robin.Schreiber, anthony_baxter
priority: normal
severity: normal
status: open
title: PEP 3121, 384 refactoring applied to gdbm module
versions: Python 3.4
Added file: http://bugs.python.org/file26806/_gdbm_pep3121-384_v0.patch

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



[issue15653] PEP 3121, 384 refactoring applied to hashopenssl module

2012-08-14 Thread Robin Schreiber

New submission from Robin Schreiber:

Changes proposed in PEP3121 and PEP384 have now been applied to the hashopenssl 
module!

--
components: Extension Modules
files: _hashopenssl_pep3121-384_v0.patch
keywords: patch
messages: 168220
nosy: Robin.Schreiber, gstein
priority: normal
severity: normal
status: open
title: PEP 3121, 384 refactoring applied to hashopenssl module
type: resource usage
versions: Python 3.4
Added file: http://bugs.python.org/file26807/_hashopenssl_pep3121-384_v0.patch

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



[issue15654] PEP 384 Refactoring applied to bz2 module

2012-08-14 Thread Robin Schreiber

New submission from Robin Schreiber:

Changes proposed in PEP384 have now been applied to the bz2 module!

--
components: Extension Modules
files: _bz2_pep384_v0.patch
keywords: patch
messages: 168221
nosy: Robin.Schreiber
priority: normal
severity: normal
status: open
title: PEP 384 Refactoring applied to bz2 module
type: resource usage
versions: Python 3.4
Added file: http://bugs.python.org/file26808/_bz2_pep384_v0.patch

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



[issue15655] PEP 384 Refactoring applied to json module

2012-08-14 Thread Robin Schreiber

New submission from Robin Schreiber:

Changes proposed in PEP3121 and PEP384 have now been applied to the json module!

--
components: Extension Modules
files: _json_pep384_v0.patch
keywords: patch
messages: 168222
nosy: Robin.Schreiber
priority: normal
severity: normal
status: open
title: PEP 384 Refactoring applied to json module
type: resource usage
versions: Python 3.4
Added file: http://bugs.python.org/file26809/_json_pep384_v0.patch

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



[issue15656] Extending Python with C page needs update for 3.x

2012-08-14 Thread Sandro Tosi

New submission from Sandro Tosi:

Hello,
this has been reported at 
http://mail.python.org/pipermail/docs/2012-July/009223.html but since I have no 
experience to judge if it's correct or not, i'll just report it:


I've recenty started to try using C code in python using the wonderful
python API, although i have to say the learning curve was non neglectable :P
I've spotted what I believe to be a small mistake in the documentation
from this page:
http://docs.python.org/release/3.2/extending/extending.html

In paragraph 1.8
(http://docs.python.org/release/3.2/extending/extending.html#keyword-parameters-for-extension-functions),
the code example given contains an error, which is actually obsolete
code from python 2.7:

void
initkeywdarg(void)
{
  /* Create the module and add the functions */
  Py_InitModule(keywdarg, keywdarg_methods);
}


This doesn't work in Python3.2. It's supposed to be

static struct PyModuleDef keywdargmodule = {
   PyModuleDef_HEAD_INIT,
   keywdarg,   /* name of module */
   keywdarg_doc, /* module documentation, may be NULL */
   -1,   /* size of per-interpreter state of the module,
or -1 if the module keeps state in global variables. */
   keywdarg_methods
};

PyMODINIT_FUNC
PyInit_keywdarg(void)
{
return PyModule_Create(keywdargmodule);
}

As explained above (and confirmed by experience).


--
assignee: docs@python
components: Documentation
messages: 168223
nosy: docs@python, sandro.tosi
priority: normal
severity: normal
stage: patch review
status: open
title: Extending Python with C page needs update for 3.x
versions: Python 3.2, Python 3.3

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



[issue15653] PEP 3121, 384 refactoring applied to hashopenssl module

2012-08-14 Thread Antoine Pitrou

Antoine Pitrou added the comment:

+m = PyState_FindModule(_hashlibmodule);
+if(!m){
+m = PyModule_Create(_hashlibmodule);
+if (m == NULL)
+return NULL;
+} else {
+Py_INCREF(m);
+return m;
+}

Why is this dance needed?

+if((void *)type-tp_dealloc == (void *)EVP_dealloc) {
+Py_DECREF(type);
+}

Why?

--
nosy: +gregory.p.smith, loewis, pitrou

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



[issue15653] PEP 3121, 384 refactoring applied to hashopenssl module

2012-08-14 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
stage:  - patch review

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



[issue15653] PEP 3121, 384 refactoring applied to hashopenssl module

2012-08-14 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Something else:

+#define _hashlibstate(o) ((_hashlibstate *)PyModule_GetState(o))

It is really bad style to #define a symbol that shadows another symbol.
Since it's a #define, I would expect to be named something like STATE(o).

--

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



[issue15657] Error in Python 3 docs for PyMethodDef

2012-08-14 Thread Sandro Tosi

New submission from Sandro Tosi:

Hello,
it has been reported at 
http://mail.python.org/pipermail/docs/2012-April/008215.html but given it 
raises some question whether it's a bug in the doc or in the code, i'd rather 
report the issue here and hear what other think:


In the Python 3.2.2 documentation (and earlier Python 3 versions), in
the Python/C API Reference Manual, chapter Object Implementation
Support, the documentation for PyMethodDef says:

  The ml_flags field is a bitfield which can include the following
  flags. The individual flags indicate either a calling convention or a
  binding convention. Of the calling convention flags, only METH_VARARGS
  and METH_KEYWORDS can be combined (but note that METH_KEYWORDS alone
  is equivalent to METH_VARARGS | METH_KEYWORDS).

The bit in the parenthetical is incorrect.  If you take a look at
PyCFunction_Call in Objects/methodobject.c, you will find a switch for
METH_VARARGS | METH_KEYWORDS, but no switch for METH_KEYWORDS.  Hence,
using METH_KEYWORDS will land you with a SystemError that complains
about METH_OLDARGS.

This is either a bug in the documentation, or a bug in Python.  In this
case, since the code has persisted through three major revisions of
Python 3, I suggest that the bug _is_ in the documentation (whether it
should be or not), since changing the code for this at this late date
means a programmer has to use METH_VARARGS | METH_KEYWORDS anyway for
compatibility.

It may be work pointing out specifically in the documentation that just
using METH_KEYWORDS will not work.


--
assignee: docs@python
components: Documentation
messages: 168226
nosy: docs@python, sandro.tosi
priority: normal
severity: normal
stage: patch review
status: open
title: Error in Python 3 docs for PyMethodDef
versions: Python 3.2, Python 3.3

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



[issue15655] PEP 384 Refactoring applied to json module

2012-08-14 Thread Antoine Pitrou

Antoine Pitrou added the comment:

+// in case init is called multiple times within one interpreter,
+// we do not have to repeat all of the initialization

First, you shouldn't use C++-style comments (//).
Second, I find this comment a bit weird. Even if init is called a second time, 
surely clear would have been called in-between, and therefore the module state 
has to be initialized again?

Review comments from issue15653 also apply here.

--
nosy: +loewis, pitrou

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



[issue14649] doctest.DocTestSuite error misleading when module has no docstrings

2012-08-14 Thread Chris Jerdonek

Chris Jerdonek added the comment:

 Every doctest is docstring from tested module, but not every docstring is a 
 valid doctest.

Actually, I'm not sure even this is correct.  doctest will form a unittest 
*TestSuite* from a module if it has docstrings, but it will not necessarily 
create a test for each docstring.  You can see this by running code like the 
following on a target module that contains an empty docstring:

suite = doctest.DocTestSuite('doctest_target')
print(repr(suite))
print(suite.countTestCases())

which outputs--

unittest.suite.TestSuite tests=[]
0

So while tests (in the doctest code) evaluates to True (because it is a 
TestSuite instance), it still has no tests.  If it wants to check for tests, 
it should probably be evaluating tests.countTestCases(), as David suggested.

--

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



[issue15390] PEP 3121, 384 refactoring applied to datetime module

2012-08-14 Thread Antoine Pitrou

Antoine Pitrou added the comment:

+Py_CLEAR(_datetimemodulestate(m)-PyDateTime_DateTimeType);
+Py_CLEAR(_datetimemodulestate(m)-PyDateTime_DeltaType);
+Py_CLEAR(_datetimemodulestate(m)-PyDateTime_TimeType);
+Py_CLEAR(_datetimemodulestate(m)-PyDateTime_TimeZoneType);
+Py_CLEAR(_datetimemodulestate(m)-PyDateTime_DateType);
+Py_CLEAR(_datetimemodulestate(m)-PyDateTime_TZInfoType);

Style nit: I would really store the module state pointer in a variable here, 
instead of repeating _datetimemodulestate(m) every line.
(same in other places, such as the module init function)

+PyObject* _Get_State(struct PyModuleDef*);

I'm not sure why a module should define such generic a function, and especially 
not without a Py prefix.

Besides, review comments from issue15653 apply here.

--
nosy: +pitrou

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



[issue15654] PEP 384 Refactoring applied to bz2 module

2012-08-14 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Same review comments as in issue15653.

--
nosy: +pitrou

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



[issue15651] PEP 3121, 384 refactoring applied to elementtree module

2012-08-14 Thread Antoine Pitrou

Antoine Pitrou added the comment:

See issue15390 review comments :)

--
nosy: +eli.bendersky, pitrou
stage:  - patch review

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



[issue14649] doctest.DocTestSuite error misleading when module has no docstrings

2012-08-14 Thread Chris Jerdonek

Chris Jerdonek added the comment:

 I suspect the intent was to raise an error if there were no *tests*, not if 
 there were no docstrings.

That, or the implementor thought that if no docstrings were found, then that 
might indicate something went wrong with the parsing.

For background purposes, here is the justification in the code comment:

elif not tests:
# Why do we want to do this? Because it reveals a bug that might
# otherwise be hidden.
raise ValueError(module, has no tests)

 I have a couple of test runners in various projects that run doctest on *all* 
 modules

Same here, which is how I noticed the issue.

 So if anything I think this exception should be dropped.  If the report is 
 that no tests are run, that should be enough of an indication that something 
 is wrong

I would be in favor of this. The unittest module's test discovery, for example, 
does not raise an exception if it finds no tests (to my knowledge).  In what 
versions would we be able to make this change?

I could prepare another patch.

--

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



[issue14649] doctest.DocTestSuite error misleading when module has no docstrings

2012-08-14 Thread R. David Murray

R. David Murray added the comment:

That's a good question.  Perhaps you could argue for it as a bug fix since it 
doesn't seem to be documented either way...except for the 'exclude_empty' 
argument of testmod.  If testmod throws an error when there are no docstrings 
instead of returning a 0 test count or (if exclude_empty is true) skipping the 
module, then I think we can treat it as a bug and fix it in all active versions.

--

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



[issue15657] Error in Python 3 docs for PyMethodDef

2012-08-14 Thread Michael Welsh Duggan

Changes by Michael Welsh Duggan m...@sei.cmu.edu:


--
nosy: +md5i

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



[issue15653] PEP 3121, 384 refactoring applied to hashopenssl module

2012-08-14 Thread Robin Schreiber

Robin Schreiber added the comment:

Regarding the macro definition, I would be fine with changing it to 
_hashlib_state.

The dance you have found inside the Init, makes shure that the very same module 
is returned if Init is called twice or multiple times, before the Module is 
unloaded. A month back, when I created this patch, I had statements such as 
test.import.import_fresh_module(...) call the Init-method multiple times, 
before a module was unloaded. This was apparently a bug, as I can no longer 
reproduce this behavior, but at that time I thought it was the expected 
behavior :-)

The last code snipped verifies, that we only dereference the type if the 
dealloc function is not being called from inside the subtype_dealloc function. 
This is necessary because the subtype_dealloc function itself contains a decref 
of the respective type object. Without this check, we would then end up 
decrefing the type too many times.

--

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



[issue15653] PEP 3121, 384 refactoring applied to hashopenssl module

2012-08-14 Thread Antoine Pitrou

Antoine Pitrou added the comment:

 The last code snipped verifies, that we only dereference the type if
 the dealloc function is not being called from inside the
 subtype_dealloc function. This is necessary because the
 subtype_dealloc function itself contains a decref of the respective
 type object. Without this check, we would then end up decrefing the
 type too many times.

I still don't understand why it is required. You shouldn't have to
decref the type at all. Otherwise, it is a bug somewhere in Python
(typeobject.c perhaps).

--

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



[issue15655] PEP 384 Refactoring applied to json module

2012-08-14 Thread Robin Schreiber

Robin Schreiber added the comment:

Hey Antoine,

This comment describes exactly what I intended with the dance in issue15653. 
For example the json testsuite issued multiple calls to the init function 
before unloading and consequently clearing the module.
However it seems as if the behavior this code dealt with,
has been a bug inside the import lib.

--

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



[issue15654] PEP 384 Refactoring applied to bz2 module

2012-08-14 Thread Nadeem Vawda

Changes by Nadeem Vawda nadeem.va...@gmail.com:


--
nosy: +nadeem.vawda

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



[issue15653] PEP 3121, 384 refactoring applied to hashopenssl module

2012-08-14 Thread Robin Schreiber

Robin Schreiber added the comment:

Well, as I have changed the static type to a HeapType (as I am now using the 
stable ABI from PEP 384 for this type), we have to start perfoming proper 
reference counting with this object. This includes increfing the type in case a 
new object of that type is created, and decrefing if such an object is being 
deallocated.
As of now, I do not know of HeapTypes being excluded from refcounting.

--

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



[issue15655] PEP 384 Refactoring applied to json module

2012-08-14 Thread Robin Schreiber

Robin Schreiber added the comment:

Incidentally, I am deeply sorry for the C++-Style comments. I thought those 
would be detected by the patchcheck.py.

--

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



[issue15653] PEP 3121, 384 refactoring applied to hashopenssl module

2012-08-14 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Le mardi 14 août 2012 à 19:55 +, Robin Schreiber a écrit :
 As of now, I do not know of HeapTypes being excluded from refcounting.

No, but see http://bugs.python.org/issue15142
It's not obvious to me that the type should be explicitly decref'ed from the 
tp_dealloc function. This will make things more complicated for people willing 
to migrate their extensions to the stable ABI.

Also, all this is not documented at all :-(

--

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



[issue15653] PEP 3121, 384 refactoring applied to hashopenssl module

2012-08-14 Thread Robin Schreiber

Robin Schreiber added the comment:

As subtype_dealloc decref'ed the HeapType I thought the dealloc method was the 
most appropriate place to decrement the refcount of the type.
However you still agree that these types need to be recounted properly, don't 
you? In that case, where would you place the decref of the type?
I have talked with Martin v. Löwis about this issue, and I think he was quite 
comfortable with placing the decref inside the dealloc method.

--

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



[issue15653] PEP 3121, 384 refactoring applied to hashopenssl module

2012-08-14 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Le mardi 14 août 2012 à 20:16 +, Robin Schreiber a écrit :
 However you still agree that these types need to be recounted
 properly, don't you?

Yes, of course.

 In that case, where would you place the decref of the type?

That's a good question. Perhaps the DECREF mechanism / typeobject.c
should do it. Or perhaps PyType_FromSpec should place a stub which would
call the actual dealloc.

--

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



[issue15490] Correct __sizeof__ support for StringIO

2012-08-14 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Patch updated. Now private pyobjects (readnl, accu) counted.

Note all three patches rather different.

--
Added file: http://bugs.python.org/file26810/stringio_sizeof-3.3_2.patch

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



[issue15490] Correct __sizeof__ support for StringIO

2012-08-14 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


Added file: http://bugs.python.org/file26811/stringio_sizeof-3.2_2.patch

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



[issue15490] Correct __sizeof__ support for StringIO

2012-08-14 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


Added file: http://bugs.python.org/file26812/stringio_sizeof-2.7_2.patch

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



[issue15604] PyObject_IsTrue failure checks

2012-08-14 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Patches updated to reflect Antoine's comments.

--
Added file: http://bugs.python.org/file26813/istrue_check-3.3_2.patch
Added file: http://bugs.python.org/file26814/istrue_check-3.2_2.patch
Added file: http://bugs.python.org/file26815/istrue_check-2.7_2.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15604
___diff -r e2e85ed7f8ba Modules/_csv.c
--- a/Modules/_csv.cTue Aug 14 18:42:54 2012 +0300
+++ b/Modules/_csv.cWed Aug 15 00:36:48 2012 +0300
@@ -196,8 +196,12 @@
 {
 if (src == NULL)
 *target = dflt;
-else
-*target = PyObject_IsTrue(src);
+else {
+int b = PyObject_IsTrue(src);
+if (b  0)
+return -1;
+*target = b;
+}
 return 0;
 }
 
diff -r e2e85ed7f8ba Modules/_io/textio.c
--- a/Modules/_io/textio.c  Tue Aug 14 18:42:54 2012 +0300
+++ b/Modules/_io/textio.c  Wed Aug 15 00:36:48 2012 +0300
@@ -1056,8 +1056,11 @@
 res = _PyObject_CallMethodId(buffer, PyId_seekable, NULL);
 if (res == NULL)
 goto error;
-self-seekable = self-telling = PyObject_IsTrue(res);
+r = PyObject_IsTrue(res);
 Py_DECREF(res);
+if (r  0)
+goto error;
+self-seekable = self-telling = r;
 
 self-has_read1 = _PyObject_HasAttrId(buffer, PyId_read1);
 
diff -r e2e85ed7f8ba Modules/_posixsubprocess.c
--- a/Modules/_posixsubprocess.cTue Aug 14 18:42:54 2012 +0300
+++ b/Modules/_posixsubprocess.cWed Aug 15 00:36:48 2012 +0300
@@ -503,7 +503,7 @@
 subprocess_fork_exec(PyObject* self, PyObject *args)
 {
 PyObject *gc_module = NULL;
-PyObject *executable_list, *py_close_fds, *py_fds_to_keep;
+PyObject *executable_list, *py_fds_to_keep;
 PyObject *env_list, *preexec_fn;
 PyObject *process_args, *converted_args = NULL, *fast_args = NULL;
 PyObject *preexec_fn_args_tuple = NULL;
@@ -518,15 +518,14 @@
 Py_ssize_t arg_num;
 
 if (!PyArg_ParseTuple(
-args, OOiiO:fork_exec,
-process_args, executable_list, py_close_fds, py_fds_to_keep,
+args, OOpOOOiiO:fork_exec,
+process_args, executable_list, close_fds, py_fds_to_keep,
 cwd_obj, env_list,
 p2cread, p2cwrite, c2pread, c2pwrite,
 errread, errwrite, errpipe_read, errpipe_write,
 restore_signals, call_setsid, preexec_fn))
 return NULL;
 
-close_fds = PyObject_IsTrue(py_close_fds);
 if (close_fds  errpipe_write  3) {  /* precondition */
 PyErr_SetString(PyExc_ValueError, errpipe_write must be = 3);
 return NULL;
diff -r e2e85ed7f8ba Modules/_ssl.c
--- a/Modules/_ssl.cTue Aug 14 18:42:54 2012 +0300
+++ b/Modules/_ssl.cWed Aug 15 00:36:48 2012 +0300
@@ -1037,15 +1037,15 @@
 PyObject *retval = NULL;
 int len;
 int verification;
-PyObject *binary_mode = Py_None;
+int binary_mode = 0;
 
-if (!PyArg_ParseTuple(args, |O:peer_certificate, binary_mode))
+if (!PyArg_ParseTuple(args, |p:peer_certificate, binary_mode))
 return NULL;
 
 if (!self-peer_cert)
 Py_RETURN_NONE;
 
-if (PyObject_IsTrue(binary_mode)) {
+if (binary_mode) {
 /* return cert in DER-encoded format */
 
 unsigned char *bytes_buf = NULL;
diff -r e2e85ed7f8ba Modules/itertoolsmodule.c
--- a/Modules/itertoolsmodule.c Tue Aug 14 18:42:54 2012 +0300
+++ b/Modules/itertoolsmodule.c Wed Aug 15 00:36:48 2012 +0300
@@ -1105,11 +1105,13 @@
 }
 ok = PyObject_IsTrue(good);
 Py_DECREF(good);
-if (!ok) {
+if (ok == 0) {
 lz-start = 1;
 return item;
 }
 Py_DECREF(item);
+if (ok  0)
+return NULL;
 }
 }
 
@@ -1124,7 +1126,7 @@
 dropwhile_setstate(dropwhileobject *lz, PyObject *state)
 {
 int start = PyObject_IsTrue(state);
-if (start == -1)
+if (start  0)
 return NULL;
 lz-start = start;
 Py_RETURN_NONE;
@@ -1270,10 +1272,11 @@
 }
 ok = PyObject_IsTrue(good);
 Py_DECREF(good);
-if (ok)
+if (ok == 1)
 return item;
 Py_DECREF(item);
-lz-stop = 1;
+if (ok == 0)
+lz-stop = 1;
 return NULL;
 }
 
@@ -1288,7 +1291,7 @@
 takewhile_reduce_setstate(takewhileobject *lz, PyObject *state)
 {
 int stop = PyObject_IsTrue(state);
-if (stop == -1)
+if (stop  0)
 return NULL;
 lz-stop = stop;
 Py_RETURN_NONE;
@@ -3536,7 +3539,7 @@
 if (ok == 1)
 return datum;
 Py_DECREF(datum);
-if (ok == -1)
+if (ok  0)
 return NULL;
 }
 }
@@ -3692,9 +3695,11 @@
 ok = PyObject_IsTrue(good);
 Py_DECREF(good);
 }
-if (!ok)
+if (ok == 0)
 return item;
 Py_DECREF(item);
+if (ok  0)
+return NULL;
 

[issue15658] Idle stopped working

2012-08-14 Thread Oskars

New submission from Oskars:

For some years I used Python with IDLE, including my Windows 7 machine.  In 
January IDLE stopped working.  Whenever I tried to open with file with IDLE, 
nothing happened.  No error message.  Nothing.

After some help from h...@python.org I typed at the command line 
C:\Python27\Lib\idlelib\idle.py -n and I got this error:
IO Error: [Errno 13] Permission denied: 
'C:\\Users\\Osk\\.idlerc\\recent-files.lst'

So I went to look at the directory .idlerc and found it empty.  No 
recent-files.lst. (Though it may be because it is a hidden file)

Now I think the problem is fixed - or at least for the time being.

I went to the admin identity and found that IDLE does open up there.  So I made 
a copy of the recent-files.lst file and emailed it to myself.  Then I went to 
my wife's identity.  And, again, IDLE opened OK.

Finally, I went back to my identity and renamed the file there to 
recent-files-H.lst.  Then I retrieved the file I had emailed to myself and 
placed it into the .idlerc directory of my account as recent-files.lst.

Suddenly I could open IDLE and run Python, as before!

The mystery remains - what happened?  When I compared the contents of the old 
recent-files.lst and the one I replace it with, the only difference I could 
find is that the old one had 17 entries, the new one had only one entry.

--
components: IDLE
messages: 168244
nosy: opapOj
priority: normal
severity: normal
status: open
title: Idle stopped working
type: crash
versions: Python 2.7

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



[issue15269] Document dircmp.left and dircmp.right

2012-08-14 Thread Chris Jerdonek

Chris Jerdonek added the comment:

Senthil, here is a recent e-mail and response in which I asked about 
documentation changes and adding tests during feature freeze:

http://mail.python.org/pipermail/python-dev/2012-July/121138.html

Also, here is a recent example of a documentation clarification that went into 
2.7, 3.2, and tip:

http://bugs.python.org/issue15554

Thanks again.

--

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



[issue14649] doctest.DocTestSuite error misleading when module has no docstrings

2012-08-14 Thread Chris Jerdonek

Chris Jerdonek added the comment:

The problem seems to be restricted only to DocTestSuite.  testmod and 
DocTestFinder both seem to work fine.  DocTestSuite calls DocTestFinder but not 
the other way around: nothing calls DocTestSuite.

If in certain versions we do not treat raising the exception as a bug (e.g. in 
already-released versions), then I am hoping we can at least document the 
behavior as a known issue in those versions and still change the exception 
message to be more accurate and helpful.

Aside from ensuring that docstrings are present, another way to work around the 
issue is to pass a DocTestFinder to DocTestSuite with exclude_empty set to 
False, as in the following code:

finder = DocTestFinder(exclude_empty=False)
suite = DocTestSuite(module, test_finder=finder)

Depending on what we decide for which versions, I am willing to create two 
patches: one for the documentation and exception message change (e.g. for 
stable versions), and another to drop raising the exception (e.g. for future 
versions).

--

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



[issue15204] Deprecate the 'U' open mode

2012-08-14 Thread Raymond Hettinger

Raymond Hettinger added the comment:

The only people affected by deprecating U are the people who are currently 
using it for some reason -- presumably they are expecting that it does 
something useful for their code.

Ideally, this proposed deprecation should be mentioned on python-dev so that 
those folks will have an opportunity to respond.

--
nosy: +rhettinger

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



[issue15543] central documentation for 'universal newlines'

2012-08-14 Thread R. David Murray

R. David Murray added the comment:

Yeah, we might as well be consistent, though it's not a big deal either way.  
I'd prefer that as a separate patch.

Any interest in backporting this to 2.7?  Being so close to final release on 
3.2 I think we can skip 3.2, unless you feel like doing it.

--

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



[issue15658] Idle stopped working

2012-08-14 Thread R. David Murray

R. David Murray added the comment:

I believe this is a duplicate of issue 4625.

--
nosy: +r.david.murray
resolution:  - duplicate
stage:  - committed/rejected
status: open - closed
superseder:  - IDLE won't open anymore, .idlerc unaccessible
type: crash - behavior

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



[issue15543] central documentation for 'universal newlines'

2012-08-14 Thread Chris Jerdonek

Chris Jerdonek added the comment:

Sure, I'd be happy to do both 2.7 and 3.2.  I can upload the patch for the 
default branch as a delta to apply after the 3.2 change has been forward-ported 
from 3.2 to default.  Thanks for taking an interest in this!

--
versions: +Python 2.7, Python 3.2

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



[issue15659] using os.fork() and import user's modules results in errors

2012-08-14 Thread Michael

New submission from Michael:

if I import any python script in the beginning of the code in then I haver next 
errors:

Error in atexit._run_exitfuncs:
Traceback (most recent call last):
  File /usr/lib/python2.7/atexit.py, line 24, in _run_exitfuncs
func(*targs, **kargs)
  File /usr/lib/python2.7/multiprocessing/util.py, line 295, in _exit_function
p.join()
  File /usr/lib/python2.7/multiprocessing/process.py, line 143, in join
assert self._parent_pid == os.getpid(), 'can only join a child process'
AssertionError: can only join a child process
Error in sys.exitfunc:
Traceback (most recent call last):
  File /usr/lib/python2.7/atexit.py, line 24, in _run_exitfuncs
func(*targs, **kargs)
  File /usr/lib/python2.7/multiprocessing/util.py, line 295, in _exit_function
p.join()
  File /usr/lib/python2.7/multiprocessing/process.py, line 143, in join
assert self._parent_pid == os.getpid(), 'can only join a child process'
AssertionError: can only join a child process

--
components: None
files: mydaemon.py
messages: 168251
nosy: michaeluc
priority: normal
severity: normal
status: open
title: using os.fork() and import user's modules results in errors
type: behavior
versions: Python 2.7
Added file: http://bugs.python.org/file26816/mydaemon.py

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



[issue15659] using os.fork() and import user's modules results in errors

2012-08-14 Thread R. David Murray

R. David Murray added the comment:

The example you uploaded doesn't call multiprocessing, yet the traceback you 
show does.  Can you provide more details on what you are actually doing?  Note 
that if you are importing a module that does a fork when it is imported, you 
are doing something wrong.

--
nosy: +r.david.murray

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



[issue15269] Document dircmp.left and dircmp.right

2012-08-14 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 7590dec388a7 by R David Murray in branch '3.2':
#15269: document dircmp.left and right, and add tests for them.
http://hg.python.org/cpython/rev/7590dec388a7

New changeset c592e5a8fa4f by R David Murray in branch 'default':
Merge #15269: document dircmp.left and right, and add tests for them.
http://hg.python.org/cpython/rev/c592e5a8fa4f

New changeset e64d4518b23c by R David Murray in branch '2.7':
#15269: document dircmp.left and right.
http://hg.python.org/cpython/rev/e64d4518b23c

--
nosy: +python-dev

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



[issue15269] Document dircmp.left and dircmp.right

2012-08-14 Thread R. David Murray

R. David Murray added the comment:

Thanks, Chris.

--
nosy: +r.david.murray
resolution:  - fixed
stage:  - committed/rejected
status: open - closed

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



[issue15586] Provide some examples for usage of ElementTree methods/attributes

2012-08-14 Thread Éric Araujo

Éric Araujo added the comment:

I noticed a long-standing typo in the latest commit: the country is named 
Liechtenstein :)

--
nosy: +eric.araujo

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



[issue15649] subprocess.Popen.communicate: accept str for input parameter if universal_newlines is False

2012-08-14 Thread Éric Araujo

Changes by Éric Araujo mer...@netwok.org:


--
nosy: +r.david.murray

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



[issue15657] Error in Python 3 docs for PyMethodDef

2012-08-14 Thread Jesús Cea Avión

Changes by Jesús Cea Avión j...@jcea.es:


--
nosy: +jcea

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



[issue15659] using os.fork() and import user's modules results in errors

2012-08-14 Thread Michael

Michael added the comment:

thanks David,
scripts which I imported were relying on some librarary which I did not 
understand. I was able to get rid of it and I don't have these errors any more. 
It was bug in my program. Thank you again.

--
resolution:  - fixed
status: open - closed

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



[issue15573] Support unknown formats in memoryview comparisons

2012-08-14 Thread Nick Coghlan

Nick Coghlan added the comment:

Yeah, as soon as I got your email I realised I'd only been searching for usage 
*in the patch* rather than the full file. Oops :(

More comments in the review.

--

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



[issue15660] In str.format there is a misleading error message about alignment

2012-08-14 Thread py.user

New submission from py.user:

 '{:02}'.format('a')
Traceback (most recent call last):
  File stdin, line 1, in module
ValueError: '=' alignment not allowed in string format specifier



according to http://docs.python.org/py3k/library/string.html#formatspec
the default alignment is '' or ''

--
components: Interpreter Core
messages: 168258
nosy: py.user
priority: normal
severity: normal
status: open
title: In str.format there is a misleading error message about alignment
type: behavior
versions: Python 3.2

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



[issue15660] In str.format there is a misleading error message about alignment

2012-08-14 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
nosy: +eric.smith, ezio.melotti
stage:  - needs patch
versions: +Python 2.7, Python 3.3, Python 3.4

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



[issue15660] In str.format there is a misleading error message about alignment

2012-08-14 Thread py.user

py.user added the comment:

found a small string in the doc about zero padding, which enables alignment 
equal to =

--
versions:  -Python 2.7, Python 3.3, Python 3.4

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



[issue13252] new decumulate() function in itertools module

2012-08-14 Thread Raymond Hettinger

Raymond Hettinger added the comment:

I also agree that the itertools module doesn't need this.  (Reasons of 
symmetry are insufficient to make the module fatter that it already is).  In 
addition, there are already a number of simple ways to do this.

--
resolution:  - rejected
status: open - closed

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