Re: [Theory] How to speed up python code execution / pypy vs GPU

2016-11-06 Thread dieter
"Mr. Wrobel" writes: > ... > However the same skeptics told my that, ok we believe that it is true, > however the code execution is much slower than any other compiled > language. However, in many cases "code execution speed" is not the primary concern. In my experience,

[issue28629] Emit ResourceWarning when implicitly terminating a suspended frame?

2016-11-06 Thread Nathaniel Smith
Nathaniel Smith added the comment: +1 to the change for generators. This is actually in the PEP 533 draft: https://www.python.org/dev/peps/pep-0533/#modifications-to-basic-iterator-types For coroutines, doesn't this overlap with the existing "coroutine not awaited" warning? --

Re: pip3 : command not found

2016-11-06 Thread Jon Ribbens
On 2016-11-06, Michael Torrie wrote: > I'm guessing that it notices by examining the path it was launched from > and looks for virtual environment files relative to that path. Indeed, the mysterious thing is what are "virtual environment files"? The official docs say "A venv

[issue28398] Return singleton empty string in _PyUnicode_FromASCII

2016-11-06 Thread Xiang Zhang
Xiang Zhang added the comment: IMHO, _PyUnicode_FromASCII is a private API and could be used in other places in future. We should not rely on the caller to check and return the singleton empty string. -- ___ Python tracker

Re: pip3 : command not found

2016-11-06 Thread Jon Ribbens
On 2016-11-06, Chris Angelico wrote: > On Sun, Nov 6, 2016 at 4:27 PM, Jon Ribbens wrote: >>> 2) If Python notices that its executable comes from a venv, it uses it. >> >> Yes. My question is *how does it notice*? > > I could answer this question, but

[issue28623] Let `shlex.quote` accept a `PathLike` object

2016-11-06 Thread R. David Murray
R. David Murray added the comment: Which IMO is correct. shlex.quote takes an arbitrary string, not a filename. I'm -1 on this proposal. -- nosy: +r.david.murray ___ Python tracker

[issue27781] Change sys.getfilesystemencoding() on Windows to UTF-8

2016-11-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset b26c8104e54f by Steve Dower in branch '3.6': Closes #27781: Removes special cases for the experimental aspect of PEP 529 https://hg.python.org/cpython/rev/b26c8104e54f New changeset b8233c779ff7 by Steve Dower in branch 'default': Closes #27781:

[issue28629] Emit ResourceWarning when implicitly terminating a suspended frame?

2016-11-06 Thread Nick Coghlan
New submission from Nick Coghlan: There have been a few discussions recently regarding the fact that generator and coroutine cleanup can suppress ResourceWarnings from other components. For example: def mygen(fname): with open(fname) as f: yield from f

Re: Fwd: About Installation.

2016-11-06 Thread MRAB
On 2016-11-06 19:36, Avijit Paul wrote: I installed python-3.6.0b2-amd64 on my Windows PC. Which is running on 64-bit system of Windows 8.1. The installation was successful. After the installation, when I ran the program it showed the following error, as shows in the attachment. I need your

[issue28628] Failure to add signal handlers for any signal but SIGINT

2016-11-06 Thread Guido van Rossum
Guido van Rossum added the comment: Hm... We've seen this exact same crash reported several times before, and it was closed without a fix AFAICT each time. - https://github.com/python/asyncio/issues/396 - http://bugs.python.org/issue23548 IIUC the conclusion in the latter was that this is due

[issue28622] Remove redundant variable annotation test from test_grammar

2016-11-06 Thread Guido van Rossum
Changes by Guido van Rossum : -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___

[issue28622] Remove redundant variable annotation test from test_grammar

2016-11-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset 048f82c86928 by Guido van Rossum in branch '3.6': issue #28622: Remove redundant variable annotation test from test_grammar. Ivan L. https://hg.python.org/cpython/rev/048f82c86928 New changeset e60c1aef639a by Guido van Rossum in branch 'default':

Re: Confused with installing per-user in Windows

2016-11-06 Thread Ivan Pozdeev via Python-list
On 07.11.2016 4:11, ddbug wrote: Dear experts, I need to install some scripts for current user (to skip sudo, UAC popups and whatever). So I make a sdist and use python -m pip install --user This should work for either Python 2 or 3. On Linux, pip installs the scripts into ~/.local/bin

