[issue24259] tar.extractall() does not recognize unexpected EOF

2015-06-29 Thread Lars Gustäbel
Lars Gustäbel added the comment: Martin, I followed your suggestion to raise ReadError. This needed an additional change in copyfileobj() because it is used both for adding file data to an archive and extracting file data from an archive. But I think the patch is in good shape now. --

[issue24532] asyncio.sock_recv() blocks normal ioloop actions.

2015-06-29 Thread STINNER Victor
STINNER Victor added the comment: Le lundi 29 juin 2015, Yury Selivanov a écrit : > > > > You should develop using asyncio debug mode: > > Maybe we should promote this check to the production mode? > asyncio must be slow. The check has a cost, I prefer to keep it only in debug mode. It's probab

[issue24533] Increased Test Coverage for Lib/random.py

2015-06-29 Thread Raymond Hettinger
Raymond Hettinger added the comment: I don't mind adding a test but would like it to written somewhat differently. I'll work something up when I get a chance. Marking this as a low priority because the code is already working fine and this is just a nice addition to improve coverage. --

[issue24535] SELinux reporting writes, executes, and dac_overwrites

2015-06-29 Thread Ned Deily
Ned Deily added the comment: This is not a Python problem; note in particular the blueman references in the messages. A quick web searching suggests there is a conflict between blueman and SELinux security policies that need to be resolved; see, for example, https://bugzilla.redhat.com/show_bu

[issue24535] SELinux reporting writes, executes, and dac_overwrites

2015-06-29 Thread Nick Levinson
New submission from Nick Levinson: Suddenly, SELinux in my Fedora 20 Linux laptop is reporting many problems with /usr/bin/python2.7 and I don't know if there's a bug in python2.7 or if something else is going on. File/s or directory/ies on which writes were attempted were on unspecified file/

[issue24532] asyncio.sock_recv() blocks normal ioloop actions.

2015-06-29 Thread Марк Коренберг
Марк Коренберг added the comment: $ PYTHONASYNCIODEBUG=1 ./bug.py Starting busy receiver Busy receiver complete Executing wait_for= cb=[_run_until_complete_cb() at /usr/lib/python3.4/asyncio/base_events.py:123] created at /usr/lib/python3.4/asyncio/base_events.py:296> took 3.001 seconds Shoul

[issue24532] asyncio.sock_recv() blocks normal ioloop actions.

2015-06-29 Thread Марк Коренберг
Марк Коренберг added the comment: Adding of b.setblocking(0) after socketpair() does not help. -- ___ Python tracker ___ ___ Python-bu

[issue24530] `import..as` fails where `import` does not

2015-06-29 Thread R. David Murray
R. David Murray added the comment: Ah, yes, that is the issue I was thinking of. So, bug, not doc issue :) -- ___ Python tracker ___

[issue24530] `import..as` fails where `import` does not

2015-06-29 Thread Martin Panter
Martin Panter added the comment: Maybe Issue 23203, proposing to fix the compiled bytecode. -- nosy: +vadmium resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Aliasing import of sub-{module,package} from the package raises AttributeError on import. _

[issue14046] argparse: assertion failure if optional argument has square/round brackets in metavar

2015-06-29 Thread John Jones
John Jones added the comment: Im kind of surprised this bug has lasted for so many years :) setting part_regexp to: r'\(.*?\(.*?\).*?\)+|\[.*?\[.*?\].*?\]+|\S+' fixes the issue for me, although its not very elegant -- nosy: +John Jones ___ Python tra

[issue24533] Increased Test Coverage for Lib/random.py

2015-06-29 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +mark.dickinson, rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscrib

[issue19176] DeprecationWarning for doctype() method when subclassing _elementtree.XMLParser

2015-06-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: In 2.7 XMLParser is a function, not a class, and therefore can't be subclassed. -- resolution: -> fixed stage: commit review -> resolved status: open -> closed versions: -Python 2.7 ___ Python tracker

[issue3530] ast.NodeTransformer doc bug

2015-06-29 Thread Terry J. Reedy
Terry J. Reedy added the comment: I am reopening this as a doc bug because RewriteName is a copy (with 'ast.' prefixes added) of a buggy example in the doc. The bug is that the new .value Name and Str attributes do not get the required 'lineno' and 'col_offset' attributes. As Armin said, copy

