[issue18042] Provide enum.unique class decorator

2013-06-18 Thread Ethan Furman
Ethan Furman added the comment: I haven't seen any discouraging words regarding the decorator. If no one has any compelling reasons why it shouldn't be added, I'll craft a version and put it in (only real difference with Nick's would be catching all the duplicates at once instead of one at a

[issue17961] Use enum names as values in enum.Enum() functional API

2013-06-18 Thread Ethan Furman
Ethan Furman added the comment: Enum members have two pieces of easily accessible information: `name` and `value`. The name is taken from the attribute the value is assigned to; the value, obviously, is the value assigned. The question, then, is what should happen when the function syntax is

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

2013-06-18 Thread João Bernardo
João Bernardo added the comment: (ping) It would be nice to have the feature on 3.4. What changes should I do to the patch? Is anyone else working on that? -- ___ Python tracker

[issue18262] ZipInfo.external_attr are not documented

2013-06-18 Thread anatoly techtonik
New submission from anatoly techtonik: zipfile doesn't restore file attributes when extracting. Documentation should at least contain example how to do this manually, because the ony way to do this - through ZipInfo.external_attr is too cryptic. -- assignee: docs@python components: Doc

[issue18261] Confusing description in Minimal DOM implementation

2013-06-18 Thread Ned Deily
Ned Deily added the comment: No, the intent really is to suggest using the ElementTree module rather than either minidom or any of the other XML modules in the standard library. Many people find the ElementTree API easier to understand and to use. -- nosy: +ned.deily resolution: -> r

[issue18255] CPython setup.py problems

2013-06-18 Thread Ronald Oussoren
Ronald Oussoren added the comment: I don't agree. Distutils still uses distutils.sysconfig for configuration information and setup.py wants to adjust that configuration, it should therefore use distutils.sysconfig instead of the global one. That said, it would be better to change distutils to

[issue18261] Confusing description in Minimal DOM implementation

2013-06-18 Thread Emcisq Zhao
New submission from Emcisq Zhao: Visit http://docs.python.org/2.7/library/xml.dom.minidom.html, please notice the first paragraph. The last sentence is " should consider using the xml.etree.ElementTree module for their XML processing instead". Shouldn't it be " should consider using the xml.do

[issue18260] configparser: TypeError occurs when handling errors in files with binary names

2013-06-18 Thread Arfrever Frehtes Taifersar Arahesis
New submission from Arfrever Frehtes Taifersar Arahesis: TypeError occurs when handling errors in files with binary names. configparser.* exceptions are expected. This regression was introduced in Python 3.2. $ cat /tmp/test1 [section] [section] $ cat /tmp/test2 [section] option = value option

[issue17177] Deprecate imp

2013-06-18 Thread Brett Cannon
Changes by Brett Cannon : -- status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail

[issue17177] Deprecate imp

2013-06-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset ded443c603f0 by Brett Cannon in branch 'default': Issue #17177: Clarify some deprecations http://hg.python.org/cpython/rev/ded443c603f0 -- ___ Python tracker _

[issue18259] Declare sethostname in socketmodule.c for AIX

2013-06-18 Thread Christian Heimes
Christian Heimes added the comment: Seems to work. I don't have root permission on the box so I can't actually test if the function call succeeds. % ./python Python 3.4.0a0 (default:626a8e49f2a9, Jun 19 2013, 00:19:57) [GCC 4.7.1] on aix7 Type "help", "copyright", "credits" or "license" for m

[issue18259] Declare sethostname in socketmodule.c for AIX

2013-06-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset 9f8efcd78d0d by Christian Heimes in branch '3.3': Issue #18259: Declare sethostname in socketmodule.c for AIX http://hg.python.org/cpython/rev/9f8efcd78d0d New changeset 14748397fc57 by Christian Heimes in branch 'default': Issue #18259: Declare set

[issue18259] Declare sethostname in socketmodule.c for AIX