Fwd: About Installation.

2016-11-06 Thread Avijit Paul
-- Forwarded message -- From: Avijit Paul Date: Mon, Nov 7, 2016 at 1:27 AM Subject: About Installation. To: python-list@python.org Hello, I installed python-3.6.0b2-amd64 on my Windows PC. Which is running on 64-bit system of Windows 8.1. The

What is currently the recommended way to work with a distutils-based setup.py that requires compilation?

2016-11-06 Thread Ivan Pozdeev via Python-list
https://wiki.python.org/moin/WindowsCompilers has now completely replaced instructions for `distutils`-based packages (starting with `from distutils.core import setup`) with ones for `setuptools`-based ones (starting with `from setuptools import setup`). However, if I have a `distutils`-based

[issue28628] Failure to add signal handlers for any signal but SIGINT

2016-11-06 Thread A.M. Kuchling
Changes by A.M. Kuchling : -- title: Failure to add -> Failure to add signal handlers for any signal but SIGINT ___ Python tracker ___

[issue28628] Failure to add

2016-11-06 Thread brotherBox
New submission from brotherBox: This is the first bug that I file, so please bear with me here. I was advised to file this after running into a strange situation with asyncio 3.4.3. Adding signal handlers for any other signal but SIGINT throws strange exceptions. The attached source code

Re: Confused with installing per-user in Windows

2016-11-06 Thread ddbug
So basically I want to modify py.exe to not only detect the Python version from a script file, but also help locating the script file. -- d -- https://mail.python.org/mailman/listinfo/python-list

[issue28609] argparse claims '*' positional argument is required in error output

2016-11-06 Thread paul j3
paul j3 added the comment: My suggestion to use `metavar=('A','')` to streamline the usage creates problems with the help code http://bugs.python.org/issue14074 The tuple metavar does not work right for positionals. That's a old issue that should have been fixed long ago. So streamlining

Confused with installing per-user in Windows

2016-11-06 Thread ddbug
Dear experts, I need to install some scripts for current user (to skip sudo, UAC popups and whatever). So I make a sdist and use python -m pip install --user This should work for either Python 2 or 3. On Linux, pip installs the scripts into ~/.local/bin ; users are instructed to add

[issue28609] argparse claims '*' positional argument is required in error output

2016-11-06 Thread paul j3
paul j3 added the comment: Simply including a `default` parameter, even with the default default None, changes the error message In [395]: parser=argparse.ArgumentParser() In [396]: parser.add_argument('cmd'); In [397]: a=parser.add_argument('args',nargs='*',default=None)

[issue24658] open().write() fails on 2 GB+ data (OS X)

2016-11-06 Thread Harry Li
Changes by Harry Li : -- nosy: +Harry Li ___ Python tracker ___ ___ Python-bugs-list

Re: Delete h2 until you reach the next h2 in beautifulsoup

2016-11-06 Thread rosefox911
On Sunday, November 6, 2016 at 1:27:48 AM UTC-4, rosef...@gmail.com wrote: > Considering the following html: > > cool stuff hiid="cool"> zz > > and the following list: > > ignore_list = ['example','lalala'] > > My goal is, while going through the HTML using Beautifulsoup, I find

[issue28627] [alpine] shutil.copytree fail to copy a direcotry with broken symlinks

2016-11-06 Thread Israel Fruchter
Israel Fruchter added the comment: the failure looks like that: Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/python3.5/shutil.py", line 359, in copytree raise Error(errors) shutil.Error: [('/bug/broken', '/temp/broken', "[Errno 95] Not supported:

[issue28627] [alpine] shutil.copytree fail to copy a direcotry with broken symlinks

2016-11-06 Thread Israel Fruchter
New submission from Israel Fruchter: this fails on python3.5-alpine and python3.6-alpine (works as fine in python2.7-alpine) cd /bug && ln -s /broken_path/to_nowhere broken python -c "import shutil; shutil.copytree('/bug', '/temp', symlinks=True)" Dockerfile example here:

[issue28563] Arbitrary code execution in gettext.c2py

2016-11-06 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka stage: -> patch review ___ Python tracker ___

[issue28586] Convert os.scandir to Argument Clinic

2016-11-06 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue25996] Add support of file descriptor in os.scandir()

2016-11-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Proposed patch adds support for file descriptors in os.scandir() and implements os.fwalk() with os.scandir(). The effect of using os.scandir() in os.fwalk(): $ ./python -m timeit -n1 -r5 -s 'import os' -- 'list(os.walk("/usr/lib"))' 1 loop, best of 5: 934

[issue28587] list.index documentation missing start and stop arguments

2016-11-06 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: Here is an updated patch. Please review :) Thanks. -- Added file: http://bugs.python.org/file45376/issue28587v3.patch ___ Python tracker

[issue10605] ElementTree documentation

2016-11-06 Thread A.M. Kuchling
A.M. Kuchling added the comment: I don't see an 'entity' argument or attribute for TreeBuilder either. XMLParser has a .entity attribute, though. Perhaps this was simple confusion? Adrian: please feel free to re-open and provide a patch if there's actually a bug here. -- nosy:

[issue9621] Graphviz output for 2to3 fixer patterns

2016-11-06 Thread A.M. Kuchling
A.M. Kuchling added the comment: Matt, do you just want to drop the issue or provide a new patch? Your code might well still be useful, but it's been 6 years, so you may not even have the code any longer. -- nosy: +akuchling ___ Python tracker

[issue11368] Document why xml.etree.ElementTree.Element has no reference to parent

2016-11-06 Thread A.M. Kuchling
A.M. Kuchling added the comment: Closing this old issue. -- nosy: +akuchling status: open -> closed ___ Python tracker ___

[issue4713] Installing sgmlop causes xmlrpclib error

2016-11-06 Thread A.M. Kuchling
A.M. Kuchling added the comment: I don't believe this bug is still present in Python 2.7. Issue #5767 removed sgmlop support from xmlrpclib in 2.7 alpha 1, and trying the test program succeeds. Closing. -- nosy: +akuchling resolution: -> works for me status: open -> closed

[issue28609] argparse claims '*' positional argument is required in error output

2016-11-06 Thread Reuben Thomas
Reuben Thomas added the comment: > Try `nargs='?'` or try providing a `default` along with the '*'. Why would I do that? I want 0 or more arguments, and there's no default value. > Including your ARGUMENT action in the error message is intentional. It will likely confuse the user. The syntax

[issue1778] SyntaxError.offset sometimes wrong

2016-11-06 Thread A.M. Kuchling
A.M. Kuchling added the comment: Fixed in Python 3.2 alpha 3, so there's no longer any work to be done for this issue. Closing. -- nosy: +akuchling resolution: -> fixed status: open -> closed ___ Python tracker

[issue28609] argparse claims '*' positional argument is required in error output

2016-11-06 Thread paul j3
paul j3 added the comment: Try `nargs='?'` or try providing a `default` along with the '*'. Including your ARGUMENT action in the error message is intentional. The test for this error message is: required_actions = [] for action in self._actions: if action not in

[issue8840] truncate() semantics changed in 3.1.2

2016-11-06 Thread A.M. Kuchling
A.M. Kuchling added the comment: "Why, this is a simple docstring change. How difficult can it be?", I thought. Ah ha ha ha. Here's a patch against the 3.5 branch. It should also apply cleanly to 3.6 or 3.7, except for a little Argument Clinic noise. The patch changes 3 occurrences of the

[issue6519] Reorder 'with' statement for files in Python Tutorial

2016-11-06 Thread A.M. Kuchling
A.M. Kuchling added the comment: Good suggestion -- here's a patch that moves it and rewrites a little. -- nosy: +akuchling Added file: http://bugs.python.org/file45374/issue6519.txt ___ Python tracker

[issue26855] android: add platform.android_ver()

2016-11-06 Thread Xavier de Gaye
Xavier de Gaye added the comment: ANDROID_API_LEVEL can only be used in the Python test suite and platform.android_ver() must be used in the standard library. The reason why ANDROID_API_LEVEL can be used in the tests instead of using the runtime API level is that the Python test suite purpose

ANN: released psutil 5.0.0, introducing a 2x speedup for process methods

2016-11-06 Thread Giampaolo Rodola'
Hello all, I'm glad to announce the release of psutil 5.0.0: https://github.com/giampaolo/psutil This release introduces important speedups making psutil from 2x to 6x faster depending on what platform you're on. A full blog post can be found here:

ANN: released psutil 5.0.0, introducing a 2x speedup for process methods

2016-11-06 Thread Giampaolo Rodola'
Hello all, I'm glad to announce the release of psutil 5.0.0: https://github.com/giampaolo/psutil This release introduces important speedups making psutil from 2x to 6x faster depending on what platform you're on. A full blog post can be found here:

[issue28587] list.index documentation missing start and stop arguments

2016-11-06 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: Thanks for the feedback :) Makes sense, I'll work on another patch. -- ___ Python tracker ___

[issue28587] list.index documentation missing start and stop arguments

2016-11-06 Thread A.M. Kuchling
A.M. Kuchling added the comment: The patch looks fine, though I suggest clarifying the example for a.index(333, 2) by adding a comment such as '# begin searching at index 2' to explain what's going on. -- nosy: +akuchling ___ Python tracker

[issue21590] Systemtap and DTrace support

2016-11-06 Thread Berker Peksag
Berker Peksag added the comment: Thanks. SilentGhost. I went with ".. highlight:: shell-session" to simplify the patch a bit. Łukasz, can we close this one and create new issues for further improvements now? -- ___ Python tracker

[issue21590] Systemtap and DTrace support

2016-11-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset d05d312161f2 by Berker Peksag in branch '3.6': Issue #21590: Silence Sphinx warnings in instrumentation.rst https://hg.python.org/cpython/rev/d05d312161f2 New changeset 442453fa3370 by Berker Peksag in branch 'default': Issue #21590: Merge from 3.6

[issue28609] argparse claims '*' positional argument is required in error output

2016-11-06 Thread paul j3
paul j3 added the comment: The current error message is the result of http://bugs.python.org/issue10424 and http://bugs.python.org/issue12776 Before the test was just: if positionals: self.error(_('too few arguments')) The 2nd patch reworked the test to include the revised handling

[issue21864] Error in documentation of point 9.8 'Exceptions are classes too'

2016-11-06 Thread Berker Peksag
Berker Peksag added the comment: Thank you for the review, Andrew! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.7 ___ Python tracker

[issue21864] Error in documentation of point 9.8 'Exceptions are classes too'

2016-11-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset db6d556365d7 by Berker Peksag in branch '3.5': Issue #21864: Remove outdated section about exceptions from the tutorial https://hg.python.org/cpython/rev/db6d556365d7 New changeset f82e348946e3 by Berker Peksag in branch '3.6': Issue #21864: Merge

[issue12913] Add a debugging howto

2016-11-06 Thread A.M. Kuchling
A.M. Kuchling added the comment: Éric Araujo: did you ever make any progress on this, such as producing a draft version? -- nosy: +akuchling ___ Python tracker

[issue28563] Arbitrary code execution in gettext.c2py

2016-11-06 Thread Xiang Zhang
Xiang Zhang added the comment: gettext_c2py_v2.patch implements a simple C expression parser. More tests are included. Carl, hope you are willing to test it. -- Added file: http://bugs.python.org/file45373/gettext_c2py_v2.patch ___ Python tracker

[issue21864] Error in documentation of point 9.8 'Exceptions are classes too'

2016-11-06 Thread A.M. Kuchling
A.M. Kuchling added the comment: The patch looks good to me; I think it should just be applied. -- nosy: +akuchling ___ Python tracker ___

[issue28626] Tutorial: rearrange discussion of output formatting to encourage f-strings

2016-11-06 Thread A.M. Kuchling
A.M. Kuchling added the comment: Oh, I didn't finish my thought on open questions: should we just drop the discussion of .ljust(), .zfill(), or should it be there so users are aware of it? Similarly, is it still worth mentioning string.Template? --

[issue28626] Tutorial: rearrange discussion of output formatting to encourage f-strings

2016-11-06 Thread A.M. Kuchling
New submission from A.M. Kuchling: The 'output formatting' section of the tutorial talks a lot about manual formatting with things like .rjust() and .zfill(), with only a passing reference to 3.6's new f-strings. The attached patch doesn't drop all of the old material, but it does rearrange

[issue19569] Use __attribute__((deprecated)) to warn usage of deprecated functions and macros

2016-11-06 Thread Arfrever Frehtes Taifersar Arahesis
Arfrever Frehtes Taifersar Arahesis added the comment: _Pragma syntax would be more suitable since it could be used with macros: https://gcc.gnu.org/onlinedocs/gcc-6.2.0/cpp/Pragmas.html Then Include/pyport.h (which defines Py_DEPRECATED) could also define: #if defined(__GNUC__) && ((__GNUC__

[issue26934] android: test_faulthandler fails

2016-11-06 Thread STINNER Victor
STINNER Victor added the comment: Can you try to write a decorator to not suplicate the same long skipIf()? -- ___ Python tracker ___

[issue28590] fstring's '{' from escape sequences does not start an expression

2016-11-06 Thread Eric V. Smith
Eric V. Smith added the comment: Thanks, Jason. I updated the PEP, so now I think the docs and PEP match the implementation. -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker

[issue19569] Use __attribute__((deprecated)) to warn usage of deprecated functions and macros

2016-11-06 Thread Arfrever Frehtes Taifersar Arahesis
Arfrever Frehtes Taifersar Arahesis added the comment: GCC supports pragmas to locally control warnings. https://gcc.gnu.org/onlinedocs/gcc-6.2.0/gcc/Diagnostic-Pragmas.html Example: __attribute__((__deprecated__)) int some_deprecated_function(void) {

[issue23996] _PyGen_FetchStopIterationValue() crashes on unnormalised exceptions

2016-11-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset bce18f5c0bc4 by Serhiy Storchaka in branch '3.5': Issue #23996: Added _PyGen_SetStopIterationValue for safe raising https://hg.python.org/cpython/rev/bce18f5c0bc4 New changeset a2c9f06ada28 by Serhiy Storchaka in branch '3.6': Issue #23996: Added

[issue21501] submitting mmap example for use in documentation

2016-11-06 Thread Guido van Rossum
Guido van Rossum added the comment: Can you say it in the form of a patch? -- nosy: +gvanrossum ___ Python tracker ___

[issue26855] android: add platform.android_ver()

2016-11-06 Thread Chi Hsuan Yen
Chi Hsuan Yen added the comment: I see Xavier de Gaye uses sysconfig.get_config_var('ANDROID_API_LEVEL') is various patches. That's OK if the build-time target API level of CPython matches runtime Android API level. Does CPython force API level matching? If so this issue is no longer

PyCA cryptography 1.5.3 released

2016-11-06 Thread Paul Kehrer
PyCA cryptography 1.5.3 has been released to PyPI. cryptography is a package which provides cryptographic recipes and primitives to Python developers. Our goal is for it to be your "cryptographic standard library". We support Python 2.6-2.7, Python 3.3+, and PyPy. Changelog: SECURITY ISSUE:

[issue28625] multiprocessing.Pool.imap swallows exceptions thrown by generators

2016-11-06 Thread Elias Zamaria
New submission from Elias Zamaria: I have the following code: from multiprocessing import Pool def double(x): return 2 * x def get_numbers(): raise Exception("oops") yield 1 yield 2 print(list(Pool(processes=2).imap(double, get_numbers( I would expect it to raise an

A Python App To Calculate Sum Of Different Elements In A List With Different Values

2016-11-06 Thread Abdullahi Salihu Abubakar
Hello! Hope you guys are fine. I am a newbie in programming, though I have been experimenting with Python for close to 3 years, but have never attempt writing any real-life program. However, recently I decided to embark on a personal project to develop a Python App which I want to dedicate

Re:

2016-11-06 Thread Chris Angelico
On Sun, Nov 6, 2016 at 12:33 AM, Abdullahi Salihu Abubakar wrote: > [lots of text, taking a representative sample] > 4. I presently use list to hold the list of beneficiaries. Based on the > short description of the proposed app above, which other container is it >

[issue28590] fstring's '{' from escape sequences does not start an expression

2016-11-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1d8b8a67b657 by Jason R. Coombs in branch '3.6': Additionally show that a backslash-escaped opening brace is treated as a literal and thus triggers the single closing brace error, clarifying #28590. https://hg.python.org/cpython/rev/1d8b8a67b657

A Python App To Calculate Sum Of Different Elements In A List With Different Values

2016-11-06 Thread Abdullahi Salihu Abubakar
Hello! Hope you guys are fine. I am a newbie in programming, though I have been experimenting with Python for close to 3 years, but have never attempt writing any real-life program. However, recently I decided to embark on a personal project to develop a Python App which I want to dedicate to

Re: Pre-pep discussion material: in-place equivalents to map and filter

2016-11-06 Thread Chris Angelico
On Sun, Nov 6, 2016 at 12:50 AM, Arthur Havlicek wrote: > 2016-11-05 12:47 GMT+01:00 Chris Angelico : > >> On Sat, Nov 5, 2016 at 9:50 PM, Arthur Havlicek >> >> But here's the thing. For everyone who writes a decorator function, >> there could be dozens

[issue28590] fstring's '{' from escape sequences does not start an expression

2016-11-06 Thread Jason R. Coombs
Jason R. Coombs added the comment: The reason that those test_no_escapes_for_braces assertions pass is because they're only dealing with opening curly braces and in an f-string, they're treated as literal opening braces. In the example you've given, the error occurs when the f-string handler

Trac 1.2 Released

2016-11-06 Thread Ryan Ollos
Trac 1.2 is now available. You can find the release at the usual place: https://trac.edgewall.org/wiki/TracDownload#LatestStableRelease Trac 1.2 is the first major release of Trac in more than 4 years. The following are some highlights from the release: * Extensible notification system (#3517) *

SCons 2.5.1 Released

2016-11-06 Thread Bill Deegan
Available at: https://sourceforge.net/projects/scons/files/latest/download?source=files Changelog: SCons - a software construction tool Change Log RELEASE 2.5.1 - Mon, 03 Nov 2016 13:37:42 -0400 From William Deegan: - Add

ANN: pandas v0.19.1 released!

2016-11-06 Thread Joris Van den Bossche
Hi all, I'm pleased to announce the release of pandas 0.19.1. This is a bug-fix release from 0.19.0 and includes some small regression fixes, bug fixes and performance improvements. We recommend that all users upgrade to this version. See the v0.19.1 Whatsnew page

[no subject]

2016-11-06 Thread Abdullahi Salihu Abubakar
Hello! Hope you guys are fine. I am a newbie in programming, though I have been experimenting with Python for close to 3 years, but have never attempt writing any real-life program. However, recently I decided to embark on a personal project to develop a Python App which I want to dedicate to

Re: Pre-pep discussion material: in-place equivalents to map and filter

2016-11-06 Thread Arthur Havlicek
2016-11-05 12:47 GMT+01:00 Chris Angelico : > On Sat, Nov 5, 2016 at 9:50 PM, Arthur Havlicek > > But here's the thing. For everyone who writes a decorator function, > there could be dozens who use it. > The day that one guy leaves the team, suddenly you have code that's become

[issue26934] android: test_faulthandler fails

2016-11-06 Thread Xavier de Gaye
Xavier de Gaye added the comment: The problem: raise() does not cause the program to exit in a Python interactive session and a spawned Python process exits with 0. Android fixed this problem at API level 24 (Android 6.0 aka Marshmallow). The attached patch fixes this (tested at API levels 21

[issue28590] fstring's '{' from escape sequences does not start an expression

2016-11-06 Thread Jason R. Coombs
Jason R. Coombs added the comment: I've got a patch ready for this and will be applying it shortly after we update the spec. -- assignee: docs@python -> jason.coombs nosy: +jason.coombs ___ Python tracker

[issue28398] Return singleton empty string in _PyUnicode_FromASCII

2016-11-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The case for size=0 often is handled before calling _PyUnicode_FromASCII. In what circumstances _PyUnicode_FromASCII is called with size=0? Is this case covered by tests? -- ___ Python tracker

[issue28147] Unbounded memory growth resizing split-table dicts

2016-11-06 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +serhiy.storchaka ___ Python tracker ___

[issue28199] Compact dict resizing is doing too much work

2016-11-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Re-committed. It might be dangerous to commit this in 3.6 at that stage. -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker

[issue28199] Compact dict resizing is doing too much work

2016-11-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset 39f33c15243b by Serhiy Storchaka in branch 'default': Issue #28199: Microoptimized dict resizing. Based on patch by Naoki Inada. https://hg.python.org/cpython/rev/39f33c15243b -- ___ Python tracker

Re: pip3 : command not found

2016-11-06 Thread Michael Torrie
On 11/05/2016 11:27 PM, Jon Ribbens wrote: >> 2) If Python notices that its executable comes from a venv, it uses it. > > Yes. My question is *how does it notice*? I'm guessing that it notices by examining the path it was launched from and looks for virtual environment files relative to that

Re: Force virtualenv pip to be used

2016-11-06 Thread Chris Angelico
On Sun, Nov 6, 2016 at 10:19 PM, Peter Otten <__pete...@web.de> wrote: > Chris Angelico wrote: > >> On Sun, Nov 6, 2016 at 9:17 PM, Alec Taylor >> wrote: >>> Running Ubuntu 16.10 with Python 2.7.12+ (default one) and virtualenv >>> 15.0.3 (`sudo -H pip install

Re: passing a variable to cmd

2016-11-06 Thread Chris Angelico
On Sun, Nov 6, 2016 at 10:48 PM, SS wrote: > # cmd='dig @4.2.2.2 nbc.com ns +short' > cmd="dig @4.2.2.2 %s ns +short", % (domname) > proc=subprocess.Popen(shlex.split(cmd),stdout=subprocess.PIPE) > out,err=proc.communicate() > print(out) > > The line that is commented out

Re: passing a variable to cmd

2016-11-06 Thread Terry Reedy
On 11/6/2016 6:48 AM, SS wrote: cmd="dig @4.2.2.2 %s ns +short", % (domname) does not work. No kidding. ', %' is a syntax error. The , makes a tuple, the % after string does interpolation. You obviously want the latter so omit the ,. The traceback should have pointed you to where the

Re: Force virtualenv pip to be used

2016-11-06 Thread Peter Otten
Alec Taylor wrote: > On Sunday, November 6, 2016 at 10:20:53 PM UTC+11, Peter Otten wrote: >> Chris Angelico wrote: >> >> > On Sun, Nov 6, 2016 at 9:17 PM, Alec Taylor >> > wrote: >> >> Running Ubuntu 16.10 with Python 2.7.12+ (default one) and virtualenv >> >> 15.0.3

[issue28123] _PyDict_GetItem_KnownHash ignores DKIX_ERROR return

2016-11-06 Thread STINNER Victor
STINNER Victor added the comment: Sorry, I didn't have time to review this issue :-( Thanks Xiang and Serhiy for fixing the issue! I prefer the new API (don't ignore the error). -- ___ Python tracker

[issue28543] Incomplete fast path codecs aliases in codecs doc

2016-11-06 Thread Berker Peksag
Berker Peksag added the comment: This is a duplicate of issue 28393. -- nosy: +berker.peksag resolution: -> duplicate stage: patch review -> resolved status: open -> closed superseder: -> Update encoding lookup docs wrt #27938 type: enhancement -> behavior

Re: passing a variable to cmd

2016-11-06 Thread Jason Friedman
> > import subprocess > import shlex > > domname = raw_input("Enter your domain name: "); > print "Your domain name is: ", domname > > print "\n" > > # cmd='dig @4.2.2.2 nbc.com ns +short' > cmd="dig @4.2.2.2 %s ns +short", % (domname) >

[issue28624] Make the `cwd` argument to `subprocess.Popen` accept a `PathLike`

2016-11-06 Thread Ram Rachum
Changes by Ram Rachum : -- components: Library (Lib) nosy: cool-RR priority: normal severity: normal status: open title: Make the `cwd` argument to `subprocess.Popen` accept a `PathLike` versions: Python 3.7 ___ Python tracker

[issue28624] Make the `cwd` argument to `subprocess.Popen` accept a `PathLike`

2016-11-06 Thread Ram Rachum
Changes by Ram Rachum : -- type: -> enhancement ___ Python tracker ___ ___ Python-bugs-list

passing a variable to cmd

2016-11-06 Thread SS
Note the following code: import subprocess import shlex domname = raw_input("Enter your domain name: "); print "Your domain name is: ", domname print "\n" # cmd='dig @4.2.2.2 nbc.com ns +short' cmd="dig @4.2.2.2 %s ns +short", % (domname)

Regarding the parsing of await expression.

2016-11-06 Thread Shiyao Ma
Hi, In the pep, https://www.python.org/dev/peps/pep-0492/#examples-of-await-expressions It is said, await await coro() is SyntaxError, instead, we should use await (await coro()) Why? because of await is not left-associative? also, for await -coro() , it should be written as, await

[issue28586] Convert os.scandir to Argument Clinic

2016-11-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset 0590b9c5a18e by Serhiy Storchaka in branch 'default': Issue #28586: Converted os.scandir() to Argument Clinic. https://hg.python.org/cpython/rev/0590b9c5a18e -- nosy: +python-dev ___ Python tracker

Re: Force virtualenv pip to be used

2016-11-06 Thread Alec Taylor
On Sunday, November 6, 2016 at 10:20:53 PM UTC+11, Peter Otten wrote: > Chris Angelico wrote: > > > On Sun, Nov 6, 2016 at 9:17 PM, Alec Taylor > > wrote: > >> Running Ubuntu 16.10 with Python 2.7.12+ (default one) and virtualenv > >> 15.0.3 (`sudo -H pip install

Re: Force virtualenv pip to be used

2016-11-06 Thread Peter Otten
Chris Angelico wrote: > On Sun, Nov 6, 2016 at 9:17 PM, Alec Taylor > wrote: >> Running Ubuntu 16.10 with Python 2.7.12+ (default one) and virtualenv >> 15.0.3 (`sudo -H pip install virtualenv`). What am I doing wrong? >> >> $ virtualenv a && . "$_"/bin/activate &&

[issue28123] _PyDict_GetItem_KnownHash ignores DKIX_ERROR return

2016-11-06 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker

[issue28123] _PyDict_GetItem_KnownHash ignores DKIX_ERROR return

2016-11-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset d06a6b0fd992 by Serhiy Storchaka in branch '3.6': Issue #28123: _PyDict_GetItem_KnownHash() now can raise an exception as https://hg.python.org/cpython/rev/d06a6b0fd992 New changeset 805467de22fc by Serhiy Storchaka in branch 'default': Issue

Re: pip3 : command not found

2016-11-06 Thread Chris Angelico
On Sun, Nov 6, 2016 at 4:27 PM, Jon Ribbens wrote: >> 2) If Python notices that its executable comes from a venv, it uses it. > > Yes. My question is *how does it notice*? I could answer this question, but since you don't appear to be following the thread properly,

Re: Force virtualenv pip to be used

2016-11-06 Thread Chris Angelico
On Sun, Nov 6, 2016 at 9:17 PM, Alec Taylor wrote: > Running Ubuntu 16.10 with Python 2.7.12+ (default one) and virtualenv > 15.0.3 (`sudo -H pip install virtualenv`). What am I doing wrong? > > $ virtualenv a && . "$_"/bin/activate && pip --version I'm pretty sure

Re: Force virtualenv pip to be used

2016-11-06 Thread Peter Otten
Alec Taylor wrote: > Running Ubuntu 16.10 with Python 2.7.12+ (default one) and virtualenv > 15.0.3 (`sudo -H pip install virtualenv`). What am I doing wrong? > > $ virtualenv a && . "$_"/bin/activate && pip --version > New python executable in /tmp/a/bin/python > Installing

[issue19569] Use __attribute__((deprecated)) to warn usage of deprecated functions and macros

2016-11-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Updated documentation. This part should be backported to all maintained 3.x versions. -- Added file: http://bugs.python.org/file45370/mark-deprecated-functions-2.patch ___ Python tracker

  1   2   >