[issue29537] Alternative fix for BUILD_MAP_UNPACK_WITH_CALL opcode in 3.5

2017-02-23 Thread Nick Coghlan
Nick Coghlan added the comment: For easier cross-referencing, note that http://bugs.python.org/issue29514 is the issue proposing a test case that ensures future maintainers are aware of the practical problems created by bumping the bytecode magic number in a maintenance release. --

[issue29537] Alternative fix for BUILD_MAP_UNPACK_WITH_CALL opcode in 3.5

2017-02-23 Thread Nick Coghlan
Changes by Nick Coghlan : -- type: -> behavior ___ Python tracker ___ ___

[issue29537] Alternative fix for BUILD_MAP_UNPACK_WITH_CALL opcode in 3.5

2017-02-23 Thread Nick Coghlan
Changes by Nick Coghlan : -- assignee: -> ncoghlan ___ Python tracker ___ ___

[issue26184] Add versionchanged note for error when create_module() is not defined by loaders

2017-02-23 Thread Nick Coghlan
Nick Coghlan added the comment: That should actually be a versionchanged note now - converting this to an easy documentation issue to cover that change. -- assignee: -> docs@python components: +Documentation -Interpreter Core keywords: +easy nosy: +docs@python stage: test needed ->

[issue14243] tempfile.NamedTemporaryFile not particularly useful on Windows

2017-02-23 Thread Nick Coghlan
Nick Coghlan added the comment: John, your problem sounds different - if you're opening the files in binary mode, then you'll be getting a default buffer that's probably 4k or 8k in size, so if you're writing less content than that, the subprocess won't see anything until you explicitly

RE: Python application launcher (for Python code)

2017-02-23 Thread Deborah Swanson
Gregory Ewing wrote, on February 23, 2017 9:13 PM > > Deborah Swanson wrote: > > As for it phoning home... Wonder what value they think this has, other > > than giving them a nosecount of how many active copies there are at > > any given time. > > It gives them a kill switch. If they decide

RE: Namedtuples problem

2017-02-23 Thread Deborah Swanson
Gregory Ewing wrote, on February 23, 2017 9:07 PM > > Deborah Swanson wrote: > > I've run into this kind of problem with namedtuples before, > trying to > > access field values with variable names, like: > > > > label = 'Location' > > records.label > > If you need to access an attribute whose

Re: Python application launcher (for Python code)

2017-02-23 Thread Gregory Ewing
Deborah Swanson wrote: As for it phoning home... Wonder what value they think this has, other than giving them a nosecount of how many active copies there are at any given time. It gives them a kill switch. If they decide they don't want it to be free any more, they can stop us from using it.

Re: Namedtuples problem

2017-02-23 Thread Gregory Ewing
Deborah Swanson wrote: I've run into this kind of problem with namedtuples before, trying to access field values with variable names, like: label = 'Location' records.label If you need to access an attribute whose name is computed at run time, you want getattr() and setattr(): value =

Re: Disallowing instantiation of super class

2017-02-23 Thread Irv Kalb
> On Feb 23, 2017, at 4:40 PM, MRAB wrote: > > On 2017-02-24 00:19, Irv Kalb wrote: >> Hi, >> >> I have built a set of three classes: >> >> - A super class, let's call it: Base >> >> - A class that inherits from Base, let's call that: ClassA >> >> - Another

[issue27788] platform module's version number doesn't match its docstring

2017-02-23 Thread Berker Peksag
Berker Peksag added the comment: Perhaps it's now time to drop that __version__ attribute in 3.7? We've removed the __version__ attribute from the email module in issue 22508. -- nosy: +berker.peksag stage: -> patch review ___ Python tracker

[issue29634] Reduce deque repeat execution when maxlen exist and size is not 1

2017-02-23 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___

[issue26184] raise an error when create_module() is not defined by exec_module() is for loaders

