Re: getting fileinput to do errors='ignore' or 'replace'?

2015-12-04 Thread Serhiy Storchaka
On 04.12.15 00:26, Oscar Benjamin wrote: On 3 Dec 2015 16:50, "Terry Reedy" wrote: fileinput is an ancient module that predates iterators (and generators) and context managers. Since by 2.7 open files are both context managers and line iterators, you can easily write your

Re: Is vars() the most useless Python built-in ever?

2015-12-04 Thread Serhiy Storchaka
On 02.12.15 11:28, Chris Angelico wrote: On Wed, Dec 2, 2015 at 7:22 PM, Serhiy Storchaka wrote: On 01.12.15 03:00, Steven D'Aprano wrote: I'm trying to understand why vars() exists. Does anyone use it? I use vars() exclusively for introspection in interactive

[issue25794] __setattr__ does not always overload operators

2015-12-04 Thread Dominik Schmid
New submission from Dominik Schmid: While implementing my own Integer class that keeps track of when operations are applied I noticed that setattr had a strange behaviour when I tried to wrap operator functions. When the attribute string had a different id to its literal it failed to

[issue25664] Logging cannot handle Unicode logger names

2015-12-04 Thread Vinay Sajip
Vinay Sajip added the comment: The problem is that logger names which are Unicode are not handled correctly, leading to the error. -- assignee: -> vinay.sajip title: Unexpected UnicodeDecodeError in logging module -> Logging cannot handle Unicode logger names

Re: getting fileinput to do errors='ignore' or 'replace'?

2015-12-04 Thread Oscar Benjamin
On 4 Dec 2015 08:36, "Serhiy Storchaka" wrote: > > On 04.12.15 00:26, Oscar Benjamin wrote: >> >> On 3 Dec 2015 16:50, "Terry Reedy" wrote: >>> >>> fileinput is an ancient module that predates iterators (and generators) >> >> and context managers. Since by

[issue25795] test_fork1 cannot be run directly: ./pyhon Lib/test/test_fork1.py

2015-12-04 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +zach.ware ___ Python tracker ___ ___

problem

2015-12-04 Thread Dylan Goodwin
Every time I try and run python 3.5 it keeps coming up with modify, repair or uninstall -- https://mail.python.org/mailman/listinfo/python-list

[issue25789] py launcher stderr is not piped to subprocess.Popen.stderr

2015-12-04 Thread Wolfgang Maier
Wolfgang Maier added the comment: > The error() function in PC/launcher.c should call exit(rc) instead of > ExitProcess(rc). This allows the CRT to terminate properly and flush the > stderr FILE stream. Interesting. Why do you need to flush stderr? I would have expected it to be unbuffered

[issue25789] py launcher stderr is not piped to subprocess.Popen.stderr

2015-12-04 Thread Vinay Sajip
Changes by Vinay Sajip : -- nosy: +vinay.sajip ___ Python tracker ___ ___

[issue25795] test_fork1 cannot be run directly: ./pyhon Lib/test/test_fork1.py

2015-12-04 Thread STINNER Victor
New submission from STINNER Victor: haypo@smithers$ ./python Lib/test/test_fork1.py Traceback (most recent call last): File "Lib/test/test_fork1.py", line 111, in unittest.main() NameError: name 'unittest' is not defined According to pyflakes, the error "undefined name 'unittest'" is

[issue25783] test_traceback.test_walk_stack() fails when run directly (without regrtest)

2015-12-04 Thread STINNER Victor
STINNER Victor added the comment: The test was introduced by the change 73afda5a4e4c of the issue ##17911 in Python 3.6: --- changeset: 94850:73afda5a4e4c parent: 94848:fc0201ccbcd4 user:Robert Collins date:Thu Mar 05 12:07:57 2015 +1300 files:

[issue25796] Running test_multiprocessing_spawn is slow (more than 8 minutes)

2015-12-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: First, we have to mark longest tests with @support.requires_resource('cpu'). -- nosy: +serhiy.storchaka ___ Python tracker

[issue25794] __setattr__ does not always overload operators

2015-12-04 Thread Eryk Sun
Changes by Eryk Sun : Removed file: http://bugs.python.org/file41235/issue25794_1.patch ___ Python tracker ___

