[issue12415] Missing: How to checkout the Doc sources

2011-06-26 Thread Philip Olson

New submission from Philip Olson phi...@roshambo.org:

I was unable to determine how to download the Python documentation source files 
(for building via Sphinx) but did figure out the following:

   hg clone http://hg.python.org/cpython
   cd cpython/Doc
   make html

Where to get the Doc sources deserves a mention here:

   http://docs.python.org/dev/documenting/building.html

I don't know this topic so won't propose a patch, but building.txt should 
mention where/how to get 'Doc' before the 'cd Doc' example.

--
assignee: docs@python
components: Documentation
messages: 139147
nosy: docs@python, philip
priority: normal
severity: normal
status: open
title: Missing: How to checkout the Doc sources

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



[issue12415] Missing: How to checkout the Doc sources

2011-06-26 Thread Sandro Tosi

Changes by Sandro Tosi sandro.t...@gmail.com:


--
nosy: +sandro.tosi

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



[issue12211] Better document math.copysign behavior.

2011-06-26 Thread Sandro Tosi

Sandro Tosi sandro.t...@gmail.com added the comment:

Taken from 
http://www.slac.stanford.edu/comp/unix/package/rtems/doc/html/libm/libm.info.copysign.html
 i'd suggest to extend

  Return a float with the magnitude of x

to

  Return a float with the magnitude (absolute value) of x

It could probably help people less math-savvy in understand what's going to 
happen :)

Maybe also (only in rest doc) might be nice to describe what happens in case 
the arguments are NaN, f.e.:

 import math
 x = float('nan')
 math.copysign(1., x)
1.0
 math.copysign(-1., x)
1.0
 math.copysign(x, -1)
nan
 math.copysign(x, x)
nan

umedoblock: would you like to expand the patch with these notes (unless someone 
objects :)).

--
nosy: +sandro.tosi
stage: needs patch - patch review

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



[issue12277] Missing comma in os.walk docs

2011-06-26 Thread Sandro Tosi

Sandro Tosi sandro.t...@gmail.com added the comment:

Marking the issue as pending (inferred from Éric msg): Éric, will this be in 
your July big-push? :)

--
nosy: +sandro.tosi
resolution:  - accepted
stage:  - commit review
status: open - pending

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



[issue12160] codecs doc: what is StreamCodec?

2011-06-26 Thread Sandro Tosi

Sandro Tosi sandro.t...@gmail.com added the comment:

Hi Victor, would you update the patch?

--
nosy: +sandro.tosi

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



[issue12291] file written using marshal in 3.2 can be read by 2.7, but not 3.2 or 3.3

2011-06-26 Thread engelbert gruber

engelbert gruber grub...@users.sourceforge.net added the comment:

add interleaved writing to the same file (which might happen or not?)

the tests pass when vinay's marshal.c is applied.

sorry for another patch

--
Added file: 
http://bugs.python.org/file22479/multiple_dump_load_read_write_test.patch

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



Re: [issue9720] zipfile writes incorrect local file header for large files in zip64

2011-06-26 Thread goodwin.gt



 Alan McIntyre alan.mcint...@gmail.com added the comment:
 
 Here's an updated patch for the py3k trunk with tests.  This pretty much
 doubles the runtime of test_zipfile64.py.  The patch also removes some
 unnecessary code from the existing test_zipfile64 tests.
 

Hello Alan

I've faced this problem too.
I start packing a 4.73GB file, and receive the struct error as follows:

1) Python 2.7.2 production:

...
  File C:\Python27\lib\zipfile.py, line 1100, in write
zinfo.file_size))
struct.error: integer out of range for 'L' format code

2) Python 3.2 production:

...
  File C:\Python32\lib\zipfile.py, line 1142, in write
zinfo.file_size))
struct.error: argument out of range



Environment: Windows 7 Ultimate 32bit

Everytime packing process fails at 4,981,808,577 byte

I need a patch for Python 2.7.2 .
Could you adapt your patch appropriately?

Thanks.

-- 
View this message in context: 
http://old.nabble.com/-issue9720--zipfile-writes-incorrect-local-file-header-for-large-files-in-zip64-tp29578646p31928738.html
Sent from the Python - python-bugs-list mailing list archive at Nabble.com.

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



[issue11669] Clarify Lang Ref Compound statements footnote

2011-06-26 Thread Roundup Robot

Roundup Robot devnull@devnull added the comment:

New changeset b11e7bc76d07 by Ezio Melotti in branch '2.7':
#11669: rephrase footnote in the Compound Statements page.
http://hg.python.org/cpython/rev/b11e7bc76d07

New changeset 74e9f94d8440 by Ezio Melotti in branch '3.2':
#11669: rephrase footnote in the Compound Statements page.
http://hg.python.org/cpython/rev/74e9f94d8440

New changeset a7099a3b5e5f by Ezio Melotti in branch 'default':
#11669: merge with 3.2.
http://hg.python.org/cpython/rev/a7099a3b5e5f

--
nosy: +python-dev

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



[issue11669] Clarify Lang Ref Compound statements footnote

2011-06-26 Thread Ezio Melotti

Ezio Melotti ezio.melo...@gmail.com added the comment:

Fixed, thanks for the patch!

--
assignee: docs@python - ezio.melotti
nosy: +ezio.melotti
resolution:  - fixed
stage: patch review - committed/rejected
status: open - closed

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



[issue12211] Better document math.copysign behavior.

2011-06-26 Thread umedoblock

umedoblock umedobl...@gmail.com added the comment:

sandro: OK, I attached the new patch.

--
Added file: http://bugs.python.org/file22480/issue_12211_2.patch

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



[issue11802] filecmp.cmp needs a documented way to clear cache

2011-06-26 Thread Raymond Hettinger

Raymond Hettinger raymond.hettin...@gmail.com added the comment:

After more thought, will just close this report.  If a new project emerges to 
improve the design of filecmp, it can be done in a separate tracker entry.

--
resolution: later - fixed
status: open - closed

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



[issue12352] multiprocessing.Value() hangs

2011-06-26 Thread Charles-François Natali

Charles-François Natali neolo...@free.fr added the comment:

[...]
 I don't like touching such global variable, but you are right.


Well, I don't like it either, but I can't really think of any other solution.
Antoine, any thought on that?

--

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



[issue9955] multiprocessing.Pipe segmentation fault when recv of unpicklable object

2011-06-26 Thread Kristian Vlaardingerbroek

Kristian Vlaardingerbroek kristian.vlaardingerbr...@gmail.com added the 
comment:

On Python 2.7.2 this can not be reproduced. Instead of the segmentation fault 
an AssertionError is raised:

AssertionError: invalid Element proxy at 39359432

In Python 3.2 the p1.send(n) step in the example raises a PicklingError when 
trying to pass an unpickable object.

Recommend closing this ticket.

--
nosy: +Kristian.Vlaardingerbroek

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



[issue9955] multiprocessing.Pipe segmentation fault when recv of unpicklable object

2011-06-26 Thread Charles-François Natali

Changes by Charles-François Natali neolo...@free.fr:


--
resolution:  - out of date
stage:  - committed/rejected
status: open - closed

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



[issue11363] Curses - add missing functions to doc

2011-06-26 Thread Sandro Tosi

Sandro Tosi sandro.t...@gmail.com added the comment:

As requested by Ezio, I'm attaching a pre-patch to bring curses doc a bit 
more adherent to current standards like by s/Returns/Return/ , ``True`` instead 
of true and so on. It applies ok on 3.3 and 3.2, on 2.7 a hunk is failing (but 
Ezio said it's fine this way :)).

After this patch is applies, the previous one (to add missing functs) can be 
applied.

--
nosy: +ezio.melotti
versions:  -Python 3.1
Added file: http://bugs.python.org/file22481/curses_doc_update.diff

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



[issue11363] Curses - add missing functions to doc

2011-06-26 Thread Sandro Tosi

Sandro Tosi sandro.t...@gmail.com added the comment:

Still following Ezio suggestion, I've reworked a bit the original patch, 
attaching its -v2 .

--
Added file: http://bugs.python.org/file22482/curses_missing_functs-py3k-v2.patch

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



[issue12352] multiprocessing.Value() hangs

2011-06-26 Thread Charles-François Natali

Charles-François Natali neolo...@free.fr added the comment:

 You are probably right. Can't we use a lock-less list? list.append is
 atomic thanks to the GIL, isn't it? But I don't know how to implement
 the lock-less list consumer. It would be nice to have a function to
 remove and return the content of the list, an atomic content=mylist[:];
 del mylist[:] function.


While not just something like:
While True:
try:
block = list.pop()
except IndexError:
break
_free(block)

Lock-less lists are not strictly atomic (only on cPython), but I doubt
that gc.disable() is available and works on every Python interpreter
anyway...
So the idea would be:
- in free(), perform a trylock
- if trylock fails, append the block to a list of pending blocks to free
- if trylock succeeds, free the pending blocks and proceed as usual
(do the same thing in malloc())

--

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



[issue12413] make faulthandler dump traceback of child processes

2011-06-26 Thread Charles-François Natali

Charles-François Natali neolo...@free.fr added the comment:

 You mean that the tracebacks of children should be dumped on a timeout of the 
 parent? Or do you also want them on a segfault of the parent? In my 
 experience, the most common problem with the multiprocessing and subprocess 
 modules is the hang.


Well, a segfault is due to the current process (or sometimes to
external conditions like OOM, but that's not the point here), so it's
not really useful to dump tracebacks of child processes in that case.
I was more thinking about timeouts.

 The timeout is implemeted using a (C) thread in faulthandler. You can do more 
 in a thread than in a signal handler ;-) A hook may be added to faulthandler 
 to execute code specific to multiprocessing / subprocess.


Yes, but when the timeout expires, there's no guarantee about the
state of the interpreter (for example in issue #12352 it was the GC
that deadlocked), so I guess we can't do anything too fancy.

 In which case is Python the leader of the group? Is it the case by default? 
 Can we do something to ensure that in regrtest, in multiprocessing tests or 
 the multiprocessing module?


Yes, it's the case by default when you launch a process through a shell.

 The subprocess maintains a list of the create subprocesses: subprocess.alive, 
 but you need a reference a reference to this list (or you can access it using 
 the Python namespace, but it requires the GIL and you cannot trust the GIL on 
 a crash).
 Does multiprocessing maintain a list of child processes?

Yes, we don't have any guarantee about the interpreter's state, and
furthermore this won't work for processes calling fork() directly.

 subprocess can execute any program, not only Python. Send an arbitrary signal 
 to a child process can cause issues.


Well, faulthandler is disabled by default, no ?

 By the way, which signal do you want to send to the child processes? A test 
 may replace the signal handler of your signal (most test use SIGALRM and 
 SIGUSR1).


Hum, SIGTERM maybe? Don't you register some fatal signals by default?

--

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



[issue10181] Problems with Py_buffer management in memoryobject.c (and elsewhere?)

2011-06-26 Thread Stefan Krah

Stefan Krah stefan-use...@bytereef.org added the comment:

[Nick]
 Another idea we may want to revisit is the PyManagedBuffer concept,
 which would be a true PyObject that existed solely to simplify sharing
 of Py_buffer structs.

 If memoryview used such an object internally, then copying and slicing
 would be quite simple - just INCREF the managed buffer instance without
 letting the original source object know anything was going on.


I think this is the nicest solution since memoryview would then always 
have a proper base object. Do I understand correctly that PyManagedBuffer
should only handle 1-dimensional objects?


There is an additional point about slicing and sub-views:

I think slicing (esp. multidimensional slicing) would be greatly simplified
if we added a requirement for the *exporting* object to provide a sliced
view. (The same applies to sub-views, also see source comments below [1]).

For example, an exporting object could provide a sliced view by adding 
a getslicedbufferproc to PyBufferProcs:

int PyObject_GetSlicedBuffer(PyObject *obj, Py_buffer *view, int flags, 
PyObject *key);


By sliced view I mean that the exporting object changes buf, shape and 
strides. There are several advantages:
 
  o The invariant that all allocated memory in the buffer belongs
to the exporting object remains intact.

  o The responsibility for creating correct multidimensional sliced views
is shifted to the implementor of the exporting object.





[1] memoryobject.c: 
 
  /* XXX There should be an API to create a subbuffer */
  /* XXX:  This needs to be fixed so it actually returns a sub-view */

--
nosy: +skrah

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



[issue11363] Curses - add missing functions to doc

2011-06-26 Thread Roundup Robot

Roundup Robot devnull@devnull added the comment:

New changeset 3eb9c31a0b03 by Ezio Melotti in branch '2.7':
#11363: clean up curses doc.
http://hg.python.org/cpython/rev/3eb9c31a0b03

New changeset 3dc602b1f4a2 by Ezio Melotti in branch '2.7':
#11363: add missing functions from curses doc. Patch by Sandro Tosi.
http://hg.python.org/cpython/rev/3dc602b1f4a2

New changeset bb27baa1124a by Ezio Melotti in branch '3.2':
#11363: clean up curses doc.
http://hg.python.org/cpython/rev/bb27baa1124a

New changeset f852e2d556af by Ezio Melotti in branch '3.2':
#11363: add missing functions from curses doc. Patch by Sandro Tosi.
http://hg.python.org/cpython/rev/f852e2d556af

New changeset b879bad40154 by Ezio Melotti in branch 'default':
#11363: merge with 3.2.
http://hg.python.org/cpython/rev/b879bad40154

--
nosy: +python-dev

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



[issue11363] Curses - add missing functions to doc

2011-06-26 Thread Ezio Melotti

Ezio Melotti ezio.melo...@gmail.com added the comment:

Fixed, thanks for the patch!

--
assignee: docs@python - ezio.melotti
resolution:  - fixed
stage: patch review - committed/rejected
status: open - closed

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



[issue11682] PEP 380 reference implementation for 3.3

2011-06-26 Thread Andrew Svetlov

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


--
nosy: +asvetlov

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



[issue11253] autodocument first appearance of ctypes.wintypes constants

2011-06-26 Thread Mark Mc Mahon

Mark Mc Mahon mtnbikingm...@gmail.com added the comment:

This mostly a documentation concern - correct? ctypes.wintypes is sparsely 
documented - in 2.7 the help for it seems to be:
The ctypes.wintypes module provides quite some other Windows specific data 
types, for example HWND, WPARAM, or DWORD. Some useful structures like MSG or 
RECT are also defined.

How about the following solution:
First of all get the previous release information
 - hg log / hg revert / import wintypes / dir(wintypes)

Future changes have to be updated manually (which probably is not a big deal as 
it is a reasonably stable module)

In fact I went and got the revision when each attribute was added... (some of 
those are just ctypes leakage)
{36899: ['ARRAY',   'MSG',
 'ArgumentError',   'OLESTR',
 'Array',   'OleDLL',
 'BOOL','POINT',
 'BYTE','POINTER',
 'BigEndianStructure',  'POINTL',
 'DEFAULT_MODE','PYFUNCTYPE',
 'DWORD',   'PyDLL',
 'FILETIME','RECT',
 'FormatError', 'RECTL',
 'GetLastError','RGB',
 'HANDLE',  'RTLD_GLOBAL',
 'HDC', 'RTLD_LOCAL',
 'HGDIOBJ', 'SIZE',
 'HINSTANCE',   'SIZEL',
 'HKEY','SetPointerType',
 'HMENU',   'Structure',
 'HMODULE', 'ULARGE_INTEGER',
 'HPEN','ULONG',
 'HRESULT', 'Union',
 'HRGN','VARIANT_BOOL',
 'HTASK',   'WIN32_FIND_DATAA',
 'HWND','WIN32_FIND_DATAW',
 'LARGE_INTEGER',   'WINFUNCTYPE',
 'LCID','WORD',
 'LONG','WPARAM',
 'LPARAM',  'WinDLL',
 'LPCOLESTR',   'WinError',
 'LPCSTR',  'alignment',
 'LPCWSTR', 'get_errno',
 'LPOLESTR','get_last_error',
 'LPSTR',   'resize',
 'LPWSTR',  'set_conversion_mode',
 'LibraryLoader',   'set_errno',
 'LittleEndianStructure',   'set_last_error',
 'MAX_PATH',]

 38788: ['ATOM', 'HRSRC',
 'BOOLEAN',  'HSTR',
 'COLORREF', 'HWINSTA',
 'HACCEL',   'LANGID',
 'HBITMAP',  'LCTYPE',
 'HBRUSH',   'LGRPID',
 'HCOLORSPACE',  'SC_HANDLE',
 'HDESK','SERVICE_STATUS_HANDLE',
 'HDWP', 'SMALL_RECT',
 'HENHMETAFILE', '_COORD',
 'HFONT','_FILETIME',
 'HGLOBAL',  '_POINTL',
 'HHOOK','_RECTL',
 'HICON','_SMALL_RECT',
 'HKL',  'tagMSG',
 'HLOCAL',   'tagPOINT',
 'HMETAFILE','tagRECT',
 'HMONITOR', 'tagSIZE',
 'HPALETTE',]

 38830: ['DOUBLE',
 'UINT',
 'WCHAR',
 '_LARGE_INTEGER',
 '_SimpleCData',
 '_ULARGE_INTEGER',
 '__all__'],

 48320: ['FLOAT',
 'INT',
 'LPCVOID',
 'LPVOID',
 'SHORT',
 'USHORT']}

48320 - 2.7?
38830 - 2.5?
38788 - 2.5?
36899 - 2.4?

So we need a doc patch? Should we update the older 'What's new in Python 2.x' 
for added attribs?

--
nosy: +markm

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



[issue12326] Linux 3: tests should avoid using sys.platform == 'linux2'

2011-06-26 Thread Charles-François Natali

Charles-François Natali neolo...@free.fr added the comment:

 So people who say sys.platform shouldn't be used: what do you propose
 to do with Lib/plat-linux2 (or, more generally, Lib/plat-*)?

I can't speak, as I've never used those.
But can't those directories be renamed to Lib/plat-platform.system()?

As for the performance overhead, since the platform module caches the result of 
uname or other function/subprocess calls, I don't think it's a showstopper. 
Furthermore, I somehow doubt those functions are performance bottlenecks anyway.

Since Linux 3 is in RC now, is there a chance to reach a consensus in the near 
future?

--

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



[issue7744] Allow site.addsitedir insert to beginning of sys.path

2011-06-26 Thread Jonas Meurer

Jonas Meurer jo...@freesources.org added the comment:

I would be interested in that feature as well. It's currently impossible to use 
custom new versions of a python module by adding the directory with 
site.addsitedir in case a old version of the module is already installed in the 
python systemwide path.

--
nosy: +mejo
status: pending - open
versions: +Python 2.6

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



[issue11493] Add python.exe-gdb.py to .hgignore

2011-06-26 Thread Sandro Tosi

Sandro Tosi sandro.t...@gmail.com added the comment:

@Éric: it was introduced with issue8032 to easy debugging python with gdb
@Santoso: this was fixed in the 2.7 branch with 421c941c529f - closing.

--
nosy: +sandro.tosi
resolution:  - out of date
stage:  - committed/rejected
status: open - closed

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



[issue11457] Expose nanosecond precision from system calls

2011-06-26 Thread Martin v . Löwis

Martin v. Löwis mar...@v.loewis.de added the comment:

 any broken-down time has issues of time stamp ordering in the
 duplicate hour of switching from DST to normal time
 
 I understand that it is an issue of the datetime module. Can it be
 solved, or is there a design issue in the module?

It's an inherent flaw of broken-down time. Don't use that
representation; the only true representation of point-in-time
is seconds since the epoch, as a real number (IMO, of course).
Broken-down time has the advantage of being more easily human-readable,
but is (often deliberately) incomplete (with the notion of partial
time stamps) and text representations are difficult to parse.

 I don't have a strong opinion on this issue, I just wanted to know
 why datetime cannot be used for this issue.

It's a personal preference of me (the strong objection to broken-down
time representations). I believe this preference is widely shared,
though. Notice how advanced file systems (NTFS, ext2) use seconds-since-
the-epoch formats, whereas FAT uses broken-down time. Also notice how
the daytime protocol uses broken-down time, and NTP uses
seconds-since-the epoch. The major variation point in the latter is
whether second fractions are represented as a separate number of not;
this is also the issue here. NTP and NTFS use a single number; ext2
uses seconds/nanoseconds. Also notice that NTP does *not* have a unit
that is an integral power of ten, but units of 2**-32s (ca. 233ps).
NTP4 supports a resolution of 2**-64s. (To be fair, the way NTP
represents time stamps can also be interpreted as a pair of
second/subsecond integers).

