[issue18047] Descriptors get invoked in old-style objects and classes

2013-05-29 Thread Raymond Hettinger

Raymond Hettinger added the comment:

We document what we're willing to guarantee.  The exposure of descriptors in 
old-style classes was an incidental implementation detail.

Sorry, I'm going to close this one.   Besides, it's time to start forgetting 
Python 2 and move along :-)

--
resolution:  - rejected
status: open - closed

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



[issue18092] Python 2.7.5 installation broken on OpenSuse 12.2

2013-05-29 Thread Andreas Jung

Changes by Andreas Jung zopyxfil...@gmail.com:


--
components: +Build

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



[issue18092] Python 2.7.5 installation broken on OpenSuse 12.2

2013-05-29 Thread Andreas Jung

New submission from Andreas Jung:

I tried to install 2.7.5 on my OpenSuse 12.2 (latest patches)

ajung@blackmoon2:~/sandboxes/mib.portal cat /etc/issue
Welcome to openSUSE 12.2 Mantis - Kernel \r (\l).


Compilation went fine (no visible errors).

Starting the interpreter gives me:

ajung@blackmoon2:~/sandboxes/mib.portal /opt/python-2.7.5/bin/python 
Could not find platform dependent libraries exec_prefix
Consider setting $PYTHONHOME to prefix[:exec_prefix]
Python 2.7.5 (default, May 29 2013, 08:19:10) 
[GCC 4.7.1 20120723 [gcc-4_7-branch revision 189773]] on linux2
Type help, copyright, credits or license for more information.
 

Trying to bootstrap a Pyramid project using zc.buildout gives me:

ajung@blackmoon2:~/sandboxes/mib.portal /opt/python-2.7.5/bin/python 
bootstrap.py 
Could not find platform dependent libraries exec_prefix
Consider setting $PYTHONHOME to prefix[:exec_prefix]
Traceback (most recent call last):
  File bootstrap.py, line 21, in module
import os, shutil, sys, tempfile, urllib, urllib2, subprocess
  File /opt/python-2.7.5/lib/python2.7/shutil.py, line 12, in module
import collections
  File /opt/python-2.7.5/lib/python2.7/collections.py, line 8, in module
from _collections import deque, defaultdict
ImportError: No module named _collections

--
messages: 190274
nosy: Andreas.Jung
priority: normal
severity: normal
status: open
title: Python 2.7.5 installation broken on OpenSuse 12.2
type: behavior
versions: Python 2.7

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



[issue18092] Python 2.7.5 installation broken on OpenSuse 12.2

2013-05-29 Thread Ned Deily

Ned Deily added the comment:

Without more information, it is difficult to guess what is going wrong.  Please 
provide exactly what ./configure options you used to build Python and any make 
install options.  When you start Python, what values do sys.prefix, 
sys.exec_prefix, and sys.path have?  Does python -E give any different 
results?

--
nosy: +ned.deily

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



[issue18052] IDLE 3.3.2 Windows taskbar icon regression

2013-05-29 Thread Martin v . Löwis

Martin v. Löwis added the comment:

I can't reproduce the issue it all; IDLE just readily pins to the task bar with 
the correct icon. Can somebody please provide exact steps to reproduce?

--

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



[issue18087] os.listdir don't show hidden option

2013-05-29 Thread Dražen Lučanin

Dražen Lučanin added the comment:

I created a first version of the patch (attached as a remote hg repo). It would 
enable users to exclude hidden files with:

import os
print(os.listdir(path='.', show_hidden=False))

while still keeping full backwards compatibility, since show_hidden is an 
optional argument set to True by default.

@Dmi Baranov - well, I think aiming at the ls functionality would be a good 
first step (so we would mimic the -a flag, as explained in the manpage). As far 
as Windows, that's not too clear, I agree. So far I only added the 
functionality to the posix_listdir. Do you think this should act the same on 
Windows - i.e. hiding  dotfiles?

--
hgrepos: +193

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



[issue11229] Make the Mac installer more like the Windows installer

2013-05-29 Thread Ronald Oussoren

Ronald Oussoren added the comment:

I'm +1 on the general idea, but have some remarks anyway:

1) for all users vs. current user

This likely requires a post-install script to fix up the load command's in 
binaries: on OSX binaries contain absolute paths to the libraries the link with 
(which for the binary installers includes libpython). This is easy to do with 
macholib, but that's not in the stdlib.

An alternative is to use @loader_path, to link with a path relative to the 
executable, but that would mean you can no longer copy the python binary an 
expect it to work (which currently does work for framework installs)

2) Tcl/Tk: this is currently not included in the binary installer, although it 
might be better to start doing that given the problems described in 
http://www.python.org/download/mac/tcltk/. The disadvantage is that the size 
of the installer would grow significantly.

3) A pre-install hook that cleans up previous installations of the same feature 
release would be nice, currently upgrade can keep junk files alive.

4) We're already installing IDLE and the Python documentation in the 
Application folder (as well as the mac-specific Python Launcher and a tool for 
updating the command-line shell profile). Adding a link for starting the 
command-line in Terminal.app is a good idea.

5) I'm not sure about an uninstall option, while it would be nice to
have such an option it would also be custom code that runs with increased 
privileges (for the all users install). Sadly enough Apple doesn't have an 
uninstall option in their packaging solution.