python 3.5.0rc1 problem opening IDLE in windows

2015-12-04 Thread Nicky Mac
Dear python team since windows applied some updates last night to my windows 10 and windows 7 systems, I can't open anything with IDLE as I usually do. On windows 10 (64bit with 64bit python), I performed the installation repair procedure. * Edit with IDLE does not appear as an installed windows

[issue10141] SocketCan support

2015-12-04 Thread Vinay Sajip
Changes by Vinay Sajip : -- status: open -> closed ___ Python tracker ___ ___

[issue25783] test_traceback.test_walk_stack() fails when run directly (without regrtest)

2015-12-04 Thread STINNER Victor
STINNER Victor added the comment: I found a similar bug in other tests, I opened the new issue #25795. -- ___ Python tracker ___

[issue25796] Running test_multiprocessing_spawn is slow (more than 8 minutes)

2015-12-04 Thread STINNER Victor
Changes by STINNER Victor : -- components: +Tests type: -> performance ___ Python tracker ___

[issue25796] Running test_multiprocessing_spawn is slow (more than 8 minutes)

2015-12-04 Thread STINNER Victor
New submission from STINNER Victor: Hi, When I run the Python test suite with "./python -m test -j0 -rW", test_multiprocessing_spawn is almost the latest one to run. Example: --- (...) [399/401/1] test_lib2to3 (68 sec) -- running: test_zipfile (43 sec), test_multiprocessing_spawn (484 sec)

[issue25794] __setattr__ does not always overload operators

2015-12-04 Thread Eryk Sun
Eryk Sun added the comment: Normally Python code calls built-in setattr, which calls the C API PyObject_SetAttr. This API interns the attribute name before calling the type's tp_setattro or tp_setattr function. Interning the string is a critical step, since the implementation for updating

[issue25794] __setattr__ does not always overload operators

2015-12-04 Thread Eryk Sun
Eryk Sun added the comment: This updated patch calls PyUnicode_Check to ensure the name is a string before calling PyUnicode_InternInPlace. -- Added file: http://bugs.python.org/file41236/issue25794_2.patch ___ Python tracker

Re: How to bounce the ball forever around the screen

2015-12-04 Thread Peter Otten
phamton...@gmail.com wrote: > from Tkinter import * > window = Tk() > canvas = Canvas(window, width=500, height=500, background="green") > canvas.pack() > > def move_ball(speed_x, speed_y): > box = canvas.bbox("ball") > x1 = box[0] > y1 = box[1] > x2 = box[2] >

[issue25797] Default argument values with type hints break type correctness

2015-12-04 Thread Emanuel Barry
Emanuel Barry added the comment: As Stefan said, this is not a bug with Python. Enforcing strict type checking is the responsibility of third-party tools, not the interpreter. -- nosy: +ebarry resolution: -> not a bug stage: -> resolved status: open -> closed

Re: problem

2015-12-04 Thread Laura Creighton
In a message of Thu, 03 Dec 2015 21:25:53 +0200, Dylan Goodwin writes: >Every time I try and run python 3.5 it keeps coming up with modify, repair >or uninstall >-- >https://mail.python.org/mailman/listinfo/python-list What OS are you running? If windows XP, your problem is that your OS is too

[issue25789] py launcher stderr is not piped to subprocess.Popen.stderr

2015-12-04 Thread Eryk Sun
Eryk Sun added the comment: Patch 2 additionally modifies run_child to call exit() instead of ExitProcess. For example: >>> import os, subprocess >>> os.environ['PYLAUNCH_DEBUG'] = '1' >>> p = subprocess.Popen(r'py -3 -c ""', stderr=subprocess.PIPE, stdout=subprocess.PIPE) >>>

[issue25797] Default argument values with type hints break type correctness

2015-12-04 Thread Stefan Krah
Stefan Krah added the comment: The compiler does not perform type checking. These are type *annotations* for third party tools like Mypy. -- nosy: +skrah ___ Python tracker

Re: [Python-ideas] Missing Core Feature: + - * / | & do not call __getattr__

2015-12-04 Thread Ian Kelly
On Fri, Dec 4, 2015 at 7:20 AM, Stephan Sahm wrote: > Dear all, > > I just stumbled upon a very weird behaviour of python 2 and python 3. At > least I was not able to find a solution. > > The point is to dynamically define __add__, __or__ and so on via __getattr__ > (for

[issue23936] Wrong references to deprecated find_module instead of find_spec

2015-12-04 Thread Thomas Kluyver
Thomas Kluyver added the comment: Updated patch attached, responding to Martin's suggestions. I'm not quite sure what to do about the 'finder' glossary entry. 'Finder' now seems to be a more abstract classification covering two distinct kinds of thing: *meta path finders* and *path entry

Re: python 3.5.0rc1 problem opening IDLE in windows

2015-12-04 Thread Laura Creighton
In a message of Fri, 04 Dec 2015 11:26:59 +, Nicky Mac writes: >Dear python team >since windows applied some updates last night to my windows 10 and windows >7 systems, >I can't open anything with IDLE as I usually do. >On windows 10 (64bit with 64bit python), I performed the installation

[issue25789] py launcher stderr is not piped to subprocess.Popen.stderr

2015-12-04 Thread Steve Dower
Steve Dower added the comment: ExitProcess is a system API and exit is the C runtime API. The C runtime is doing the buffering, so the system doesn't know about it and can't flush if you terminate through that API. The exit function should, or we could explicitly flush the buffer after

Re: urllib2.urlopen() crashes on Windows 2008 Server

2015-12-04 Thread Ulli Horlacher
Dennis Lee Bieber wrote: > >I have a Python2 program which runs fine on Windows 7, but > >crashes on Windows 2008 Server R2 64 bit: > > > >downloading http://fex.belwue.de/download/7za.exe > >Traceback (most recent call last): > > File "", line 1992, in > > File "",

Sphinx 1.3.3 released

2015-12-04 Thread Takayuki Shimizukawa
Hi all, I'm delighted to announce the release of Sphinx 1.3.3, now available on the Python package index at . It includes about 3 bug fixes for the 1.3 release series, among them a regression in 1.3.2 that is including packaging error. For the full changelog,

[issue25797] Default argument values with type hints break type correctness

2015-12-04 Thread Dhruv Rajvanshi
New submission from Dhruv Rajvanshi: Specifying default arguments break the type system. The types of default values aren't matched with the type of the argument. Moreover, having None as a default value changes the type declaration to Optional[T]. So, the declaration may be f(a : int =

Re: Exclude text within quotation marks and words beginning with a capital letter

2015-12-04 Thread Jason Friedman
> > I am working on a program that is written in Python 2.7 to be compatible > with the POS tagger that I import from Pattern. The tagger identifies all > the nouns in a text. I need to exclude from the tagger any text that is > within quotation marks, and also any word that begins with an upper

Re: Frozen apps (py2exe, cx_freeze) built with Python 3.5

2015-12-04 Thread Zachary Ware
On Fri, Dec 4, 2015 at 10:37 AM, Ian Kelly wrote: > On Fri, Dec 4, 2015 at 10:21 AM, d...@forestfield.co.uk > wrote: >> Python 3.5 will not run under Windows XP, but what about applications >> created using py2exe or cx_freeze under Windows 7, 8 or

[issue23936] Wrong references to deprecated find_module instead of find_spec

2015-12-04 Thread Thomas Kluyver
Thomas Kluyver added the comment: That's basically what I was aiming for. Should the description be briefer and more generic? -- ___ Python tracker ___

[issue13033] Add shutil.chowntree

2015-12-04 Thread YoSTEALTH
YoSTEALTH added the comment: Can this chowntree() function proposed here be implemented? It would have saved me a bunch of time and its a good feature to have. -- nosy: +YoSTEALTH, r.david.murray ___ Python tracker

[issue23936] Wrong references to deprecated find_module instead of find_spec

2015-12-04 Thread Brett Cannon
Brett Cannon added the comment: The generic "finder" glossary entry should be rather generic and then point to "meta path finder" and "path entry finder" for dis-ambiguity (and both of those terms are already in the glossary). -- ___ Python tracker

Frozen apps (py2exe, cx_freeze) built with Python 3.5

2015-12-04 Thread d...@forestfield.co.uk
Python 3.5 will not run under Windows XP, but what about applications created using py2exe or cx_freeze under Windows 7, 8 or 10, is there any knowledge of whether they will run under XP? Regards, David Hughes Forestfield Software -- https://mail.python.org/mailman/listinfo/python-list

Re: Frozen apps (py2exe, cx_freeze) built with Python 3.5

2015-12-04 Thread Ian Kelly
On Fri, Dec 4, 2015 at 10:21 AM, d...@forestfield.co.uk wrote: > Python 3.5 will not run under Windows XP, but what about applications created > using py2exe or cx_freeze under Windows 7, 8 or 10, is there any knowledge of > whether they will run under XP? I wouldn't

Re: Unicode failure

2015-12-04 Thread Oscar Benjamin
On 4 Dec 2015 22:34, "D'Arcy J.M. Cain" wrote: > > I thought that going to Python 3.4 would solve my Unicode issues but it > seems I still don't understand this stuff. Here is my script. > > #! /usr/bin/python3 > # -*- coding: UTF-8 -*- > import sys >

counting unique numpy subarrays

2015-12-04 Thread duncan smith
Hello, I'm trying to find a computationally efficient way of identifying unique subarrays, counting them and returning an array containing only the unique subarrays and a corresponding 1D array of counts. The following code works, but is a bit slow. ### from collections import

[issue25798] Update python.org installers to use OpenSSL 1.0.2e

2015-12-04 Thread Ned Deily
New submission from Ned Deily: https://www.openssl.org/news/secadv/20151203.txt -- components: Build messages: 255880 nosy: benjamin.peterson, larry, ned.deily, steve.dower priority: normal severity: normal stage: needs patch status: open title: Update python.org installers to use

problem fixed

2015-12-04 Thread Ali Zarkesh
My problem fixed That was only about User Account Control -- https://mail.python.org/mailman/listinfo/python-list

[issue25500] docs claim __import__ checked for in globals, but IMPORT_NAME bytecode does not

2015-12-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset 567baf74ebad by Brett Cannon in branch '3.5': Issue #25500: Fix the language reference to not claim that import https://hg.python.org/cpython/rev/567baf74ebad New changeset 0259c2c555fb by Brett Cannon in branch 'default': Merge for issue #25500

RE: Unicode failure

2015-12-04 Thread Albert-Jan Roskam
I think you need to use a raw unicode string, ur >>> unicodedata.name(ur'\u2122') 'TRADE MARK SIGN' > Date: Fri, 4 Dec 2015 13:07:38 -0500 > From: da...@vybenetworks.com > To: python-list@python.org > Subject: Unicode failure > > I thought that going to Python 3.4 would solve my Unicode issues

[issue25799] 2.7.11rc1 not added to Win10 app list (start menu)

2015-12-04 Thread Terry J. Reedy
Terry J. Reedy added the comment: By 'Start - All apps' I meant the list in the bottom left, as illustrated in some of the links of the search page you posted. I am sure 2.7.10 was there at some point, though not necessarily earlier today. -- ___

Re: counting unique numpy subarrays

2015-12-04 Thread Peter Otten
duncan smith wrote: > Hello, > I'm trying to find a computationally efficient way of identifying > unique subarrays, counting them and returning an array containing only > the unique subarrays and a corresponding 1D array of counts. The > following code works, but is a bit slow. > >

[issue25039] Docs: Link to Stackless Python in Design and History FAQ section is broken

2015-12-04 Thread Zachary Ware
Changes by Zachary Ware : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___

Unicode failure

2015-12-04 Thread D'Arcy J.M. Cain
I thought that going to Python 3.4 would solve my Unicode issues but it seems I still don't understand this stuff. Here is my script. #! /usr/bin/python3 # -*- coding: UTF-8 -*- import sys print(sys.getdefaultencoding()) print(u"\N{TRADE MARK SIGN}") And here is my output. utf-8 Traceback

[issue25768] compileall functions do not document or test return values

2015-12-04 Thread Brett Cannon
Brett Cannon added the comment: I just realized there are no tests for this in test_compileall either. Nicholas, do you have any interest in attempting to add tests for the return values before we document them? -- title: compileall functions do not document return values ->

[issue23936] Wrong references to deprecated find_module instead of find_spec

2015-12-04 Thread Thomas Kluyver
Thomas Kluyver added the comment: Thanks Brett :-) -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue25799] 2.7.11rc1 not added to Win10 app list (start menu)

2015-12-04 Thread Steve Dower
Steve Dower added the comment: It's worked fine on my Win10 machine (with all updates - they can't be turned off easily on Win10...). If you browse through the All Apps menu (https://www.bing.com/search?q=windows+10+all+apps+menu) do you see Python 2.7 there? --

Re: [Python-ideas] Using functools.lru_cache only on some arguments of a function

2015-12-04 Thread Ian Kelly
On Fri, Dec 4, 2015 at 2:44 PM, Bill Winslow wrote: > This is a question I posed to reddit, with no real resolution: > https://www.reddit.com/r/learnpython/comments/3v75g4/using_functoolslru_cache_only_on_some_arguments/ > > The summary for people here is the following: > >

Re: Unicode failure

2015-12-04 Thread Peter Otten
D'Arcy J.M. Cain wrote: > I thought that going to Python 3.4 would solve my Unicode issues but it > seems I still don't understand this stuff. Here is my script. > > #! /usr/bin/python3 > # -*- coding: UTF-8 -*- > import sys > print(sys.getdefaultencoding()) > print(u"\N{TRADE MARK SIGN}") > >

[issue25795] test_fork1 cannot be run directly: ./python Lib/test/test_fork1.py

2015-12-04 Thread Zachary Ware
Zachary Ware added the comment: STINNER Victor added the comment: > Can you please check if the branch 3.5 is impacted? It is. -- ___ Python tracker ___

[issue25801] ResourceWarning in test_zipfile64

2015-12-04 Thread SilentGhost
New submission from SilentGhost: Running test_zipfile64 from command line (i.e., ./python Lib/test/test_zipfile64.py) I get two ResourceWarnings: » ./python Lib/test/test_zipfile64.py ..Lib/test/test_zipfile64.py:82: ResourceWarning:

Re: Unicode failure

2015-12-04 Thread Terry Reedy
On 12/4/2015 1:07 PM, D'Arcy J.M. Cain wrote: I thought that going to Python 3.4 would solve my Unicode issues Within Python itself, that should be mostly true. As soon as you send text to a display, the rules of the display device take over. #! /usr/bin/python3 # -*- coding: UTF-8 -*-

[issue25799] 2.7.11rc1 not added to Win10 app list (start menu)

2015-12-04 Thread Terry J. Reedy
New submission from Terry J. Reedy: I just installed 2.7.11rc1 on Win 10 and noticed that 'Python 2.7' is missing both from Start - All apps and from search bar results for 'python' (only 3.4 and 3.5 appear in local search results). To be sure, I uninstalled, installed fresh, and even

[issue25800] errors running test_capi from command line

2015-12-04 Thread SilentGhost
New submission from SilentGhost: Running: ./python Lib/test/test_capi.py I got EmbeddingTests erroring out in setUp: first line of which (a triple application of os.path.dirname) creates an empty string which cannot be used as an argument to os.chdir afterwards. I'm to be honest not at all

[issue24934] django_v2 benchmark not working in Python 3.6

2015-12-04 Thread Brett Cannon
Brett Cannon added the comment: Thanks for the patch, Florin! Only changes I made was to deprecate django_v2 and to set the minimum Python version to 2.7. -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python

RE: counting unique numpy subarrays

2015-12-04 Thread Albert-Jan Roskam
Hi (Sorry for topposting) numpy.ravel is faster than numpy.flatten (no copy) numpy.empty is faster than numpy.zeros numpy.fromiter might be useful to avoid the loop (just a hunch) Albert-Jan > From: duncan@invalid.invalid > Subject: counting unique numpy subarrays > Date: Fri, 4 Dec 2015

[issue25799] 2.7.11rc1 not added to Win10 app list (start menu)

2015-12-04 Thread Terry J. Reedy
Terry J. Reedy added the comment: 2.7.10 and 3.4.3 were on the Start menu before conversion to Win 10, so this is the first time I have added anything before 3.5. -- ___ Python tracker

[issue25771] importlib: '.submodule' is not a relative name (no leading dot)

2015-12-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset b3a0765671d6 by Brett Cannon in branch 'default': Issue #25771: Tweak ValueError message when package isn't specified https://hg.python.org/cpython/rev/b3a0765671d6 -- nosy: +python-dev ___ Python

[issue25771] importlib: '.submodule' is not a relative name (no leading dot)

2015-12-04 Thread Brett Cannon
Brett Cannon added the comment: Fixed in default (left 3.5 alone since it technically isn't a bug fix but a clarification; fine if someone else wants to handle the backport). -- resolution: -> fixed stage: -> resolved status: open -> closed ___

[issue25039] Docs: Link to Stackless Python in Design and History FAQ section is broken

2015-12-04 Thread Camilla Montonen
Camilla Montonen added the comment: Hi everyone on the nosy list! I think this issue can be closed. The maintainer of the stackless website http://www.stackless.com/ has posted a message about technical problems and included links to the docs for the project. --

[issue25795] test_fork1 cannot be run directly: ./python Lib/test/test_fork1.py

2015-12-04 Thread STINNER Victor
STINNER Victor added the comment: > How am I supposed to start? Can you please check if the branch 3.5 is impacted? -- ___ Python tracker ___

[issue25799] 2.7.11rc1 not added to Win10 app list (start menu)

2015-12-04 Thread Terry J. Reedy
Terry J. Reedy added the comment: I believe I have auto-updates turned on, so this could be new after recent Win 10 patches. -- ___ Python tracker ___

[issue24934] django_v2 benchmark not working in Python 3.6

2015-12-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset 8a9b86071c15 by Brett Cannon in branch 'default': Issue #24934: Introduce the django_v2 benchmark using Django 1.9.0. https://hg.python.org/benchmarks/rev/8a9b86071c15 -- nosy: +python-dev ___ Python

Problem in pip

2015-12-04 Thread Ali Zarkesh
My pip can't download or upgrade anything I use python 3.5 (win 32) and my pip version is 7.1.2. The error message is this: Exception: Traceback (most recent call last): File "c:\program files\python 3.5\lib\site-packages\pip\basecommand.py", line 211, in main status = self.run(options, args)

Re: Problem in pip

2015-12-04 Thread Zachary Ware
On Fri, Dec 4, 2015 at 12:02 PM, Ali Zarkesh wrote: > My pip can't download or upgrade anything > I use python 3.5 (win 32) and my pip version is 7.1.2. > The error message is this: > > Exception: > Traceback (most recent call last): > ... > PermissionError: [Errno 13]

[issue25500] docs claim __import__ checked for in globals, but IMPORT_NAME bytecode does not

2015-12-04 Thread Brett Cannon
Brett Cannon added the comment: Thanks for the bug report, Sergei! I fixed the docs in the end. -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker

[issue25795] test_fork1 cannot be run directly: ./python Lib/test/test_fork1.py

2015-12-04 Thread Felippe da Motta Raposo
Felippe da Motta Raposo added the comment: I did it! Can you please take a look at it? -- keywords: +patch Added file: http://bugs.python.org/file41241/mywork.patch ___ Python tracker

[issue25798] Update python.org installers to use OpenSSL 1.0.2e

2015-12-04 Thread Steve Dower
Steve Dower added the comment: Considering we're building 2.7 and 3.5 tomorrow, ought we delay them long enough to add a second RC with this change? Looking at the issues that have been fixed, it doesn't seem like any are critical. -- ___ Python

[issue25800] errors running test_capi from command line

2015-12-04 Thread Martin Panter
Martin Panter added the comment: The code looks like it is trying to find the root of the source code tree, and then chdir() to it and access /Programs/_testembed etc. In your case the chain of dirname() calls returns an empty string because that root is already the current directory. I would

[issue21240] Add an abstactmethod directive to the Python ReST domain

2015-12-04 Thread Brett Cannon
Brett Cannon added the comment: Are you willing to check this in, Berker? Or is it not needed anymore? -- assignee: docs@python -> berker.peksag nosy: +brett.cannon ___ Python tracker

[issue25802] Finish deprecating load_module()

2015-12-04 Thread Brett Cannon
New submission from Brett Cannon: There are a couple concrete implementations of load_module() in importlib that have not been explicitly deprecated that probably should be. As part of this I will finally add an Examples section to the importlib docs to show how to do common tasks such as

Re: counting unique numpy subarrays

2015-12-04 Thread duncan smith
On 04/12/15 22:36, Albert-Jan Roskam wrote: > Hi > > (Sorry for topposting) > > numpy.ravel is faster than numpy.flatten (no copy) > numpy.empty is faster than numpy.zeros > numpy.fromiter might be useful to avoid the loop (just a hunch) > > Albert-Jan > Thanks, I'd forgotten the difference

[issue25795] test_fork1 cannot be run directly: ./python Lib/test/test_fork1.py

2015-12-04 Thread Martin Panter
Martin Panter added the comment: Either patch looks good to me. I don’t have a strong opinion about unittest.TestCase. I left a comment about adding the module=... back in test_pyclbr. -- nosy: +martin.panter stage: needs patch -> patch review ___

msvcr100.dll missing ... error started after Windows 10 update to 10586.17

2015-12-04 Thread Glenn Linderman
My wife's 64-bit Win8 home machine has 32-bit Python 3.3 installed. Then it upgraded to Win 8.1. Then I upgraded it to Win 10. Then I upgraded it to Threshold 2. It gets regular automatic updates also, like the one last night to build 10586.17. That's the history. When she tried a python

[issue21235] importlib's spec module create algorithm is not exposed

2015-12-04 Thread Brett Cannon
Brett Cannon added the comment: Is there anything left in this issue that hasn't been addressed in Python 3.5? -- status: open -> pending ___ Python tracker

[issue25755] Test test_property failed if run twice

2015-12-04 Thread Martin Panter
Martin Panter added the comment: Maybe it would be even better to wrap this up using unittest.mock.patch.object(). That is an obscure function that is hard to learn from the documentation, but very useful for testing. There is also test.support.swap_attr(), which is easier to figure out.

[issue23936] Wrong references to deprecated find_module instead of find_spec

2015-12-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset 88cee7d16ccb by Brett Cannon in branch '3.5': Issue #23936: Clarify what finders are. https://hg.python.org/cpython/rev/88cee7d16ccb New changeset 1b1900d2a537 by Brett Cannon in branch 'default': Merge for issue #23936

[issue13368] Possible problem in documentation of module subprocess, method send_signal

2015-12-04 Thread Eryk Sun
Eryk Sun added the comment: You can send CTRL_C_EVENT to a process group. But it requires the group leader to manually enable Ctrl+C handling. Initially it's disabled when creating a process with CREATE_NEW_PROCESS_GROUP. The attached script demonstrates sending CTRL_C_EVENT to a process

[issue25801] ResourceWarning in test_zipfile64

2015-12-04 Thread Martin Panter
Martin Panter added the comment: It looks like it is disabled from the regular test suite on purpose: # XXX(nnorwitz): disable this test by looking for extra largfile [sic] resource # which doesn't exist. This test takes over 30 minutes to run in general # and requires more disk space than

[issue14285] Traceback wrong on ImportError while executing a package

2015-12-04 Thread Martin Panter
Martin Panter added the comment: I think the problem with doing a blind import of the parent package is it would be hard to differentiate between the ImportError when the package (or an ancestor) is missing, versus a user-generated ImportError. Maybe you could inspect the exception as a

[issue25771] importlib: '.submodule' is not a relative name (no leading dot)

2015-12-04 Thread Martin Panter
Martin Panter added the comment: Thanks, the fix is fine and there is no big need to backport it. For the record, I only came across this playing with runpy. Old message: $ python3 -m .submodule /sbin/python3: Error while finding spec for '.submodule' (: '.submodule' is not a relative name

[issue25795] test_fork1 cannot be run directly: ./python Lib/test/test_fork1.py

2015-12-04 Thread Felippe da Motta Raposo
Felippe da Motta Raposo added the comment: SilentGhost suggested that I should change all occurrences of `TestCase`, on both `test_telnetlib` and `test_pyclbr`, by `unittest.TestCase`. This patch has these changes. -- Added file: http://bugs.python.org/file41244/mywork.patch

[issue21436] Consider leaving importlib.abc.Loader.load_module()

2015-12-04 Thread Brett Cannon
Brett Cannon added the comment: Python 3.5 lets you do: spec = importlib.util.spec_from_file_location('what.ever', 'foo.py') module = importlib.util.module_from_spec(spec) spec.loader.exec_module(module) I am satisfied that case for loading from a file is easy enough to not warrant

[issue25156] shutil.copyfile should internally use os.sendfile when possible

2015-12-04 Thread desbma
desbma added the comment: Here is a new patch, with changes suggested by SilentGhost and josh.rosenberg in the review. -- Added file: http://bugs.python.org/file41243/issue25156_v4.patch ___ Python tracker

Re: counting unique numpy subarrays

2015-12-04 Thread duncan smith
On 04/12/15 23:06, Peter Otten wrote: > duncan smith wrote: > >> Hello, >> I'm trying to find a computationally efficient way of identifying >> unique subarrays, counting them and returning an array containing only >> the unique subarrays and a corresponding 1D array of counts. The >>

[issue14911] generator.throw() documentation inaccurate

2015-12-04 Thread Martin Panter
Martin Panter added the comment: Changes in throw-3x.v2.patch: * Split into two signatures * Added parallel coroutine.throw(value) signature * *Value* should be an exception instance; drop mentioning other options * Default value is instantiated from *type* * __traceback__ can be cleared *

[issue25795] test_fork1 cannot be run directly: ./python Lib/test/test_fork1.py

2015-12-04 Thread Felippe da Motta Raposo
Felippe da Motta Raposo added the comment: Martin Panter added the comment: > I left a comment about adding the module=... back in test_pyclbr. I had to put it because `test_others` was failing: (test output) ``` l1=['TestCase'] l2=['unittest.TestCase'] ignore={'object'} class= FAIL

[issue25764] PyObject_Call() is called with an exception set in subprocess

2015-12-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset 4f4e2cbd2138 by Martin Panter in branch '3.4': Issue #25764: Preserve subprocess fork exception when preexec_fn used https://hg.python.org/cpython/rev/4f4e2cbd2138 New changeset ae27ad306dbf by Martin Panter in branch '3.5': Issue #25764: Merge

[issue25764] PyObject_Call() is called with an exception set in subprocess

2015-12-04 Thread Martin Panter
Martin Panter added the comment: OS X buildbots don’t like my resource change. http://buildbot.python.org/all/builders/AMD64%20Snow%20Leop%203.4/builds/1377/steps/test/logs/stdio It seems that the setrlimit() cleanup line is failing, all the subsequent tests fail to fork(). I don’t understand

[issue25194] Opt-in motivations & affiliations page for core contributors

2015-12-04 Thread R. David Murray
R. David Murray added the comment: Is there any reason to keep this issue open at this point? -- ___ Python tracker ___

[issue24903] Do not verify destdir argument to compileall

2015-12-04 Thread R. David Murray
R. David Murray added the comment: Thanks, Jake. -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker ___

Re: Unicode failure

2015-12-04 Thread Random832
On 2015-12-04, Terry Reedy wrote: > Tk widgets, and hence IDLE windows, will print any character from \u > to \u without raising, even if the result is blank or �. Higher > codepoints fail, but allowing the entire BMP is better than any Windows > codepage. Well, any

[issue25803] pathlib.Path('/').mkdir() raises wrong error type

2015-12-04 Thread Daniel Lepage
New submission from Daniel Lepage: pathlib.Path('/').mkdir() raises an IsADirectoryError instead of a FileExistsError. -- components: Library (Lib) messages: 255916 nosy: Daniel Lepage priority: normal severity: normal status: open title: pathlib.Path('/').mkdir() raises wrong error

[issue24903] Do not verify destdir argument to compileall

2015-12-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset b63fd82a8528 by R David Murray in branch '3.4': #24903: Remove misleading error message to fix regression. https://hg.python.org/cpython/rev/b63fd82a8528 New changeset c65e135df1dc by R David Murray in branch '3.5': Merge: #24903: Remove misleading

Re: Unicode failure

2015-12-04 Thread D'Arcy J.M. Cain
On Fri, 4 Dec 2015 22:49:49 + Albert-Jan Roskam wrote: > I think you need to use a raw unicode string, ur > > >>> unicodedata.name(ur'\u2122') > 'TRADE MARK SIGN' That seems to work in 2.x but not 3.x. -- D'Arcy J.M. Cain Vybe Networks Inc.

  1   2   >