[issue24534] disable executing code in .pth files

2015-06-29 Thread STINNER Victor
STINNER Victor added the comment: > The attached patch removes support for executing code in .pth files This change will basically break all Python applications. Don't do that. If you believe that we can smoothly move to a world without .pth files, you should propose an overall plan, step by s

[issue24475] The docs never define what a pool "task" is

2015-06-29 Thread Daniel Neuberger
Daniel Neuberger added the comment: I second this. I was definitely confused at first and it took me a little while of googling to realize that jobs are not what one (at least me) would intuitively think they are. -- nosy: +Daniel Neuberger ___ Pyth

[issue24534] disable executing code in .pth files

2015-06-29 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 29.06.2015 21:30, Min RK wrote: > > .pth files currently allow execution of arbitrary code, triggered by lines > starting with `import`. This is a rarely understood, and often misbehaving > feature. easy_install has used this feature to ensure that its

[issue24534] disable executing code in .pth files

2015-06-29 Thread R. David Murray
R. David Murray added the comment: I'm guessing this feature has been around too long and is used in too many ways to remove. I believe it is effectively disabled by -I (if it is not, that would be a valid feature request). However, since setuptools was the pioneer in this area, if setuptool

[issue19176] DeprecationWarning for doctype() method when subclassing _elementtree.XMLParser

2015-06-29 Thread Roundup Robot
Roundup Robot added the comment: New changeset 75571407dcd3 by Serhiy Storchaka in branch '3.4': Issue #19176: Fixed doctype() related bugs in C implementation of ElementTree. https://hg.python.org/cpython/rev/75571407dcd3 New changeset 6ae8842e9b60 by Serhiy Storchaka in branch '3.5': Issue #19

[issue24400] Awaitable ABC incompatible with functools.singledispatch

2015-06-29 Thread Stefan Behnel
Stefan Behnel added the comment: > isawaitable(), however, should continue using abc.Awaitable, since it only > checks for __await__ presence on the type (or should we just drop it?) I'd really remove it. It's not referring to an actual type, so it doesn't fit the purpose of the inspect module

[issue24534] disable executing code in .pth files