--
nosy: +ronaldoussoren

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



[issue11229] Make the Mac installer more like the Windows installer

2013-05-29 Thread Ronald Oussoren

Ronald Oussoren added the comment:

BTW. There is a completely different way for distributing Python: drop the 
entire installer and provide a zipfile containing a single application bundle.

The most likely target for the application is IDLE, with a new menu item for 
making the command-line tools available (see editors like Textmate and BBEdit 
for a precedent, or even Xcode).

The advantage of a single application bundle is that you don't have to have an 
installer, users can just dragdrop for installation *and deinstallation*. An 
added advantage is that there are third party
libraries that make it easy to (auto-)update applications, the 
check for updates menu in a lot of Mac apps is based on an opensource
library that could be used here is well.

There are some disadvatages as well:

* It is different than how Python is currently distributed, any
  change will upset some people

* If there's a single application bundle you cannot easily add
  Python Launcher (although it could be hidden inside the toplevel app)

* At least some people will be upset by having to start IDLE at all,
  even if it would only be used to make the command-line tools available

* Someone will have to do the work :-)

I intentionally don't list the Mac App store as an advantage or disadvantage, 
primarily because the app store requires sandboxing and that would make no 
sense for a general programming tool (a sandboxed version of IDLE app could be 
used to start scripts, but those scripts would be in the sandbox as well and 
hence couldn't access most of the system).

--

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



[issue18052] IDLE 3.3.2 Windows taskbar icon regression

2013-05-29 Thread Terry J. Reedy

Terry J. Reedy added the comment:

All I did was install (standard, all users) and start Idle without rebooting. 
Problem goes away after reboot. This happened on previous versions with 
different hardware.

--

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



[issue18087] os.listdir don't show hidden option

2013-05-29 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc added the comment:

The concept of hidden file depends on the platform, and is independent of the 
listdir() function. The first thing is to agree on an implementation of the 
hidden property, and expose it as os.path.ishidden.

Then we can consider an option to os.listdir.
But do we need it? today it does not have any option at all, like isfile or 
isdir which would be more useful.

--
nosy: +amaury.forgeotdarc

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



[issue18087] os.listdir don't show hidden option

2013-05-29 Thread Antoine Pitrou

Antoine Pitrou added the comment:

I don't really understand, since this is an easy one-liner:

[n for n in os.listdir(...) if not n.startswith(.)]

Also, as mentioned, what you want to hide is not necessarily well-defined. For 
example, under Unix you might want to hide *~ files.
So I don't think os.listdir() should grow such an option, it's up to user code 
to decide what should be displayed / reported to the user.

(or in other words: while Python provides filesystem-access functions, Python 
is not a shell)

--
nosy: +pitrou

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



[issue16102] uuid._netbios_getnode() is outdated

2013-05-29 Thread Antoine Pitrou

Antoine Pitrou added the comment:

If noone has reported the issue in years (Google doesn't seem to report any 
occurrence), perhaps it means the code is simply not used anymore? In which 
case it should probably be removed.

--
nosy: +pitrou

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



[issue9369] const char* for PyObject_CallMethod and PyObject_CallFunction

2013-05-29 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Looks good to me.

--
nosy: +pitrou

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



[issue18087] os.listdir don't show hidden option

2013-05-29 Thread Dmi Baranov

Dmi Baranov added the comment:

 Also, as mentioned, what you want to hide is not necessarily
 well-defined. For example, under Unix you might want
 to hide *~ files.

Yes, and instead of adding another parameters, something like that:

os.listdir(path, show_hidden=False, hidden_files_mask='*~', 
but_show_directories=True, something_etc=None)

I suggest leaving the hidden files logic outside of stdlib (in the end-user 
code). Welcome to `glob` / `fnmatch` modules :-)

--

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



[issue17987] test.support.captured_stderr, captured_stdin not documented

2013-05-29 Thread Dmi Baranov

Dmi Baranov added the comment:

Fred or Serhiy - any news here? I'm signed Contributor Agreement few days ago, 
just waiting a change in my profile here, please don't worry about copyright :-)

--

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



[issue18090] dict_contains first argument declared register, and shouldn't be

2013-05-29 Thread Larry Hastings

Changes by Larry Hastings la...@hastings.org:


--
nosy: +Mark.Shannon, rhettinger

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



[issue18091] Remove PyNoArgsFunction

2013-05-29 Thread Larry Hastings

Larry Hastings added the comment:

Either of you gentlemen care to offer an opinion?

--
nosy: +benjamin.peterson, pitrou

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



[issue18087] os.listdir don't show hidden option

2013-05-29 Thread Serhiy Storchaka

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


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

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



[issue9369] const char* for PyObject_CallMethod and PyObject_CallFunction

2013-05-29 Thread Serhiy Storchaka

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


--
assignee:  - serhiy.storchaka

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



[issue16102] uuid._netbios_getnode() is outdated

2013-05-29 Thread Serhiy Storchaka

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


--
assignee:  - serhiy.storchaka

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



[issue18085] Verifying refcounts.dat

2013-05-29 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc added the comment:

And is it necessary to list all functions there?
Many functions share the same behavior: they don't change the ownership of 
PyObject* passed as argument, and return a new reference.

Only document functions that don't conform to this rule, like PyTuple_SET_ITEM 
and PyImport_AddModule.

