[issue25523] Correct "a" article to "an" article

2015-11-01 Thread Martin Panter
Martin Panter added the comment: Thanks everyone for the comments. Serhiy’s points: I did this by using “grep” and then manually editing all of the appropriate lines. So they were not generated by a script, but because it is a fairly mindless process I could have made human mistakes. In

[issue22450] urllib doesn't put Accept: */* in the headers

2015-11-01 Thread Raymond Hettinger
Raymond Hettinger added the comment: > What do you think, Raymond Before dismissing this, we should get a better understanding of why "Accept: */*" is so widely used in practice. Here's what we know so far: * The header made a difference to the Facebook Graph API. * Curl (a minimalist)

[issue25525] Deallocation scheme for memoryview is unsafe

2015-11-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Strange bug. I can't attach any file. -- ___ Python tracker ___ ___

[issue25528] Attempt to further increase test coverage of calendar module

2015-11-01 Thread Rohit Mediratta
New submission from Rohit Mediratta: Opened to submit a patch. - make patchcheck succeeded - full testsuite succeeded - Old coverage Lib/calendar.py 375 5486% 511, 519, 541, 608-699, 703 - New coverage Lib/calendar.py 375 5186% 608-699, 703 --

[issue25522] IDLE: warn if save-as name matches stdlib name

2015-11-01 Thread Laura Creighton
Laura Creighton added the comment: Do we need a full path name here as well? Probably not. -- ___ Python tracker ___

[issue25514] better startup error messages in IDLE when stdlib modules shadowed

2015-11-01 Thread Laura Creighton
Laura Creighton added the comment: can I send a file -- type: behavior -> enhancement versions: -Python 3.4 Added file: http://bugs.python.org/file40915/dia2.py ___ Python tracker

[issue25523] Correct "a" article to "an" article

2015-11-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I had pointed to some of changes not because they look wrong to me, but for the case if there are human mistakes. After your acknowledgement all LGTM. -- stage: patch review -> commit review ___ Python tracker

[issue22450] urllib doesn't put Accept: */* in the headers

2015-11-01 Thread Martin Panter
Martin Panter added the comment: According to all the HTTP 1.1 RFCs, having */* at the end means you accept any other content type if none of the higher priority ones are available (otherwise you risk a 406 Not Acceptable error). So that explains why Firefox has */* tacked on. Requests

[issue25228] Regression in cookie parsing with brackets and quotes

2015-11-01 Thread Martin Panter
Martin Panter added the comment: Adding Guido and Antoine, who committed the security fix as 9e765e65e5cb in 2.7 and 5cfe74a9bfa4 in 3.2. Perhaps you are able to help decide if the proposal here would affect the original security report. Basically this issue (as well as #22758 and #22983) are

[issue25522] IDLE: warn if save-as name matches stdlib name

2015-11-01 Thread Laura Creighton
Laura Creighton added the comment: I'm not sure about "Neither you nor Python will be able to import the stdlib." Depending on what the file is, you may be able to import it later. I'd prefer: "If you run Python in this directory, your version of will be used instead of the one in the

[issue14373] C implementation of functools.lru_cache

2015-11-01 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue25527] Invalid (... and confusing) warning raised by 2to3 regarding repeat

2015-11-01 Thread Antony Lee
New submission from Antony Lee: $ echo 'from numpy import repeat\nrepeat(2, 3)' | 2to3 - RefactoringTool: Skipping optional fixer: buffer RefactoringTool: Skipping optional fixer: idioms RefactoringTool: Skipping optional fixer: set_literal RefactoringTool: Skipping optional fixer: ws_comma

[issue25228] Regression in cookie parsing with brackets and quotes

2015-11-01 Thread Pathangi Jatinshravan
Pathangi Jatinshravan added the comment: Just saw the code review comments now, didn't know that there was a separate section for code review comments until now. Will take a look and implement them. -- ___ Python tracker

[issue25510] fileinput.FileInput.readline() always returns str object at the end even if in 'rb' mode

2015-11-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset e27c589e1c6a by Serhiy Storchaka in branch '3.4': Issue #25510: fileinput.FileInput.readline() now returns b'' instead of '' https://hg.python.org/cpython/rev/e27c589e1c6a New changeset 321b34824020 by Serhiy Storchaka in branch '3.5': Issue

[issue25228] Regression in cookie parsing with brackets and quotes

2015-11-01 Thread Pathangi Jatinshravan
Pathangi Jatinshravan added the comment: New patch with code review comments incorporated. -- Added file: http://bugs.python.org/file40919/patch_review.diff ___ Python tracker

[issue25525] Deallocation scheme for memoryview is unsafe

2015-11-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Sorry for my bad wording. I wasn't going to blame or insult anybody. -- ___ Python tracker ___

[issue25446] smtplib.py AUTH LOGIN code messed up sending login and password data since 3.5

2015-11-01 Thread Larry Hastings
Larry Hastings added the comment: I think it's about time to think about releasing 3.5.1. But since this bug is marked as a "release blocker", 3.5.1 cannot be released until this is fixed. Arguably I can't even really make a schedule for 3.5.1 until it's fixed, or at least I'm reasonably

[issue25510] fileinput.FileInput.readline() always returns str object at the end even if in 'rb' mode

2015-11-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you Ryosuke for your contribution. -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker

[issue18973] Use argparse in the calendar module

2015-11-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset 9f8b5053e30d by Serhiy Storchaka in branch 'default': Issue #18973: Command-line interface of the calendar module now uses argparse https://hg.python.org/cpython/rev/9f8b5053e30d -- nosy: +python-dev ___

[issue25521] optparse module does not emit DeprecationWarning

2015-11-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: And it looks there was a special decision to not deprecate optparse. -- ___ Python tracker ___

[issue25228] Regression in cookie parsing with brackets and quotes

2015-11-01 Thread Guido van Rossum
Guido van Rossum added the comment: I'm coming at this without much context (I don't recall the original issue) but IIUC from a security POV, lenient parsing is unsafe -- it could allow an attacker to modify a cookie (or part of a cookie -- I'm unclear on the correct terminology here) and that's

[issue18973] Use argparse in the calendar module

2015-11-01 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: Serhiy, welcome. -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue25083] Python can sometimes create incorrect .pyc files

2015-11-01 Thread Brett Cannon
Brett Cannon added the comment: Nope, I think you probably have everyone who might be interested in looking at fixing this on the issue, tzickel. Just a matter of someone taking the interest and initiative to fix this in Python 2.7. -- ___ Python

[issue18973] Use argparse in the calendar module

2015-11-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you SilentGhost and Stéphane for your review. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue25525] Deallocation scheme for memoryview is unsafe

2015-11-01 Thread Stefan Krah
Stefan Krah added the comment: First of all, the premise "exports > 0" in your example looks wrong to me. The deallocation process for the first view should start precisely when it no longer has any exports. In fact, the check for "exports > 0" is for the case when memoryview.release() is

[issue23496] Steps for Android Native Build of Python 3.4.2

2015-11-01 Thread Cyd Haselton
Cyd Haselton added the comment: Key note: it looks like the config option --with-hash-algorithm does nothing; python is still built with the siphash hash algorithim even though I specified fnv and, in pyconfig.h: /* Define hash algorithm for str, bytes and memoryview. SipHash24: 1, FNV: 2,

[issue23496] Steps for Android Native Build of Python 3.4.2

2015-11-01 Thread Ryan Gonzalez
Ryan Gonzalez added the comment: Are there no binaries? Pretty sure it isn't your device. I'd think a compiler issue. What are you using, and what version? You have insane determination! :D On November 1, 2015 8:34:21 AM CST, Cyd Haselton wrote: > >Cyd Haselton added

[issue23496] Steps for Android Native Build of Python 3.4.2

2015-11-01 Thread Cyd Haselton
Cyd Haselton added the comment: Pretty sure there are binaries, but the python binary can't build its own modules. I'm using GCC 4.9.2 on Android L...which means it is a PIE and that Python is being built as a PIE -- ___ Python tracker

[issue25521] optparse module does not emit DeprecationWarning

2015-11-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There is a difference between optparse and other deprecated module. Other modules are deprecated if they are too buggy or bad-designed to be fixed and there are stable standard or third-party modules that provides similar functionality. But looking on a

[issue25464] Tix HList header_exists should be "exist"

2015-11-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It looks as a bug in Tix. All other Tcl, Tk and Tix commands (except "assemblecode") use "exists", and "header exists" is documented. Perhaps we should workaround this bug. But I doubt about renaming header_exists to header_exist. As for tests, I'm working

[issue25083] Python can sometimes create incorrect .pyc files

2015-11-01 Thread tzickel
tzickel added the comment: TL:DR Python 2 forgot to do I/O error checking when reading .py files from disk. On some rare situations this can bite Python in the ass and cause it to bork .pyc files. Checked python 3, it checks the I/O in a different / better way. Next python 2.7 is out in 1.5

[issue23496] Steps for Android Native Build of Python 3.4.2

2015-11-01 Thread Cyd Haselton
Cyd Haselton added the comment: GDB debugging isn't going to happen any time soon; all of the gdb tests fail. I re-compiled with the --with-pydebug option, thinking that would help, but it won't build; I get the following error when the newly built python starts to build packages: Debug

[issue25530] ssl: OP_NO_SSLv3 should always be set unless a user specifically asks for it

2015-11-01 Thread Alex Gaynor
New submission from Alex Gaynor: SSLv3 is broken, both _create_unverified_context and create_default_context turn it off, but we should make all contexts turn it off, like we do for SSLv2. A patch is attached. -- components: Library (Lib) files: sslv3.diff keywords: needs review,

[issue25531] greenlet header file is missing inside virtualenv

2015-11-01 Thread Alexey Borzenkov
Alexey Borzenkov added the comment: Just wanted to clarify that greenlet.h is not missing in virtualenv, but headers seem to be installed in venv/include/site/python3.5, when only venv/include is considered for includes when building extensions. It is not specific to OSX and it is trivial to

[issue25531] greenlet header file is missing inside virtualenv

2015-11-01 Thread R. David Murray
R. David Murray added the comment: Greenlet isn't part of python, so what bug in CPython are you reporting? It sounds like you should be reporting this to the greenlet folks. -- nosy: +r.david.murray ___ Python tracker

[issue25083] Python can sometimes create incorrect .pyc files

2015-11-01 Thread Meador Inge
Meador Inge added the comment: I started poking at the patch a little and have a few comments. My understanding of the issue comments is that the read error actually happens when reading in the *source* file and *not* the bytecode file. This happens because 'ferror' is not checked after

[issue25521] optparse module does not emit DeprecationWarning

2015-11-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: No, I have not more information. My supposition is based on indirect evidence in msg225052. I suppose there was more recent discussion in 2014. -- ___ Python tracker

[issue25243] decouple string-to-boolean logic from ConfigParser.getboolean and offer as separate function

2015-11-01 Thread Joshua Bronson
Joshua Bronson added the comment: My friend @novalis_dt and I worked up a patch for this including tests (attached). First time working with the CPython codebase but hope it's a reasonable start. Here's a preview: ~> ./python.exe

[issue25532] infinite loop when running inspect.unwrap over unittest.mock.call

2015-11-01 Thread Chris Withers
New submission from Chris Withers: The following results in an infinite loop: >>> from inspect import unwrap >>> from unittest.mock import call >>> unwrap(call) This can occur when you use doctest.DocTestSuite to load doc tests from a module where unittest.mock.call has been imported.

[issue25521] optparse module does not emit DeprecationWarning

2015-11-01 Thread R. David Murray
R. David Murray added the comment: I can't remember the timing...was that PEP accepted before we made DeprecationWarnings off by default? It sounds like it probably was, based on the phrasing. -- ___ Python tracker

[issue25464] Tix HList header_exists should be "exist"

2015-11-01 Thread Terry J. Reedy
Terry J. Reedy added the comment: If tkinter and IDLE are some places installed without tix, then it it not usable. What about the suggestion for a revised patch? -- ___ Python tracker

[issue18010] pydoc search chokes on import errors

2015-11-01 Thread Martin Panter
Martin Panter added the comment: Here is a test case. I had to insert a temporary directory into sys.path, based off my patch in Issue 25184. Let me know if it doesn’t look too evil :) -- nosy: +martin.panter stage: test needed -> patch review Added file:

[issue25523] Correct "a" article to "an" article

2015-11-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset d8ff13414deb by Martin Panter in branch '3.4': Issue #25523: Correct "a" article to "an" article https://hg.python.org/cpython/rev/d8ff13414deb New changeset e279ab6753fd by Martin Panter in branch '3.5': Issue #25523: Merge "a" to "an" fixes from

[issue25521] optparse module does not emit DeprecationWarning

2015-11-01 Thread R. David Murray
R. David Murray added the comment: Oh, and as far as bugs because it is powerful...optparse has had time to have its bugs fixed, so having bugs in the newer features of argparse is not surprising, really. We just need to get the fixes committed. --

[issue25523] Correct "a" article to "an" article

2015-11-01 Thread Martin Panter
Changes by Martin Panter : -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker ___

[issue25529] Provide access to the validated certificate chain in ssl module

2015-11-01 Thread Christian Heimes
Changes by Christian Heimes : -- nosy: +alex, christian.heimes, dstufft, giampaolo.rodola, janssen, pitrou ___ Python tracker ___

[issue25041] document AF_PACKET socket address format

2015-11-01 Thread Camilla Montonen
Camilla Montonen added the comment: Thank you very much for the feedback, Martin and Berker! I'll start working on the revised patch. -- ___ Python tracker

[issue25446] smtplib.py AUTH LOGIN code messed up sending login and password data since 3.5

2015-11-01 Thread R. David Murray
R. David Murray added the comment: I will work on it this week, should have something committed before the end of next weekend. -- ___ Python tracker

[issue25388] tokenizer crash/misbehavior -- heap use-after-free

2015-11-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Stack trace: #0 ascii_decode (start=0xa72f2008 "", end=0xf891 , dest=) at Objects/unicodeobject.c:4795 #1 0x08100c0f in PyUnicode_DecodeUTF8Stateful (s=s@entry=0xa72f2008 "", size=size@entry=1490081929, errors=errors@entry=0x81f4303 "replace",

[issue25395] SIGSEGV using json.tool: highly nested OrderedDict

2015-11-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you Martin for your review and for initial investigation. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue25395] SIGSEGV using json.tool: highly nested OrderedDict

2015-11-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset ce8c850a52d4 by Serhiy Storchaka in branch '3.5': Issue #25395: Fixed crash when highly nested OrderedDict structures were https://hg.python.org/cpython/rev/ce8c850a52d4 New changeset bd6bfa5fe203 by Serhiy Storchaka in branch 'default': Issue

[issue25510] fileinput.FileInput.readline() always returns str object at the end even if in 'rb' mode

2015-11-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: LGTM. I don't think we should care about breaking backward compatibility here. Most code tests end-of-files with "not line" or "len(line) == 0", and this work with fixed fileinput as well as with broken. That is why we have received this bug report now,

[issue18973] Use argparse in the calendar module

2015-11-01 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka ___ Python tracker ___

[issue25529] Provide access to the validated certificate chain in ssl module

2015-11-01 Thread Cory Benfield
New submission from Cory Benfield: I’m currently working on adding support for HPKP to the Requests and urllib3 modules. HPKP (HTTP Public Key Pinning), specified in RFC 7469, is an extension to HTTP that allows a web server to specify a whitelist of public keys that are valid for TLS

[issue25455] Some repr implementations don't check for self-referential structures

2015-11-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The general solution is to make PyObject_Repr to detect recursive calls (as reprlib.recursive_repr does). The straightforward way is to use thread local identity set. It can be implemented as a dict that maps id(obj) -> obj (creates an int object for key

[issue25510] fileinput.FileInput.readline() always returns str object at the end even if in 'rb' mode

2015-11-01 Thread R. David Murray
R. David Murray added the comment: Ah, I misunderstood the bug report. Yes, this should be OK (I hope :). -- ___ Python tracker ___

[issue25446] smtplib.py AUTH LOGIN code messed up sending login and password data since 3.5

2015-11-01 Thread Chris Angelico
Changes by Chris Angelico : -- nosy: +Rosuav ___ Python tracker ___ ___ Python-bugs-list

[issue25531] greenlet header file is missing inside virtualenv

2015-11-01 Thread kracekumar ramaraju
New submission from kracekumar ramaraju: I am using OSX 10.10.5 (14F27) and Python 3.5. Python 3.5 was installed via brew. When greenlet is installed inside virtualenv using py3.5 header files are missing inside /path/to/venv/include/python3.5m. As a result uwsgi is unable to build with

[issue25521] optparse module does not emit DeprecationWarning

2015-11-01 Thread John Hagen
John Hagen added the comment: @martin.panter My new patch fixes Lib/test_optparse.py by suppressing the warning like test_imp does as you suggested. @serhiy.storchaka I don't have a strong preference that it be a DeprecationWarning vs. PendingDeprecationWarning since to me, both get the

[issue25521] optparse module does not emit DeprecationWarning

2015-11-01 Thread John Hagen
Changes by John Hagen : Removed file: http://bugs.python.org/file40913/optparse_deprecationwarning.patch ___ Python tracker ___

[issue25464] Tix HList header_exists should be "exist"

2015-11-01 Thread Terry J. Reedy
Terry J. Reedy added the comment: I agree. Leave the name 'header_exists', consistent with all others, pass 'exist', and add a comment. Optional: report the bug upstream if there are tix maintainers somewhere. Serhiy, my question about the status of tix is really whether I can use it in

[issue25464] Tix HList header_exists should be "exist"

2015-11-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > Serhiy, my question about the status of tix is really whether I can use it in > IDLE, since it is not now. I can't say anything. But be aware that Tix is optional and likely is not installed on Linux. Maintainers should add new dependence to IDLE package

[issue25521] optparse module does not emit DeprecationWarning

2015-11-01 Thread R. David Murray
R. David Murray added the comment: My sense is that most of the open argparse bugs are *because* of the increased power (that is, they aren't, with a few exceptions, in the fundamental bits that optparse does as well). And the issues are open because no one is maintaining that module, either

[issue25474] Weird behavior when setting f_trace in a context manager

2015-11-01 Thread Xavier de Gaye
Xavier de Gaye added the comment: This is an artefact that occurs as the result of raising an exception in the local trace function. Disassembling the first case of failure of as_context.py with the attached script gives the following: 9 0 LOAD_GLOBAL 0 (context)

[issue25521] optparse module does not emit DeprecationWarning

2015-11-01 Thread Martin Panter
Martin Panter added the comment: Serhiy, do you have a link or more information about this decision? Looking around at previous discussions, this is what I found: limiting to pending deprecation: ; not bothering with any code warning:

[issue25532] infinite loop when running inspect.unwrap over unittest.mock.call

2015-11-01 Thread Chris Withers
Chris Withers added the comment: A naive solution is to chat unittest.mock._Call's __getattr__ to be as follows: def __getattr__(self, attr): if attr == '__wrapped__': raise AttributeError('__wrapped__') if self.name is None: return _Call(name=attr, from_kall=False)

[issue23749] asyncio missing wrap_socket (starttls)

2015-11-01 Thread Yury Selivanov
Yury Selivanov added the comment: Guido, Victor, any thoughts about the (proto-)patch? -- ___ Python tracker ___

[issue25531] greenlet header file is missing inside virtualenv

2015-11-01 Thread Kracekumar Ramaraj
Kracekumar Ramaraj added the comment: I have attached the link to greenlet issue as well. The issue seems to be with distutils/setuptools. -- ___ Python tracker

[issue24379] operator.subscript

2015-11-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The are is a reference loop: global instance -> type -> method -> module globals -> global instance Since an instance doesn't have GC head if __slots__ is empty, the loop can't be broken. A workaround is to add a stub element to __slots__:

[issue25523] Correct "a" article to "an" article

2015-11-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a patch with additional changes. -- resolution: fixed -> stage: resolved -> patch review status: closed -> open Added file: http://bugs.python.org/file40925/a-an_2.patch ___ Python tracker

[issue19407] PEP 453: update the "Installing Python Modules" documentation

2015-11-01 Thread Jon Snoo
Jon Snoo added the comment: The link to the "quick recommendations section" in the Python 2.7 and 3.3 docs is broken. It appears that the PPUG has changed the path from https://python-packaging-user-guide.readthedocs.org/en/latest/current.html to

[issue24931] _asdict breaks when inheriting from a namedtuple

2015-11-01 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- resolution: -> not a bug status: open -> closed ___ Python tracker ___

[issue24379] operator.subscript

2015-11-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset 83fa2e9b0038 by Raymond Hettinger in branch 'default': Issue #24379: Revert the operator.subscript patch (dccc4e63aef5) pending resolution of the related refcnt leak. https://hg.python.org/cpython/rev/83fa2e9b0038 --

[issue24379] operator.subscript

2015-11-01 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: rhettinger -> priority: high -> normal ___ Python tracker ___

[issue14119] Ability to adjust queue size in Executors

2015-11-01 Thread Alexander Mohr
Alexander Mohr added the comment: adding support for internal queue size is critical to avoid chewing through all your memory when you have a LOT of tasks. I just hit this issue myself. If we could have a simple parameter to set the max queue size this would help tremendously! --