--

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



[issue4608] urllib.request.urlopen does not return an iterable object

2011-06-26 Thread Roundup Robot

Roundup Robot devnull@devnull added the comment:

New changeset c0a68b948f5d by Raymond Hettinger in branch '3.2':
Issue #4608: urllib.request.urlopen does not return an iterable object
http://hg.python.org/cpython/rev/c0a68b948f5d

New changeset d4aeeddf72e3 by Raymond Hettinger in branch 'default':
Issue #4608: urllib.request.urlopen does not return an iterable object
http://hg.python.org/cpython/rev/d4aeeddf72e3

--
nosy: +python-dev

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



[issue4608] urllib.request.urlopen does not return an iterable object

2011-06-26 Thread Raymond Hettinger

Raymond Hettinger raymond.hettin...@gmail.com added the comment:

Thanks for the patch.

--
status: open - closed

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



[issue10181] Problems with Py_buffer management in memoryobject.c (and elsewhere?)

2011-06-26 Thread Nick Coghlan

Nick Coghlan ncogh...@gmail.com added the comment:

The idea of PyManagedBuffer is for it to be an almost completely passive object 
that *just* acts as a refcounted wrapper around the Py_buffer structure, so it 
doesn't care about the actual contents. The only supplemental functionality I 
think it should provide is to disallow explicitly releasing the buffer while 
the reference count is greater than 1. I'm OK with my example cited above being 
unreliable. The correct way to write such code would then be:

  with memoryview(obj) as m:
with m[:] as m2:
  ...

I think separating the concerns this way, letting PyManagedBuffer worry about 
the lifecycle issues of the underlying buffer reference, while PyMemoryView 
deals with the *interpretation* of the buffer description (such as by providing 
useful slicing functionality) will make the whole arrangement easier to handle. 
When a memoryview is sliced, it would create a new memoryview that has a 
reference to the same PyManagedBuffer object, but different internal state that 
affects how that buffer is accessed. This is better than requiring that every 
implementor of the buffer API worry about the slicing logic - we can do it 
right in memoryview and then implementers of producer objects don't have to 
worry about it.

Currently, however, memoryview gets tied up in knots since it is trying to do 
everything itself in a way that makes it unclear what is going on. The 
semantics of copying the Py_buffer struct or of accessing the PEP 3118 API on 
the underlying object when slicing or copying views are demonstrably broken. If 
we try to shoehorn reference counting semantics into the current object model, 
we would end up with two distinct modes of operation for memoryview:

  Direct: the view is directly accessing an underlying object via the PEP 3118 
API
  Indirect: the view has a reference to another memoryview object that it is 
using as a data source

That's complicated - hard to implement in the first place and hard to follow 
when reading the code. Adding the PyManagedBuffer object makes the object model 
more complex, but simplifies the runtime semantics: every memoryview instance 
will access a PyManagedBuffer object which takes care of the underlying PEP 
3118 details. Direct use of the PEP 3118 consumer API in 3rd party code will 
also be strongly discouraged, with PyManagedBuffer promoted as the preferred 
alternative (producers, of course, will still need to provide the raw Py_buffer 
data that PyManagedBuffer exposes).

At the Python level, I don't think it is necessary to expose a new object, so 
we can stick with Antoine's preferred model where memoryview is the only public 
API. My proposed new PyManagedBuffer object would just be about making life 
easier at the C level.

--

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



[issue10181] Problems with Py_buffer management in memoryobject.c (and elsewhere?)

2011-06-26 Thread Nick Coghlan

Nick Coghlan ncogh...@gmail.com added the comment:

I should also note that if memoryview ends up growing enough state to cope 
correctly with numpy-style multi-dimensional slicing, I'm actually OK with 
that. You could get a long way just using the array module to allocate a large 
chunk of memory and then a suitably enhanced memoryview to manipulate it as a 
multidimensional array.

That's a future concern, though - for now, the key task is to migrate to 
reliable, reference based semantics for Py_buffer management.

--

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



[issue8890] Use tempfile instead of /tmp in examples

2011-06-26 Thread Dave King

Dave King d...@davbo.org added the comment:

Spotted another use of /tmp/ in the logging howto. Attached a diff.

--
nosy: +davbo
Added file: http://bugs.python.org/file22483/tmp_logging_howto.diff

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



[issue11689] sqlite: Incorrect unit test fails to detect failure

2011-06-26 Thread Sandro Tosi

Sandro Tosi sandro.t...@gmail.com added the comment:

I've commented on the Rietveld review page - forgive me if I missed something 
and didn't get the patch meaning right.

--
nosy: +sandro.tosi
stage:  - patch review
versions: +Python 3.2

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



[issue8890] Use tempfile instead of /tmp in examples

2011-06-26 Thread Roundup Robot

Roundup Robot devnull@devnull added the comment:

New changeset 1ed71544fceb by Raymond Hettinger in branch '3.2':
Issue #8890: Remove /tmp from examples.
http://hg.python.org/cpython/rev/1ed71544fceb

New changeset fcf242243d46 by Raymond Hettinger in branch 'default':
Issue #8890: Remove /tmp from examples.
http://hg.python.org/cpython/rev/fcf242243d46

--
nosy: +python-dev

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



[issue8890] Use tempfile instead of /tmp in examples

2011-06-26 Thread Raymond Hettinger

Changes by Raymond Hettinger raymond.hettin...@gmail.com:


--
status: open - closed

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



[issue11895] pybench prep_times calculation error

2011-06-26 Thread Sandro Tosi

Changes by Sandro Tosi sandro.t...@gmail.com:


--
nosy: +sandro.tosi
resolution:  - accepted
stage:  - committed/rejected
status: open - closed

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



[issue1067702] urllib fails with multiple ftp transfers

2011-06-26 Thread Stefan Schwarzer

Stefan Schwarzer sschwar...@sschwarzer.net added the comment:

I was able to get some error output with the code of the OP. However, I only 
saw the opposite message, such as:

Retrieval of 
'ftp://ftp.gnome.org/pub/debian/dists/stable/main/source/Sources.bz2' failed 
with error: [Errno ftp error] 200 Switching to Binary mode.

I had to change the used FTP server and path because I had problems connecting 
to that server.

Even with the guidelines by the OP, I could trigger the bug only occasionally.

I converted the script to be executable with manual intervention (see 
attachment). Still, sometimes both files are also successfully downloaded in 
the second iteration (i. e. the outer iteration which downloads both files).

These results are from a test with Python 2.6.6. I plan to continue testing 
with the tip of the Python 2.7 branch.

--
nosy: +sschwarzer
title: urllib fails with multiple ftps - urllib fails with multiple ftp 
transfers
Added file: http://bugs.python.org/file22484/urllibftpbug-non-interactive.py

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



[issue1067702] urllib fails with multiple ftp transfers

2011-06-26 Thread Stefan Schwarzer

Stefan Schwarzer sschwar...@sschwarzer.net added the comment:

 I converted the script to be executable with manual intervention (see 
 attachment).

This should have been without manual intervention. :)

--

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



[issue12384] difflib.SequenceMatcher and Match: code and doc bugs

2011-06-26 Thread Raymond Hettinger

Raymond Hettinger raymond.hettin...@gmail.com added the comment:

Go head an patch the first self.matching_blocks to also return a named tuple.  
Also, correct any doctests or examples using these.

The docs could also mention that list of namedtuples with fields a, b, and size 
is returned by get_matching_blocks().

--
assignee: rhettinger - terry.reedy
priority: normal - low

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



[issue1067702] urllib fails with multiple ftp transfers

2011-06-26 Thread Stefan Schwarzer

Stefan Schwarzer sschwar...@sschwarzer.net added the comment:

I can confirm the bug for the Python 2.7 tip (changeset b11e7bc76d07) after 
using the script urllibftpbug-non-interactive.py.

--

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



[issue12211] Better document math.copysign behavior.

2011-06-26 Thread Sandro Tosi

Sandro Tosi sandro.t...@gmail.com added the comment:

well, what I actually meant is to describe the behavior in case one (or both) 
of the arguments is NaN (so not cutpasting the code), while the example was 
just provided as a quick reference.

--

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



[issue12134] json.dump much slower than dumps

2011-06-26 Thread Raymond Hettinger

Raymond Hettinger raymond.hettin...@gmail.com added the comment:

As Antoine and Eric stated, the module is working as intended and we don't 
document implementation details and generally stay away from talking about 
performance in the docs.

--
resolution:  - rejected
status: open - closed

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



[issue8890] Use tempfile instead of /tmp in examples

2011-06-26 Thread engelbert gruber

engelbert gruber grub...@users.sourceforge.net added the comment:

Assumption:

  /tmp is used in examples so the examples work 
  because /tmp is always writeable

module tempfile is for creating temporary files, the name of which is 
unimported, when a user is trying code from documentation it might be hard on 
him/her to additionally guess/save the random filenames.

``grep tmp -r CPython3.3/Doc`` (trimmed results and grouped)

* Doc/distutils/install.rst, Doc/install/install.rst:

  e.g. ``--install-base=/tmp`` 

  maybe ``--install-base=other-python-base-directory``
  if someone installs to another directory, one has a reason and 
  therefore knows the directory.

* all other e.g. ::

Doc/library/sqlite3.rst::file:`/tmp/example` file::
Doc/library/sqlite3.rst:   conn = sqlite3.connect('/tmp/example')

  use ``/tmp`` because it is writeable, but assuming the user wants
  to program i think it is not so big a burden to assume him/her to
  grasp the concept of directories, files and write protection.

  So either it can be left out, as in sqlite3.rst, maybe a file 
  extension would be more helpful, or replaced by a placeholder
  like ``my-log-directory`` or ``directory-for-tempfiles``.

  I am unsure about the  chars ?

list of files:

Doc/distutils/install.rst
Doc/documenting/fromlatex.rst
Doc/howto/logging-cookbook.rst
Doc/install/install.rst
Doc/library/atexit.rst
Doc/library/cgi.rst
Doc/library/imghdr.rst
Doc/library/mailcap.rst
Doc/library/nntplib.rst
Doc/library/optparse.rst
Doc/library/packaging.database.rst
Doc/library/packaging.pypi.simple.rst
Doc/library/pipes.rst
Doc/library/sqlite3.rst
Doc/library/tempfile.rst
Doc/library/trace.rst
Doc/library/zipimport.rst
Doc/tools/sphinxext/susp-ignored.csv
Doc/tutorial/inputoutput.rst

So which way ?

--
nosy: +grubert

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



[issue11469] Fix resource warning in test_trailers

2011-06-26 Thread Sandro Tosi

Sandro Tosi sandro.t...@gmail.com added the comment:

This has been fixed by Brett in 9050675cb94e .

--
nosy: +sandro.tosi
resolution:  - accepted
stage:  - committed/rejected
status: open - closed

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



[issue1067702] urllib fails with multiple ftp transfers

2011-06-26 Thread Stefan Schwarzer

Stefan Schwarzer sschwar...@sschwarzer.net added the comment:

After running the adapted test script three times for Python 3 tip (changeset 
c5b0585624ef), I didn't get an error message / exception.

--
Added file: http://bugs.python.org/file22485/urllibftpbug-non-interactive-py3.py

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



[issue1067702] urllib fails with multiple ftp transfers

2011-06-26 Thread Stefan Schwarzer

Stefan Schwarzer sschwar...@sschwarzer.net added the comment:

The traceback and its context for the exception raised in Python 2.7 is:

...
###
 99 %
###
 99 %

 100 %
Done retrieving 
'ftp://ftp.gnome.org/pub/debian/dists/stable/main/source/Sources.bz2'; read 
4539023 bytes
Start retrieving 
'ftp://ftp.gnome.org/pub/debian/dists/stable/main/source/Sources.bz2'
Start retrieving 
'ftp://ftp.gnome.org/pub/debian/dists/stable/main/source/Sources.bz2'
Retrieval of 
'ftp://ftp.gnome.org/pub/debian/dists/stable/main/source/Sources.bz2' failed 
with error: [Errno ftp error] 200 Switching to Binary mode.
Traceback (most recent call last):
  File urllibftpbug-non-interactive.py, line 62, in _getTask
self._fromFile = urllib.urlopen(self.fromURL)
  File /home/schwa/sd/python/cpython/Lib/urllib.py, line 84, in urlopen
return opener.open(url)
  File /home/schwa/sd/python/cpython/Lib/urllib.py, line 205, in open
return getattr(self, name)(url)
  File /home/schwa/sd/python/cpython/Lib/urllib.py, line 548, in open_ftp
(fp, retrlen) = self.ftpcache[key].retrfile(file, type)
  File /home/schwa/sd/python/cpython/Lib/urllib.py, line 886, in retrfile
conn = self.ftp.ntransfercmd(cmd)
  File /home/schwa/sd/python/cpython/Lib/ftplib.py, line 326, in ntransfercmd
host, port = self.makepasv()
  File /home/schwa/sd/python/cpython/Lib/ftplib.py, line 304, in makepasv
host, port = parse227(self.sendcmd('PASV'))
  File /home/schwa/sd/python/cpython/Lib/ftplib.py, line 790, in parse227
raise error_reply, resp
IOError: [Errno ftp error] 200 Switching to Binary mode.
Total bytes: 4539023
 0 %
 0 %
 0 %
...

I printed the traceback by adding traceback.print_exc() at the end of the 
_getTask method:

except Exception, e:
self._cleanup(e)
traceback.print_exc()

--

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



[issue5950] Make zipimport work with zipfile containing comments

2011-06-26 Thread engelbert gruber

engelbert gruber grub...@users.sourceforge.net added the comment:

+1*4

--
nosy: +grubert

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



[issue11568] docstring of select.epoll.register() is wrong

2011-06-26 Thread Sandro Tosi

Sandro Tosi sandro.t...@gmail.com added the comment:

The patch is fine: but would you be interested in trying to write a unittest 
for select.epoll.register ? it would be really nice to start having 'select' 
tested (oh no, don't ask me how to test select since I have no idea :)).

--
nosy: +sandro.tosi
stage:  - patch review
versions: +Python 2.7, Python 3.2, Python 3.3

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



[issue11302] Add more tests to test_ast.py

2011-06-26 Thread Sandro Tosi

Sandro Tosi sandro.t...@gmail.com added the comment:

Hi Benjamin, we know have rietveld directly integrated in the tracker, so it 
might be time to add you comments? If you still can remember them, given it 
passed some time :)

--
nosy: +sandro.tosi
stage:  - patch review

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



[issue12038] assertEqual doesn't display newline differences quite well

2011-06-26 Thread mouad

mouad mouad...@gmail.com added the comment:

I took on consideration the two suggestion that was in the issue and create 
this patch that basically show only until the last character that differ and 
truncate the rest.

I just included one test case, other test case if they should be included (and 
if my solution got accepted :)), should be more *complex* and check using Regex 
the correctness of the assertion message, but here is the output that we can 
see when applying the patch:

 tc.assertEqual(x\n * 40 + \n, x\n * 40 + \r\n)

'x\nx\nx\nx\nx\nx\nx\nx\nx\nx\nx\nx\nx\n...nx\nx\nx\nx\nx\nx\nx\nx\nx\nx\nx\nx\n\n
 [truncated]... != 
'x\nx\nx\nx\nx\nx\nx\nx\nx\nx\nx\nx\nx\n...\nx\nx\nx\nx\nx\nx\nx\nx\nx\nx\nx\n\r
 [truncated]...
  x
  x
  x
  x
  x
  x
  x
  x
  x
  x
  x
  x
  x
  x
  x
  x
  x
  x
  x
  x
  x
  x
  x
  x
  x
  x
  x
  x
  x
  x
  x
  x
  x
  x
  x
  x
  x
  x
  x
  x
- 
+ 


 tc.assertEqual('', 'abbb')

AssertionError: 'aa [truncated]... != 'ab [truncated]...
- 
+ abbb

 tc.assertEqual('', '')

AssertionError: 'a [truncated]... != 'b [truncated]...
- 
+ 

 tc.assertEqual(x\n * 80 + \n, x\n * 80 + \r)

AssertionError: 
'x\nx\nx\nx\nx\nx\nx\nx\nx\nx\nx\nx\nx\n...nx\nx\nx\nx\nx\nx\nx\nx\nx\nx\nx\nx\n\n
 [truncated]... != 
'x\nx\nx\nx\nx\nx\nx\nx\nx\nx\nx\nx\nx\n...nx\nx\nx\nx\nx\nx\nx\nx\nx\nx\nx\nx\n\r
 [truncated]...

--
keywords: +patch
nosy: +mouad
Added file: http://bugs.python.org/file22486/issue-12038.patch

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



[issue12211] Better document math.copysign behavior.

2011-06-26 Thread Terry J. Reedy

Terry J. Reedy tjre...@udel.edu added the comment:

I agree with adding '(absolute value)'. I think the following covers the NaN 
behavior. NaN acts as a positive value that cannot be negated. This should be 
added to both doc and docstring.

I do not think we generally specify the nan behavior for each function, but it 
usually follows general rules. The copysign(x,nan) behavior is not obvious as 
nan, like int 0, does not really have a sign. One might expect 
copysign(-1.0,nan) to be -1.

--

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



[issue5950] Make zipimport work with zipfile containing comments

2011-06-26 Thread Terry J. Reedy

Terry J. Reedy tjre...@udel.edu added the comment:

Brett, Nick, this could be considered a patch to the import machinery as the 
bugs shows with a import statement. In any case, no one is signed up for 
zipimport specifically.

--
nosy: +brett.cannon, ncoghlan
versions: +Python 3.3 -Python 3.2

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



[issue10181] Problems with Py_buffer management in memoryobject.c (and elsewhere?)

2011-06-26 Thread Petri Lehtinen

Changes by Petri Lehtinen pe...@digip.org:


--
nosy: +petri.lehtinen

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



[issue10583] Encoding issue with chm help in 2.7.1

2011-06-26 Thread flashk

flashk fla...@gmail.com added the comment:

Yes, I still notice this issue with the 2.7.2 release.

As I mentioned earlier, I did not notice this problem with 2.7. Were there any 
significant changes to the docs between 2.7 and 2.7.1?

Considering the bug with HTML Help pointed out by Kristian, I'm thinking there 
was either a change in the html encoding or the build environment for the 
Windows installer. Anybody aware of either of these changes happening between 
2.7 and 2.7.1?

--

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



[issue12255] A few changes to .*ignore

2011-06-26 Thread Senthil Kumaran

Senthil Kumaran sent...@uthcode.com added the comment:

On Sat, Jun 25, 2011 at 08:38:04PM +, Senthil Kumaran wrote:
  As I am not affected by remains of .rej and .orig (neither have I
  found their usefulness (yet)), so my concerns can be stepped over. 

Just a side-note. I wondered why is my case so, and I realized that I
had integrated k3diff to handle any conflicts during merge so when a
conflict arises, it immediately invokes k3diff and it allowed me to
handle the conflicts giving me the contexts which are stored in .rej
files.

--

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



[issue12303] expose sigwaitinfo() and sigtimedwait() in the signal module

2011-06-26 Thread Ross Lagerwall

Ross Lagerwall rosslagerw...@gmail.com added the comment:

From the FreeBSD 6.4 buildbot:

[172/356/2] test_signal
error: 'NoneType' object has no attribute 'si_signo'
error: False is not true
test test_signal failed -- multiple errors occurred; run in verbose mode for 
details
Re-running test test_signal in verbose mode
test_getsignal (test.test_signal.PosixTests) ... ok
test_out_of_range_signal_number_raises_error (test.test_signal.PosixTests) ... 
ok
test_setting_signal_handler_to_none_raises_error (test.test_signal.PosixTests) 
... ok
test_main (test.test_signal.InterProcessSignalTests) ... skipped 'inter process 
signals not reliable (do not mix well with threading) on freebsd6'
test_pending (test.test_signal.WakeupSignalTests) ... ok
test_pthread_kill_main_thread (test.test_signal.WakeupSignalTests) ... ok
test_signum (test.test_signal.WakeupSignalTests) ... ok
test_wakeup_fd_during (test.test_signal.WakeupSignalTests) ... ok
test_wakeup_fd_early (test.test_signal.WakeupSignalTests) ... ok
test_siginterrupt_off (test.test_signal.SiginterruptTest) ... ok
test_siginterrupt_on (test.test_signal.SiginterruptTest) ... ok
test_without_siginterrupt (test.test_signal.SiginterruptTest) ... ok
test_itimer_exc (test.test_signal.ItimerTest) ... ok
test_itimer_prof (test.test_signal.ItimerTest) ... skipped 'itimer not reliable 
(does not mix well with threading) on freebsd6'
test_itimer_real (test.test_signal.ItimerTest) ... ok
test_itimer_virtual (test.test_signal.ItimerTest) ... skipped 'itimer not 
reliable (does not mix well with threading) on some BSDs.'
test_issue9324 (test.test_signal.WindowsSignalTests) ... skipped 'Windows 
specific'
test_pthread_kill (test.test_signal.PendingSignalsTests) ... ok
test_pthread_sigmask (test.test_signal.PendingSignalsTests) ... ok
test_pthread_sigmask_arguments (test.test_signal.PendingSignalsTests) ... ok
test_sigpending (test.test_signal.PendingSignalsTests) ... ok
test_sigpending_empty (test.test_signal.PendingSignalsTests) ... ok
test_sigtimedwait (test.test_signal.PendingSignalsTests) ... ok
test_sigtimedwait_negative_timeout (test.test_signal.PendingSignalsTests) ... ok
test_sigtimedwait_poll (test.test_signal.PendingSignalsTests) ... error: 
'NoneType' object has no attribute 'si_signo'
FAIL
test_sigtimedwait_timeout (test.test_signal.PendingSignalsTests) ... ok
test_sigwait (test.test_signal.PendingSignalsTests) ... ok
test_sigwait_thread (test.test_signal.PendingSignalsTests) ... ok
test_sigwaitinfo (test.test_signal.PendingSignalsTests) ... ok
test_sigwaitinfo_interrupted (test.test_signal.PendingSignalsTests) ... error: 
False is not true
FAIL

==
FAIL: test_sigtimedwait_poll (test.test_signal.PendingSignalsTests)
--
Traceback (most recent call last):
  File 
/usr/home/db3l/buildarea/3.x.bolen-freebsd/build/Lib/test/test_signal.py, 
line 685, in test_sigtimedwait_poll
self.wait_helper(test, self.handler, signal.SIGALRM)
  File 
/usr/home/db3l/buildarea/3.x.bolen-freebsd/build/Lib/test/test_signal.py, 
line 645, in wait_helper
self.assertEqual(os.waitpid(pid, 0), (pid, 0))
AssertionError: Tuples differ: (55455, 256) != (55455, 0)

First differing element 1:
256
0

- (55455, 256)
? ^^^

+ (55455, 0)
? ^


==
FAIL: test_sigwaitinfo_interrupted (test.test_signal.PendingSignalsTests)
--
Traceback (most recent call last):
  File 
/usr/home/db3l/buildarea/3.x.bolen-freebsd/build/Lib/test/test_signal.py, 
line 721, in test_sigwaitinfo_interrupted
self.wait_helper(test, self.alarm_handler, signal.SIGUSR1)
  File 
/usr/home/db3l/buildarea/3.x.bolen-freebsd/build/Lib/test/test_signal.py, 
line 645, in wait_helper
self.assertEqual(os.waitpid(pid, 0), (pid, 0))
AssertionError: Tuples differ: (55460, 256) != (55460, 0)

First differing element 1:
256
0

- (55460, 256)
? ^^^

+ (55460, 0)
? ^





@Victor, you've had some experience with fixing signals on the FreeBSD 6 
buildbot.
Have you got any ideas as to what the cause of this may be?

--

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



[issue6721] Locks in python standard library should be sanitized on fork

2011-06-26 Thread Terry J. Reedy

Changes by Terry J. Reedy tjre...@udel.edu:


--
versions:  -Python 3.1

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



[issue6717] Some problem with recursion handling

2011-06-26 Thread Terry J. Reedy

Changes by Terry J. Reedy tjre...@udel.edu:


--
versions: +Python 3.3 -Python 3.1

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



[issue8743] set() operators don't work with collections.Set instances

2011-06-26 Thread Terry J. Reedy

Changes by Terry J. Reedy tjre...@udel.edu:


--
versions: +Python 3.3 -Python 3.1

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



[issue1669349] make install fails if no previous Python installation

2011-06-26 Thread Terry J. Reedy

Terry J. Reedy tjre...@udel.edu added the comment:

I am closing this because none of the reports are for current versions (2.7,3.2)

--
nosy: +terry.reedy
resolution:  - out of date
status: open - closed
versions: +Python 3.3 -Python 3.1

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



[issue1475523] gettext breaks on plural-forms header

2011-06-26 Thread Terry J. Reedy

Changes by Terry J. Reedy tjre...@udel.edu:


--
versions: +Python 3.3 -Python 3.1

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



[issue11726] linecache becomes specific to Python scripts in Python 3

2011-06-26 Thread Terry J. Reedy

Changes by Terry J. Reedy tjre...@udel.edu:


--
versions:  -Python 3.1

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



[issue4924] gc.collect() won't always collect as expected

2011-06-26 Thread Terry J. Reedy

Changes by Terry J. Reedy tjre...@udel.edu:


--
versions: +Python 3.2, Python 3.3 -Python 3.0, Python 3.1

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



[issue4924] gc.collect() won't always collect as expected

2011-06-26 Thread Terry J. Reedy

Changes by Terry J. Reedy tjre...@udel.edu:


--
versions:  -Python 2.6

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



[issue4672] Distutils SWIG support blocks use of SWIG -outdir option

2011-06-26 Thread Terry J. Reedy

Changes by Terry J. Reedy tjre...@udel.edu:


--
versions: +Python 3.2 -Python 2.6, Python 3.0, Python 3.1

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



[issue5159] Indicating packages to be loaded when a Tcl interpreter is created in tkinter

2011-06-26 Thread Terry J. Reedy

Changes by Terry J. Reedy tjre...@udel.edu:


--
type:  - feature request
versions: +Python 3.3 -Python 2.7, Python 3.1

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



[issue5225] OS X Update Shell Profile may not update $PATH if run more than once

2011-06-26 Thread Terry J. Reedy

Changes by Terry J. Reedy tjre...@udel.edu:


--
versions: +Python 3.2, Python 3.3 -Python 3.0, Python 3.1

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



[issue5225] OS X Update Shell Profile may not update $PATH if run more than once

2011-06-26 Thread Terry J. Reedy

Changes by Terry J. Reedy tjre...@udel.edu:


--
versions:  -Python 2.6

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



[issue5375] Unified locals/consts array + register-based instructions

2011-06-26 Thread Terry J. Reedy

Terry J. Reedy tjre...@udel.edu added the comment:

This a type of feature request and such a change would only go into a new 
version. Given the absence of response from djc, perhaps this should be closed 
as languishing-postponed?

--
nosy: +terry.reedy
versions: +Python 3.3 -Python 2.7, Python 3.1

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



[issue978604] wait_variable hangs at exit

2011-06-26 Thread Terry J. Reedy

Terry J. Reedy tjre...@udel.edu added the comment:

In 3.2, winxp, (with Tkinter = tkinter), I get
invalid command name 12277720callit
while executing
12277720callit
(after script)
and no new prompt and ^C ineffective. Had to kill command window.
With IDLE, get nothing and have to kill with Task Manager.
So confirmed for 3.x.

--
nosy: +terry.reedy
versions: +Python 3.2, Python 3.3 -Python 2.6, Python 3.1

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



[issue5661] asyncore should catch EPIPE while sending() and receiving()

2011-06-26 Thread Terry J. Reedy

Terry J. Reedy tjre...@udel.edu added the comment:

I am not marking 'test needed' since the problem is 'hardly reproducible'.

--
nosy: +stutzbach, terry.reedy -josiah.carlson
stage:  - patch review
versions: +Python 3.2, Python 3.3 -Python 2.6, Python 3.0, Python 3.1

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



[issue5619] Pass MS CRT debug flags into subprocesses

2011-06-26 Thread Terry J. Reedy

Changes by Terry J. Reedy tjre...@udel.edu:


--
versions: +Python 3.2, Python 3.3 -Python 3.1

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



[issue4591] 32-bits unsigned user/group identifier

2011-06-26 Thread Terry J. Reedy

Changes by Terry J. Reedy tjre...@udel.edu:


--
versions: +Python 3.2, Python 3.3 -Python 3.0, Python 3.1

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



[issue4591] 32-bits unsigned user/group identifier

2011-06-26 Thread Terry J. Reedy

Changes by Terry J. Reedy tjre...@udel.edu:


--
versions:  -Python 2.6

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



[issue12406] msi.py needs updating for Python 3.3

2011-06-26 Thread Martin v . Löwis

Martin v. Löwis mar...@v.loewis.de added the comment:

This looks fine, except for the Tk changes, which should not be made.

--

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



[issue5722] settimer / gettimer functionality on FreeBSD 6.3 (not 7.x)

2011-06-26 Thread Terry J. Reedy

Terry J. Reedy tjre...@udel.edu added the comment:

I am following Andrew's suggestion. This issue can serve as 'don't do that' doc.

The 3.2 README has been edited and slimmed down by Georg Brandl. It is limited 
to general build instructions. It would not be the place for such a nit. It 
does say You can pass many options to the configure script; run ./configure 
--help to find out more. I do not know if that gives system specific hints.

It seems to me that the wiki might be a place for system-specific instructions, 
with a page like BuildingWithFreeBSD, etc.

--
nosy: +terry.reedy
resolution:  - wont fix
status: open - closed
versions: +Python 3.2 -Python 3.1

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



[issue12406] msi.py needs updating for Python 3.3

2011-06-26 Thread Vinay Sajip

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

Thanks, Martin. I've realised there are more additions due to packaging - for 
example there is a whole set of wininst-X.Y[-amd64].exe files in 
Lib/packaging/command. I won't commit anything just yet - I've made the changes 
I need to my local branch for testing.

--
nosy: +eric.araujo

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



[issue12291] file written using marshal in 3.2 can be read by 2.7, but not 3.2 or 3.3

2011-06-26 Thread Vinay Sajip

Changes by Vinay Sajip vinay_sa...@yahoo.co.uk:


Added file: http://bugs.python.org/file22487/0feab4e7b27f.diff

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



[issue12382] [msilib] Obscure exception message when trying to open a non-existent MSI database

2011-06-26 Thread Martin v . Löwis

Martin v. Löwis mar...@v.loewis.de added the comment:

I'd add them to msierror, with no inclusion of the file name.

If you want the file name in the exception, you should uniformly apply this to 
all errors in OpenDatabase, and then subclass MSIError to, say, MSIOpenError 
which includes a .filename attribute.

--

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



[issue12291] file written using marshal in 3.2 can be read by 2.7, but not 3.2 or 3.3

2011-06-26 Thread Vinay Sajip

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

I've incorporated Engelbert's two patches into test_marshal.py in my sandbox 
fix branch. I coalesced them into a single additional test in the existing 
BugsTestCase.

--
type:  - behavior

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



[issue5700] io.FileIO calls flush() after file closed

2011-06-26 Thread Terry J. Reedy

Terry J. Reedy tjre...@udel.edu added the comment:

The original snippet works the same on 3.2.0. Was their any conclusion as to 
whether or not a change should be made?

--
nosy: +terry.reedy
versions: +Python 3.2, Python 3.3 -Python 3.1

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



[issue5875] test_distutils failing on OpenSUSE 10.3, Py3k

2011-06-26 Thread Terry J. Reedy

Changes by Terry J. Reedy tjre...@udel.edu:


--
versions: +Python 3.2 -Python 3.1

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



[issue12406] msi.py needs updating for Python 3.3

2011-06-26 Thread Vinay Sajip

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

BTW I made those Tcl/Tk changes because the instructions point to getting the 
files from the svn repository (using svn export), and they unpack into 
directories with a hyphen before the 8.

--

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



[issue1662] [patch] assert tp_traverse in PyType_GenericAlloc()

2011-06-26 Thread Terry J. Reedy

Changes by Terry J. Reedy tjre...@udel.edu:


--
versions: +Python 3.2, Python 3.3 -Python 3.1

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



[issue12414] getsizeof() on code objects is wrong

2011-06-26 Thread Martin v . Löwis

Martin v. Löwis mar...@v.loewis.de added the comment:

For composite objects, getsizeof should only return the memory of the object 
itself, and not that of other objects it refers to. the object itself 
definitely includes the struct of the object, and also definitely includes 
non-PyObject blocks uniquely referred to by the object. It definitely should 
not return objects it reports in gc.get_referents. It probably should include 
PyObjects not shared with any other object, and not accessible from outside of 
the object.

There are boundary cases, such as memory blocks which are not PyObject, but may 
be shared across objects, and PyObjects not reported in get_referents.

It seems this case is the latter: the PyObjects are not returned from 
get_referents, but are certainly available to Python, e.g. through co_code and 
co_consts.

I don't think there sizes should be added to the size of the PyObject, since 
otherwise accounting algorithms may account for it twice.

What's your use case for including it in the total size?

--
nosy: +loewis

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



[issue12326] Linux 3: tests should avoid using sys.platform == 'linux2'

2011-06-26 Thread Martin v . Löwis

Martin v. Löwis mar...@v.loewis.de added the comment:

 I can't speak, as I've never used those. But can't those directories
 be renamed to Lib/plat-platform.system()?

That would be incorrect for some systems. For example, FreeBSD does
change sets of symbolic constants across system releases (mostly
additions, but sometimes also removals). Back then, SunOS 4 and SunOS
5 were completely unrelated systems.

 Since Linux 3 is in RC now, is there a chance to reach a consensus in
 the near future?

Doesn't look like it.

--

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



[issue12413] make faulthandler dump traceback of child processes

2011-06-26 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

  In which case is Python the leader of the group? ...
 
 Yes, it's the case by default when you launch a process through a shell.

subprocess doesn't use a shell by default, and I don't think that
multiprocessing uses a shell to start Python.

  The subprocess maintains a list of the create subprocesses: 
  subprocess.alive, but you need a reference a reference to this list (or you 
  can access it using the Python namespace, but it requires the GIL and you 
  cannot trust the GIL on a crash).
  Does multiprocessing maintain a list of child processes?
 
 Yes, we don't have any guarantee about the interpreter's state, and
 furthermore this won't work for processes calling fork() directly.

I don't think that we can have a reliable, generic and portable solution
for this issue. I suggest to only focus on one use case (debug the
multiprocessing and/or subprocess module), and latter try to support
more cases.

I agree that interpreter state can be inconsistent, but faulthandler
does already use read the interpreter state. We cannot do better than
best effort. Well, it doesn't really matter if faulthandler crashs,
the program is already dying ;-)

To simplify the implementation, I propose to patch multiprocessing
and/or subprocess to register the pid of the child process in a list in
the faulthandler module.

It would be better if these modules unregister pid when a subprocess
exits, but it's not mandatory. We can send a signal to a non existant
process. In the worst case, on a heavy loaded computer, another process
may get the same pid, but it's unlikely. I'm quite sure that
multiprocessing and subprocess already handle the subprocess exit, so it
should be quite simply to add a hook.

  subprocess can execute any program, not only Python.
  Send an arbitrary signal to a child process can cause issues.
 Well, faulthandler is disabled by default, no ?

Yes, but I prefer to interfer with unrelated processes if it's possible.

  By the way, which signal do you want to send to the child processes?
 
 Hum, SIGTERM maybe? Don't you register some fatal signals by default?

faulthandler.enable() installs a signal handler for SIGSEGV, SIGBUS,
SIGILL and SIGABRT signals. (SIGKILL cannot be handled by the
application.)

  A test may replace the signal handler of your signal

Well, it's doesn't really matter. If one child process doesn't print the
traceback, you have less information, but it is unlikely and we may get
the information manually or by changing temporary the signal number.

--

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



[issue12406] msi.py needs updating for Python 3.3

2011-06-26 Thread Martin v . Löwis

Martin v. Löwis mar...@v.loewis.de added the comment:

 BTW I made those Tcl/Tk changes because the instructions point to
 getting the files from the svn repository (using svn export), and
 they unpack into directories with a hyphen before the 8.

Yes, that's unfortunate. These instructions are not correct (they
are not wrong, either); they don't support Tix, but Tix support
is required for the official releases.

--

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



[issue5895] socketmodule.c on HPUX ia64 without _XOPEN_SOURCE_EXTENDED compiles incorrectly

2011-06-26 Thread Terry J. Reedy

Terry J. Reedy tjre...@udel.edu added the comment:

Naoyuki, unless you can confirm that Daniel's patch works, we will have to 
close this as out-of-date.

Martin: PEP 11 lists platforms no-longer supported, but does not list those 
that are. For writing/reviewing patches like this, it would be helpful if it 
did. Is __hpux __ia64 a supported platform, so that this would be a legal 
patch? With the OP apparently not interested, there seems to be no one to test 
such patches.

--
nosy: +loewis, terry.reedy
versions: +Python 3.2, Python 3.3 -Python 2.6, Python 3.1

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



[issue5895] socketmodule.c on HPUX ia64 without _XOPEN_SOURCE_EXTENDED compiles incorrectly

2011-06-26 Thread Martin v . Löwis

Martin v. Löwis mar...@v.loewis.de added the comment:

 Martin: PEP 11 lists platforms no-longer supported, but does not list
 those that are.

You mean, doesn't list the platforms that are still supported?

That's on purpose: the point of PEP 11 is to warn current users about
forthcoming changes, not to track support status for specific platforms.

 For writing/reviewing patches like this, it would be
 helpful if it did. Is __hpux __ia64 a supported platform, so that
 this would be a legal patch? With the OP apparently not interested,
 there seems to be no one to test such patches.

Python never worked really well on HP-UX, but it worked in some form
for a long time. Don't know whether that makes it a supported
platform. Accepting patches for HP-UX is fine with me. It would be
better if some committer could confirm that the patch actually works,
and also confirm that it doesn't break other releases of HP-UX.

--
title: socketmodule.c  on HPUX ia64 without _XOPEN_SOURCE_EXTENDED compiles 
incorrectly - socketmodule.c on HPUX ia64 without  _XOPEN_SOURCE_EXTENDED 
compiles incorrectly

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



[issue12328] multiprocessing's overlapped PipeConnection on Windows

2011-06-26 Thread sbt

sbt shibt...@gmail.com added the comment:

sigint_event.patch is a patch to make
_multiprocessing.win32.WaitForMultipleObjects interruptible.  It
applies directly on to default.

The patch also adds functions _PyOS_SigintEvent and _PyOS_IsMainThread
which are implemented in signalmodule.c and declared in intrcheck.c.

_PyOS_SigintEvent returns a manual reset event (cast to void*) which
is set whenever SIGINT is received.  It is Windows only.

_PyOS_IsMainThread returns 0 or 1 according to whether the current
thread is the main thread.

The time and _multiprocessing modules have been updated to use these
functions.

Note that WaitForMultipleObjects has a bWaitAll parameter.  When this
is true, all handles in the array are waited for, and
WaitForMultipleObjects is not interruptible.

--
Added file: http://bugs.python.org/file22488/sigint_event.patch

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



[issue12392] pthread_kill() doesn't work on the main thread on FreeBSD6

2011-06-26 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@haypocalc.com:


--
resolution:  - fixed
status: open - closed

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



[issue3435] 3rd party program calls trace.py on non Python files

2011-06-26 Thread Terry J. Reedy

Terry J. Reedy tjre...@udel.edu added the comment:

The patch adds this check:

+   if not filename.endswith((.pyc, .pyo, .py)):
+continue

This is not valid. A Python file is a text file with python code. In spite of 
import conventions, they are not required to have any particular extension and 
some people omit them from main scripts. Trace works fine with such files now 
and your patch would prevent that. Python files are only identified as such by 
trying to parse them.

The problem and solution lie with your setup. Arrange things so Bitten only 
treats Python files as Python files.

--
nosy: +terry.reedy
resolution:  - invalid
stage: test needed - patch review
status: open - closed
title: trace.py tries to get coverage data from non Python files - 3rd party 
program calls trace.py on non Python files
versions: +Python 2.7, Python 3.2 -Python 2.6, Python 3.1

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



[issue12328] multiprocessing's overlapped PipeConnection on Windows

2011-06-26 Thread sbt

sbt shibt...@gmail.com added the comment:

I have noticed a few more problems.

* Because poll() isn't thread safe on Windows, neither is Queue.empty().  Since 
a queue's pipe will never contain empty messages, this can be fixed easily by 
using (a wrapper for) win32.PeekNamedPipe().

* PipeListener/PipeClient have not been updated to use overlapped I/O.

* If more than one process is to read from a pipe connection then (even with 
proper synchronisation) we cannot safely use poll() since it can leave a 
partial message in the pipe.

--

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



[issue3635] pickle.dumps cannot save instance of dict-derived class that overrides __getattribute__

2011-06-26 Thread Terry J. Reedy

Terry J. Reedy tjre...@udel.edu added the comment:

Should this be closed for the same reason #1730480 was?
If not, would this effectively be a feature request and have to wait for a new 
version (3.3)?

--
nosy: +alexandre.vassalotti, pitrou, terry.reedy
versions: +Python 2.7, Python 3.2 -Python 2.6, Python 3.1

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



[issue1067702] urllib fails with multiple ftp transfers

2011-06-26 Thread Roundup Robot

Roundup Robot devnull@devnull added the comment:

New changeset a4d418e8010d by Senthil Kumaran in branch '2.7':
Fix closes issue1067702  The problem with close multiple ftp transfers were due 
cases where sockets/file were not closed immediately. Tightned those cases and 
failure is no longer observed.
http://hg.python.org/cpython/rev/a4d418e8010d

--
nosy: +python-dev
resolution:  - fixed
stage: test needed - committed/rejected
status: open - closed

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



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

2011-06-26 Thread Terry J. Reedy

Changes by Terry J. Reedy tjre...@udel.edu:


--
stage:  - needs patch
versions: +Python 3.2, Python 3.3 -Python 3.1

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



[issue12303] expose sigwaitinfo() and sigtimedwait() in the signal module

2011-06-26 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

 @Victor, you've had some experience with fixing signals
 on the FreeBSD 6 buildbot...

It's not exactly that I had some experience, it's just that I have a SSH access 
to the buildbot.

The following code hangs for (exactly?) 30 seconds on sigwaitinfo():

import os, signal, threading
s = signal.SIGALRM
signal.pthread_sigmask(signal.SIG_BLOCK, [s])
os.kill(os.getpid(), s)
signal.sigwaitinfo([s])
signal.pthread_sigmask(signal.SIG_UNBLOCK, [s])

sigwait() and sigtimedwait() wait also 30 seconds.

The following code only hangs for 1 second using sigwait(), sigwaitinfo() or 
sigtimedwait():

import os, signal, threading
s = signal.SIGALRM
signal.pthread_sigmask(signal.SIG_BLOCK, [s])
os.kill(os.getpid(), s)
signal.sigwaitinfo([s])
signal.pthread_sigmask(signal.SIG_UNBLOCK, [s])


test_sigtimedwait_poll() should be skipped on FreeBSD 6, there is a bug in the 
OS.

test_sigwaitinfo_interrupted() fails because SIGALRM signal handler is called, 
and the default FreeBSD handler stops the process. You should install a dummy 
signal handler (e.g. lambda signum, frame: None) for SIGALRM. I don't 
understand why the test doesn't fail on Linux, the default handler of SIGALRM 
on Linux stops also the process.

--

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



[issue11870] test_3_join_in_forked_from_thread() of test_threading hangs 1 hour on x86 Ubuntu Shared 3.x

2011-06-26 Thread Charles-François Natali

Charles-François Natali neolo...@free.fr added the comment:

Patch attached.

--
Added file: http://bugs.python.org/file22489/test_threading_fork.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11870
___diff -r fca745bc70be Lib/test/test_threading.py
--- a/Lib/test/test_threading.pySat Jun 25 16:31:06 2011 +0200
+++ b/Lib/test/test_threading.pySun Jun 26 22:50:42 2011 +0200
@@ -418,6 +418,13 @@
 
 class ThreadJoinOnShutdown(BaseTestCase):
 
+# Between fork() and exec(), only async-safe functions are allowed (issues
+# #12316 and #11870), and fork() from a worker thread is known to trigger
+# problems with some operating systems (issue #3863): skip problematic 
tests
+# on platforms known to behave badly.
+platforms_to_skip = ('freebsd4', 'freebsd5', 'freebsd6', 'netbsd5',
+ 'os2emx')
+
 def _run_and_join(self, script):
 script = if 1:
 import sys, os, time, threading
@@ -448,6 +455,7 @@
 self._run_and_join(script)
 
 @unittest.skipUnless(hasattr(os, 'fork'), needs os.fork())
+@unittest.skipIf(sys.platform in platforms_to_skip, due to known OS bug)
 def test_2_join_in_forked_process(self):
 # Like the test above, but from a forked interpreter
 script = if 1:
@@ -464,15 +472,11 @@
 self._run_and_join(script)
 
 @unittest.skipUnless(hasattr(os, 'fork'), needs os.fork())
+@unittest.skipIf(sys.platform in platforms_to_skip, due to known OS bug)
 def test_3_join_in_forked_from_thread(self):
 # Like the test above, but fork() was called from a worker thread
 # In the forked process, the main Thread object must be marked as 
stopped.
 
-# Skip platforms with known problems forking from a worker thread.
-# See http://bugs.python.org/issue3863.
-if sys.platform in ('freebsd4', 'freebsd5', 'freebsd6', 'netbsd5',
-   'os2emx'):
-raise unittest.SkipTest('due to known OS bugs on ' + sys.platform)
 script = if 1:
 main_thread = threading.current_thread()
 def worker():
@@ -498,15 +502,11 @@
 self.assertEqual(data, expected_output)
 
 @unittest.skipUnless(hasattr(os, 'fork'), needs os.fork())
+@unittest.skipIf(sys.platform in platforms_to_skip, due to known OS bug)
 def test_4_joining_across_fork_in_worker_thread(self):
 # There used to be a possible deadlock when forking from a child
 # thread.  See http://bugs.python.org/issue6643.
 
-# Skip platforms with known problems forking from a worker thread.
-# See http://bugs.python.org/issue3863.
-if sys.platform in ('freebsd4', 'freebsd5', 'freebsd6', 'os2emx'):
-raise unittest.SkipTest('due to known OS bugs on ' + sys.platform)
-
 # The script takes the following steps:
 # - The main thread in the parent process starts a new thread and then
 #   tries to join it.
@@ -575,6 +575,7 @@
 self.assertScriptHasOutput(script, end of main\n)
 
 @unittest.skipUnless(hasattr(os, 'fork'), needs os.fork())
+@unittest.skipIf(sys.platform in platforms_to_skip, due to known OS bug)
 def test_5_clear_waiter_locks_to_avoid_crash(self):
 # Check that a spawned thread that forks doesn't segfault on certain
 # platforms, namely OS X.  This used to happen if there was a waiter
@@ -587,10 +588,6 @@
 # lock will be acquired, we can't know if the internal mutex will be
 # acquired at the time of the fork.
 
-# Skip platforms with known problems forking from a worker thread.
-# See http://bugs.python.org/issue3863.
-if sys.platform in ('freebsd4', 'freebsd5', 'freebsd6', 'os2emx'):
-raise unittest.SkipTest('due to known OS bugs on ' + sys.platform)
 script = if True:
 import os, time, threading
 
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11870] test_3_join_in_forked_from_thread() of test_threading hangs 1 hour on x86 Ubuntu Shared 3.x

2011-06-26 Thread Charles-François Natali

Changes by Charles-François Natali neolo...@free.fr:


Removed file: http://bugs.python.org/file22468/test_threading_fork.diff

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



  1   2   >