[issue26628] Undefined behavior calling C functions with ctypes.Union arguments

2017-02-23 Thread Vinay Sajip
Changes by Vinay Sajip : -- nosy: +vinay.sajip ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue29630] REPL tab-completion triggers code execution

2017-02-23 Thread Francisco Demartino
New submission from Francisco Demartino: On the REPL, when autocompleting with the TAB key, getattr is called, potentially triggering code execution. This took me by surprise. Until you press RETURN, it should be pretty safe to go around autocompleting with certainty that you won't run any cod

[issue16576] ctypes: structure with bitfields as argument

2017-02-23 Thread Vinay Sajip
Changes by Vinay Sajip : -- nosy: +vinay.sajip ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue16575] ctypes: unions as arguments

2017-02-23 Thread Vinay Sajip
Changes by Vinay Sajip : -- nosy: +vinay.sajip ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue29630] REPL tab-completion triggers code execution

2017-02-23 Thread Louie Lu
Louie Lu added the comment: I can reproduce the problem in Python 3.7. -- nosy: +louielu ___ Python tracker ___ ___ Python-bugs-list m

[issue29630] REPL tab-completion triggers code execution

2017-02-23 Thread Louie Lu
Louie Lu added the comment: Could it be the problem from readline? Using python 2 with readline trigger same behavior. -- ___ Python tracker ___ _

[issue29624] Python 3.5.3 x86 web installer cannot install launcher

2017-02-23 Thread Tim Golden
Tim Golden added the comment: Since the webmaster@ address tends to bear the brunt of these, can I make sure I understand the situation? * The only installers affected are those for x86/32-bit Windows 3.5.3 * By default [I just checked] the launcher checkbox is not checked * If it *is* checke

[issue29630] REPL tab-completion triggers code execution

2017-02-23 Thread Francisco Demartino
Francisco Demartino added the comment: This branch (working on the PR) fixes it: https://github.com/franciscod/cpython/tree/bpo-29630 -- ___ Python tracker ___ _

[issue28121] If module starts with comment or empty line then frame.f_code.co_firstlineno is inconsistent with inspect.findsource

2017-02-23 Thread Louie Lu
Louie Lu added the comment: Sorry, but I can't reproduce at 3.7, 3.5, or 2.7. the result shows me that inspect does respect comment line. ➜ cpython git:(350) ✗ ./python /tmp/main.py 2 (['# First line\n', 'import inspect\n', 'frame = inspect.currentframe()\n', 'print(frame.f_code.co_firstlineno

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

2017-02-23 Thread Vinay Sajip
Vinay Sajip added the comment: Thanks for the comments. Using your suggestions simplifies things quite a bit. Still finding my way around :-) > Regarding structs with bitfields and unions, we could add an stgdict flag to > prevent passing them as arguments in the Unix X86_64 ABI Is this to de

[issue29630] REPL tab-completion triggers code execution

2017-02-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is how Python works. Accessing an attribute (and even checking that the attribute exists) can trigger code executing. Changes in https://github.com/franciscod/cpython/tree/bpo-29630 break autocompliting of proxy objects. And in any case it triggers code

[issue29630] REPL tab-completion triggers code execution

2017-02-23 Thread Christian Heimes
Christian Heimes added the comment: I agree with Serhiy. There is no way to safely inspect any Python object without triggering some dunder functions like __getattr__, __getattribute__ or __dir__. -- nosy: +christian.heimes resolution: -> not a bug stage: -> resolved status: open ->

[issue29630] REPL tab-completion triggers code execution

2017-02-23 Thread Francisco Demartino
Changes by Francisco Demartino : -- pull_requests: +213 status: pending -> open ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue29630] REPL tab-completion triggers code execution

2017-02-23 Thread Francisco Demartino
Francisco Demartino added the comment: I've updated that branch and made a pull request (https://github.com/python/cpython/pull/248) I think this is a good compromise: inspect.getattr_static can tell if it's a property, and in that case we don't call getattr on it to prevent code execution on

[issue28121] If module starts with comment or empty line then frame.f_code.co_firstlineno is inconsistent with inspect.findsource

2017-02-23 Thread Aivar Annamaa
Aivar Annamaa added the comment: Looks like I misinderstood inspect.findsource. I thought it is supposed to give only the code for argument object (eg. only def code when given a function), but looks like it is giving the whole file. Unfortunately inspect.findsource is not documented in https

[issue29630] REPL tab-completion triggers code execution

2017-02-23 Thread Christian Heimes
Christian Heimes added the comment: Your change is not backwards compatible and makes auto-completion less useful. -- ___ Python tracker ___ _

[issue29629] rgb_to_hls in colorsys.py

2017-02-23 Thread Madhavendra Sharma
Madhavendra Sharma added the comment: OK, That's fine. Thanks for the clarification. But most of the calculations I found for the conversion from RGB to HLS contains H = 60 * h' that's why I could not interpret it properly. Even on the same wiki page calculations specific to RGB to HLS were t

[issue29630] REPL tab-completion triggers code execution

2017-02-23 Thread Francisco Demartino
Francisco Demartino added the comment: > There is no way to safely inspect any Python object without triggering some > dunder functions like __getattr__, __getattribute__ or __dir__. But somehow inspect.getattr_static can do it? > Your change is not backwards compatible and makes auto-completi

[issue29629] rgb_to_hls in colorsys.py

2017-02-23 Thread Madhavendra Sharma
Changes by Madhavendra Sharma : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Pyt

[issue29631] Error “importlib.h, importlib_external.h updated. You will need to rebuild pythoncore to see the changes.” is reported when build Python on Winodws

2017-02-23 Thread Karen
New submission from Karen: We use VS2015 to build Python(branch 3.6)on Windows. It failed with error "importlib.h, importlib_external.h updated. You will need to rebuild pythoncore to see the changes". This error is reported from Python 3.6 branch revision 3ab24bd. The detailed error log file

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

2017-02-23 Thread Eryk Sun
Eryk Sun added the comment: > Perhaps you mean 16 rather than 8? Sorry, that was a misfire. It should be 16. -- ___ Python tracker ___ __

[issue29630] REPL tab-completion triggers code execution

2017-02-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It is less useful because don't work with dynamic attributes (with __getattar__ and __getattribute__). And if executing property getters is an issue (I don't think it is), this change doesn't fix it completely. -- ___

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

2017-02-23 Thread INADA Naoki
Changes by INADA Naoki : -- pull_requests: +216 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.py

[issue29630] REPL tab-completion triggers code execution

2017-02-23 Thread Christian Heimes
Christian Heimes added the comment: inspect.getattr_static *tries* to get attributes without triggering dunder methods. It's neither fully compatible to getattr() nor does it guarantee that no code is triggered. The function may or may not be secure. Surprise or not surprise is a matter of per

[issue29176] /tmp does not exist on Android and is used by curses.window.putwin()

2017-02-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I hope that this never happen in real world, but in theory this change can introduce regression. That is why I think it should be documented in Misc/NEWS. -- ___ Python tracker

[issue29176] /tmp does not exist on Android and is used by curses.window.putwin()

2017-02-23 Thread STINNER Victor
STINNER Victor added the comment: > POSIX.1-2001 specifies: an error message may be written to stdout if the > stream cannot be opened. At least, I don't see such message in the Android implementation: https://android.googlesource.com/platform/bionic/+/android-5.0.0_r1/libc/bionic/tmpfile.cpp

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

2017-02-23 Thread INADA Naoki
INADA Naoki added the comment: Now trailing optional fields are optional arguments of AST type. -- ___ Python tracker ___ ___ Python-b

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

2017-02-23 Thread INADA Naoki
INADA Naoki added the comment: @mbussonn With PR 249, "import os" and "%timeit" works fine. -- ___ Python tracker ___ ___ Python-bugs-

[issue29630] REPL tab-completion triggers code execution

2017-02-23 Thread Francisco Demartino
Francisco Demartino added the comment: Serhiy, Chris, thank you for your additional comments. They surely helped me understand why my solution to this "problem?" isn't that good (also I slept on it a bit and maybe that helped). I still ponder for a way to get autocompletion while guarranteeing

[issue28810] Document bytecode changes in 3.6

2017-02-23 Thread Ivan Levkivskyi
Changes by Ivan Levkivskyi : -- pull_requests: +217 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue28598] RHS not consulted in `str % subclass_of_str` case.

2017-02-23 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: -57 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

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

2017-02-23 Thread Pedro
New submission from Pedro: The possible values for action are currently: 'store' 'store_true' 'store_false' 'store_const' 'append' 'append_const' 'count' 'help' 'version' a subclass of argparse.Action The string values are evidently for backward compatibility with optparse. However, adding the

[issue28598] RHS not consulted in `str % subclass_of_str` case.

2017-02-23 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +218 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue28911] Clarify the behaviour of assert_called_once_with

2017-02-23 Thread Arne de Laat
Changes by Arne de Laat : -- pull_requests: +219 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue29624] Python 3.5.3 x86 web installer cannot install launcher

2017-02-23 Thread Steve Dower
Steve Dower added the comment: Creating a repaired installer is possible, though risky (it's easy when I still have the original build handy, but at this stage a rebuild will produce different hashes and make things worse). But I intend to look into that as soon as I can. If the launcher is n

[issue18423] Document limitations on -m

2017-02-23 Thread Nick Coghlan
Nick Coghlan added the comment: The limitation noted in #18422 was specific to 3.3, as the missing API was added to NamespaceLoader in 3.4. So the current documentation is accurate for recent versions of Python. -- nosy: +ncoghlan resolution: -> out of date stage: needs patch -> resol

[issue29606] urllib FTP protocol stream injection

2017-02-23 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +christian.heimes, haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: h

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

2017-02-23 Thread Vinay Sajip
Vinay Sajip added the comment: Just a thought - the TYPEFLAG_NONARGTYPE needs to be copied from the base class if set there, right? -- ___ Python tracker ___ ___

[issue28911] Clarify the behaviour of assert_called_once_with

2017-02-23 Thread Arne de Laat
Changes by Arne de Laat : -- pull_requests: +220 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue23890] assertRaises increases reference counter

2017-02-23 Thread Nick Coghlan
Changes by Nick Coghlan : -- stage: needs patch -> commit review ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue23890] assertRaises increases reference counter

2017-02-23 Thread Nick Coghlan
Nick Coghlan added the comment: Victor's PR takes a more pragmatic approach to address this problem: rather than adding the ability to clear the frames for an arbitrary exception tree, it just uses a try/finally in a couple of key unittest function definitions to clear the offending circular r

[issue29581] __init_subclass__ causes TypeError when used with standard library metaclasses (such as ABCMeta)

2017-02-23 Thread Nick Coghlan
Nick Coghlan added the comment: No, the filtering is only applied to the __new__ and __init__ calls on the metaclass, not to the __init_subclass__ call. Showing the last part of an interactive session where I ran the above commands: === >>> class AbstractWithInit(ignore_extra_args(Abst

[issue29581] __init_subclass__ causes TypeError when used with standard library metaclasses (such as ABCMeta)

2017-02-23 Thread Nick Coghlan
Nick Coghlan added the comment: Oops, and now I see the typo in the example code, it seems you're right. I was misremembering an earlier more decorator-like variant of the design where we didn't rely on passing the __init_subclass__ arguments through the metaclass constructor. -- ___

[issue29581] __init_subclass__ causes TypeError when used with standard library metaclasses (such as ABCMeta)

2017-02-23 Thread Nick Coghlan
Changes by Nick Coghlan : -- nosy: +Martin.Teichmann ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

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

2017-02-23 Thread Eryk Sun
Eryk Sun added the comment: I had suggested inheriting the TYPEFLAG_NONARGTYPE flag in StructUnionType_new. It requires a minor change to get basedict unconditionally, and then assign if (basedict) dict->flags |= basedict->flags & TYPEFLAG_NONARGTYPE; We need more feedback on this

[issue29581] __init_subclass__ causes TypeError when used with standard library metaclasses (such as ABCMeta)

2017-02-23 Thread Nick Coghlan
Nick Coghlan added the comment: Note that the publisher side workaround for this is relatively straightforward: __init_subclass__ implementations that want to be compatible with arbitrary metaclasses will need to take any additional parameters as class attributes (which they may delete), rathe

[issue27840] functools.partial: don't copy keywoard arguments in partial_call()?

2017-02-23 Thread STINNER Victor
STINNER Victor added the comment: I reopen the issue to propose to add a comment explaining why the dictionary must always be copied: https://github.com/python/cpython/pull/253 -- pull_requests: +221 resolution: rejected -> status: closed -> open __

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

2017-02-23 Thread Nick Coghlan
Nick Coghlan added the comment: Thanks mbusson, berker.peksag! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue28911] Clarify the behaviour of assert_called_once_with

2017-02-23 Thread Arne de Laat
Changes by Arne de Laat : -- pull_requests: +222 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue29633] MSI installer does not pass values as SecureProperty from UI

2017-02-23 Thread aldehoff
New submission from aldehoff: This is a revival of issue 1298962 (http://bugs.python.org/issue1298962) from 2009. I can reproduce the problem with an MSI created by cx_Freeze and bdist_msi on a Windows 7 64bit system in a company domain. Python is at version 3.6.0, cx_Freeze is at 5.0.1. I am

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

2017-02-23 Thread R. David Murray
R. David Murray added the comment: The obvious thing to do would be to make the Action subclasses have public names. I personally would continue to use the strings, though, as they are easier to type. (The same would be true if an enum were introduced (that I'd continue to use the stings bec

[issue29465] Modify _PyObject_FastCall() to reduce stack consumption

2017-02-23 Thread STINNER Victor
Changes by STINNER Victor : -- title: Add _PyObject_FastCall() to reduce stack consumption -> Modify _PyObject_FastCall() to reduce stack consumption ___ Python tracker ___

[issue29259] Add tp_fastcall to PyTypeObject: support FASTCALL calling convention for all callable objects

2017-02-23 Thread STINNER Victor
STINNER Victor added the comment: I don't completely reject the issue. I may come back later if I find a way to make it even more efficient. But I prefer to close the issue as REJECTED to make it clear that right now with the current implementation and benchmark results, it's not worth it. --

[issue29598] Write unit tests for pdb module

2017-02-23 Thread Xavier de Gaye
Xavier de Gaye added the comment: > Note that there is a bug in find_function() (it opens a file with default > encoding). Please open an issue. -- ___ Python tracker ___ _

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

2017-02-23 Thread Louie Lu
New submission from Louie Lu: There is a XXX in v3.5.0 shows that need to dealing with deque maxlen setting case in deque_repeat. Although there have common case for deque size 1 with maxlen, other size of deque with maxlen still using for-loop to extend the deque, without any detection. Add

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

2017-02-23 Thread Louie Lu
Changes by Louie Lu : -- pull_requests: +223 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

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

2017-02-23 Thread Vinay Sajip
Vinay Sajip added the comment: > We need more feedback on this suggested flag, especially to stay consistent > with CFFI if possible. Undoubtedly, more feedback would be very helpful. I'm not sure using this flag impacts on consistency with CFFI particularly, since it's an internal implementa

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

2017-02-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Wouldn't be better to update the number of repeats before the loop rather than checking at every iteration? if (deque->maxlen >= 0 && n * size > deque->maxlen) n = (deque->maxlen + size - 1) / size; -- assignee: -> rhettinger nosy: +rhettinger,

[issue29549] Improve docstring for str.index

2017-02-23 Thread Lisa Roach
Changes by Lisa Roach : -- pull_requests: +225 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[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 ___ __

[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. --

[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 ___ ___ Python-bugs-list mailing list Unsu

[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 ___ ___ Python-bugs-li

[issue24024] str.__doc__ needs an update

2017-02-23 Thread Garvit
Changes by Garvit : -- pull_requests: +227 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.

[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 2.7, Python 3.3, Python 3.4, Py

[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 `/t

[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 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 usef

[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
Changes by R. David Murray : -- type: behavior -> enhancement ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: h

[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 u

[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 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.py

[issue10379] locale.format() input regression

2017-02-23 Thread Garvit Khatri
Changes by Garvit Khatri : -- pull_requests: +229 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[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. -- _

[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 prod

[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 impl

[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 t

[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 _

[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

[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 sav

[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 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[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 itch,

[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

[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 ___ ___ Python-bugs-list mailing list Unsubscribe: https://

[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.

[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 me

[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 indee

[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 ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

[issue29455] Mention coverage.py in trace module documentation

2017-02-23 Thread Marco Buttu
Changes by Marco Buttu : -- pull_requests: +233 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.py

[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

[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 ___

[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 tracker

[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 "lt

[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

[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 list Unsubscribe: https://mail.python.org

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

2017-02-23 Thread Steve Dower
Changes by Steve Dower : -- pull_requests: +234 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.py

[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 get

[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 mailing list Unsubscribe: https://mail.pytho

[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 neit

[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 day

  1   2   >