2013-06-18 Thread David Edelsohn
New submission from David Edelsohn: AIX provides sethostname() but it is not declared in any useful header. Fixed as follows: diff -r 626a8e49f2a9 Modules/socketmodule.c --- a/Modules/socketmodule.cTue Jun 18 23:28:18 2013 +0200 +++ b/Modules/socketmodule.cTue Jun 18 20:17:37 2013 -0700

[issue18202] Minor fixes for test_coding

2013-06-18 Thread STINNER Victor
STINNER Victor added the comment: The patch looks good to me. It may be better to split it in two commits: fix test_exec_valid_coding() in Python 3.3, cleanup test only in python 3.4. As you want. -- ___ Python tracker

[issue18184] Add range check for %c in PyUnicode_FromFormat

2013-06-18 Thread STINNER Victor
STINNER Victor added the comment: Both patches look good to me. Do you feel motivated to check if all formating methods have a test? Here is a list of format methods: PyUnicode_Format(): - 3.3, 3.4: formatchar() raises OverflowError if x > MAX_UNICODE - 2.7: formatchar() raises OverflowError if

[issue3329] API for setting the memory allocator used by Python

2013-06-18 Thread STINNER Victor
STINNER Victor added the comment: Update the patch to follow the API described in the PEP 445 (2013-06-18 22:33:41 +0200). -- Added file: http://bugs.python.org/file30645/py_setallocators-7.patch ___ Python tracker

[issue18258] Fix test discovery for test_codecmaps*.py

2013-06-18 Thread Zachary Ware
Changes by Zachary Ware : -- type: enhancement -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http

[issue17883] Fix buildbot testing of Tkinter

2013-06-18 Thread Jeremy Kloth
Jeremy Kloth added the comment: (Note that the buildbot is 64-bit so the paths need to be tcltk64) The test_ttk_guionly passed successfully *from the command-line*. It is currently hung in that test from the buildbot scheduler *as a service*. I do not know of a simple way to test changes via

[issue18258] Fix test discovery for test_codecmaps*.py

2013-06-18 Thread Zachary Ware
New submission from Zachary Ware: The test package is almost to the point where I can run `PCbuild\python_d.exe -m unittest discover Lib/test/ "test_*.py"` and get a useful result, the only thing that still blows up is multibytecodec_support.py. I had not previously noticed this problem due t

[issue18248] fficonfig.py.in wrong for AIX

2013-06-18 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: LGTM. I checked in Makefile.am, and the list of platform-specific files is the same. -- ___ Python tracker ___ __

[issue1159] os.getenv() not updated after external module uses C putenv()

2013-06-18 Thread Terry J. Reedy
Terry J. Reedy added the comment: The problem is the 'putenv' and 'getenv' appear to be parallel, and seem to be documented as being parallel "Set the environment variable named key to the string value." "Return the value of the environment variable key if it exists," but they are not. Getenv ac

[issue18248] fficonfig.py.in wrong for AIX

2013-06-18 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +amaury.forgeotdarc, belopolsky, meador.inge stage: -> patch review versions: -Python 3.5 ___ Python tracker ___ __

[issue18256] thread_pthread.h fixes for AIX

2013-06-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: Fixed, thank you! -- nosy: +pitrou resolution: -> fixed stage: -> committed/rejected status: open -> closed versions: +Python 2.7 -Python 3.5 ___ Python tracker _

[issue18256] thread_pthread.h fixes for AIX

2013-06-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset f2e373ddfa00 by Antoine Pitrou in branch '3.3': Issue #18256: Compilation fix for recent AIX releases. Patch by David Edelsohn. http://hg.python.org/cpython/rev/f2e373ddfa00 New changeset 7081859c1e20 by Antoine Pitrou in branch 'default': Issue #1

[issue18058] Define is_package for NamespaceLoader

2013-06-18 Thread Brett Cannon
Brett Cannon added the comment: No because it would mean new functionality in a bugfix release. -- ___ Python tracker ___ ___ Python-b

[issue18058] Define is_package for NamespaceLoader

2013-06-18 Thread Thomas Heller
Thomas Heller added the comment: Brett, can these changes be merged into 3.3 also? -- nosy: +theller ___ Python tracker ___ ___ Python

[issue18255] CPython setup.py problems

2013-06-18 Thread Arfrever Frehtes Taifersar Arahesis
Arfrever Frehtes Taifersar Arahesis added the comment: distutils.sysconfig module is theoretically deprecated in favor of sysconfig module. It is better to fix sysconfig module than to switch back to distutils.sysconfig module. -- nosy: +Arfrever __

[issue17934] Add a frame method to clear expensive details

2013-06-18 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- dependencies: +PEP 442 implementation ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscr

[issue17883] Fix buildbot testing of Tkinter

2013-06-18 Thread Zachary Ware
Zachary Ware added the comment: Jeremy, can you give me the output of a test run with issue17883-tmp-test.diff applied? (Or just what a `python -m test -v test_ttk_guionly` gives with ..\tcltk\bin on the PATH) -- ___ Python tracker

[issue15795] Zipfile.extractall does not preserve file permissions

2013-06-18 Thread anatoly techtonik
anatoly techtonik added the comment: There should be an easy way to restore file attributes. -- ___ Python tracker ___ ___ Python-bugs

[issue18244] singledispatch: When virtual-inheriting ABCs at distinct points in MRO, composed MRO is dependent on haystack ordering

2013-06-18 Thread Łukasz Langa
Łukasz Langa added the comment: Hello, Edward. First of all, thank you for correctly pointing out the problem. We'll integrate your patch but first I'd like to have a unit test that specifically shows why the secondonary `for` loop you introduced is necessary. Currently if we change this:

[issue15795] Zipfile.extractall does not preserve file permissions

2013-06-18 Thread anatoly techtonik
Changes by anatoly techtonik : -- nosy: +techtonik ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.

[issue17883] Fix buildbot testing of Tkinter

2013-06-18 Thread Jeremy Kloth
Jeremy Kloth added the comment: It seems that the changes committed by Ezio are causing the AMD64 Windows buildbot to hang in test_ttk_guionly. A note that this buildbot is running as a service so no desktop is available. The same test however is working (skipped successfully) on the 3.3 bran

[issue17177] Deprecate imp

2013-06-18 Thread Brett Cannon
Brett Cannon added the comment: Going to temporarily re-open to remind me to add better deprecation docs for imp.load_module() to point to specific loader in importlib.machinery. Should also add example usage as well. -- status: closed -> open ___ P

[issue18138] ssl.SSLContext.add_cert()

2013-06-18 Thread Christian Heimes
Changes by Christian Heimes : Added file: http://bugs.python.org/file30643/sslctx_add_cert5.patch ___ Python tracker ___ ___ Python-bugs-list

[issue18138] ssl.SSLContext.add_cert()

2013-06-18 Thread Christian Heimes
Christian Heimes added the comment: Yes, I have seen them. In fact OpenSSL has library, function and reason. if ((ERR_GET_LIB(errcode) == ERR_LIB_X509) && (ERR_GET_REASON(errcode) == X509_R_CERT_ALREADY_IN_HASH_TABLE)) {} I'm going for 3) -- __

[issue18138] ssl.SSLContext.add_cert()

2013-06-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: Le mardi 18 juin 2013 à 17:30 +, Christian Heimes a écrit : > Christian Heimes added the comment: > > I'm pondering about the error case "cert already in hash table". There > should be a way to distinguish the error from other errors. I don't know if you've

[issue18138] ssl.SSLContext.add_cert()

2013-06-18 Thread Christian Heimes
Christian Heimes added the comment: I'm pondering about the error case "cert already in hash table". There should be a way to distinguish the error from other errors. I see three ways to handle the case: 1) introduce SSLCertInStoreError exeption 2) ignore the error and do nothing 3) ignore the

