[issue22683] bisect index out of bounds issue

2014-10-22 Thread Paul Ianas
Paul Ianas added the comment: Sure, it is your call. As said, this is rather an enhancement. Still, if I were to decide, I would chose: 1. not to break the API <=> raise IndexError instead of ValueError in case hi is invalid. 2. to protect against illegal values: as said, if hi < 0 bisect_* alw

[issue22708] httplib/http.client in method _tunnel used HTTP/1.0 CONNECT method

2014-10-22 Thread Vova
New submission from Vova: At my workplace I have to use corporate Internet proxy server with AD/domain/ntlm authorization. I use local cntlm proxy server to authorize myself on corporate proxy. Programs are send requests to cntlm proxy without any authorization information. Cntlm proxy communi

[issue22683] bisect index out of bounds issue

2014-10-22 Thread Raymond Hettinger
Raymond Hettinger added the comment: These functions are very old and the API is unlikely to change, particularly if the goal is to change one kind of exception to another (making bad inputs fail in a different way than they do now). As far as I can tell, the current arrangement has never bee

[issue22683] bisect index out of bounds issue

2014-10-22 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: -> rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http

[issue22702] to improve documentation for join() (str method)

2014-10-22 Thread Van Ly
Van Ly added the comment: Aim for the fewest syllables in the words without losing meaning or good taste. -- ___ Python tracker ___ __

[issue22702] to improve documentation for join() (str method)

2014-10-22 Thread Raymond Hettinger
Raymond Hettinger added the comment: At least the "iterable iterable" should be fixed. However, as Josh said, the proposed wording is verbose. Aim for the smallest number of words that gets the job done. -- ___ Python tracker

[issue22702] to improve documentation for join() (str method)

2014-10-22 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: docs@python -> rhettinger nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list ma

[issue22702] to improve documentation for join() (str method)

2014-10-22 Thread Van Ly
Van Ly added the comment: The improvement on the original (doc v.2.7.5) lies in the removal of the repeated 'iterable' in the first sentence, and I have also shortened it to deliver only what is returned by the builtin method which was what I wanted to know without knowing how. I wrote up this

[issue22702] to improve documentation for join() (str method)

2014-10-22 Thread Josh Rosenberg
Josh Rosenberg added the comment: Seems awfully verbose relative to the standards of the other built-in methods. Can you explain what improvements you feel this provides? str.join isn't a particularly complex method, relative to the other str methods that have inline usage examples (e.g. the *

[issue20341] Argument Clinic: add "nullable ints"

2014-10-22 Thread Josh Rosenberg
Changes by Josh Rosenberg : -- nosy: +josh.r ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue22707] Idle: changed options should take effect immediately

2014-10-22 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- versions: +Python 2.7, Python 3.4, Python 3.5 ___ Python tracker ___ ___ Python-bugs-list mailing list

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

2014-10-22 Thread Josh Rosenberg
Changes by Josh Rosenberg : -- nosy: +josh.r ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue3068] IDLE - Add an extension configuration dialog

2014-10-22 Thread Terry J. Reedy
Terry J. Reedy added the comment: Tal, thank you updating and submitting your patch. It fills a real hole in Idle customization. I am already using it to tweek the completion popup delay to find the best value for me. I opened these followup issues. #22703 fix the behavior of Options / Cod

[issue22707] Idle: changed options should take effect immediately

2014-10-22 Thread Terry J. Reedy
New submission from Terry J. Reedy: Currently, some option changes take effect immediately, and some only when Idle is started again. To the extent possible, options should take effect immediately, perhaps by not caching values outside of the config dictionary that records changes before they

[issue22705] Idle extension configuration: add option-help option

2014-10-22 Thread Terry J. Reedy
New submission from Terry J. Reedy: #3068 adds a extension configuration dialog, with some validation of user input. msg228890 suggest a new 'option-help' option to explain the meaning of options, limit int entries when appropriate, and limit string choices (with a drop-down list) when approp

[issue22704] Review extension enable options

2014-10-22 Thread Terry J. Reedy
New submission from Terry J. Reedy: Currently, each extension is supposed to have an 'enable' option and optionally enable_editor or enable_shell, to "to apply it only to editor/shell windows" (config-extensions.def comment). I think the rule should be changed (see below). Currently, the fil