2015-06-29 Thread Tim Smith
Tim Smith added the comment: In Homebrew we occasionally use .pth files to call site.addsitedir. This is useful when we want to add a directory to sys.path that contains .pth files that also need to be processed (for example, when adding a directory to sys.path that contains namespace packages

[issue24531] please document that no code preceding encoding declaration is allowed

2015-06-29 Thread Jakub Wilk
Jakub Wilk added the comment: Right, I meant . -- ___ Python tracker ___ ___

[issue24534] disable executing code in .pth files

2015-06-29 Thread Ned Deily
Changes by Ned Deily : -- nosy: +brett.cannon, eric.snow, ncoghlan ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscrib

[issue24534] disable executing code in .pth files

2015-06-29 Thread Min RK
New submission from Min RK: .pth files currently allow execution of arbitrary code, triggered by lines starting with `import`. This is a rarely understood, and often misbehaving feature. easy_install has used this feature to ensure that its packages are highest priority (even higher than stdli

[issue24532] asyncio.sock_recv() blocks normal ioloop actions.

2015-06-29 Thread Yury Selivanov
Yury Selivanov added the comment: > You should develop using asyncio debug mode: Maybe we should promote this check to the production mode? -- ___ Python tracker ___ ___

[issue24532] asyncio.sock_recv() blocks normal ioloop actions.

2015-06-29 Thread STINNER Victor
STINNER Victor added the comment: You should develop using asyncio debug mode: https://docs.python.org/dev/library/asyncio-dev.html#asyncio-dev haypo@selma$ PYTHONASYNCIODEBUG=1 ./python x.py Starting busy receiver Traceback (most recent call last): File "x.py", line 21, in main() Fil

[issue24533] Increased Test Coverage for Lib/random.py

2015-06-29 Thread Charles Nodell
New submission from Charles Nodell: This patch just extends test coverage on the random library by a few lines. -- components: Tests files: mywork.patch keywords: patch messages: 245956 nosy: Charles Nodell priority: normal severity: normal status: open title: Increased Test Coverage for

[issue24462] bytearray.find Buffer Over-read

2015-06-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The patch for issue24467 also fixed this issue in different way. In any case thank you Dmitry for your patches. -- components: +Interpreter Core resolution: -> duplicate stage: patch review -> resolved status: open -> closed superseder: -> bytearray

[issue24467] bytearray pop and remove Buffer Over-read

2015-06-29 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- components: +Interpreter Core resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue24467] bytearray pop and remove Buffer Over-read

2015-06-29 Thread Roundup Robot
Roundup Robot added the comment: New changeset a887ce8611d2 by Serhiy Storchaka in branch '2.7': Issue #24467: Fixed possible buffer over-read in bytearray. The bytearray https://hg.python.org/cpython/rev/a887ce8611d2 New changeset c95d7ffa492e by Serhiy Storchaka in branch '3.4': Issue #24467:

[issue24518] json.dumps should accept key function for ``sort_keys``

2015-06-29 Thread Bob Ippolito
Bob Ippolito added the comment: On further investigation, simplejson has implemented this functionality under a different name since 2.5.0 (2012-03-29). """ If item_sort_key is a callable (not the default), then the output of dictionaries will be sorted with it. The callable will be used like

[issue24532] asyncio.sock_recv() blocks normal ioloop actions.

2015-06-29 Thread Марк Коренберг
New submission from Марк Коренберг: Suppose that program: import asyncio import socket def receiver(loop): (a, b) = socket.socketpair() loop.call_later(1, lambda: print('Should be called inside the loop')) end = loop.time() + 3 print('Starting

[issue24528] Misleading exeption for await in comprehensions.

2015-06-29 Thread Yury Selivanov
Yury Selivanov added the comment: Thanks for discovering this, Ivan. The patch is attached. -- keywords: +needs review, patch nosy: +ncoghlan stage: -> patch review Added file: http://bugs.python.org/file39834/awaitcomp.patch ___ Python tracker

[issue24531] please document that no code preceding encoding declaration is allowed

2015-06-29 Thread R. David Murray
R. David Murray added the comment: What docs are you looking at? https://docs.python.org/3/reference/lexical_analysis.html#encoding-declarations? I suspect the author thought that "If a comment in the first or second line..." implied both lines needed to be comments, but I agree that the wordi

[issue24530] `import..as` fails where `import` does not

2015-06-29 Thread R. David Murray
R. David Murray added the comment: I'm pretty sure this has already been reported, but I have no idea how to search for the issue :) If I remember correctly there's a doc patch, so I suppose it hasn't been applied. But I could be misremembering. -- nosy: +brett.cannon, eric.snow, r.d

[issue24529] Same MemoryError object gets thrown from different places.

2015-06-29 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python

[issue24529] Same MemoryError object gets thrown from different places.

2015-06-29 Thread R. David Murray
R. David Murray added the comment: If the same memory exception object were not used, we'd have to allocate memory for the new one... -- nosy: +r.david.murray resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker

[issue24518] json.dumps should accept key function for ``sort_keys``

2015-06-29 Thread Bob Ippolito
Bob Ippolito added the comment: Seems like a good idea to me, I'll make sure this gets in simplejson as well. -- ___ Python tracker ___ __

[issue24531] please document that no code preceding encoding declaration is allowed

2015-06-29 Thread Jakub Wilk
New submission from Jakub Wilk: If the encoding is declared on the second line, the first line must not contain anything except comments. However, this fact is not documented. The Python Language reference says only that "the encoding declaration must appear on a line of its own"; and PEP 263

[issue19176] DeprecationWarning for doctype() method when subclassing _elementtree.XMLParser

2015-06-29 Thread Martin Panter
Martin Panter added the comment: inherit-doctype.v3.patch looks good to me -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue22609] Constructors of some mapping classes don't accept `self` keyword argument

2015-06-29 Thread Martin Panter
Martin Panter added the comment: Patch looks fine to me. I understand Yury withdrew his comment. -- stage: patch review -> commit review ___ Python tracker ___ __

[issue24518] json.dumps should accept key function for ``sort_keys``

2015-06-29 Thread Raymond Hettinger
Raymond Hettinger added the comment: The idea and patch look reasonable. Bob, what do you think? -- assignee: -> bob.ippolito nosy: +bob.ippolito, rhettinger versions: +Python 3.6 -Python 3.4 ___ Python tracker _

[issue17546] Document the circumstances where the locals() dict get updated

2015-06-29 Thread Martin Panter
Martin Panter added the comment: I quickly scanned through the email thread from Issue 17960. I guess it makes sense to specify that locals() can be used to directly get a class’s namespace. Probably doesn’t hurt to say locals() is equivalent to globals() at module level, although this seems l

[issue24530] `import..as` fails where `import` does not

2015-06-29 Thread Dustin J. Mitchell
New submission from Dustin J. Mitchell: Reproduction: # main.py import foo.bar # foo/__init__.py # (empty) # foo/bar/__init__.py import foo.bar.bing as bing # foo/bar/bing.py # (empty) Result: dustin@euclid ~/tmp $ python3.3 main.py Traceback (most recent call last): File "main.py", line

[issue24529] Same MemoryError object gets thrown from different places.

2015-06-29 Thread SylvainDe
New submission from SylvainDe: Disclaimer: This is very minor, impacts only Python 2 and is maybe not even a bug. Context: I was "randomly" changing attribute of Exception objects when I discovered something I did not expect : sometimes when an exception occurs, a new object is raised (which

[issue3353] make built-in tokenizer available via Python C API

2015-06-29 Thread Dustin J. Mitchell
Dustin J. Mitchell added the comment: This seems to have stalled out after the PyCon sprints. Any chance the final patch can be reviewed? -- ___ Python tracker ___ _

[issue23496] Steps for Android Native Build of Python 3.4.2

2015-06-29 Thread Cyd Haselton
Cyd Haselton added the comment: No...haven't upgraded to Android 5.0 yet. On June 29, 2015 9:00:01 AM CDT, Ryan Gonzalez wrote: > >Ryan Gonzalez added the comment: > >You compiled with -fPIE and GCC, right? I know the Android Clang seems >broken. > >On June 29, 2015 7:09:25 AM CDT, Cyd Haselt

[issue23496] Steps for Android Native Build of Python 3.4.2

2015-06-29 Thread Ryan Gonzalez
Ryan Gonzalez added the comment: You compiled with -fPIE and GCC, right? I know the Android Clang seems broken. On June 29, 2015 7:09:25 AM CDT, Cyd Haselton wrote: > >Cyd Haselton added the comment: > >FYI, Figured out that running ./configure with --with-pydebug does NOT >define Py_DEBUG in p

[issue24528] Misleading exeption for await in comprehensions.

2015-06-29 Thread Yury Selivanov
Changes by Yury Selivanov : -- assignee: -> yselivanov ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

[issue24514] tarfile fails to extract archive (handled fine by gnu tar and bsdtar)

2015-06-29 Thread Lars Gustäbel
Lars Gustäbel added the comment: I think a simple addition to the existing unittest for nti() will be enough. itn() seems well-tested, and nts() and stn() are not affected, because they don't operate on numbers. -- Added file: http://bugs.python.org/file39832/issue24514.diff _

[issue24420] Documentation regressions from adding subprocess.run()

2015-06-29 Thread Martin Panter
Martin Panter added the comment: New patch dropping the [, input] parameter from the signature. I also removed the bit about *stdout*, since it should be obvious from the equivalent run() call given, and equally applies to *check*. -- Added file: http://bugs.python.org/file39831/high-a

[issue24514] tarfile fails to extract archive (handled fine by gnu tar and bsdtar)

2015-06-29 Thread Tal Einat
Tal Einat added the comment: The patch is very simple, but this needs tests. At the very least, a simple tar file which reproduces this issue could be added to the tests. Taking this a step further would be writing some unit tests for the internal nti() and itn() functions, and perhaps also st

[issue24272] PEP 484 docs

2015-06-29 Thread Ivan Levkivskyi
Changes by Ivan Levkivskyi : -- nosy: +levkivskyi ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue21827] textwrap.dedent() fails when largest common whitespace is a substring of smallest leading whitespace

2015-06-29 Thread Ivan Levkivskyi
Changes by Ivan Levkivskyi : -- nosy: +levkivskyi ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue5945] PyMapping_Check returns 1 for lists

2015-06-29 Thread Ivan Levkivskyi
Changes by Ivan Levkivskyi : -- nosy: +levkivskyi ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue24483] Avoid repeated hash calculation in C implementation of functools.lru_cache()

2015-06-29 Thread Tal Einat
Tal Einat added the comment: With clru_cache_known_hash_4.patch on the current default branch, the entire test suite passes here (OSX 10.10). -- nosy: +taleinat ___ Python tracker _

[issue11352] Update cgi module doc

2015-06-29 Thread Ivan Levkivskyi
Changes by Ivan Levkivskyi : -- nosy: +levkivskyi ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue21253] unittest assertSequenceEqual can lead to Difflib.compare() crashing on mostly different sequences

2015-06-29 Thread Ivan Levkivskyi
Changes by Ivan Levkivskyi : -- nosy: +levkivskyi ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue19217] Calling assertEquals for moderately long list takes too long

2015-06-29 Thread Ivan Levkivskyi
Changes by Ivan Levkivskyi : -- nosy: +levkivskyi ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue23496] Steps for Android Native Build of Python 3.4.2

2015-06-29 Thread Cyd Haselton
Cyd Haselton added the comment: FYI, Figured out that running ./configure with --with-pydebug does NOT define Py_DEBUG in pyconfig.h. Defining it in pyconfig.h got me past the "undefined reference to `_PyUnicode_CheckConsistency'" error, but i'm now getting this: if test $? -ne 0 ; then \

[issue24527] The MimeTypes class cannot ignore global files per instance

2015-06-29 Thread Wladimir Palant
Changes by Wladimir Palant : -- nosy: +Wladimir Palant ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://

[issue24528] Misleading exeption for await in comprehensions.

2015-06-29 Thread Ivan Levkivskyi
New submission from Ivan Levkivskyi: The following code: async def foo(): lst = [await coro(i) for i in range(10)] return lst gives SyntaxError: 'await' outside async function I understand that this is because the comprehensions are implemented using a function scope (see also #10544

[issue24527] The MimeTypes class cannot ignore global files per instance

2015-06-29 Thread Sebastian Noack
New submission from Sebastian Noack: In order to prevent the mimetypes module from considering global files and registry entries, you have to call mimetypes.init([]). However, this will enforce that behavior globally, and only works if the module wasn't initialized yet. There is also a simila

[issue24526] Exponent function bug

2015-06-29 Thread R. David Murray
R. David Murray added the comment: This bit of python's precedence rules often catches people by surprise. ** binds tighter than -, so what python is evaluating is -(1**10). -- nosy: +r.david.murray resolution: -> not a bug stage: -> resolved status: open -> closed type: compile erro

[issue24526] Exponent function bug

2015-06-29 Thread bhaskar
New submission from bhaskar: the value of a -ve number when raised by a power of even number always results in a +ve number. I tried it with -1**10 , -1**2, -9**4 these all are resulting in -ve numbers which is mathematically incorrect. ps. the same example is in the attachment -- com

[issue24526] Exponent function bug

2015-06-29 Thread bhaskar
Changes by bhaskar : Added file: http://bugs.python.org/file39830/pythonabc.png ___ Python tracker ___ ___ Python-bugs-list mailing list Unsub

[issue24525] [doc] missing word

2015-06-29 Thread Vincent Legoll
New submission from Vincent Legoll: Here is a patch to fix a missing word in the urllib doc -- assignee: docs@python components: Documentation files: python-doc-fix.hgpatch messages: 245927 nosy: docs@python, vincent-legoll priority: normal severity: normal status: open title: [doc] miss

[issue24279] Update test_base64 to use test.support.script_helper

2015-06-29 Thread Martin Panter
Changes by Martin Panter : -- nosy: +vadmium ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue18576] Document test.support.script_helper

2015-06-29 Thread Martin Panter
Martin Panter added the comment: I left some more comments on Reitveld. The main one is I think stderr gets stripped with assert_python_ok(), but I don’t think stdout is touched. Correct me if I’m wrong though. -- ___ Python tracker

[issue17546] Document the circumstances where the locals() dict get updated

2015-06-29 Thread Nick Coghlan
Nick Coghlan added the comment: I mostly like Martin's suggested wording, but would also note that I filed issue 17960 to tighten up the requirements for when we expect assigning to locals() to work. To save folks reading the whole referenced email, I think it would be worth defining that mod

[issue24134] assertRaises can behave differently

2015-06-29 Thread Robert Collins
Robert Collins added the comment: Hi, catching up (see my mail to -dev about not getting tracker mail). Deprecations++. Being nice for folk whom consume unittest2 which I backport to everything is important to me :). -- ___ Python tracker