[issue11192] test_socket error on AIX

2013-06-18 Thread David Edelsohn
Changes by David Edelsohn : -- nosy: +David.Edelsohn ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mai

[issue11192] test_socket error on AIX

2013-06-18 Thread alef
alef added the comment: Same error with Python 2.7.3 on AIX 6.1 -- versions: +Python 2.7 ___ Python tracker ___ ___ Python-bugs-list m

[issue18257] Two copies of python-config

2013-06-18 Thread Ronald Oussoren
Ronald Oussoren added the comment: Also, the shell-script version of python-config uses the -f option of readlink and that option is not supported on OSX 10.8 (or older versions, I haven't looked at the 10.9 beta yet) Furthermore the entire readlink command is not present in HP-UX (and possibl

[issue18257] Two copies of python-config

2013-06-18 Thread Ronald Oussoren
New submission from Ronald Oussoren: Changeset c0370730b364 introduced a shell-script implementation of python-config (see issue #16235). The older python implementation is still present in $(srcdir)/Misc and generated by Makefile.pre.in. -- messages: 191416 nosy: doko, ronaldoussoren

[issue18211] -Werror=statement-after-declaration problem

2013-06-18 Thread Ronald Oussoren
Ronald Oussoren added the comment: I just noticed the patch is not good enough: "python-config --cflags" still prints the -Werror flag because it is now a shell script and doesn't use sysconfig data at all. -- ___ Python tracker

[issue18255] CPython setup.py problems

2013-06-18 Thread Ronald Oussoren
Ronald Oussoren added the comment: So much for obviously correct changes... 1) fix typo in import statement (from sysconfig import import ...) 2) setup.py uses sysconfig.get_path and that's not present in distutils.sysconfig. (Sigh..., why are there two modules with almost but not entirely eq

[issue18238] test_signal.py wait_helper hangs on AIX

2013-06-18 Thread STINNER Victor
STINNER Victor added the comment: > This needs to be backported to Python 2.7 as well. signal.sigwaitinfo() was added to Python 3.3 (and doesn't exist in Python 2). -- resolution: -> fixed status: open -> closed ___ Python tracker

[issue18255] CPython setup.py problems

2013-06-18 Thread Jeremy Kloth
Changes by Jeremy Kloth : -- nosy: +jkloth ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue18238] test_signal.py wait_helper hangs on AIX

2013-06-18 Thread David Edelsohn
David Edelsohn added the comment: This needs to be backported to Python 2.7 as well. -- ___ Python tracker ___ ___ Python-bugs-list ma

[issue18238] test_signal.py wait_helper hangs on AIX

2013-06-18 Thread David Edelsohn
Changes by David Edelsohn : -- versions: +Python 2.7, Python 3.3, Python 3.4 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue18228] AIX locale parsing failure

2013-06-18 Thread David Edelsohn
Changes by David Edelsohn : -- versions: -Python 2.7, Python 3.3 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe

[issue18228] AIX locale parsing failure

2013-06-18 Thread David Edelsohn
Changes by David Edelsohn : -- versions: +Python 2.7, Python 3.3 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue18256] thread_pthread.h fixes for AIX

2013-06-18 Thread David Edelsohn
New submission from David Edelsohn: Recent releases of AIX do not need to call pthread_init(). The function is provided in libpthread.a for backward compatibility, but not declared in any header. This patch adds a declaration, or it can be removed completely because AIX 4.x no longer is suppor

[issue18138] ssl.SSLContext.add_cert()

2013-06-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: > The check for trailing data ensures that the user gets an error > message if she tries to load a PEM string with multiple certs. She > might expect that add_ca_cert(pem) loads all PEM certs from the > string while in fact PEM_read_bio_X509() only loads the firs

[issue18138] ssl.SSLContext.add_cert()