--
nosy: +amaury.forgeotdarc

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



[issue18090] dict_contains first argument declared register, and shouldn't be

2013-05-29 Thread Antoine Pitrou

Antoine Pitrou added the comment:

I would recommend suppressing all register keywords from our C source files. 
It shouldn't make any difference these days.

--
nosy: +pitrou

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



[issue18084] wave.py should use sys.byteorder to determine endianess

2013-05-29 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Can you please submit a contributor form?

http://python.org/psf/contrib/contrib-form/
http://python.org/psf/contrib/

--

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



[issue17768] _decimal: allow NUL fill character

2013-05-29 Thread Stefan Krah

Stefan Krah added the comment:

Here's a baroque patch for _decimal. It's complicated by the fact
that there's no way of knowing what kind of UTF-8 fragments might
be hidden in multi-byte separators or decimal points.

--
Added file: http://bugs.python.org/file30407/issue17768.diff

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



[issue18093] Move main functions to a separate Programs directory

2013-05-29 Thread Nick Coghlan

Nick Coghlan added the comment:

Note that the two patches are the same, I was just curious to see the 
difference in handling between them in terms of the review integration.

--

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



[issue18093] Move main functions to a separate Programs directory

2013-05-29 Thread Nick Coghlan

New submission from Nick Coghlan:

This patch moves the C level main functions for python, _testembed and 
_freeze_importlib to a new Programs directory.

I added README files with my current understanding of the expected contents of 
the Python, Objects, Modules and Programs directories and also attempted to 
update the Windows builds (which don't appear to include _testembed at all).

--
components: Build, Interpreter Core
files: move_programs.diff
keywords: patch
messages: 190292
nosy: ncoghlan
priority: normal
severity: normal
stage: patch review
status: open
title: Move main functions to a separate Programs directory
type: enhancement
versions: Python 3.4
Added file: http://bugs.python.org/file30408/move_programs.diff

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



[issue18093] Move main functions to a separate Programs directory

2013-05-29 Thread Nick Coghlan

Changes by Nick Coghlan ncogh...@gmail.com:


Added file: http://bugs.python.org/file30409/move_programs.git.diff

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



[issue18093] Move main functions to a separate Programs directory

2013-05-29 Thread Nick Coghlan

Changes by Nick Coghlan ncogh...@gmail.com:


Removed file: http://bugs.python.org/file30408/move_programs.diff

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



[issue18093] Move main functions to a separate Programs directory

2013-05-29 Thread Nick Coghlan

Changes by Nick Coghlan ncogh...@gmail.com:


--
Removed message: http://bugs.python.org/msg190293

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



[issue18087] os.listdir don't show hidden option

2013-05-29 Thread Dražen Lučanin

Dražen Lučanin added the comment:

@Amaury Forgeot d'Arc - well, the '.' and '..' special files are
detected directly in the listdir code, so I don't think there is any
need to interleave this logic any deeper (such as os.path.ishidden).

@Antoine Pitrou - a one-liner, but it unnecessarily complicates the
code - an optional argument is a much more elegant solution in my
opinion. Regarding the *~ files - they are backup files, not hidden
files (same as e.g. #somefile# files that Emacs generates). These are
shown by ls, just hidden in some desktop environments.

Another point is that dotfiles are really something of a special case
(especially to programmers http://dotfiles.github.io/ ), because many
programs store configurations and special data inside and it makes
sense to allow users to omit these.

I know I could use glob, I am currently doing that, but it seems like
bad practice to switch to a different module that is also in the
standard library, just it has the dotfile detection magic and os
doesn't. The fact is that dotfiles do have special a meaning in Unix
operating systems and the os module documentation states that some
functionality is only tailored to Unix-based platforms
(http://docs.python.org/2/library/os.html):

An “Availability: Unix” note means that this function is commonly
found on Unix systems. It does not make any claims about its existence
on a specific operating system.

On Wed, May 29, 2013 at 1:05 PM, Serhiy Storchaka
rep...@bugs.python.org wrote:

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


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

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

--

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



[issue17681] Work with an extra field of gzip files

2013-05-29 Thread Dmi Baranov

Dmi Baranov added the comment:

I'll be glad to do it, but having some questions for discussing.

First about FEXTRA format - it consists of a series of subfields [1] and 
current Lib/test/test_gzip.py :: test_read_with_extra having a bit incorrect 
extra field - sure, if somebody using format from RFC1952. You having a real 
samples with extra field?.
Should we parse subfields here (I have already asked Jean-Loup Gailly, 
maintainer of registry of subfield IDs, for current registry values and waiting 
reply) or will just provide extra header as byte string?

Next about GzipFile's public interface - GzipFile(...).extra look ugly. Should 
I extend this ticket to support all metadata headers? FNAME, FCOMMENT, FHCRC, 
etc - correctly reading now, but no ways to get it outside (and no ways to 
create a file with FCOMMENT and FHCRC now).

Eg, something to like this:
GzipFile(...).metadata.FNAME == 'sample.gz'
GzipFile(..., extra=b'AP6Test', comment='comment')


[1] http://tools.ietf.org/html/rfc1952#section-2.3.1.1

--
nosy: +dmi.baranov

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



[issue18094] Skip tests in test_uuid not silently

2013-05-29 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

Tests in test_uuid just silently skipped if ran on unsuitable platform or if 
required module is not available. In such cases tests resulted as succesful 
passed. The proposed patch uses unittest.skipUnless to mark them as skipped.

--
components: Tests
files: test_uuid.patch
keywords: patch
messages: 190296
nosy: serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Skip tests in test_uuid not silently
type: enhancement
versions: Python 3.3, Python 3.4
Added file: http://bugs.python.org/file30410/test_uuid.patch

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



[issue16102] uuid._netbios_getnode() is outdated

2013-05-29 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Any exceptions were silently dropped. And tests silently skipped (issue18094).

--

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



[issue17987] test.support.captured_stderr, captured_stdin not documented

2013-05-29 Thread Fred L. Drake, Jr.

Fred L. Drake, Jr. added the comment:

From v5 of the patch:
+   A context managers that temporarily replaces the :data:`sys.stdin` /
+   :data:`sys.stdout` / :data:`sys.stderr` stream with :class:`io.StringIO`
+   object.

I'd go with singular nouns instead of trying to map across them with plurals:

  Context manager that temporarily replaces the named stream with an
  :class:`io.StringIO` object.

--

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



[issue17925] asynchat.async_chat.initiate_send : del deque[0] is not safe

2013-05-29 Thread Xavier de Gaye

Xavier de Gaye added the comment:

The problem is that when the fifo contains a producer and the more()
method of the producer returns a non-empty bytes sequence, then the
producer must be put back in the fifo first. This is what does the
following change made to Pierrick patch:

diff --git a/Lib/asynchat.py b/Lib/asynchat.py
--- a/Lib/asynchat.py
+++ b/Lib/asynchat.py
@@ -229,6 +229,7 @@
 except TypeError:
 data = first.more()
 if data:
+self.producer_fifo.appendleft(first)
 self.producer_fifo.appendleft(data)
 continue

The asynchat test is OK when the patch is modified with the above
change.

However, then the patch does not make initiate_send() thread safe.
There is now a race condition: another thread may be allowed to run
between the two appendleft() calls, this other thread may then call
the more() method of 'first' and send the returned bytes. When that
happens, the sent data is mis-ordered.

--

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



[issue17681] Work with an extra field of gzip and zip files

2013-05-29 Thread Serhiy Storchaka

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


Added file: http://bugs.python.org/file30412/zip_extra.diff

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



[issue17681] Work with an extra field of gzip and zip files

2013-05-29 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I have an almost ready patch but I doubt about interface. It can be discussed. 
ZIP file entries have similar extra field and I'm planning to add similar 
feature to the zipfile module too.

Here are preliminary patches.

--
keywords: +patch
title: Work with an extra field of gzip files - Work with an extra field of 
gzip and zip files
Added file: http://bugs.python.org/file30411/gzip_extra.diff

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



[issue17925] asynchat.async_chat.initiate_send : del deque[0] is not safe

2013-05-29 Thread Giampaolo Rodola'

Giampaolo Rodola' added the comment:

I think we shouldn't expect asynchat to be thread safe in this regard.

--

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



[issue18093] Move main functions to a separate Programs directory

2013-05-29 Thread Barry A. Warsaw

Changes by Barry A. Warsaw ba...@python.org:


--
nosy: +barry

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



[issue17987] test.support.captured_stderr, captured_stdin not documented

2013-05-29 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

LGTM with Fred's suggestion.

--
assignee: docs@python - fdrake

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



[issue16113] Add SHA-3 (Keccak) support

2013-05-29 Thread englabenny

englabenny added the comment:

NIST has published a tentative schedule for SHA-3 standardization. They expect 
to publish in the second quarter of 2014.

See http://csrc.nist.gov/groups/ST/hash/sha-3/timeline_fips.html  

and http://csrc.nist.gov/groups/ST/hash/sha-3/sha-3_standardization.html

--

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



[issue17403] Robotparser fails to parse some robots.txt

2013-05-29 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 30128355f53b by Senthil Kumaran in branch '3.3':
#17403: urllib.parse.robotparser normalizes the urls before adding to ruleline.
http://hg.python.org/cpython/rev/30128355f53b

New changeset e954d7a3bb8a by Senthil Kumaran in branch 'default':
merge from 3.3
http://hg.python.org/cpython/rev/e954d7a3bb8a

New changeset bcbad715c2ce by Senthil Kumaran in branch '2.7':
#17403: urllib.parse.robotparser normalizes the urls before adding to ruleline.
http://hg.python.org/cpython/rev/bcbad715c2ce

--
nosy: +python-dev

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



[issue17925] asynchat.async_chat.initiate_send : del deque[0] is not safe

2013-05-29 Thread Andrew Stormont

Andrew Stormont added the comment:

What about changing:

self.producer_fifo.appendleft(first)
self.producer_fifo.appendleft(data)

To

self.producer_fifo.extendleft([data, first])

Assuming deque's extendleft is actually thread safe.

--

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



[issue17403] Robotparser fails to parse some robots.txt

2013-05-29 Thread Senthil Kumaran

Senthil Kumaran added the comment:

This is fixed in default, 3.3 and 2.7. I will merge this change to 3.2 code 
line before closing this. I shall raise a new request for updating robotparser 
with other goodies.

--

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



[issue17768] _decimal: allow NUL fill character

2013-05-29 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 9156c663d6aa by Stefan Krah in branch '3.3':
Issue #17768: Support newline fill character in decimal.py and NUL fill
http://hg.python.org/cpython/rev/9156c663d6aa

--
nosy: +python-dev

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



[issue17768] _decimal: allow NUL fill character

2013-05-29 Thread Stefan Krah

Changes by Stefan Krah stefan-use...@bytereef.org:


--
resolution:  - fixed
status: open - closed

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



[issue18095] unable to invoke socket.connect with AF_UNSPEC

2013-05-29 Thread Roman Valov

New submission from Roman Valov:

There is a way to disconnect UDP socket
that was previously connected to specific
remote endpoint in C:

  struct sockaddr_in sin;
  memset((char *)sin, 0, sizeof(sin));
  sin.sin_family = AF_UNSPEC;
  connect(fd, (struct sockaddr *)sin, sizeof(sin));

However in this is not available in python, since connect
accepts only (host, port) as a parameter for UDP socket.

It's possible to drop port connection with port=0,
however I can't find a way to drop host connection.

--
components: IO
messages: 190308
nosy: Roman.Valov
priority: normal
severity: normal
status: open
title: unable to invoke socket.connect with AF_UNSPEC
type: behavior
versions: Python 3.3

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



[issue9736] doctest.DocTestSuite doesn't handle test globs correctly

2013-05-29 Thread Marius Gedminas

Marius Gedminas added the comment:

This is a duplicate of issue2604, isn't it?

--
nosy: +mgedmin

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



[issue18093] Move main functions to a separate Programs directory

2013-05-29 Thread Stefan Drees

Changes by Stefan Drees ste...@drees.name:


--
nosy: +dilettant

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



[issue18078] threading.Condition to allow notify on a specific waiter

2013-05-29 Thread João Bernardo

João Bernardo added the comment:

I did what @Richard Oudkerk said and created the wait_for_any classmethod for 
the Condition class.

Other Changes:

 - I had to refactor wait and wait_for to be specializations of 
wait_for_any.
 - try...except on notify because the inner lock might have been released by 
other condition.
 - Added two helper functions _remove_waiter and _wait (the part of the old 
wait function to re-acquire the inner lock)

Bonus:
To simplify the use, I added a from_condition constructor to create a new 
condition using the same lock as an existing one.
That way, you don't need to record the lock someplace else before creating a 
new Condition for the same lock.


* The current tests pass.

* Missing: new tests and docs.




Sample:

lock = Lock()
cond1 = Condition(lock)
cond2 = Condition(lock)
cond3 = Condition.from_condition(cond1)

with lock:
Condition.wait_for_any({cond1: foo, cond2: bar})
Condition.wait_for_any([cond1, cond2, cond3]) # no predicates
  # used on wait
with cond2: # same thing
Condition.wait_for_any({cond3: foo})

---

PS: the patch text is messy because of refactoring and some lines were moved. 
It is easy to read when applied.

--
keywords: +patch
Added file: http://bugs.python.org/file30413/wait_for_any.patch

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



[issue18084] wave.py should use sys.byteorder to determine endianess

2013-05-29 Thread Hideaki Takahashi

Hideaki Takahashi added the comment:

I signed it and by eSign and got a signed/filed response yesterday.
But according to Lifecycle of a patch in developer guide, my name is needed to 
be added to Misc/ACKS.
Can I update patch to do this?

--

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



[issue17947] Code, test, and doc review for PEP-0435 Enum

2013-05-29 Thread Ethan Furman

Ethan Furman added the comment:

Working on documentation...

--

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



[issue18084] wave.py should use sys.byteorder to determine endianess

2013-05-29 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Yes, please.

--

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



[issue9369] const char* for PyObject_CallMethod and PyObject_CallFunction

2013-05-29 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Jörg, Lars, can you please submit a contributor form?

http://python.org/psf/contrib/contrib-form/
http://python.org/psf/contrib/

--

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



[issue9369] const char* for PyObject_CallMethod and PyObject_CallFunction

2013-05-29 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 0a45896a7cde by Serhiy Storchaka in branch 'default':
Issue #9369: The types of `char*` arguments of PyObject_CallFunction() and
http://hg.python.org/cpython/rev/0a45896a7cde

--
nosy: +python-dev

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



[issue9369] const char* for PyObject_CallMethod and PyObject_CallFunction

2013-05-29 Thread Serhiy Storchaka

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


--
resolution: accepted - fixed
stage: commit review - committed/rejected

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



[issue17846] Building Python on Windows - Supplementary info

2013-05-29 Thread michael kearney

michael kearney added the comment:

Thanks for the pointer to your work and discussion in issue16895. I was
contemplating something along those lines. I had not started down that path
first because I've only relatively recently thrashed the problem enough to
understand the issues, and second because I wasn't thrilled with the
prospect of implementing anything in microsoft's shell scripting language
(called PowerShell now yes?), which being proprietary and primitive would
discourage I would think the python community from even considering looking
at the code when the inevitable bugs appear. I was intrigued to read in the
recent replies to issue
16895 about the suggestion to bootstrap. There is a lot of history to the
merits of that approach in other languages. It is surprising to me that the
approach isn't used in python. Well I guess, given that python is C under
the skin and configure/make is well established unix idiom

My progress on this topic has been in fits and starts. It's about what I can
tolerate. The state of OpenSLL all by itself is pretty bizarre. Regardless,
I believe another fit is in my near future.  Judging by the response to your
issue there is interest and hope in getting this corner of python under
control.
I will review your configure/make solution, with luck a patch to the
devguide can be just a massive simplification. On the other hand, the
discussion of what is going on in automating the process would be useful.
The existing docs did help me decode what was going on envetually.

-m

--

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



[issue18091] Remove PyNoArgsFunction

2013-05-29 Thread Benjamin Peterson

Benjamin Peterson added the comment:

If you want to convince Blender to stop using it, you can kill it. It's seems 
fairly harmless, though.

--

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



[issue18093] Move main functions to a separate Programs directory

2013-05-29 Thread Tshepang Lekhonkhobe

Changes by Tshepang Lekhonkhobe tshep...@gmail.com:


--
nosy: +tshepang

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



[issue17925] asynchat.async_chat.initiate_send : del deque[0] is not safe

2013-05-29 Thread Xavier de Gaye

Xavier de Gaye added the comment:

extendleft is an extension module C function (in the _collections
module) that does not release the GIL, so it is thread safe.

--

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



[issue18096] bad library order returned by python-config.in

2013-05-29 Thread David Taylor

New submission from David Taylor:

Misc/python-config.in returns a bad library order when given the --ldflags or 
--libs arguments.  A library should be listed *BEFORE* those libraries that it 
depends upon.  The python library depends upon all the other libraries listed, 
but it is listed last -- it should be first.

When linking with shared libraries, you can generally get away with the current 
behaviour.  When linking with static libraries, it fails

--
components: Library (Lib)
files: xx
messages: 190319
nosy: taylor
priority: normal
severity: normal
status: open
title: bad library order returned by python-config.in
type: behavior
versions: Python 3.3
Added file: http://bugs.python.org/file30414/xx

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



[issue18085] Verifying refcounts.dat

2013-05-29 Thread Skip Montanaro

Skip Montanaro added the comment:

 And is it necessary to list all functions there?

Probably not.  However, BITD, I was figuring this stuff out as I was
going along by examining the source code and writing down what I
found.  No regard for common or special cases.

S

--

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



[issue18097] Check out my profile on LinkedIn

2013-05-29 Thread Michel Weinachter

New submission from Michel Weinachter:

LinkedIn


I'd like to include you in my network to share updates and stay in touch.

- Michel

Michel Weinachter
Senior security manager / RSSI at Thales
Paris Area, France

Confirm that you know Michel Weinachter:
https://www.linkedin.com/e/-3qcne3-hhas6r2q-4f/isd/13708904224/XGTvGJjU/?hs=falsetok=26V0lOdbLhnBM1

--
You are receiving Invitation to Connect emails. Click to unsubscribe:
http://www.linkedin.com/e/-3qcne3-hhas6r2q-4f/z2oU7dKDzpt2G7xQz2FC2SclHmnUGzmsk0c/goo/report%40bugs%2Epython%2Eorg/20061/I4549108961_1/?hs=falsetok=0zmMvplEjhnBM1

(c) 2012 LinkedIn Corporation. 2029 Stierlin Ct, Mountain View, CA 94043, USA.

--
files: unnamed
messages: 190321
nosy: datamoc
priority: normal
severity: normal
status: open
title: Check out my profile on LinkedIn
Added file: http://bugs.python.org/file30415/unnamed

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



[issue1693050] \w not helpful for non-Roman scripts

2013-05-29 Thread Matthew Barnett

Matthew Barnett added the comment:

You could've obtained it from msg76556 or msg190100:

 print(ascii('हिन्दी'))
'\u0939\u093f\u0928\u094d\u0926\u0940'
 import re, regex
 print(ascii(re.match(r\w+, 
 '\u0939\u093f\u0928\u094d\u0926\u0940').group()))
'\u0939'
 print(ascii(regex.match(r\w+, 
 '\u0939\u093f\u0928\u094d\u0926\u0940').group()))
'\u0939\u093f\u0928\u094d\u0926\u0940'

--

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



[issue18097] spam

2013-05-29 Thread Amaury Forgeot d'Arc

Changes by Amaury Forgeot d'Arc amaur...@gmail.com:


--
resolution:  - invalid
status: open - closed
title: Check out my profile on LinkedIn - spam

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



[issue1693050] \w not helpful for non-Roman scripts

2013-05-29 Thread Jeffrey C. Jacobs

Jeffrey C. Jacobs added the comment:

Thanks Matthew and sorry to put you through more work; I just wanted to verify 
exactly which unicode (UTF-16 I take it) were being used to verify if the 
UNICODE standard expected them to be treated as unique words or single letters 
within a word.  Sanskrit is an alphabet, not an ideograph so each symbol is 
considered a letter.  So I believe your implementation is correct and yes, you 
are right, re is at fault.  There are just accenting characters and letters in 
that sequence so they should be interpreted as a single word of 6 letters, as 
you determine, and not one of the first letter.  Mind you, I misinterpreted 
msg190100 in that I thought you were using findall in which case the answer 
should be 1, but as far as length of extraction, yes, 6, I totally agree.  
Sorry for the misunderstanding.  http://www.unicode.org/charts/PDF/U0900.pdf 
contains the code chart for Hindi.

--

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



[issue1693050] \w not helpful for non-Roman scripts

2013-05-29 Thread Matthew Barnett

Matthew Barnett added the comment:

UTF-16 has nothing to do with it, that's just an encoding (a pair of them 
actually, UTF-16LE and UTF-16BE).

And I don't know why you thought I was using findall in msg190100 when the 
examples were using match! :-)

--

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



[issue18097] spam

2013-05-29 Thread R. David Murray

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


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

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



[issue18090] dict_contains first argument declared register, and shouldn't be

2013-05-29 Thread Antoine Pitrou

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


--
nosy: +serhiy.storchaka

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



[issue18084] wave.py should use sys.byteorder to determine endianess

2013-05-29 Thread Hideaki Takahashi

Hideaki Takahashi added the comment:

Patch updated. Thanks.

--
Added file: http://bugs.python.org/file30416/18084_2.patch

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



[issue18090] dict_contains first argument declared register, and shouldn't be

2013-05-29 Thread Serhiy Storchaka

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


--
nosy: +mark.dickinson

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



[issue1693050] \w not helpful for non-Roman scripts

2013-05-29 Thread STINNER Victor

STINNER Victor added the comment:

Let see Modules/_sre.c:

#define SRE_UNI_IS_ALNUM(ch) Py_UNICODE_ISALNUM(ch)
#define SRE_UNI_IS_WORD(ch) (SRE_UNI_IS_ALNUM(ch) || (ch) == '_')

 [ch.isalpha() for ch in '\u0939\u093f\u0928\u094d\u0926\u0940']
[True, False, True, False, True, False]
 import unicodedata
 [unicodedata.category(ch) for ch in '\u0939\u093f\u0928\u094d\u0926\u0940']
['Lo', 'Mc', 'Lo', 'Mn', 'Lo', 'Mc']

So the matching ends at U+093f because its category is a spacing combining 
(Mc), which is part of the Mark category, where the re module expects an 
alphanumeric character.

msg76557:


Unicode TR#18 defines \w as a shorthand for

\p{alpha}
\p{gc=Mark}
\p{digit}
\p{gc=Connector_Punctuation}


So if we want to respect this standard, the re module needs to be modified to 
accept other Unicode categories.

--

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



[issue18090] dict_contains first argument declared register, and shouldn't be

2013-05-29 Thread Mark Shannon

Mark Shannon added the comment:

The register qualifier on the parameter does not alter the calling convention, 
it determines the storage class of the parameter variable within the function.

Having said that I am all in favour in removing any and all register 
declarations.

--

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



[issue18090] dict_contains first argument declared register, and shouldn't be

2013-05-29 Thread Larry Hastings

Larry Hastings added the comment:

 The register qualifier on the parameter does not alter the calling
 convention, it determines the storage class of the parameter variable
 within the function.

You assert that declaring a parameter as register instructs the compiler that 
callers should pass in the argument on the stack, but the function should then 
copy it to a register?  Can you cite a reference?

(I admit in advance I can't cite a reference for my assertion that it asks to 
pass the argument in a register.  And we all know the register keyword is 
more or less an unfunny joke to the compiler anyway.)

--

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



[issue18084] wave.py should use sys.byteorder to determine endianess

2013-05-29 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ccffce2dde49 by Serhiy Storchaka in branch 'default':
Issue #18084: Use sys.byteorder in wave.py.
http://hg.python.org/cpython/rev/ccffce2dde49

--
nosy: +python-dev

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



[issue18084] wave.py should use sys.byteorder to determine endianess

2013-05-29 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you for your patch.

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

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



[issue17247] int and float should detect inconsistent format strings

2013-05-29 Thread Stefan Krah

Stefan Krah added the comment:

With this patch float and int should behave like Decimal. It may
break existing code that (accidentally) uses both legacy zero padding
and explicit alignment.

--
keywords: +patch
stage: needs patch - patch review
versions:  -Python 3.3
Added file: http://bugs.python.org/file30417/issue17247.diff

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



[issue17269] getaddrinfo segfaults on OS X when provided with invalid arguments combinations

2013-05-29 Thread Stefan Krah

Stefan Krah added the comment:

Hi, I think this broke the tiger buildbot:

http://buildbot.python.org/all/builders/x86%20Tiger%203.x/builds/6368/steps/test/logs/stdio

--
nosy: +skrah

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



[issue18098] Build Applet.app build fails on OS X 10.8

2013-05-29 Thread Ned Deily

New submission from Ned Deily:

The Build Applet.app tool for OS X depends on the deprecated EasyDialogs module 
to interact with the user.  EasyDialogs depends on Apple-deprecated Carbon 
QuickDraw APIs.  As of OS X 10.8, the headers for the QuickDraw APIs are no 
longer supplied with Xcode 4.  This means that Build Applet.app can no longer 
be built on 10.8 unless an earlier version of Xcode and an SDK from an earlier 
system are used.  The Mac/Makefile target install_BuildApplet fails with 
either:
  ImportError: cannot import name GetNewDialog
or
  AttributeError: 'module' object has no attribute 'GetQDGlobalsScreenBits'
depending on whether the interpreter being built supports 32-bit or not.

Given that Build Applet.app is already considered deprecated and has been 
removed in Python 3, it does not seem appropriate to attempt to re-engineer its 
GUI interface.  Instead, the Makefile should just skip building it if 
EasyDialogs is not available.

(Note that the QuickDraw libraries are still being shipped in OS X 10.8, so a 
Build Applet.app built on an older system - such as with the python.org OS X 
installers - will still run on 10.8.  There is no guarantee that will still be 
true in future versions of OS X.)

--
assignee: ned.deily
components: Build, Macintosh
messages: 190333
nosy: ned.deily, ronaldoussoren
priority: normal
severity: normal
stage: needs patch
status: open
title: Build Applet.app build fails on OS X 10.8
versions: Python 2.7

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



[issue7136] Idle File Menu Option Improvement

2013-05-29 Thread Todd Rovito

Changes by Todd Rovito rovit...@gmail.com:


--
nosy: +Todd.Rovito

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



[issue7136] Idle File Menu Option Improvement

2013-05-29 Thread Todd Rovito

Todd Rovito added the comment:

Roger's patch works but the documentation has changed since he made the patch 
back in 2011.  So I patched the patch and hope this very simple patch will get 
committed.  I will work on a patch for 2.7 next.

Today I was teaching a student on how to use Python with IDLE and the student 
found the existing menu option confusing.  I was thrilled a patch already 
existed and it just needed updated.  Thanks!

--
versions: +Python 3.4 -Python 3.2
Added file: 
http://bugs.python.org/file30418/7136FileMenuConfusionV23point4.patch

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



[issue7136] Idle File Menu Option Improvement

2013-05-29 Thread Todd Rovito

Todd Rovito added the comment:

Same patch but for Python 2.7.5.  I just updated the documentation from Roger's 
excellent patch.

--
versions: +Python 2.7
Added file: 
http://bugs.python.org/file30419/7136FileMenuConfusionV22point7.patch

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



[issue16809] Tk 8.6.0 introduces TypeError. (Tk 8.5.13 works)

2013-05-29 Thread Roger Serwy

Roger Serwy added the comment:

The problem I'm encountering is that tk.splitlist() is now being given a 
Tcl_Obj instead of a str type. Since everything is Tcl is a string, 
explicitly casting a Tcl_Obj to a string seems reasonable. Attached is some 
proof-of-concept code to work around the issue.


Serhiy's patch against 3.4 gives this traceback:

[python@saturn 3.4]$ ./python tk_86_error.py 
8.6
Traceback (most recent call last):
  File tk_86_error.py, line 6, in module
label.pack_info()
  File /home/python/python/3.4/Lib/tkinter/__init__.py, line 1924, in 
pack_info
if value[:1] == '.':
TypeError: '_tkinter.Tcl_Obj' object is not subscriptable

--
stage: patch review - needs patch
Added file: http://bugs.python.org/file30421/tk_86_workaround.py

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



[issue7136] Idle File Menu Option Improvement

2013-05-29 Thread Roger Serwy

Roger Serwy added the comment:

LGTM. Thanks Todd!

--
assignee:  - roger.serwy
stage: needs patch - commit review
versions: +Python 3.3

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



[issue18052] IDLE 3.3.2 Windows taskbar icon regression

2013-05-29 Thread Roger Serwy

Roger Serwy added the comment:

I'm running Win7 64-bit in a VM. The steps for me was to start with a system 
without any Python version installed. Install 3.3.1 32-bit, and then install 
3.3.2 32-bit. IDLE launches with a red Tk icon and pinning it to the task bar 
does not actually pin IDLE. A reboot does fix the issue, as Terry observed.

--

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



[issue14191] argparse doesn't allow optionals within positionals

2013-05-29 Thread paul j3

paul j3 added the comment:

This is a refinement of the patch with Message188609.

In parse_known_intermixed_args, the temporary capture of formatted usage has 
been put in a try/finally structure.

Positionals are now 'deactivated' with

action.nargs = SUPPRESS
action.default = SUPPRESS

To use this, a 'nargs==SUPPRESS' case has been added to the relevant methods.  
In _get_args_pattern() it acts just like 'nargs=0'.  In '_get_values()' it 
returns 'value=SUPPRESS'.  The net effect is that, in take_action(), 'action' 
is not invoked, and that positional is not added to the namespace.

Previously I used nargs=0, which put a [] value in the namespace, which then 
had to be deleted.

I have not added anything about this SUPPRESS option to the documentation 
(PARSER isn't there either).

When the parser uses incompatible features (e.g. REMAINDER), this now raises a 
TypeError.  The effect is similar to giving add_argument incompatible 
definitions.  The 'fallback' that I used earlier can be implemented with a 
simple 'try/except TypeError'.  Other parsing errors go through the usual 
ArgumentParser.error() method.

test_argparse.py has been changed to handle this TypeError.

--
Added file: http://bugs.python.org/file30422/intermixed.patch

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



[issue14191] argparse doesn't allow optionals within positionals

2013-05-29 Thread Glenn Linderman

Glenn Linderman added the comment:

These sound like good refinements. You've been thinking.  By making the 
fallback happen externally, it simplifies the implementation of 
parse_intermixed_args, and forces the application to accept responsibility for 
calling it with a consistent set of arguments, or calling something else. I 
like that. I don't really see the fallback as a particularly useful feature, so 
pushing it outside the stdlib, yet still making it simple to implement for any 
that do find it to be useful, seems like a good tradeoff.

--

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