2017-02-23 Thread Matthias Bussonnier
Matthias Bussonnier added the comment: should be closed by #28026, it now raises an ImportError. I think this can be closed. Unless one want to change the text in Starting in Python 3.6 it will be an error > Starting in Python 3.6 it will be an error To use the past tense. -- nosy:

[issue28556] typing.py upgrades

2017-02-23 Thread Mariatta Wijaya
Changes by Mariatta Wijaya : -- pull_requests: +242 ___ Python tracker ___ ___

[issue28556] typing.py upgrades

2017-02-23 Thread Mariatta Wijaya
Changes by Mariatta Wijaya : -- pull_requests: +241 ___ Python tracker ___ ___

[issue14243] tempfile.NamedTemporaryFile not particularly useful on Windows

2017-02-23 Thread Mark Lawrence
Changes by Mark Lawrence : -- nosy: -BreamoreBoy ___ Python tracker ___ ___

[issue29634] Reduce deque repeat execution when maxlen exist and size is not 1

2017-02-23 Thread Louie Lu
Louie Lu added the comment: Raymond: comment has changed, pushed on to GitHub. -- ___ Python tracker ___ ___

RE: Namedtuples problem

2017-02-23 Thread Deborah Swanson
Erik wrote, on February 23, 2017 4:03 PM > > On 23/02/17 23:00, Deborah Swanson wrote: > >> It looks to me like you are indexing into a single-element > list that > >> you are creating using the literal list syntax in the middle of > >> the expression. > > > > Actually, group is essentially a

[issue29632] argparse values for action in add_argument() should be flags instead of (or in addition to) strings

2017-02-23 Thread paul j3
paul j3 added the comment: Those strings are defined in a 'parser.registry' dictionary, with expressions like self.register('action', 'store', _StoreAction) (Users can also register their own custom classes. The registry can also be used for the 'type' attribute.) So you can already do:

RE: Python application launcher (for Python code)

2017-02-23 Thread Deborah Swanson
Michael Torrie wrote, on February 23, 2017 7:43 AM > > On 2017-02-22 09:49 PM, Deborah Swanson wrote: > > Didn't even look. Visual Studio has always been pricey, and it never > > occurred to me that they might have a free or cheap version now. > > You can get the full edition of Visual Studio,

RE: Python application launcher (for Python code)

2017-02-23 Thread Deborah Swanson
Cholo Lennon wrote, on February 23, 2017 7:58 AM > > On 02/20/2017 07:56 PM, Deborah Swanson wrote: > > Basically, I now have quite a few Python programs I use frequently, > > and as time goes on my collection and uses of it will grow. > Right now > > I just want a way to select which one I'd

RE: Namedtuples problem

2017-02-23 Thread Deborah Swanson
Irv Kalb wrote, on February 23, 2017 3:51 PM > > > On Feb 23, 2017, at 3:00 PM, Deborah Swanson > > > wrote: > > > > The weirdness is that > > > > group[0][4] > > > > gets the right answer, but > > > >

RE: Namedtuples problem

2017-02-23 Thread Deborah Swanson
Ben Bacarisse wrote, on February 23, 2017 4:24 PM > > "Deborah Swanson" writes: > > >> -Original Message- > >> From: Erik [mailto:pyt...@lucidity.plus.com] > >> Sent: Thursday, February 23, 2017 2:09 AM > >> To: pyt...@deborahswanson.net;

[issue29639] test suite intentionally avoids referring to localhost, destroying abstraction away from IPv6 vs IPv4

2017-02-23 Thread Gregory P. Smith
New submission from Gregory P. Smith: I am working on fixing our test suite to run on IPv6 only hosts (which are becoming a reality). Many failures today occur because of hard coded 127.0.0.1 values. This is wrong. We should refer to "localhost" The "solution" to

RE: Namedtuples problem

2017-02-23 Thread Deborah Swanson
MRAB wrote, on Thursday, February 23, 2017 4:06 PM > > On 2017-02-23 23:00, Deborah Swanson wrote: > > > > > >> -Original Message- > >> From: Erik [mailto:pyt...@lucidity.plus.com] > >> Sent: Thursday, February 23, 2017 2:09 AM > >> To: pyt...@deborahswanson.net; python-list@python.org >

[issue18792] test_ftplib timeouts

2017-02-23 Thread Gregory P. Smith
Gregory P. Smith added the comment: https://bugs.python.org/issue29639 opened to track undoing this when appropriate. -- ___ Python tracker ___

[issue18792] test_ftplib timeouts

2017-02-23 Thread Gregory P. Smith
Gregory P. Smith added the comment: FYI - hardcoding these addresses is now causing me problems as I try to get our test suite passing on IPv6 only hosts. "localhost" is correct. IMNSHO if for some reason a system cannot resolve "localhost" into a correct address, it should be banned from

[issue29632] argparse values for action in add_argument() should be flags instead of (or in addition to) strings

2017-02-23 Thread paul j3
Changes by paul j3 : -- nosy: +paul.j3 ___ Python tracker ___ ___ Python-bugs-list

Re: Disallowing instantiation of super class

2017-02-23 Thread Peter Otten
Irv Kalb wrote: > Hi, > > I have built a set of three classes: > > - A super class, let's call it: Base > > - A class that inherits from Base, let's call that: ClassA > > - Another class that inherits from Base, let's call that: ClassB > > ClassA and ClassB have some code in their

[issue29622] ast module doesn't support optional fields of Parser/Python.asdl

2017-02-23 Thread Matthias Bussonnier
Changes by Matthias Bussonnier : -- pull_requests: +240 ___ Python tracker ___

[issue29463] Add `docstring` field to AST nodes

2017-02-23 Thread Matthias Bussonnier
Changes by Matthias Bussonnier : -- pull_requests: +238 ___ Python tracker ___

[issue29637] ast.get_docstring(): AttributeError: 'NoneType' object has no attribute 'expandtabs'

2017-02-23 Thread Matthias Bussonnier
Changes by Matthias Bussonnier : -- pull_requests: +239 ___ Python tracker ___

Re: Disallowing instantiation of super class

2017-02-23 Thread MRAB
On 2017-02-24 00:19, Irv Kalb wrote: Hi, I have built a set of three classes: - A super class, let's call it: Base - A class that inherits from Base, let's call that: ClassA - Another class that inherits from Base, let's call that: ClassB ClassA and ClassB have some code in their

Re: Namedtuples problem

2017-02-23 Thread Irv Kalb
> On Feb 23, 2017, at 3:00 PM, Deborah Swanson > wrote: > > The weirdness is that > > group[0][4] > > gets the right answer, but > > group[[idx][records_idx[label]]], > where idx = 0 and records_idx[label]] = 4 If that's the

Spyder 3.1.3 update

2017-02-23 Thread Pablo Lozano
Good day, I installed the Spyder 3.6 IDE from the Anaconda package and at the start k to the IDE I get the Spyder Update saying Spyder 3.1.3 is available. Did it incorrectly install Anaconda? As far as I know Spyder 3.1.3 is rather old and the latest is 3.6 Regards Pablo --

Re: Namedtuples problem

2017-02-23 Thread Ben Bacarisse
"Deborah Swanson" writes: >> -Original Message- >> From: Erik [mailto:pyt...@lucidity.plus.com] >> Sent: Thursday, February 23, 2017 2:09 AM >> To: pyt...@deborahswanson.net; python-list@python.org >> Subject: Re: Namedtuples problem >> >> >> Hi, >> >> On

Disallowing instantiation of super class

2017-02-23 Thread Irv Kalb
Hi, I have built a set of three classes: - A super class, let's call it: Base - A class that inherits from Base, let's call that: ClassA - Another class that inherits from Base, let's call that: ClassB ClassA and ClassB have some code in their __init__ methods that set some instance

Re: Namedtuples problem

2017-02-23 Thread MRAB
On 2017-02-23 23:00, Deborah Swanson wrote: -Original Message- From: Erik [mailto:pyt...@lucidity.plus.com] Sent: Thursday, February 23, 2017 2:09 AM To: pyt...@deborahswanson.net; python-list@python.org Subject: Re: Namedtuples problem Hi, On 23/02/17 09:38, Deborah Swanson wrote:

Re: Namedtuples problem

2017-02-23 Thread Erik
On 23/02/17 23:00, Deborah Swanson wrote: It looks to me like you are indexing into a single-element list that you are creating using the literal list syntax in the middle of the expression. Actually, group is essentially a 2-element list. Each group has a list of rows, and each row has a set

Re: Namedtuples problem

2017-02-23 Thread MRAB
On 2017-02-23 22:51, Deborah Swanson wrote: Peter Otten wrote, on February 23, 2017 2:34 AM [snip] #untested def split_into_groups(records, key): groups = defaultdict(list) for record in records: # no need to check if a group already exists # an empty list will

[issue29637] ast.get_docstring(): AttributeError: 'NoneType' object has no attribute 'expandtabs'

2017-02-23 Thread Matthias Bussonnier
Changes by Matthias Bussonnier : -- nosy: +mbussonn ___ Python tracker ___ ___

[issue29634] Reduce deque repeat execution when maxlen exist and size is not 1

2017-02-23 Thread Raymond Hettinger
Raymond Hettinger added the comment: The code looks fine. Please change the comment to something like: /* Reduce the number of repetitions when maxlen would be exceeded */ -- ___ Python tracker

[issue29638] Spurious failures in test_collections in releak hunting mode after typing is imported

2017-02-23 Thread Ivan Levkivskyi
New submission from Ivan Levkivskyi: This command: ./python -c 'import runpy, typing; runpy.run_module("test")' -R 5:5 test_collections Sometimes gives spurious failures like this: test_collections leaked [0, 0, 3, -3, 3] memory blocks, sum=3 I think this is because ABC caches of

Re: How to create a Python 3.6 traceroute without SOCK RAW?

2017-02-23 Thread Irmen de Jong
On 24-2-2017 0:20, Juan C. wrote: > On Thu, Feb 23, 2017 at 7:42 PM, Irmen de Jong wrote: >> >> import os >> os.system("traceroute www.google.com") > > Indeed, that would work, but it isn't a great approach in my opinion > because I would rely on a system command, in this

[issue28556] typing.py upgrades

2017-02-23 Thread Ivan Levkivskyi
Changes by Ivan Levkivskyi : -- pull_requests: +237 ___ Python tracker ___ ___

[issue29549] Improve docstring for str.index

2017-02-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Write docstrings in following style: "index($self, sub, start=0, end=sys.maxsize, /)\n" "--\n" "\n" "\n" "\n" "" Extract the summary line. Don't use the metavariable "S" since it no longer defined in the signature. --

Re: How to create a Python 3.6 traceroute without SOCK RAW?

2017-02-23 Thread Juan C.
On Thu, Feb 23, 2017 at 7:42 PM, Irmen de Jong wrote: > > import os > os.system("traceroute www.google.com") Indeed, that would work, but it isn't a great approach in my opinion because I would rely on a system command, in this case Windows uses tracert while UNIX uses

RE: Namedtuples problem

2017-02-23 Thread Deborah Swanson
> -Original Message- > From: Erik [mailto:pyt...@lucidity.plus.com] > Sent: Thursday, February 23, 2017 2:09 AM > To: pyt...@deborahswanson.net; python-list@python.org > Subject: Re: Namedtuples problem > > > Hi, > > On 23/02/17 09:38, Deborah Swanson wrote: > >

RE: Namedtuples problem

2017-02-23 Thread Deborah Swanson
Peter Otten wrote, on February 23, 2017 2:34 AM > > Deborah Swanson wrote: > > > > Can anyone see why I'm getting this Index error? and how to fix it? > > I'm not completely sure I can follow you, but you seem to be > mixing two problems > > (1) split a list into groups > (2) convert a list

Re: How to create a Python 3.6 traceroute without SOCK RAW?

2017-02-23 Thread Irmen de Jong
On 23-2-2017 22:33, Juan C. wrote: > I need to implement a traceroute inside my script but I can't escalate > privileges. Unix uses UDP for traceroute, but I didn't find any material > regarding UDP traceroute in Python. import os os.system("traceroute www.google.com") --

[issue22273] abort when passing certain structs by value using ctypes

2017-02-23 Thread Vinay Sajip
Vinay Sajip added the comment: > Perhaps it should instead use two specific flags, TYPEFLAG_HASBITFIELD and > TYPEFLAG_HASUNION This seems better at first sight. It's not making any suitability decisions (apart from doing the unrolling), and the meaning of these flags will be less volatile

[issue29191] liblzma is missing from pcbuild.sln

2017-02-23 Thread Steve Dower
Changes by Steve Dower : -- versions: +Python 3.6 ___ Python tracker ___ ___

[issue29624] Python 3.5.3 x86 web installer cannot install launcher

2017-02-23 Thread Steve Dower
Changes by Steve Dower : -- pull_requests: +235 ___ Python tracker ___ ___

[issue29624] Python 3.5.3 x86 web installer cannot install launcher

2017-02-23 Thread Steve Dower
Changes by Steve Dower : -- pull_requests: +236 ___ Python tracker ___ ___

[issue28909] Adding LTTng-UST tracing support

2017-02-23 Thread Peter McCormick
Peter McCormick added the comment: Hi Łukasz, thank you for the feedback! > "PyTrace" is already a name in use for a different purpose. I understand the > itch to make the name more "right" but I am in general not a fan of renaming > "PyDTrace" to anything else now. It was a placeholder from

[issue22273] abort when passing certain structs by value using ctypes

2017-02-23 Thread Eryk Sun
Eryk Sun added the comment: Perhaps it should instead use two specific flags, TYPEFLAG_HASBITFIELD and TYPEFLAG_HASUNION, which are propagated unconditionally from the base class and fields. As a base case, a union itself is flagged TYPEFLAG_HASUNION. Arrays are unrolled on X86_64 only if

[issue29514] Add a test case that prevents magic number changes in minor releases

2017-02-23 Thread Carson Lam
Changes by Carson Lam : -- nosy: +Carson Lam ___ Python tracker ___ ___ Python-bugs-list

[issue27593] Deprecate sys._mercurial and create sys._git

2017-02-23 Thread Steve Dower
Steve Dower added the comment: It looks to me like we want: branch=`git name-rev --name-only HEAD` revision=`git rev-parse HEAD` tag=`git name-rev --tags --name-only HEAD` Unless we're planning on leaving out the tag? My PR 262 makes the Windows build changes in master, but doesn't change

[issue27593] Deprecate sys._mercurial and create sys._git

2017-02-23 Thread Steve Dower
Changes by Steve Dower : -- pull_requests: +234 ___ Python tracker ___ ___

[issue14243] tempfile.NamedTemporaryFile not particularly useful on Windows

2017-02-23 Thread Jakub Wilk
Changes by Jakub Wilk : -- nosy: +jwilk ___ Python tracker ___ ___ Python-bugs-list mailing

[issue29637] ast.get_docstring(): AttributeError: 'NoneType' object has no attribute 'expandtabs'

2017-02-23 Thread Jakub Wilk
New submission from Jakub Wilk: With git master (4c78c527d215c37472145152cb0e95f196cdddc9) I get this: >>> import ast >>> ast.get_docstring(ast.parse('')) Traceback (most recent call last): File "", line 1, in File "/home/jwilk/opt/lib/python3.7/ast.py", line 203, in get_docstring text

[issue28909] Adding LTTng-UST tracing support

2017-02-23 Thread Francis Deslauriers
Francis Deslauriers added the comment: I am finally having the time to work in this. > A nit: the name LTTng-UST is rather unfriendly, especially when used without > the dash and in all lowercase characters. Given that we're using "dtrace" and > "systemtap", it would be simpler to just use

How to create a Python 3.6 traceroute without SOCK RAW?

2017-02-23 Thread Juan C.
I need to implement a traceroute inside my script but I can't escalate privileges.  Unix uses UDP for traceroute, but I didn't find any material regarding UDP traceroute in Python. -- https://mail.python.org/mailman/listinfo/python-list

[issue16355] inspect.getcomments() does not work in the interactive shell

2017-02-23 Thread Marco Buttu
Marco Buttu added the comment: Hello Vajrasky, the doc patch LGTM. Looking at the David's comment in Rietveld, it seems that he does not want the test patch to be applyed. Can you please make a pull request? Thank you very much -- ___ Python

[issue29414] Change 'the for statement is such an iterator' in Tutorial

2017-02-23 Thread Marco Buttu
Marco Buttu added the comment: Hello Jim, do you have the time to make a pull request? Let me know, otherwise I will do it -- ___ Python tracker ___

[issue29191] liblzma is missing from pcbuild.sln

2017-02-23 Thread Mo Jia
Mo Jia added the comment: I think let user add the liblzma project by hand is not good enough. While the build.bat don't have this problem. So they should work similar. -- nosy: +Mo.Jia versions: -Python 3.5, Python 3.6 ___ Python tracker

[issue29455] Mention coverage.py in trace module documentation

2017-02-23 Thread Marco Buttu
Changes by Marco Buttu : -- pull_requests: +233 ___ Python tracker ___ ___

[issue29635] os.chdir() acts like `cd -P` by default, it should offer an option to not follow symlinks

2017-02-23 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- status: open -> closed ___ Python tracker ___

[issue29635] os.chdir() acts like `cd -P` by default, it should offer an option to not follow symlinks

2017-02-23 Thread Fabien Dubosson
Fabien Dubosson added the comment: > I'm going to close this issue. I was doing to do so, here was my message: > See shells sources. According to the manpage `pwd -L` just uses PWD from > environment. I looked directly at `pwd` sources, and

[issue22273] abort when passing certain structs by value using ctypes

2017-02-23 Thread Vinay Sajip
Vinay Sajip added the comment: > It occurs to me that in the 1st pass, it also needs to propagate the > non-argument flag from any field that has it set. So does that mean disallowing a structure which contains a union? What about if the final structure is large enough to require passing in

[issue29635] os.chdir() acts like `cd -P` by default, it should offer an option to not follow symlinks

2017-02-23 Thread R. David Murray
R. David Murray added the comment: Ah, that should all be implementable from your python shell, then, no need for support in the os module. For reference, when I said 'cd man page', this is what I was referring to: http://www.unix.com/man-page/posix/1posix/cd/ I'm going to close this issue.

[issue27413] Add an option to json.tool to bypass non-ASCII characters.

2017-02-23 Thread Daniel Himmelstein
Changes by Daniel Himmelstein : -- pull_requests: +232 ___ Python tracker ___

[issue29635] os.chdir() acts like `cd -P` by default, it should offer an option to not follow symlinks

2017-02-23 Thread Fabien Dubosson
Fabien Dubosson added the comment: > Most os functions are thin wrappers around system calls. There is no system > call that works as 'cd' without '-P'. I would like to believe in this, but then if `cd` is some bash internal, how does `/usr/bin/pwd -L` find it back? > Since yours is the

[issue29615] SimpleXMLRPCDispatcher._dispatch mangles tracebacks when invoking RPC calls through _dispatch

2017-02-23 Thread Petr MOTEJLEK
Changes by Petr MOTEJLEK : -- pull_requests: +231 ___ Python tracker ___ ___

[issue29636] Specifying indent in the json.tool command

2017-02-23 Thread Daniel Himmelstein
New submission from Daniel Himmelstein: The utility of `python -m json.tool` would increase if users could specify the indent level. Example use case: newlines in a JSON document are important for readability and the ability to open in a text editor. However, if the file is large, you can

[issue29635] os.chdir() acts like `cd -P` by default, it should offer an option to not follow symlinks

2017-02-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > Just wondering, do you know what is the function called by `cd`/`cd -L` then? > It doesn't seems to be a bash internal tweak because `/usr/bin/pwd -L` is > able to get the symlink path, and this binary is not part of bash. See shells sources. According to

Re: Metaclass to rewrite class __doc__?

2017-02-23 Thread Peter Otten
Skip Montanaro wrote: > I stumbled upon this use of a metaclass to modify function docstrings: > > http://www.jesshamrick.com/2013/04/17/rewriting-python-docstrings-with-a-metaclass/ > > In certain circumstances (mostly when extending some Pybind11 wrappers), > it might be nice to extend/modify

[issue29624] Python 3.5.3 x86 web installer cannot install launcher

2017-02-23 Thread Steve Dower
Steve Dower added the comment: I have built an updated web installer which should allow us to replace just the one file on the server to fix the issue. The only downside is that it is not compatible with existing installs of 3.5.3 (that is, you can't run the executable to Modify/Repair/Remove

[issue29635] os.chdir() acts like `cd -P` by default, it should offer an option to not follow symlinks

2017-02-23 Thread R. David Murray
R. David Murray added the comment: Since yours is the itch, I'm afraid you are going to have to be the one to figure out how this could be implemented :) -- ___ Python tracker

[issue29635] os.chdir() acts like `cd -P` by default, it should offer an option to not follow symlinks

2017-02-23 Thread Fabien Dubosson
Fabien Dubosson added the comment: Thanks for the additional information! > The 'cd' man page says that 'cd -P' should "perform actions equivalent to the > chdir() function". Just wondering, do you know what is the function called by `cd`/`cd -L` then? It doesn't seems to be a bash internal

[issue29635] os.chdir() acts like `cd -P` by default, it should offer an option to not follow symlinks

2017-02-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: 'cd' is not an external command and has no manpage. It is a shell builtin command. Most os functions are thin wrappers around system calls. There is no system call that works as 'cd' without '-P'. If you implement a shell in Python, you perhaps need an

[issue14243] tempfile.NamedTemporaryFile not particularly useful on Windows

2017-02-23 Thread John Florian
John Florian added the comment: I just stumbled onto this though I'm not writing for Windows. Instead, I'm on Fedora 25 with Python 3.5.2 and I went nearly crazy tracing down what seemed to be inconsistent behavior. My use case has Python using NamedTemporaryFile(delete=True) in a CM to

[issue29625] colorsys.rgb_to_hsv always returns saturation as 0 (python2.7 only)

2017-02-23 Thread Mark Dickinson
Mark Dickinson added the comment: No problem. I did spend some time wondering whether `rgb_to_hsv` still gives the correct results if any of the inputs happens to be an integer (though still in the range [0, 1]). It looks as though it does, though. --

[issue10379] locale.format() input regression

2017-02-23 Thread Garvit Khatri
Changes by Garvit Khatri : -- pull_requests: +229 ___ Python tracker ___ ___

[issue29624] Python 3.5.3 x86 web installer cannot install launcher

2017-02-23 Thread Steve Dower
Changes by Steve Dower : -- pull_requests: +228 ___ Python tracker ___ ___

[issue22273] abort when passing certain structs by value using ctypes

2017-02-23 Thread Eryk Sun
Eryk Sun added the comment: > I'm not sure using this flag impacts on consistency with CFFI I meant consistency with respect to supported argument types. If someone contributed a workaround to CFFI, then I would rather port it, but it looks like they're also waiting for this to be addressed

Metaclass to rewrite class __doc__?

2017-02-23 Thread Skip Montanaro
I stumbled upon this use of a metaclass to modify function docstrings: http://www.jesshamrick.com/2013/04/17/rewriting-python-docstrings-with-a-metaclass/ In certain circumstances (mostly when extending some Pybind11 wrappers), it might be nice to extend/modify a class's docstring in a similar

[issue29635] os.chdir() acts like `cd -P` by default, it should offer an option to not follow symlinks

2017-02-23 Thread R. David Murray
Changes by R. David Murray : -- type: behavior -> enhancement ___ Python tracker ___

[issue29549] Improve docstring for str.index

2017-02-23 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: Thanks for the PR, Lisa. Serhiy, Raymond, could you both review this? Thanks. I can do the merge and backport once it gets both of your approval :) Also,should this be applied to 3.5 too? -- ___ Python tracker

[issue29635] os.chdir() acts like `cd -P` by default, it should offer an option to not follow symlinks

2017-02-23 Thread R. David Murray
R. David Murray added the comment: The function is chdir, not cd. The 'cd' man page says that 'cd -P' should "perform actions equivalent to the chdir() function". So, you are asking for a different function, which should *not* be named 'os.chdir'. You'll have to make a case for it being

[issue29635] os.chdir() acts like `cd -P` by default, it should offer an option to not follow symlinks

2017-02-23 Thread Fabien Dubosson
Fabien Dubosson added the comment: The previous example (sorry, first time using this platform, I'm a little bit messy here), shows that `os.chdir` resolves symlinks by default, as opposed to what `cd` does in bash. This means it is not possible to change the directory to a symlink folder. A

[issue29635] os.chdir() acts like `cd -P` by default, it should offer an option to not follow symlinks

2017-02-23 Thread Fabien Dubosson
New submission from Fabien Dubosson: When using bash, the `cd` function does not follow symlinks by default, but `cd -P` does. The `os.chdir` function behaves like `cd -P` preventing to be able to change directory to a symlink folder. Initial setup (make a `/tmp/to/dst` symlink pointing to

Re: concurrent futures, async futures and await

2017-02-23 Thread Ian Kelly
On Thu, Feb 23, 2017 at 9:44 AM, Nagy László Zsolt wrote: > >> My guess: because asyncio wouldn't know what to do with a >> concurrent.futures.Future. > I see that as a problem. >> >> The tornado docs say that "You can also use >> tornado.gen.convert_yielded to convert

[issue29635] os.chdir() acts like `cd -P` by default, it should offer an option to not follow symlinks

2017-02-23 Thread Fabien Dubosson
Changes by Fabien Dubosson : -- components: Interpreter Core nosy: StreakyCobra priority: normal severity: normal status: open title: os.chdir() acts like `cd -P` by default, it should offer an option to not follow symlinks type: behavior versions: Python

[issue24024] str.__doc__ needs an update

2017-02-23 Thread Garvit
Changes by Garvit : -- pull_requests: +227 ___ Python tracker ___ ___ Python-bugs-list

[issue29622] ast module doesn't support optional fields of Parser/Python.asdl

2017-02-23 Thread INADA Naoki
Changes by INADA Naoki : -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___

RE: Namedtuples problem

2017-02-23 Thread Deborah Swanson
Thanks all of you for replying. I'm going to have to study your responses a bit before I can respond. I wrote this code the way I did because I was getting errors that I stopped getting with these fixes and I got the correct results from this code, up until the last line. All of you introduced

[issue28814] Deprecation notice on inspect.getargvalues() is incorrect

2017-02-23 Thread Matthias Bussonnier
Matthias Bussonnier added the comment: Thanks Nick for finding this ! -- ___ Python tracker ___ ___

[issue29549] Improve docstring for str.index

2017-02-23 Thread Lisa Roach
Lisa Roach added the comment: I'll just go ahead and make my PR, let me know what else needs to be done. Serhiy, if you could point me in the direction of how to write the docstring so that it is in the Argument Clinic style I would be happy to take a look. --

[issue29634] Reduce deque repeat execution when maxlen exist and size is not 1

2017-02-23 Thread Louie Lu
Louie Lu added the comment: Serhiy: yes, your advice is better than checking inside the loop. I have updated this to the commit, thanks! -- ___ Python tracker

  1   2   >