2013-06-18 Thread Christian Heimes
Christian Heimes added the comment: Here is a simplified version of the C function. It uses y* or es# "ascii" to parse the argument. The check for trailing data ensures that the user gets an error message if she tries to load a PEM string with multiple certs. She might expect that add_ca_cert

[issue18162] Add index attribute to IndexError

2013-06-18 Thread R. David Murray
R. David Murray added the comment: I am in favor of adding meaningful attributes to stdlib exceptions. I've always considered the lack of such an API a wart in Python, though an understandable one (since exceptions started out as simple strings). But yeah, while I hate to say it, this is pro

[issue18211] -Werror=statement-after-declaration problem

2013-06-18 Thread Ronald Oussoren
Ronald Oussoren added the comment: The setup.py issues are in #18255. -- dependencies: +CPython setup.py problems ___ Python tracker ___ _

[issue18255] CPython setup.py problems

2013-06-18 Thread Ronald Oussoren
New submission from Ronald Oussoren: While working on a fix for #18211 I noticed two problems with the setup.py that's used to build the stdlib extensions. 1) setup.py uses sysconfig instead of distutils.sysconfig. The sematics of the two modules a slighty different. 2) The block of code star

[issue18211] -Werror=statement-after-declaration problem

2013-06-18 Thread Ronald Oussoren
Ronald Oussoren added the comment: I had a patch that only changed distutils.sysconfig.get_config_var('CFLAGS') when not building python, but then noticed that this doesn't work: the setup.py file for stdlib extensions fetches information from the toplevel sysconfig file, not distutils.sysconf

[issue18252] timeit makes code run faster?

2013-06-18 Thread Richard Oudkerk
Changes by Richard Oudkerk : -- stage: -> committed/rejected ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: h

[issue18252] timeit makes code run faster?

2013-06-18 Thread Richard Oudkerk
Changes by Richard Oudkerk : -- stage: committed/rejected -> ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: h

[issue18211] -Werror=statement-after-declaration problem

2013-06-18 Thread Ronald Oussoren
Ronald Oussoren added the comment: Is "-Werror=statement-after-declaration" the right solution anyway? This errors out on just one of the incompatibilities between C89 and C99, although it is one that is easy to get wrong accidentally. Gcc (and clang) also support '-std=c89' that forces the co

[issue18162] Add index attribute to IndexError

2013-06-18 Thread Brett Cannon
Brett Cannon added the comment: Do you mean "sometimes there sometimes not" because old code won't set it (yet) or because you don't think it will always be appropriate to set the attribute and thus people won't set it when available? -- ___ Python

[issue18252] timeit makes code run faster?

2013-06-18 Thread R. David Murray
R. David Murray added the comment: By the way, this kind of question is more suited to the python-list mailing list (where you will in the general case get a faster answer anyway :) -- nosy: +r.david.murray stage: -> committed/rejected status: open -> closed __

[issue18253] make standard library PEP8 compliant

2013-06-18 Thread R. David Murray
R. David Murray added the comment: Sorry, but this is not the kind of change that we make to the codebase. It has too many unintended consequences. (Large portions of the stdlib pre-date PEP8, and thus are not PEP8 compliant.) We fix some thing when we modify the code involved, but other th

[issue18251] test_subprocess_jy fails when Argument has embedded quote