[issue22703] Idle Code Context: separate changing current and future editors

2014-10-22 Thread Terry J. Reedy
New submission from Terry J. Reedy: #17535, msg225416, 2014-08-16 17:18 describes the current double behavior of Options / Code context. It toggles the code-context state of both the current editor and the default for future editors. The two toggles can be in opposite directions. The check

[issue22706] Idle extension configuration and key bindings

2014-10-22 Thread Terry J. Reedy
New submission from Terry J. Reedy: In default config-extensions.def, section [X] is followed by section [X_cfgBindings]. In user config-extensions.cfg, the two sections are written independently by the config dialog (key bindings) and by the extensions dialog (the [X]). While having [X] and

[issue3068] IDLE - Add an extension configuration dialog

2014-10-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1d708436831a by Terry Jan Reedy in branch '2.7': Issue #3068: Add Idle extension configuration dialog to Options menu. https://hg.python.org/cpython/rev/1d708436831a New changeset d2a045855c4e by Terry Jan Reedy in branch '3.4': Issue #3068: Add Idl

[issue22702] to improve documentation for join() (str method)

2014-10-22 Thread Ned Deily
Changes by Ned Deily : -- assignee: -> docs@python components: +Documentation -Macintosh nosy: +docs@python -ned.deily, ronaldoussoren versions: +Python 3.4 -Python 3.3 ___ Python tracker _

[issue21449] Replace _PyUnicode_CompareWithId with _PyUnicode_CompareWithIdEqual

2014-10-22 Thread Antoine Pitrou
Antoine Pitrou added the comment: That said, I think it's quite a good idea. -- ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue21449] Replace _PyUnicode_CompareWithId with _PyUnicode_CompareWithIdEqual

2014-10-22 Thread Antoine Pitrou
Antoine Pitrou added the comment: Note that PyUnicode_CompareWithASCII should be quite fast in most cases (it uses memcmp() on UCS1 strings). -- nosy: +pitrou stage: -> patch review versions: -Python 3.6 ___ Python tracker

[issue22702] to improve documentation for join() (str method)

2014-10-22 Thread Van Ly
New submission from Van Ly: This issue should go in the Documentation component but that is not an option in the issue tracker. Suggestion to improve documentation for join() (str method). Applies to versions 2.7.5, 3.3.6, 3.5.0a0. --quote str.join(iterable) Returns a string. Uses the stri

[issue21449] Replace _PyUnicode_CompareWithId with _PyUnicode_CompareWithIdEqual

2014-10-22 Thread Josh Rosenberg
Josh Rosenberg added the comment: Is there someone else who should be looking at this? Having a fast path for identifier comparisons makes sense (and the concept of ordering between essentially unique identifiers makes no sense). It's not part of the public API (limited or not) so I don't thin

[issue16863] Python 2 error in Argparse tutorial

2014-10-22 Thread Terry J. Reedy
Terry J. Reedy added the comment: Once this discrepancy is explained (3.x) prog.py: error: the following arguments are required: echo (2.7) prog.py: error: too few arguments I agree with leaving the 3.x version in the tutorial. A normal output discrepany might be a different matter. --

[issue22607] find by dichotomy the failing test

2014-10-22 Thread Xavier de Gaye
Xavier de Gaye added the comment: This new version of the patch uses a specific exception to skip tests and fixes a bug when invoking the overriden and wrapped subTest method. -- Added file: http://bugs.python.org/file36994/regrest_XY_options_2.patch ___

[issue16863] Python 2 error in Argparse tutorial

2014-10-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset e7428d7f641f by Terry Jan Reedy in branch '2.7': Issue #16863: Explain difference between text and 2.7 behavior. https://hg.python.org/cpython/rev/e7428d7f641f -- nosy: +python-dev ___ Python tracker

[issue16863] Python 2 error in Argparse tutorial

2014-10-22 Thread Terry J. Reedy
Terry J. Reedy added the comment: Since the author of the tutorial agrees with my idea, and no one has come forward with anything else, I will make the change. -- assignee: -> terry.reedy ___ Python tracker _

[issue16863] Python 2 error in Argparse tutorial

2014-10-22 Thread Berker Peksag
Changes by Berker Peksag : -- keywords: +easy nosy: +berker.peksag stage: -> needs patch ___ Python tracker ___ ___ Python-bugs-list

[issue11260] smtpd-as-a-script feature should be documented and should use argparse

2014-10-22 Thread Berker Peksag
Changes by Berker Peksag : -- nosy: +berker.peksag stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue22560] Add loop-agnostic SSL implementation to asyncio

2014-10-22 Thread Antoine Pitrou
Antoine Pitrou added the comment: Does someone want to review this? -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubs

[issue22672] float arguments in scientific notation not supported by argparse

2014-10-22 Thread Jacopo Nespolo
Changes by Jacopo Nespolo : -- nosy: +bethard ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue22701] Write unescaped unicode characters (Japanese, Chinese, etc) in JSON module when "ensure_ascii=False"

2014-10-22 Thread R. David Murray
R. David Murray added the comment: If I fix your example so it runs: json.dump({'name': "港区"}, open('myfile.json', 'w'), indent=4, separators=(',', ': '), ensure_ascii=False) I get the expected output: rdmurray@pydev:~/python/p34>cat myfile.json { "name": "港区" } That example won't work

[issue17293] uuid.getnode() MAC address on AIX

2014-10-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > You probably forgot to attach the patch... Indeed. :-( -- Added file: http://bugs.python.org/file36993/uuid_netstat_getnode-3.5.patch ___ Python tracker __

[issue17293] uuid.getnode() MAC address on AIX

2014-10-22 Thread STINNER Victor
STINNER Victor added the comment: > Here is a patch for 3.5 which uses subprocess.Popen() (subprocess.Popen() > used in _find_mac() since issue22637). You probably forgot to attach the patch... -- ___ Python tracker

[issue17293] uuid.getnode() MAC address on AIX

2014-10-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a patch for 3.5 which uses subprocess.Popen() (subprocess.Popen() used in _find_mac() since issue22637). -- ___ Python tracker ___ __

[issue22701] Write unescaped unicode characters (Japanese, Chinese, etc) in JSON module when "ensure_ascii=False"

2014-10-22 Thread Michael Kuss
New submission from Michael Kuss: When running the following: >> json.dump(['name': "港区"], myfile.json, indent=4, separators=(',', ': '), >> ensure_ascii=False) the function escapes the unicode, even though I have explicitly asked to not force to ascii: \u6E2F\u533A By changing "__init__.py"

[issue22698] Add constants for ioctl request codes

2014-10-22 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +neologix ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue22700] email's header_value_parser missing defect report for 'abc@xyz.c:om'

2014-10-22 Thread R. David Murray
New submission from R. David Murray: The example address in the title results in an 'invalid-header' object, but none of the sub-parts have an attached defect. The 'misplaced-special' sub-part should have an associated Defect in its .defects attribute. -- components: email messages: 2

[issue22699] cross-compilation of Python3.4

2014-10-22 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +doko ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.

[issue22699] cross-compilation of Python3.4

2014-10-22 Thread Billy
New submission from Billy: Who knows to cross-compile Python 3.4? -- messages: 229828 nosy: bill9889 priority: normal severity: normal status: open title: cross-compilation of Python3.4 type: resource usage versions: Python 3.4 ___ Python tracker

[issue22698] Add constants for ioctl request codes

2014-10-22 Thread Ethan Furman
Changes by Ethan Furman : -- nosy: +ethan.furman ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue22698] Add constants for ioctl request codes

2014-10-22 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: It would be useful to expose ioctl request codes (Linux specific?) [1] at Python level. In particular this will allow to determine MAC address in uuid at Python level without using ctypes or calling external programs. [2] [1] http://man7.org/linux/man-pag

[issue22667] Incorrect evaluation of variables with names containing supplementary characters

2014-10-22 Thread Benjamin Peterson
Benjamin Peterson added the comment: The unicode standard explains some of the tradeoffs. http://www.unicode.org/reports/tr31/tr31-21.html#normalization_and_case On Wed, Oct 22, 2014, at 07:42, Drekin wrote: > > Drekin added the comment: > > I understand. I have found > https://mail.python.org

[issue22697] Deadlock with writing to stderr from forked process

2014-10-22 Thread Maries Ionel Cristian
New submission from Maries Ionel Cristian: Example code: import os import sys import threading def run(): sys.stderr.write("in parent thread\n") threading.Thread(target=run).start() pid = os.fork() if pid: os.waitpid(pid, 0) else: sys.stderr.write("in child\n") To run: while py

[issue22696] Add a function to know about interpreter shutdown

2014-10-22 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Are there other special interpreter states about which it would by > helpful to know? Interpreter initializing, garbage collecting, signal > handling? - interpreter initializing: user code generally isn't executed in that phase - garbage collecting: there ar

[issue22696] Add a function to know about interpreter shutdown

2014-10-22 Thread Antoine Pitrou
Antoine Pitrou added the comment: > My patch uses a private function which is CPython specific. > Does it make sense to add a public function instead? I would like it to be public. It can be useful in __del__ methods and the like. -- ___ Python track

[issue22695] open() declared deprecated in python 3 docs

2014-10-22 Thread R. David Murray
R. David Murray added the comment: Presumably we can fix it. The code is in Docs/tools/pyspecific.py. Probably just need to figure out how it is different from the regular Sphinx deprecated tag implementation. -- nosy: +r.david.murray ___ Python t

[issue22694] The help file issue I'm having.

2014-10-22 Thread R. David Murray
Changes by R. David Murray : -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> A Better Help File ___ Python tracker ___ ___

[issue22692] Problems with Python's help()

2014-10-22 Thread R. David Murray
Changes by R. David Murray : -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> A Better Help File ___ Python tracker ___ ___

[issue22691] A Better Help File

2014-10-22 Thread R. David Murray
R. David Murray added the comment: The help isn't targeted at teaching you to use the module. The help is targeted at *reminding* you how to use the module after you've read the full documentation, which usually does contain examples (though generally not at the top of the page...they are usu

[issue22696] Add a function to know about interpreter shutdown

2014-10-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Are there other special interpreter states about which it would by helpful to know? Interpreter initializing, garbage collecting, signal handling? -- ___ Python tracker

[issue22599] traceback: errors in the linecache module at exit

2014-10-22 Thread STINNER Victor
STINNER Victor added the comment: Oh, I see that Antoine opened the issue #22696. -- ___ Python tracker ___ ___ Python-bugs-list maili

[issue22696] Add a function to know about interpreter shutdown

2014-10-22 Thread STINNER Victor
STINNER Victor added the comment: For the issue #22599, I wrote a patch but then I removed my patch and reverted my changed... Here is a new patch which implements why I already wrote: add a new sys._is_finalizing() function, with a unit test. > I propose to add a new function sys.shutting_do

[issue22696] Add a function to know about interpreter shutdown

2014-10-22 Thread Antoine Pitrou
New submission from Antoine Pitrou: I propose to add a new function sys.shutting_down() (name debatable) returning True if the interpreter is currently shutting down. This would be a function so that you can bind it and avoid having it wiped at shutdown :-) -- components: Interpreter

[issue22599] traceback: errors in the linecache module at exit

2014-10-22 Thread STINNER Victor
STINNER Victor added the comment: > The patch looks fragile to me: who knows whether other similar problems can > appear in other situations? Oh, I forgot to say that yes, my patch is incomplete, but it is simple and it is already make the code more reliable. -- __

[issue22599] traceback: errors in the linecache module at exit

2014-10-22 Thread STINNER Victor
STINNER Victor added the comment: > The patch looks fragile to me: who knows whether other similar problems can > appear in other situations? Maybe we can always ignore non fatal errors when calling linecache from print_exception? Having the Python source code in the traceback is better, but it

[issue22667] Incorrect evaluation of variables with names containing supplementary characters

2014-10-22 Thread STINNER Victor
STINNER Victor added the comment: > So I wonder if there are some other reasons for choosing NFKC over NFC. In fact, there is a whole PEP: http://legacy.python.org/dev/peps/pep-3131/ I see "Which normalization form should be used, NFC or NFKC?" without answer, sorry. I guess that NFKC avoids

[issue22599] traceback: errors in the linecache module at exit

2014-10-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > Since I wrote tokenize.open(), I can explain why I chose to import builtins > :-) Then it is good to me. > I would prefer something like traceback_ignore_linecache_error.patch, perhaps > combined with a new function that would tell you whether the interpr

[issue22667] Incorrect evaluation of variables with names containing supplementary characters

2014-10-22 Thread Drekin
Drekin added the comment: I understand. I have found https://mail.python.org/pipermail/python-3000/2007-May/007995.html as a reason for using NFKC rather than NFC. On the other hand I think one may want these double-struct mathematical letters to be different from the ordinary ones if used as

[issue22599] traceback: errors in the linecache module at exit

2014-10-22 Thread Antoine Pitrou
Antoine Pitrou added the comment: The patch looks fragile to me: who knows whether other similar problems can appear in other situations? I would prefer something like traceback_ignore_linecache_error.patch, perhaps combined with a new function that would tell you whether the interpreter is s

[issue22592] Drop support of Borland C compiler

2014-10-22 Thread STINNER Victor
STINNER Victor added the comment: Ok, I pushed my patch. If you see remaining parts of the Borland C compiler, you can remove them in a different changeset (reopen maybe the issue?). For distutils, I consider that it's a different topic. If you want to drop support of this compiler in distutil

[issue22592] Drop support of Borland C compiler

2014-10-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset f2ce9603346c by Victor Stinner in branch 'default': Issue #22592: Drop support of the Borland C compiler to build Python https://hg.python.org/cpython/rev/f2ce9603346c -- nosy: +python-dev ___ Python trac

[issue22592] Drop support of Borland C compiler

2014-10-22 Thread STINNER Victor
STINNER Victor added the comment: > The patch LGTM but there is Borland C support in distutils As discussed on python-dev, it's fine to support more C compiler to compile extensions, than compilers supported to build Python itself. > there are several mentions in the documentation I did a qui

[issue22599] traceback: errors in the linecache module at exit

2014-10-22 Thread STINNER Victor
STINNER Victor added the comment: > traceback_at_exit-2.patch: Updated patch to remove "import builtins" from > tokenize.py, it's no more needed. Antoine, Serhiy: What do you think about this patch? IMO the bug is very simple and fixes a common bug. -- ___

[issue22636] avoid using a shell in ctypes.util: replace os.popen with subprocess

2014-10-22 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://

[issue22637] avoid using a shell in uuid: replce os.popen with subprocess.Popen

2014-10-22 Thread STINNER Victor
Changes by STINNER Victor : -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue22695] open() declared deprecated in python 3 docs

2014-10-22 Thread STINNER Victor
STINNER Victor added the comment: "However the "deprecated" instruction works without following empty line. It looks as there is a bug in the implementation of the "deprecated-removed" instruction." Agreed, we can maybe enhance that. At least emit a warning? -- __

[issue22695] open() declared deprecated in python 3 docs

2014-10-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There are other "deprecated-removed" instructions without following empty line in the docs. Should they be changed? However the "deprecated" instruction works without following empty line. It looks as there is a bug in the implementation of the "deprecated-r

[issue22695] open() declared deprecated in python 3 docs

2014-10-22 Thread STINNER Victor
STINNER Victor added the comment: > Reader may assume the open() function is what will be removed, which is wrong > AFAIK It looks like an issue with the reST syntax in the documentation. Wait until the doc is regenerated (in a few hours) and then check again the doc please, to confirm that t

[issue22695] open() declared deprecated in python 3 docs

2014-10-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset a2ecc284eaa7 by Victor Stinner in branch '3.4': Issue #22695: Fix syntax of open() doc https://hg.python.org/cpython/rev/a2ecc284eaa7 -- nosy: +python-dev ___ Python tracker

[issue22695] open() declared deprecated in python 3 docs

2014-10-22 Thread Василий Макаров
New submission from Василий Макаров: Python 3 open() documentation ( https://docs.python.org/3/library/functions.html#open ) is probably broken. Here is what one can see at the end of open() description: "... Deprecated since version 3.4, will be removed in version 4.0. The 'U' mode." Reader

[issue22678] An OSError subclass for "no space left on device" would be nice

2014-10-22 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +barry, pitrou ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue6818] remove/delete method for zipfile/tarfile objects

2014-10-22 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +serhiy.storchaka versions: +Python 3.5 -Python 3.4 ___ Python tracker ___ ___ Python-bugs-list ma

[issue6818] remove/delete method for zipfile/tarfile objects

2014-10-22 Thread Yuval Greenfield
Yuval Greenfield added the comment: Ping. Has this been postponed? -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscr