[issue28826] Programming with Python 3.6

2016-12-10 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- status: open -> pending ___ Python tracker ___

[issue28739] PEP 498: docstrings as f-strings

2016-12-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Eric, could you please make a review of the patch? -- stage: -> patch review type: -> behavior versions: +Python 3.6 ___ Python tracker

[issue21134] Segfault when stringifying UnicodeEncodeError (or UnicodeDecodeError) created with __new__()

2016-12-10 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed status: pending -> closed ___ Python tracker ___

[issue20191] resource.prlimit(int, int, str) crashs

2016-12-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Following patch applies to resource.prlimit() the same solution as to resource.setrlimit(). -- components: +Extension Modules keywords: +patch stage: needs patch -> patch review Added file: http://bugs.python.org/file45848/prlimit_refcount.patch

[issue28930] bytes_methods.c won't recompile if related stringlib/* changed

2016-12-10 Thread STINNER Victor
STINNER Victor added the comment: LGTM, you can push it to 3.6 and default. -- ___ Python tracker ___ ___

[issue28783] Embedded/nuget packages incorrectly reference bdist_wininst

2016-12-10 Thread Steve Dower
Steve Dower added the comment: I have a better fix for this issue in the attached patch. It doesn't require any change to setuptools in order to avoid crashing when installing from sdist (e.g. Cython). As before, this only involves changing the nuget package and its build scripts, so there

[issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files

2016-12-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Victor, you perhaps could just use NULL as default: +source: object = NULL -- ___ Python tracker ___

[issue25677] Syntax error caret confused by indentation

2016-12-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: LGTM. -- assignee: serhiy.storchaka -> martin.panter ___ Python tracker ___

[issue28933] AC: Accept None as a Py_ssize_t default value

2016-12-10 Thread Julien Palard
Julien Palard added the comment: > You propose an automatic conversion of "None" into "-1"? That's awful. > Please don't commit that patch to CPython. Not really, I propose a way to do it with AC when needed. And the AC semantics introduced are not "Automatic conversion of None into -1" but

[issue28933] AC: Accept None as a Py_ssize_t default value

2016-12-10 Thread Julien Palard
Julien Palard added the comment: > It looks like you did it with a converter for 28754. That's okay. But not > in the default implementation. It's not by default, we have to declare "… = None" in the AC declaration, which was an error before my patch (incompatible types…). Before:

[issue28929] Provide a link from documentation back to its source file

2016-12-10 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: Hi, This patch updates the Show Source link on the left of Docs menu and point it to github. I tested it locally, and works for versions >= 3.5 Please let me know if you have any feedback about this. Thanks :) Not sure if the older docs versions should be

[issue26483] docs unclear on difference between str.isdigit() and str.isdecimal()

2016-12-10 Thread Martin Panter
Changes by Martin Panter : -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker ___

[issue28916] Not matched behavior of modulo operator % with the description of the documentation

2016-12-10 Thread Martin Panter
Changes by Martin Panter : -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker ___

[issue26483] docs unclear on difference between str.isdigit() and str.isdecimal()

2016-12-10 Thread Roundup Robot
Roundup Robot added the comment: New changeset c15f122617d5 by Martin Panter in branch '3.5': Issue #26483: Clarify str.isdecimal() and isdigit() https://hg.python.org/cpython/rev/c15f122617d5 New changeset bc7fc85beed1 by Martin Panter in branch '3.6': Issues #28916, #26483: Merge stdtypes.rst

[issue28916] Not matched behavior of modulo operator % with the description of the documentation

2016-12-10 Thread Roundup Robot
Roundup Robot added the comment: New changeset 35e66eb101da by Martin Panter in branch '3.5': Issue #28916: Correct description of %o and %x alternative forms https://hg.python.org/cpython/rev/35e66eb101da New changeset bc7fc85beed1 by Martin Panter in branch '3.6': Issues #28916, #26483: Merge

[issue25458] ftplib: command response shift - mismatch

2016-12-10 Thread Ivan Pozdeev
Ivan Pozdeev added the comment: Spawned the `urllib' issue to issue28931. -- ___ Python tracker ___ ___

[issue28931] urllib ignores FTP 226 response, breaking further FTP requests

2016-12-10 Thread Ivan Pozdeev
Changes by Ivan Pozdeev : Added file: http://bugs.python.org/file45845/105577.patch ___ Python tracker ___

[issue20191] resource.prlimit(int, int, str) crashs

2016-12-10 Thread Larry Hastings
Larry Hastings added the comment: Sorry, Argument Clinic doesn't support automatic tuple unpacking for arguments. It was almost never used, I don't think it was ever a good idea, and it would have made an already-too-complicated program even more complicated-er. --

[issue20191] resource.prlimit(int, int, str) crashs

2016-12-10 Thread Martin Panter
Changes by Martin Panter : -- stage: -> needs patch ___ Python tracker ___ ___

[issue6083] Reference counting bug in PyArg_ParseTuple and PyArg_ParseTupleAndKeywords

2016-12-10 Thread Martin Panter
Changes by Martin Panter : -- dependencies: +resource.prlimit(int, int, str) crashs ___ Python tracker ___

[issue20191] resource.prlimit(int, int, str) crashs

2016-12-10 Thread Martin Panter
Martin Panter added the comment: Revision 4bac47eb444c fixed setrlimit(). Perhaps those changes can just be applied again to prlimit(). I’m not an Arg Clinic expert, but isn’t one of its purposes to imitate native Python function signatures? Since argument unpacking was dropped from Python 2

[issue28934] _mboxMMDF#get_message should delegate to get_bytes

2016-12-10 Thread bpoaugust
bpoaugust added the comment: On further investigation it sppears that overriding the get_bytes function does not help with unmangling >From. However it would still be worth re-using the code. -- ___ Python tracker

[issue28912] collections.abc.OrderedMapping

2016-12-10 Thread Joshua Bronson
Joshua Bronson added the comment: Sorry to hear but thanks for the consideration. To follow up on your comments: > nice to see Guido's reasons for giving a -0 on the proposal. (Guido was giving his -0 on a proposal for collections.abc.Ordered, whereas the main proposal here is

[issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files

2016-12-10 Thread Martin Panter
Martin Panter added the comment: Zach’s comments on float seem to have been addressed (https://bugs.python.org/review/20185/diff2/10940:10949/Objects/floatobject.c). The comments on the resource module were about return converters:

[issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files

2016-12-10 Thread Martin Panter
Martin Panter added the comment: Julien, to help push these changes forward, I suggest start by rebasing and reviewing the conglomerate patch, since it seems that was almost ready. Reading through the thread, it seems the current status is: 1. _crypt module handled elsewhere by Antoine 2.

[issue28912] collections.abc.OrderedMapping

2016-12-10 Thread Raymond Hettinger
Raymond Hettinger added the comment: Thank you for the link, it was nice to see Guido's reasons for giving a -0 on the proposal. I would add that I haven't see any code in the wild that would benefit from testing isinstance(m, OrderedMapping) and taking some different action depending on the

[issue28754] Argument Clinic for bisect.bisect_left

2016-12-10 Thread Larry Hastings
Larry Hastings added the comment: We don't *have* to use a converter function, no. But consider: someone somewhere will have to convert a PyObject * into a Py_ssize_t, also accepting None. Doing it in a converter function means we can easily share the code with bisect_right, which should

[issue25677] Syntax error caret confused by indentation

2016-12-10 Thread Martin Panter
Martin Panter added the comment: Patch v6 strips the form feed, and adds an extra test. -- Added file: http://bugs.python.org/file45844/cpython25677.v6.patch ___ Python tracker

[issue28754] Argument Clinic for bisect.bisect_left

2016-12-10 Thread Julien Palard
Julien Palard added the comment: Hi Raymond, I don't like having the converters in the C implementation too, that's why I'm working on issue28933 to clean this. > letting the C function handle both -1 and None in the implementation rather > than in AC? It works, yes. But I prefer to clearly

[issue1446619] extended slice behavior inconsistent with docs

2016-12-10 Thread Mark Lawrence
Changes by Mark Lawrence : -- nosy: -BreamoreBoy ___ Python tracker ___ ___

[issue28754] Argument Clinic for bisect.bisect_left

2016-12-10 Thread Raymond Hettinger
Raymond Hettinger added the comment: Why does this need a converter function? I there is any reason this can't use "O" with "hi" defaulting to None (matching the pure python API) and letting the C function handle both -1 and None in the implementation rather than in AC? --

[issue28582] Invalid backslash syntax errors are not always accurate as to the location on the line where the error occurs

2016-12-10 Thread Martin Panter
Martin Panter added the comment: I think there are actually two issues at play here: 1. The caret is not compensated for indentation removed from the code. This is what Issue 25677 was originally about. The current patch there will ensure that the behaviour is always like the second

[issue28902] 3.6.0rc1 installer fails to install / uninstall.

2016-12-10 Thread Decorater
Decorater added the comment: I found the registry keys for all python version Except for the keys that Adds it to path to manually uninstall the Add to Path. Other than that Everything Else has been found and take cared of manually thanks to Windows built in Registry Editor. --

[issue28928] IDLE crashes when opening .py file from Finder

2016-12-10 Thread Ned Deily
Ned Deily added the comment: I'm glad you got it working. The information at https://www.python.org/download/mac/tcltk/ pertains primarily to using Pythons from the python.org installers; it doesn't directly apply to Python instances built by and supplied by third-party distributors like

[issue28902] 3.6.0rc1 installer fails to install / uninstall.

2016-12-10 Thread Decorater
Changes by Decorater : Added file: http://bugs.python.org/file45843/Python 3.6.0rc1 (64-bit)_20161210164706.log ___ Python tracker ___

[issue28902] 3.6.0rc1 installer fails to install / uninstall.

2016-12-10 Thread Decorater
Changes by Decorater : Added file: http://bugs.python.org/file45842/Python 3.6.0rc1 (64-bit)_20161210164706.log ___ Python tracker ___

[issue28902] 3.6.0rc1 installer fails to install / uninstall.

2016-12-10 Thread Decorater
Changes by Decorater : Removed file: http://bugs.python.org/file45842/Python 3.6.0rc1 (64-bit)_20161210164706.log ___ Python tracker ___

[issue28902] 3.6.0rc1 installer fails to install / uninstall.

2016-12-10 Thread Decorater
Decorater added the comment: Well, not only that but now when I try to uninstall the 64 bit version it seems to not be able to find when on the "Add to path" part of Uninstaller E:\ProgramData\Package Cache\{815FC13F-79DD-484C-8788-028D69569000}v3.6.121.0\ and some other folders. I think What

[issue28928] IDLE crashes when opening .py file from Finder

2016-12-10 Thread wkdewey
wkdewey added the comment: The ultimate solution was to uninstall homebrew, since there is no obvious way to get it to use the right version of Tcl/Tk (8.5.18). And then to install the python binary from python.org, which does pick up the right version of Tcl/Tk. I can't remember why I was

[issue28754] Argument Clinic for bisect.bisect_left

2016-12-10 Thread Larry Hastings
Larry Hastings added the comment: Okay, but do it with a converter function, not by changing the default behavior for Py_ssize_t. The vast majority of uses of Py_ssize_t should not accept None. -- ___ Python tracker

[issue28424] pkgutil.get_data() doesn't work with namespace packages

2016-12-10 Thread Brett Cannon
Brett Cannon added the comment: Thanks for the patch, Douglas! -- resolution: -> fixed status: open -> closed ___ Python tracker ___

[issue28424] pkgutil.get_data() doesn't work with namespace packages

2016-12-10 Thread Roundup Robot
Roundup Robot added the comment: New changeset 3484933ba904 by Brett Cannon in branch '3.5': Issue #28424: Document pkgutil.get_data() doesn't work with namespace packages. https://hg.python.org/cpython/rev/3484933ba904 New changeset c17d2a37d610 by Brett Cannon in branch '3.6': Merge for issue

[issue28925] Confusing exception from cPickle on reduce failure

2016-12-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I think it is better to remove this code. -- keywords: +patch stage: needs patch -> patch review Added file: http://bugs.python.org/file45841/load_classic_instance_error-2.7.patch ___ Python tracker

[issue25035] Getter/setter for argparse keys

2016-12-10 Thread paul j3
paul j3 added the comment: Yes, the information that `add_argument` returns a Action object is missing from the documentation. It might be useful addition. The documentation has many faults. It isn't basic enough to be a tutorial, but many first time users use it as such, and get confused

[issue28190] Cross-build _curses failed if host ncurses headers and target ncurses headers have different layouts

2016-12-10 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: -haypo ___ Python tracker ___ ___

[issue28754] Argument Clinic for bisect.bisect_left

2016-12-10 Thread Julien Palard
Julien Palard added the comment: Hi Larry, In any cases it looks like supporting hi=-1 and hi=None is mandatory: hi=None is the current implementation in the bisect (Python) module. hi=-1 is the current implementation in the _bisect (C) module. Both are currently living together, the C

[issue25711] Rewrite zipimport from scratch

2016-12-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > Technically, will it be possible to freeze it? I think yes. But I don't know how to do this. I hope on Brett's (or other import machinery expert) help. Since zipimporter constructor is called only with string path by import machinery, the os module is

[issue14156] argparse.FileType for '-' doesn't work for a mode of 'rb'

2016-12-10 Thread paul j3
Changes by paul j3 : -- priority: normal -> high ___ Python tracker ___ ___

[issue28754] Argument Clinic for bisect.bisect_left

2016-12-10 Thread Larry Hastings
Larry Hastings added the comment: FWIW, pypy uses defaults of lo=0, hi=None. https://bitbucket.org/pypy/pypy/src/25da7bc9719457aee57547993833d5168ba6aded/lib-python/2.7/bisect.py?at=default=file-view-default -- ___ Python tracker

[issue28933] AC: Accept None as a Py_ssize_t default value

2016-12-10 Thread Larry Hastings
Larry Hastings added the comment: It looks like you did it with a converter for 28754. That's okay. But not in the default implementation. -- ___ Python tracker

[issue28933] AC: Accept None as a Py_ssize_t default value

2016-12-10 Thread Larry Hastings
Larry Hastings added the comment: You propose an automatic conversion of "None" into "-1"? That's awful. Please don't commit that patch to CPython. -- ___ Python tracker

[issue16737] Different behaviours in script run directly and via runpy.run_module

2016-12-10 Thread Jason R. Coombs
Jason R. Coombs added the comment: I've found some other inconsistencies with the use of python -m. One is the surprising behavior when running pip: $ touch logging.py $ pip --help > /dev/null $ python -m pip --help > /dev/null Traceback (most recent call last): File

[issue25711] Rewrite zipimport from scratch

2016-12-10 Thread Gregory P. Smith
Gregory P. Smith added the comment: So long as this code block that imports os is avoided, I believe that this can be properly frozen: +if not isinstance(path, str): +import os +path = os.fsdecode(path) But it should be easy to avoid that code path when the

[issue28931] urllib ignores FTP 226 response, breaking further FTP requests

2016-12-10 Thread Ivan Pozdeev
Changes by Ivan Pozdeev : -- keywords: +patch Added file: http://bugs.python.org/file45840/105577.patch ___ Python tracker ___

[issue28424] pkgutil.get_data() doesn't work with namespace packages

2016-12-10 Thread Brett Cannon
Changes by Brett Cannon : -- versions: +Python 3.7 -Python 3.4 ___ Python tracker ___ ___

[issue28424] pkgutil.get_data() doesn't work with namespace packages

2016-12-10 Thread Brett Cannon
Brett Cannon added the comment: Patch LGTM. -- stage: -> commit review ___ Python tracker ___ ___

[issue28425] Python3 ignores __init__.py that are links to /dev/null

2016-12-10 Thread Brett Cannon
Brett Cannon added the comment: Those results are expected as passing in a file by path means it's just read by open() and then passed to exec() while the others pass through import itself which has the os.path.isfile() check. Since this is a change from Python 2.7 I would be willing to look

[issue28929] Provide a link from documentation back to its source file

2016-12-10 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: Thanks, Brett :) I think it's easier to update the existing Source Link to github. I'll work on a patch for this. -- ___ Python tracker

[issue28924] Inline PyEval_EvalFrameEx() in callers

2016-12-10 Thread Brett Cannon
Brett Cannon added the comment: Inlining wouldn't break Pyjion since all of its smarts would be in the trampoline function in PyInterpreterState. It may break other debuggers like Python Tools for Visual Studio, though (+steve.dower for that). But is the overhead honestly that high to warrant

[issue28929] Provide a link from documentation back to its source file

2016-12-10 Thread Brett Cannon
Brett Cannon added the comment: Either idea works, but I want a link that someone who finds a spelling mistake can easily follow and submit a PR to fix the issue. -- ___ Python tracker

[issue28935] distutils use ConfigParser in Python 3.x and fails to parse setup.cfg with percent sign

2016-12-10 Thread Axel Haustant
New submission from Axel Haustant: Because of the Python 3.2 configparser renaming/refactoring, string interpolation has been enabled into distutils config parsing and so fails to read any setup.cfg with percent signs (try to perform string interpolation and fails). To reproduce: create a

[issue28754] Argument Clinic for bisect.bisect_left

2016-12-10 Thread Julien Palard
Julien Palard added the comment: Maybe wait for issue28933. -- ___ Python tracker ___ ___ Python-bugs-list

[issue28934] _mboxMMDF#get_message should delegate to get_bytes

2016-12-10 Thread bpoaugust
New submission from bpoaugust: At present both _mboxMMDF#get_message and get_bytes read the file directly. However the code in get_bytes duplicates some of the code in get_message. get_message should be recoded to use get_bytes. It would then be possible to override get_bytes (which is also

[issue28933] AC: Accept None as a Py_ssize_t default value

2016-12-10 Thread Julien Palard
Julien Palard added the comment: Proposed a patch, but I'm not a huge fan of modifying getargs.c. If it's accepted, I'll obviously need to write tests before this is merged. -- keywords: +patch Added file: http://bugs.python.org/file45838/issue28933.diff

[issue28933] AC: Accept None as a Py_ssize_t default value

2016-12-10 Thread Julien Palard
Changes by Julien Palard : -- title: AC: Accept None as a default value for any type -> AC: Accept None as a Py_ssize_t default value ___ Python tracker

[issue28933] AC: Accept None as a default value for any type

2016-12-10 Thread Julien Palard
New submission from Julien Palard: Today, writing an AC declaration like: something: Py_ssize_t(c_default="-1") = None Leads to the almost obvious "Py_ssize_t_converter: default value None for field something is not of type int". But it actually make sense: - Accept None as a default

[issue28932] Fail compile Python 3.6.0rc1 on OpenBSD 6.0

2016-12-10 Thread Alexandr Shadchin
New submission from Alexandr Shadchin: In OpenBSD not exist sys/random.h. -- components: Build, Installation files: patch-Python_random_c messages: 282860 nosy: Alexandr Shadchin priority: normal severity: normal status: open title: Fail compile Python 3.6.0rc1 on OpenBSD 6.0 type:

[issue28849] do not define sys.implementation._multiarch on Android

2016-12-10 Thread Roundup Robot
Roundup Robot added the comment: New changeset b3ba41bf92c7 by Xavier de Gaye in branch '3.6': Issue #28849: Do not define sys.implementation._multiarch on Android. https://hg.python.org/cpython/rev/b3ba41bf92c7 New changeset 40e8b39199da by Xavier de Gaye in branch 'default': Issue #28849:

[issue28779] set_forkserver_preload() can crash the forkserver if preloaded module instantiate multiprocessing classes

2016-12-10 Thread Antoine Pitrou
Antoine Pitrou added the comment: Now fixed, closing. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue28779] set_forkserver_preload() can crash the forkserver if preloaded module instantiate multiprocessing classes

2016-12-10 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1a955981b263 by Antoine Pitrou in branch '3.5': Issue #28779: multiprocessing.set_forkserver_preload() would crash the forkserver process if a preloaded module instantiated some multiprocessing objects such as locks.

[issue28918] cross compiling xxlimited fails with "Py_LIMITED_API is incompatible with Py_DEBUG"

2016-12-10 Thread Roundup Robot
Roundup Robot added the comment: New changeset f9e0c864157c by Xavier de Gaye in branch '3.6': Issue #28918: Fix the cross compilation of xxlimited when Python https://hg.python.org/cpython/rev/f9e0c864157c New changeset ff82dfd558df by Xavier de Gaye in branch 'default': Issue #28918: Merge

[issue28931] urllib ignores FTP 226 response, breaking further FTP requests

2016-12-10 Thread Ivan Pozdeev
Ivan Pozdeev added the comment: The attached patch fixes this case. It still leaves the following problem: >>> u=urllib.urlopen("ftp://ftp.zlatkovic.com/pub/libxml/md5sum.txt;).read() >>> urllib.urlretrieve("ftp://ftp.zlatkovic.com/pub/libxml/md5sum.txt","t.bin;) Traceback (most recent call

[issue28754] Argument Clinic for bisect.bisect_left

2016-12-10 Thread Julien Palard
Changes by Julien Palard : Added file: http://bugs.python.org/file45836/issue28754-9.diff ___ Python tracker ___

[issue28754] Argument Clinic for bisect.bisect_left

2016-12-10 Thread Julien Palard
Julien Palard added the comment: Added a test to ensure compatibility of both hi=None (introduced in original Python version) and hi=-1 (Introduced by the C version). Modified Python version to be compatible with the C-introduced hi=-1, so that the new test pass. --

[issue28931] urllib ignores FTP 226 response, breaking further FTP requests

2016-12-10 Thread Ivan Pozdeev
New submission from Ivan Pozdeev: >>> urllib.urlretrieve("ftp://ftp.zlatkovic.com/pub/libxml/md5sum.txt","t.bin;) ('t.bin', ) >>> urllib.urlretrieve("ftp://ftp.zlatkovic.com/pub/libxml/md5sum.txt","t.bin;) Traceback (most recent call last): File "", line 1, in File "C:\Py\lib\urllib.py",

[issue5322] Python 2.6 object.__new__ argument calling autodetection faulty

2016-12-10 Thread Tobias Hansen
Tobias Hansen added the comment: This change breaks backward compatibility in Python 2.7. This is the example that also broke in #25731. In that case the change was reverted. See https://bugs.python.org/issue25731#msg262922 $ cat foo.pxd cdef class B: cdef object b $ cat foo.pyx cdef

[issue14156] argparse.FileType for '-' doesn't work for a mode of 'rb'

2016-12-10 Thread Aviv Palivoda
Aviv Palivoda added the comment: Pinging as mentioned in the devguide. -- ___ Python tracker ___ ___

[issue26960] urllib hangs when closing connection

2016-12-10 Thread Ivan Pozdeev
Ivan Pozdeev added the comment: This fix has caused issue25458 to manifest itself in `urllib', too. AFAICS, it's impossible to fully fix `urllib' to correctly handle end-of-transmission response without fixing `ftplib' first. -- nosy: +Ivan.Pozdeev

[issue28815] test_socket fails if /proc/modules is existent but not readable

2016-12-10 Thread patrila
patrila added the comment: Oops, sorry that was the draft version of the patch. Attached the correct version. It was tested against "default" branch (but not against 2.7). -- Added file: http://bugs.python.org/file45834/test_socket_isTipcAvailable_proc_modules.patch

[issue28190] Cross-build _curses failed if host ncurses headers and target ncurses headers have different layouts

2016-12-10 Thread Chi Hsuan Yen
Chi Hsuan Yen added the comment: @xdegaye: no-path-to-ncursesw.patch fixes a problem yet introducing a new one. With that patch auto-detection of ncurses include files are broken. Now users have to specify the path manually even for native builds. --

[issue28930] bytes_methods.c won't recompile if related stringlib/* changed

2016-12-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Makefile-bytes-methods-v2.patch LGTM. -- ___ Python tracker ___ ___

[issue28930] bytes_methods.c won't recompile if related stringlib/* changed

2016-12-10 Thread Xiang Zhang
Xiang Zhang added the comment: > Alternatively just BYTESTR_DEPS can be used instead of BYTESMETHODS_DEPS. > This would make easier moving implementations between bytesobject.c and > bytes_methods.c. Yes. The only downside of this is some changes may recompile bytes_methods.c unnecessarily

[issue25677] Syntax error caret confused by indentation

2016-12-10 Thread Martin Panter
Martin Panter added the comment: (Long story short: need to strip form feeds in print_error_text(), but I agree that this otherwise does fix a bug.) There is one minor regression that this patch causes IMO. Given the following file, where represents a form feed character ('\014') if True:

[issue28190] Cross-build _curses failed if host ncurses headers and target ncurses headers have different layouts

2016-12-10 Thread Xavier de Gaye
Xavier de Gaye added the comment: > no, this is a very wrong simplification. Both gcc and clang offer a method > to search for header files and libraries in a target specific location. > Please use these options. Please open a new issue for the detection of the curses paths. The current

[issue20211] setup.py: do not add system header locations when cross compiling

2016-12-10 Thread Xavier de Gaye
Xavier de Gaye added the comment: > this assumption is wrong for the multiarch case. Please explain why it is wrong. -- ___ Python tracker ___

[issue28754] Argument Clinic for bisect.bisect_left

2016-12-10 Thread Julien Palard
Julien Palard added the comment: I was able to simplify my patch a bit, I think I should also add a test to ensure we keep the hi=-1 and hi=None compatibility in the future. -- Added file: http://bugs.python.org/file45832/issue28754-8.diff ___

[issue20211] setup.py: do not add system header locations when cross compiling

2016-12-10 Thread Chi Hsuan Yen
Chi Hsuan Yen added the comment: xdegaye's explanation is incorrect. The actual scene is much more complicated. First, let me explain why things may be broken. The wrong directory is included only if all of the following conditions are met: 1. PYTHON_FOR_BUILD is not installed with

[issue28190] Cross-build _curses failed if host ncurses headers and target ncurses headers have different layouts

2016-12-10 Thread Xavier de Gaye
Xavier de Gaye added the comment: > Both gcc and clang offer a method to search for header files and libraries in > a target specific location. AFAIK there is no target specific location when cross compiling. What are those cross compilation target specific locations according to you ?

[issue28190] Cross-build _curses failed if host ncurses headers and target ncurses headers have different layouts

2016-12-10 Thread Matthias Klose
Matthias Klose added the comment: > The only change that is needed here is to not include > /usr/include/ncursesw in setup.py when cross compiling no, this is a very wrong simplification. Both gcc and clang offer a method to search for header files and libraries in a target specific location.

[issue28190] Cross-build _curses failed if host ncurses headers and target ncurses headers have different layouts

2016-12-10 Thread Xavier de Gaye
Xavier de Gaye added the comment: This patch does not add /usr/include/ncursesw to the include directories search paths when cross compiling. Restoring the original title. @Chi Hsuan Yen Please open a new issue for the detection of the curses paths. The current issue is about the failure to

[issue20211] setup.py: do not add system header locations when cross compiling

2016-12-10 Thread Matthias Klose
Matthias Klose added the comment: this assumption is wrong for the multiarch case. -- ___ Python tracker ___

[issue20211] setup.py: do not add system header locations when cross compiling

2016-12-10 Thread Xavier de Gaye
Xavier de Gaye added the comment: When cross compiling, setup.py must not look for headers in the directory for installing C header files and must not look for libraries in the directory for installing object code libraries of the _native_ interpreter which is being used to run setup.py.