2013-06-18 Thread R. David Murray
R. David Murray added the comment: It looks like this bug belongs on the jython tracker at bugs.jython.org. (By the way, it isn't clear if the problem is in the jython code or the test; the stdlib Popen works as expected on Windows.) -- nosy: +r.david.murray resolution: -> invalid st

[issue18240] hmac unnecessarily restricts input to "bytes"

2013-06-18 Thread Christian Heimes
Christian Heimes added the comment: It may take a day or two until your signature makes it through red tape. I'll get back to you. :) -- ___ Python tracker ___ _

[issue18240] hmac unnecessarily restricts input to "bytes"

2013-06-18 Thread Jonas Borgström
Jonas Borgström added the comment: Of course. I've now signed and filed the agreement. -- ___ Python tracker ___ ___ Python-bugs-list

[issue18252] timeit makes code run faster?

2013-06-18 Thread icedream91
icedream91 added the comment: I did some tests, Richard Oudkerk (sbt) is right. Thanks a lot. -- ___ Python tracker ___ ___ Python-bug

[issue18240] hmac unnecessarily restricts input to "bytes"

2013-06-18 Thread Christian Heimes
Christian Heimes added the comment: Thanks for your update. As far as I can tell you haven't signed our contributor agreement yet. Can you please do so? http://www.python.org/psf/contrib/ http://www.python.org/psf/contrib/contrib-form/ -- stage: needs patch -> patch review __

[issue18240] hmac unnecessarily restricts input to "bytes"

2013-06-18 Thread Jonas Borgström
Jonas Borgström added the comment: Patch updated to include tests and versionchanged tags -- Added file: http://bugs.python.org/file30637/hmac2.patch ___ Python tracker ___ _

[issue18254] Accessing attr dict at definition time of a class from a metaclass results in changed type.

2013-06-18 Thread Archard Lias
New submission from Archard Lias: Accessing (just iterating or accessing in any way) the dict_proxy to the attribute dictionary in the `MessageMeta` metaclass, results in a change of "type" in any metaclass inheriting class definitions. Reproducible in CPython versions (tested so far): 3.2.2 3

[issue18252] timeit makes code run faster?

2013-06-18 Thread Richard Oudkerk
Richard Oudkerk added the comment: I think if you use timeit then the code is wrapped inside a function before it is compiled. This means that your code can mostly use faster local lookups rather than global lookups. -- nosy: +sbt ___ Python tracke

[issue18253] make standard library PEP8 compliant

2013-06-18 Thread Friedrich Spee von Langenfeld
New submission from Friedrich Spee von Langenfeld: The modules in the standard library aren´t PEP( compliant. I´ve written a script to change this. It uses autopep8.py (must be in the path) and is written for Windows users. -- components: Library (Lib) files: autopepframework.py messag

[issue18252] timeit makes code run faster?

2013-06-18 Thread icedream91
icedream91 added the comment: I used Python 3.3.2 to try this problem: http://projecteuler.net/problem=23 , and I got a correct answer. When I wanted to check how long it took, I found something strange: When I ran 23.py directly, it showed that it took about 13s. But if I use timeit module, i

[issue18252] timeit makes code run faster?

2013-06-18 Thread icedream91
Changes by icedream91 : Removed file: http://bugs.python.org/file30633/23.py ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscr

[issue18252] timeit makes code run faster?

2013-06-18 Thread icedream91
New submission from icedream91: I used Python 3.3.2 to try this problem: http://projecteuler.net/problem=23 , and I got a correct answer. When I wanted to check how long it took, I found something strange: When I ran 23.py directly, it showed that it took about 13s. But if I use timeit module,

[issue18251] test_subprocess_jy fails when Argument has embedded quote

2013-06-18 Thread Sowmya
New submission from Sowmya: test_subprocess_jy fails with below error: test test_subprocess_jy failed -- Traceback (most recent call last): File \'L:\\apps\\ascii\\jython\\70files\\current\\win\\Lib\\test\\test_subprocess_jy.py\', line 13, in testDefaultEnvIsInherited p1 = Popen([sys.exec

[issue14000] Subprocess stdin.flush does not flush

2013-06-18 Thread Jian Wen
Jian Wen added the comment: The following code shows how to use pts. #!/usr/bin/env python import os import pty import shlex import time _args = "/usr/bin/ssh example.com" args = shlex.split(_args) pid, child_fd = pty.fork() if pid == 0: # Child os.execv("/usr/bin/ssh", args) else: