[issue25480] string format in large number

2015-10-26 Thread tryme
New submission from tryme: I am new to python and I don't know if it really is a bug. But indeed when I see sth is not right it is worthwhile to point out. Using fresh installed ubuntu desktop with build in python3. typing the command line by line in terminal just for learning. below is the

[issue25476] close() behavior on non-blocking BufferedIO objects with sockets

2015-10-26 Thread eryksun
eryksun added the comment: I meant that you need a check in buffered_close such as the following: if (res == NULL) { if (PyErr_ExceptionMatches(PyExc_BlockingIOError)) goto end; PyErr_Fetch(, , ); } else Py_DECREF(res); For 2.7 you could create a

[issue25467] Put “deprecated” warnings first

2015-10-26 Thread Ezio Melotti
Ezio Melotti added the comment: Thanks for the report and the patch. I think a better way to handle this would be to add a "tag" next to the function name for both deprecations and "new in", and leave the actual deprecation/new-in notes at the bottom, something like: funcname(args) [new in

[issue25479] Increase unit test coverage for abc.py

2015-10-26 Thread Szymon Trapp
New submission from Szymon Trapp: Added a new function to unit tests for abc.py to increase the test coverage, specifically for the usage of __subclasshook__. This will cover lines 209-214. Note: this is my first submission to Python and I'm following the advice to start with the unit tests

[issue25466] offer "from __future__ import" option for "raise... from"

2015-10-26 Thread Terry J. Reedy
Terry J. Reedy added the comment: Except for *very* carefully considered security features for 2.7, we do not add new features to python x.y after initial release. The 2.7 security exception required a PEP, and I believe the PEP was limited to features specified in the PEP. I would expect

[issue25478] Consider adding a normalize() method to collections.Counter()

2015-10-26 Thread Raymond Hettinger
New submission from Raymond Hettinger: Allen Downey suggested this at PyCon in Montreal and said it would be useful in his bayesian statistics courses. Separately, Peter Norvig created a normalize() function in his probablity tutorial at In[45] in

[issue25444] Py Launch Icon

2015-10-26 Thread Nils Lindemann
Nils Lindemann added the comment: it seems i have still not explained my issue in an understandable way: the three first icons in the file list in the screenshot, aka the icons which are used in eg py 3.2, these icons are cool. the icon i do not like, is the launcher icon which is used in eg

[issue25311] Add f-string support to tokenize.py

2015-10-26 Thread Roundup Robot
Roundup Robot added the comment: New changeset 21f6c4378846 by Eric V. Smith in branch 'default': Issue 25311: Add support for f-strings to tokenize.py. Also added some comments to explain what's happening, since it's not so obvious. https://hg.python.org/cpython/rev/21f6c4378846 --

ANN: lfm v3.0

2015-10-26 Thread Iñigo Serna
Hi all, after many years, new version of lfm; now compatible with Python 3.4+. Description === Last File Manager is a powerful file manager for the UNIX console. It has a curses interface and it's written in Python v3.4+. Licensed under GNU Public License version 3 or later. Some of the

Python 32 bit error

2015-10-26 Thread Joshua Star
I am running a 32 bit computer, (Windows XP) and when I finish with the installer program, I try to run either of the two executable files that are put on my computer and they both come up with the message "python.exe is not a valid Win32 application" Also, in the installer program, some of

[issue25482] signal.set_wakeup_fd() doesn't work if the signal don't have handler

2015-10-26 Thread Atsuo Ishimoto
New submission from Atsuo Ishimoto: I expect following code prints '\x1c' when I resize terminal window on Linix/Mac terminal. import select, os, signal rfd, wfd = os.pipe() os.set_blocking(wfd, False) signal.set_wakeup_fd(wfd) select.select([rfd], [], [])

[issue25193] itertools.accumulate should have an optional initializer argument

2015-10-26 Thread Raymond Hettinger
Raymond Hettinger added the comment: To me prime sieve demos and puzzle problems aren't motivating use cases. Also, the two examples in the single stack-exchange answer become awkward because they would also need a middle argument for the accumulation function: Current: cs =

[issue25476] close() behavior on non-blocking BufferedIO objects with sockets

2015-10-26 Thread eryksun
eryksun added the comment: Per issue 16597, when an exception occurs in flush(), the file is closed anyway. You'd have to check the exception and only skip to the end for EWOULDBLOCK or EAGAIN. That way you're not introducing a regression for ENOSPC and other exceptions for which retrying

[issue25476] close() behavior on non-blocking BufferedIO objects with sockets

2015-10-26 Thread David Beazley
David Beazley added the comment: Please don't make flush() close the file on a BlockingIOError. That would be an unfortunate mistake and make it impossible to implement non-blocking I/O correctly with buffered I/O. -- ___ Python tracker

[issue25154] Drop the pyvenv script

2015-10-26 Thread Eric V. Smith
Eric V. Smith added the comment: There's a typo here in 'executable': + '`{} -m venv`'.format(exeutable), file=sys.stderr) And this could now be: print('WARNING: the pyenv script is deprecated in favour of ' f'`{executable} -m venv`', file=sys.stderr) ! And since there

[issue25481] PermissionError in subprocess.check_output() when running as a different user (not login shell)

2015-10-26 Thread jaystrict
New submission from jaystrict: When running subprocess.check_output(['doesnotexist']) as another user, I expect a FileNotFoundError, but a PermissionError is thrown. How to reproduce: [user1 tmp]$ su --login user2 Password: [user2

ANN: Scipy 0.16.1 release

2015-10-26 Thread Ralf Gommers
Hi all, I'm happy to announce the availability of the Scipy 0.16.1 release. This is a bugfix only release; it contains no new features compared to 0.16.0. The sources and binary installers can be found at: - Source tarballs: at https://github.com/scipy/scipy/releases and on PyPi. - OS

[issue25480] string format in large number

2015-10-26 Thread Eric V. Smith
Eric V. Smith added the comment: You should read: https://docs.python.org/3/tutorial/floatingpoint.html -- components: -Build nosy: +eric.smith resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker

ANN: python-ldap 2.4.22

2015-10-26 Thread Michael Ströder
Find a new release of python-ldap: https://pypi.python.org/pypi/python-ldap/2.4.22 python-ldap provides an object-oriented API to access LDAP directory servers from Python programs. It mainly wraps the OpenLDAP 2.x libs for that purpose. Additionally it contains modules for other LDAP-related

[no subject]

2015-10-26 Thread dore.theo36
Provenance : Courrier pour Windows 10 -- https://mail.python.org/mailman/listinfo/python-list

Re: Ignore stderr and use return code

2015-10-26 Thread Ben Finney
Ganesh Pal writes: > In the below code, we found that the command i.e cmd = "mount > /filesystem1" succeeded. But the test failed due to the weaker stderr I don't know what you mean by stderr being “weaker”. > def mount_me(): > cmd = "mount /filesystem1" >

[issue25300] Enable Intel MPX (Memory protection Extensions) feature

2015-10-26 Thread Florin Papa
Florin Papa added the comment: Hi all, I updated the patch after fixing crashes that occurred at compile and run time on Ubuntu 15.10, with kernel version 4.2.0-16-generic, LD version 2.25.1 and GCC version 5.2.1. The Python MPX binary will be built with –O0 because other optimization levels

[issue25311] Add f-string support to tokenize.py

2015-10-26 Thread Eric V. Smith
Changes by Eric V. Smith : -- keywords: -patch stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue25311] Add f-string support to tokenize.py

2015-10-26 Thread Eric V. Smith
Eric V. Smith added the comment: I've fixed this particular problem, but the tokenize module definitely has some other issues. It recompiles regexes very often when it doesn't need to, it treats single- and triple-quoted strings differently (leading to some code bloat), etc. I may open

Re: Error while launching python idle.

2015-10-26 Thread Terry Reedy
On 10/24/2015 3:00 PM, Vijay kumar wrote: Hi, I recently installed python 2.7 on my windows 10 laptop. When i launch python by clicking the python idle the following error appears In attached image. You should also type the text so it appears in responses. even before i do anything. Just

[issue20519] Replace uuid ctypes usage with an extension module.

2015-10-26 Thread Gustavo J. A. M. Carneiro
Gustavo J. A. M. Carneiro added the comment: One issue of note is regarding generate_time(). Originally I found ctypes bindings for this function, so I wrapped it as well in the extension module. However, it doesn't appear to be used... -- ___

[issue25432] isinstance documentation: explain behavior when type is a tuple

2015-10-26 Thread feliep
feliep added the comment: I think that the following part could replace the part of the other text that's between ###. It's more objective and easier to understand. classinfo may could be a tuple of type objects, or may contains others tuples that contains type objects (other sequence types

[issue20438] inspect: Deprecate getfullargspec?

2015-10-26 Thread Yury Selivanov
Yury Selivanov added the comment: > This is the situation I am in: coverage.py uses getargspec in a very simple > way in its tooling. I support 2.7 and 3.5, so I have to do this: try: getargspec = inspect.getfullargspec except AttributeError: getargspec =

[issue20438] inspect: Deprecate getfullargspec?

2015-10-26 Thread Yury Selivanov
Yury Selivanov added the comment: > The thing is, we've adopted a policy that if something exists in python2.7 we > shouldn't delete it in python3 until after 2.7 is officially out of > maintenance (at the earliest), in order to facilitate single-source porting > to python3. That policy was

[issue23749] asyncio missing wrap_socket (starttls)

2015-10-26 Thread Yury Selivanov
Yury Selivanov added the comment: Guido, Victor, Please find attached a first draft of the patch. It's a very early attempt (i.e. I'm not including unit tests/docstrings), and its primary purpose is to gather initial feedback. Some points: 1. As discussed earlier, the primary API point is

[issue23749] asyncio missing wrap_socket (starttls)

2015-10-26 Thread Yury Selivanov
Yury Selivanov added the comment: Here's an example client implementation with writer.start_tls() (taken from my debug code): @asyncio.coroutine def client(addr): reader, writer = yield from asyncio.open_connection( *addr, loop=loop)

[issue25467] Put “deprecated” warnings first

2015-10-26 Thread Ezio Melotti
Ezio Melotti added the comment: > I don't want to be distracted by "new in 3.1" tags when reading > the 3.6 documentation. This is true, but on the other hand you might want to see the [new in 3.4] while looking at 3.6 docs and working on a program that must support Python 3.3+. Anyway we

[issue25486] Resurrect inspect.getargspec() in 3.6

2015-10-26 Thread Yury Selivanov
New submission from Yury Selivanov: See issue #20438 for more details -- components: Library (Lib) messages: 253499 nosy: yselivanov priority: normal severity: normal stage: needs patch status: open title: Resurrect inspect.getargspec() in 3.6 type: behavior versions: Python 3.6

[issue20519] Replace uuid ctypes usage with an extension module.

2015-10-26 Thread Gustavo J. A. M. Carneiro
Gustavo J. A. M. Carneiro added the comment: This patch fixes the Mac OS X issue @haypo pointed out. -- Added file: http://bugs.python.org/file40865/issue20519_10941v2.diff ___ Python tracker

[issue25432] isinstance documentation: explain behavior when type is a tuple

2015-10-26 Thread R. David Murray
R. David Murray added the comment: The fact that nested tuples are accepted is just bizarre, IMO :(. It could say something like "If classinfo is a (possibly nested) list of types, return True if any of the types match." -- ___ Python tracker

[issue25486] Resurrect inspect.getargspec() in 3.6

2015-10-26 Thread Ned Batchelder
Changes by Ned Batchelder : -- nosy: +nedbat ___ Python tracker ___ ___

[issue25154] Drop the pyvenv script

2015-10-26 Thread Brett Cannon
Brett Cannon added the comment: Took Eric's advice in 8828d7847e92 as well as actually tested the results this time. :P -- status: open -> closed ___ Python tracker

[issue25432] isinstance documentation: explain behavior when type is a tuple

2015-10-26 Thread Felipe Volpone
Felipe Volpone added the comment: r.david.murray: I liked your way. -- ___ Python tracker ___ ___

[issue23391] Documentation of EnvironmentError (OSError) arguments disappeared

2015-10-26 Thread Roundup Robot
Roundup Robot added the comment: New changeset cb554248ce54 by Martin Panter in branch '3.4': Issue #23391: Restore OSError constructor argument documentation https://hg.python.org/cpython/rev/cb554248ce54 New changeset 7b1a9a12eb77 by Martin Panter in branch '3.5': Issue #23391: Merge OSError

[issue25432] isinstance documentation: explain behavior when type is a tuple

2015-10-26 Thread R. David Murray
R. David Murray added the comment: Sure, that's fine with me. I was trying to minimize words, but clarity is good. -- ___ Python tracker ___

Re: UNABLE TO GET IDLE TO RUN

2015-10-26 Thread Terry Reedy
On 10/26/2015 9:55 AM, Peter Otten wrote: The "bug" or misfeature is that idle automatically adds the working directory to sys.path. I am not sure what you mean by 'working directory' here. When one runs a program with 'python somepath/file.py', python prepends somepath to sys.path.

[issue25487] imp module DeprecationWarning in test suite

2015-10-26 Thread Martin Panter
New submission from Martin Panter: I typically run the test suite with the “python -bWall” options enabled, and there is a new warning. I suspect it is a result of the DeprecationWarning upgrade in revision 5877c191b76e. When -Werror is enabled it causes test failure. The fix is probably

[issue23391] Documentation of EnvironmentError (OSError) arguments disappeared

2015-10-26 Thread Martin Panter
Martin Panter added the comment: I will leave opening a bug for the args issue for someone else. But if you come up with a sensible solution or find out all the details, I am happy to help write up or review the documentation changes. -- resolution: -> fixed stage: commit review ->

[issue25432] isinstance documentation: explain behavior when type is a tuple

2015-10-26 Thread Terry J. Reedy
Terry J. Reedy added the comment: David, if you are suggesting that the initial negative clause of "If classinfo is not a class (type object)" is not needed, I agree. If classinfo is a tuple, is is not a class. 'list of types' has to be 'tuple of types'. I think 'match' needs to be expanded

Re: how to get python socket to use a specific interface

2015-10-26 Thread Cameron Simpson
On 26Oct2015 12:33, Robin Becker wrote: . device? -- Robin Becker Using eth0:0 is normally a method to setup eth0 to respond to a 2nd IPV4/IPV6 address. Have you done the ifconfig steps to enable that? If its been done, you will see it's 2nd address in an

[issue25483] Improve f-string implementation: FORMAT_VALUE opcode

2015-10-26 Thread Eric V. Smith
Eric V. Smith added the comment: This patch addresses Larry's review, plus bumps the bytecode magic number. -- ___ Python tracker ___

Re: Ignore stderr and use return code

2015-10-26 Thread Chris Angelico
On Mon, Oct 26, 2015 at 3:34 PM, Cameron Simpson wrote: > No. Mount should have a zero status if it succeeds and anon-zero exit status > if it fails. There is no grey area here. This is the general case. For specific programs, you can often check their man pages; for the

[issue20519] Replace uuid ctypes usage with an extension module.

2015-10-26 Thread STINNER Victor
STINNER Victor added the comment: New review (question for Windows). -- ___ Python tracker ___ ___

Re: Python 32 bit error

2015-10-26 Thread Chris Angelico
On Sat, Oct 24, 2015 at 8:38 AM, Joshua Star wrote: > I am running a 32 bit computer, (Windows XP) and when I finish with the > installer program, I try to run either of the two executable files that are > put on my computer and they both come up with the message

[issue25465] Pickle uses O(n) memory overhead

2015-10-26 Thread Martin Panter
Martin Panter added the comment: Perhaps by OS crash you mean either the Linux out-of-memory (OOM) killer, that takes a hueristic stab at killing the right process, or Linux running almost out of memory, and everything grinding to a halt presumably because each task switch needs to re-read

[issue25482] signal.set_wakeup_fd() doesn't work if the signal don't have handler

2015-10-26 Thread Atsuo Ishimoto
Atsuo Ishimoto added the comment: Okay, so I think this needed to be documented in signal.set_wakeup_fd(). IMO this reduces usefulness of set_wakeup_fd(). If I need to install custom handler by my self, I can write to fd in my own custom handler. And, installing custom handler omits

[issue25478] Consider adding a normalize() method to collections.Counter()

2015-10-26 Thread Josh Rosenberg
Josh Rosenberg added the comment: Counter is documented as being primarily intended for integer counts. While you can use them with floats, I'm not sure they're the right data type for this use case. Having some methods that only make sense with floats, and others (like elements) that only

[issue25356] Idle (Python 3.4 on Ubuntu) does not allow typing accents

2015-10-26 Thread eryksun
eryksun added the comment: This seems to be a problem with Tk 8.6 when using an international keyboard layout on Linux. I ran the following test.tcl script via wish: text .t pack .t Initially dead keys work, but they stop working if I switch away from the text entry to another window

[issue16785] Document the fact that constructing OSError with erron returns subclass if possible

2015-10-26 Thread Martin Panter
Martin Panter added the comment: Hopefully revision cb554248ce54 is good enough to close this. The documentation now says ''' The constructor often actually returns a subclass of OSError, as described in “OS exceptions” below. The particular subclass depends on the final “errno” value. This

[issue25472] Typing: Specialized subclasses of generics cannot be unpickled

2015-10-26 Thread Guido van Rossum
Guido van Rossum added the comment: FWIW the pickle produced looks like this, decoded with pickletools.dis(): 0: \x80 PROTO 3 2: cGLOBAL '__main__ B' 14: qBINPUT 0 16: )EMPTY_TUPLE 17: \x81 NEWOBJ 18: qBINPUT 1 20: }EMPTY_DICT 21: q

[issue25472] Typing: Specialized subclasses of generics cannot be unpickled

2015-10-26 Thread Guido van Rossum
Guido van Rossum added the comment: The issue seems to be the line inst_dict = inst.__dict__ in _Unpickler.load_build(). (I found this out by forcing sys.modules['_pickle'] = None, so the pure-Python pickle.py code gets used.) This leads to a simpler repro: # Use the same

[issue25482] signal.set_wakeup_fd() doesn't work if the signal don't have handler

2015-10-26 Thread Benjamin Peterson
Benjamin Peterson added the comment: Yes, you need to tell the kernel to not ignore SIGWINCH automatically for you. -- nosy: +benjamin.peterson resolution: -> not a bug status: open -> closed ___ Python tracker

[issue25439] Add type checks to urllib.request.Request

2015-10-26 Thread Martin Panter
Martin Panter added the comment: There is already a check for request.data being str in do_request_(). Maybe it is okay to remove this check; I think it would be equivalent to the new check. Regarding the dict check, here is a strange class that currently works, but would be broken by the

[issue25481] PermissionError in subprocess.check_output() when running as a different user (not login shell)

2015-10-26 Thread jaystrict
jaystrict added the comment: Narrowing it down further: In $PATH there is a subdirectory of /home/user1. PATH="/home/user1/bin:/usr/local/sbin:/usr/local/bin:/usr/bin" Doing an strace on the example above shows the line stat("/home/user1/bin/python", 0x7fff9d365bb0) = -1 EACCES (Permission

[issue25481] PermissionError in subprocess.check_output() when running as a different user (not login shell)

2015-10-26 Thread R. David Murray
R. David Murray added the comment: What do you mean by older obsolete error code? It sounds like the problem is that user2 doesn't have read (or execute?) permission for that directory in the path. I'd think it would just skip it in that case, though. I don't have time to run tests myself

[issue20438] inspect: Deprecate getfullargspec?

2015-10-26 Thread R. David Murray
R. David Murray added the comment: The thing is, we've adopted a policy that if something exists in python2.7 we shouldn't delete it in python3 until after 2.7 is officially out of maintenance (at the earliest), in order to facilitate single-source porting to python3. That policy was adopted

[issue25465] Pickle uses O(n) memory overhead

2015-10-26 Thread Herbert
Herbert added the comment: Hi Eric, I would assume that for the right range-parameter (in my case 30 * 1000 ** 2), which just fits in memory, your system would also crash after a pickle.dump. That is, I had this behavior on two of my machine both running a Ubuntu setup though. Nevertheless,

[issue25467] Put “deprecated” warnings first

2015-10-26 Thread Ezio Melotti
Ezio Melotti added the comment: > I’m not sure I understand what you mean by “tag”. >> funcname(args) [new in 3.2] [deprecated in 3.5] >> Func description here. I mean some kind of tag/label next to the name of the function in the documentation (red/orange for deprecations, green for

Re: UNABLE TO GET IDLE TO RUN

2015-10-26 Thread Peter Otten
Terry Reedy wrote: > On 10/23/2015 5:42 AM, Peter Otten wrote: >> Laura Creighton wrote: >> >>> In a message of Fri, 23 Oct 2015 00:19:42 -0400, Terry Reedy writes: On 10/21/2015 11:24 AM, Terry Alexander via Python-list wrote: > I have tried installing both Python 2.7 and 3.5, and

[issue20438] inspect: Deprecate getfullargspec?

2015-10-26 Thread Ned Batchelder
Ned Batchelder added the comment: This is the situation I am in: coverage.py uses getargspec in a very simple way in its tooling. I support 2.7 and 3.5, so I have to do this: try: getargspec = inspect.getfullargspec except AttributeError: getargspec =

ANN: clefstorm

2015-10-26 Thread Nagy László Zsolt
ClefSform provides a simple module that can be used from a Tornado server to authenticate users with Clef (www.getclef.com) two-factor authentication. This is a pre-release, it can only be used with tornado version 4.3. That version is still beta, but that is the only version that supports async

Re: how to get python socket to use a specific interface

2015-10-26 Thread Robin Becker
. device? -- Robin Becker Using eth0:0 is normally a method to setup eth0 to respond to a 2nd IPV4/IPV6 address. Have you done the ifconfig steps to enable that? If its been done, you will see it's 2nd address in an ifconfig query. Man pages are wunnerful things. yes I have done

[issue25481] PermissionError in subprocess.check_output() when running as a different user (not login shell)

2015-10-26 Thread R. David Murray
R. David Murray added the comment: It is almost certainly the case that the error message is correct. The most likely explanation given your pasted session is that user2 does not have permission in the CWD. When you use --login, the CWD changes to user2's home, which it of course has

[issue25425] white-spaces encountered in 3.4

2015-10-26 Thread pavan kumar Dharmavarapu
pavan kumar Dharmavarapu added the comment: Terry: Thanks for you comments and your help we will keep your mail as reference , I will be posting regarding this in near future since we are developing some of our applications. On Mon, Oct 26, 2015 at 6:06 AM, Terry J. Reedy

[issue25467] Put “deprecated” warnings first

2015-10-26 Thread Tony R.
Tony R. added the comment: > Thanks for the report and the patch. Thank you for the review! > I think a better way to handle this would be to add a "tag" next to the > function name for both deprecations and "new in", and leave the actual > deprecation/new-in notes at the bottom, something

[issue25444] Py Launch Icon

2015-10-26 Thread Terry J. Reedy
Terry J. Reedy added the comment: I am the current IDLE maintainer, so that is my interest. I am not responsible for the launcher icon and don't care about it either way. The second one is the one used for IDLE, but Windows has a different format for icons and the little one on the title

[issue24570] IDLE Autocomplete and Call Tips Do Not Pop Up on OS X with ActiveTcl 8.5.18

2015-10-26 Thread Jose M. Alcaide
Jose M. Alcaide added the comment: My previous comment was incorrect, sorry. I thought that this issue was fixed in time for the release of Python 3.5, but it wasn't (fix was committed on Sep 26, two weeks after 3.5's release). My apologies. --

ANN: orcastorm

2015-10-26 Thread Nagy László Zsolt
OrcaStorm provides a simple module that can be used from a Tornado server to authenticate users with SaasPass (www.saaspass.com) two-factor authentication. This is a pre-release, it can only be used with tornado version 4.3. That version is still beta, but that is the only version that supports

[issue25484] Operator issue with "in" on same level and preceding ==

2015-10-26 Thread Sapphire Becker
New submission from Sapphire Becker: So I found this while using == as xnor, here's a summary of the issue: >>> "h" in ["h"] == True False >>> ("h" in ["h"]) == True True >>> "h" in (["h"] == True) Traceback (most recent call last): File "", line 1, in TypeError: argument of type 'bool' is not

[issue25483] Improve f-string implementation: FORMAT_VALUE opcode

2015-10-26 Thread Eric V. Smith
New submission from Eric V. Smith: Currently, the f-string f'a{3!r:10}' evaluates to bytecode that does the same thing as: ''.join(['a', format(repr(3), '10')]) That is, it literally calls the functions format() and repr(). The same holds true for str() and ascii() with !s and !a,

[issue25467] Put “deprecated” warnings first

2015-10-26 Thread Brett Cannon
Changes by Brett Cannon : -- nosy: +brett.cannon ___ Python tracker ___ ___

[issue25481] PermissionError in subprocess.check_output() when running as a different user (not login shell)

2015-10-26 Thread jaystrict
jaystrict added the comment: I just tried the same thing in /home/user2 which is the home of user2 and in /. In both directories the result is the PermissionError. So the cause is not the CWD. -- ___ Python tracker

[issue25467] Put “deprecated” warnings first

2015-10-26 Thread Tony R.
Tony R. added the comment: > On Oct 26, 2015, at 1:49 PM, Ezio Melotti wrote: > > Not sure if there's a clever way to do it though (maybe a CSS class can be > added to the directives and the labels can be added with CSS :after). I was thinking something along these

[issue25467] Put “deprecated” warnings first

2015-10-26 Thread R. David Murray
R. David Murray added the comment: I think Ezio's idea is great. I would not want to see the notices at the top, but a label would make things clear (and the label could be hyperlinked to the note, since sometimes they are a bit of a distance away). Someone has to figure out the Sphinx

[issue25483] Improve f-string implementation: FORMAT_VALUE opcode

2015-10-26 Thread Eric V. Smith
Eric V. Smith added the comment: Small cleanups. Fixed a bug in PyCompile_OpcodeStackEffect. -- Added file: http://bugs.python.org/file40864/format-opcode-1.diff ___ Python tracker

[issue25467] Put “deprecated” warnings first

2015-10-26 Thread Ezio Melotti
Ezio Melotti added the comment: > Note that the 'new' label should only appear for stuff that is new > in that release. This is not a problem if it says [new in x.y] explicitly. This way for each version-added/version-changed/deprecated/deprecated-remove directive we will also have a label.

[issue25484] Operator issue with "in" on same level and preceding ==

2015-10-26 Thread Ezio Melotti
Ezio Melotti added the comment: As far as I understand, this is treated as "x < y < z" or "x == y == z": >>> import ast >>> ast.dump(ast.parse("1 < 2 < 3")) 'Module(body=[Expr(value=Compare(left=Num(n=1), ops=[Lt(), Lt()], comparators=[Num(n=2), Num(n=3)]))]) >>> ast.dump(ast.parse("1 == 2 ==

Re: Best way to do background calculations?

2015-10-26 Thread Israel Brewster
On Oct 25, 2015, at 4:05 PM, MRAB wrote: > > On 2015-10-23 17:35, Israel Brewster wrote: >> tl;dr: I've been using the multiprocessing module to run some >> calculations in the background of my CherryPy web app, but apparently >> this process sometimes gets stuck,

Re: Best way to do background calculations?

2015-10-26 Thread Israel Brewster
On Oct 25, 2015, at 3:40 PM, Dennis Lee Bieber wrote: > > On Fri, 23 Oct 2015 08:35:06 -0800, Israel Brewster > declaimed the following: > >> tl;dr: I've been using the multiprocessing module to run some calculations >> in the background of my

[issue25154] Drop the pyvenv script

2015-10-26 Thread Brett Cannon
Changes by Brett Cannon : -- status: closed -> open ___ Python tracker ___ ___

[issue25484] Operator issue with "in" on same level and preceding ==

2015-10-26 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti versions: +Python 3.5 ___ Python tracker ___

[issue25481] PermissionError in subprocess.check_output() when running as a different user (not login shell)

2015-10-26 Thread jaystrict
jaystrict added the comment: user2 in fact has permissions in the CWD. The CWD has been set to /tmp intentionally, exactly for that reason that every user has "rwx" access there. -- status: pending -> open ___ Python tracker

[issue25481] PermissionError in subprocess.check_output() when running as a different user (not login shell)

2015-10-26 Thread R. David Murray
R. David Murray added the comment: On some unix systems you cannot execute files in /tmp, even if x is set. Is that true for yours? Bascially, subprocess is just reporting the error that the OS is reporting to it, which is why I say the messages is almost certainly correct. --

[issue25484] Operator issue with "in" on same level and preceding ==

2015-10-26 Thread Ezio Melotti
Ezio Melotti added the comment: https://docs.python.org/3/reference/expressions.html#comparisons says that "a op1 b op2 c ... y opN z is equivalent to a op1 b and b op2 c and ... y opN z" and this explains the "unexpected" result: >>> 1 in [1] == True False >>> 1 in [1] and [1] == True False

Re: Best way to do background calculations?

2015-10-26 Thread Israel Brewster
On Oct 25, 2015, at 6:48 PM, Chris Angelico wrote: > > On Sat, Oct 24, 2015 at 3:35 AM, Israel Brewster > wrote: >> >> Ideally, this recalculation process would happen in the background. There is >> no need for the user to wait around while the system

Re: Best way to do background calculations?

2015-10-26 Thread Chris Angelico
On Tue, Oct 27, 2015 at 4:01 AM, Israel Brewster wrote: > Sounds similar to MRAB's suggestion of starting the process before any > sockets have been opened. Certainly worth investigating, and I think it > should be doable. Thanks! Yep, either would work. My suggestion

[issue25485] Add a context manager to telnetlib.Telnet

2015-10-26 Thread desbma
New submission from desbma: telnetlib.Telnet could have a context manager to call close() automatically. I can provide a patch if the idea is approved, although I have never contributed to Python. -- components: Library (Lib) messages: 253489 nosy: desbma priority: normal severity:

Re: OT snake_case

2015-10-26 Thread MRAB
On 2015-10-25 23:43, Mark Lawrence wrote: On 23/10/2015 17:53, MRAB wrote: I just discovered today that writing names in lowercase with underscores is sometimes called "snake case". Seems kind of apt for Python! :-) Apparently, it was coined in the Ruby community... So when I get around to

[issue25467] Put “deprecated” warnings first

2015-10-26 Thread R. David Murray
R. David Murray added the comment: Insert "in my opinion" into that sentence. I don't want to be distracted by "new in 3.1" tags when reading the 3.6 documentation. It isn't new from my POV :) -- ___ Python tracker

[issue25481] PermissionError in subprocess.check_output() when running as a different user (not login shell)

2015-10-26 Thread jaystrict
jaystrict added the comment: I just found that a "chmod o+x /home/user1" fixes the problem in the sense that now a FileNotFoundError is thrown. So I am very certain that you can reproduce this by making your home directory non-executable. Could it be that python tries to access the "original"