Re: Looking up a dictionary _key_ by key?

2015-06-24 Thread Peter Otten
Dan Stromberg wrote: I know that sounds strange: usually we look up values by key, not keys. But suppose you have a strange key type that despite being equal, is not identical in some fields, and you need to see those fields. Is there a way of getting the key used by the dictionary, short

pytest-2.7.2: bug fixes

2015-06-24 Thread holger krekel
pytest-2.7.2: bug fixes === pytest is a mature Python testing tool with more than a 1100 tests against itself, passing on many different interpreters and platforms. This release is supposed to be drop-in compatible to 2.7.1. See below for the changes and see docs at:

[issue24495] asyncio.ensure_future() AttributeError with “async def” coroutines

2015-06-24 Thread Martin Panter
New submission from Martin Panter: While trying to port the example at https://docs.python.org/3.5/library/asyncio-task.html#example-future-with-run-until-complete to use “async def”, I discovered the ensure_future() function does not like the coroutine field name changes introduced in Issue

[issue24492] using custom objects as modules: AttributeErrors new in 3.5

2015-06-24 Thread Armin Rigo
Armin Rigo added the comment: Also, if we want to be paranoid, the _PyObject_GetAttrId() can return anything, not necessarily a string object. This would make the following PyUnicode_FromFormat() fail. So maybe you also want to overwrite failures in PyUnicode_FromFormat() with the final

Re: Pure Python Data Mangling or Encrypting

2015-06-24 Thread Devin Jeanpierre
How about a random substitution cipher? This will be ultra-weak, but fast (using bytes.translate/bytes.maketrans) and seems to be the kind of thing you're asking for. -- Devin On Tue, Jun 23, 2015 at 12:02 PM, Randall Smith rand...@tnr.cc wrote: Chunks of data (about 2MB) are to be stored on

[issue24492] using custom objects as modules: AttributeErrors new in 3.5

2015-06-24 Thread Armin Rigo
Armin Rigo added the comment: I'd guess so: if the PyObject_GetAttrId() fails, then ignore the rest of the code that was added in https://hg.python.org/cpython/rev/fded07a2d616 and jump straight to ``PyErr_Format(PyExc_ImportError, ...)``. -- ___

[issue24495] asyncio.ensure_future() AttributeError with “async def” coroutines

2015-06-24 Thread STINNER Victor
STINNER Victor added the comment: It's not the first time that a bug in found in _format_coroutine(). We need more unit tests! Previous bug: https://github.com/python/asyncio/issues/222 -- ___ Python tracker rep...@bugs.python.org

Re: Looking up a dictionary _key_ by key?

2015-06-24 Thread Ian Kelly
On Tue, Jun 23, 2015 at 7:06 PM, Paul Rubin no.email@nospam.invalid wrote: Chris Angelico ros...@gmail.com writes: Would I have to do an O(n) search to find my key? Iterate over it - it's an iterable view in Py3 - and compare. I think the question was whether the O(n) search could be avoided,

Re: Looking up a dictionary _key_ by key?

2015-06-24 Thread Marko Rauhamaa
Ian Kelly ian.g.ke...@gmail.com: I don't think that it's fundamentally broken. A simple example would be the int 3, vs. the float 3, vs. the Decimal 3. All of them compare equal to one another, but they are distinct values, and sometimes it might be useful to be able to determine which one is

rhythmbox plugin problem

2015-06-24 Thread L E
Hello, I am trying to get some old plugins I wrote to wrote on anewer version of rhythmbox. When I try to load the plugin I see: (rhythmbox:3092): libpeas-WARNING **: nowplaying-lcd: /usr/lib/rhythmbox/plugins/nowplaying-lcd/libnowplaying-lcd.so: cannot open shared object file: No such file or

Pure Python Data Mangling or Encrypting

2015-06-24 Thread Randall Smith
Chunks of data (about 2MB) are to be stored on machines using a peer-to-peer protocol. The recipient of these chunks can't assume that the payload is benign. While the data senders are supposed to encrypt data, that's not guaranteed, and I'd like to protect the recipient against exposure to

[issue24493] subprocess with env=os.environ doesn't preserve environment variables when calling a 32bit process on Windows 8.1

2015-06-24 Thread Florian Bruhin
Florian Bruhin added the comment: I've now updated to Python 3.4.3 and it's broken there as well. I tried on two other Windows 8.1 machines (with Python 3.4.3 and 3.4.1 respectively), and I can't reproduce there either... It works with shell=True indeed. I wonder why this is only broken on

Re: Looking up a dictionary _key_ by key?

2015-06-24 Thread Mark Lawrence
On 24/06/2015 01:47, Dan Stromberg wrote: Would I have to do an O(n) search to find my key? can you use something from here https://pypi.python.org/pypi/sortedcontainers/0.9.6 with the bisect module? -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do

Next CodinGame online programming contest on June, 27 - Python available

2015-06-24 Thread Maria Martin
Hi everyone! On June 27th, Code of the Rings, an online coding battle will launch. It's Free open to all. You will have 24 hours to code and optimize your solution to a puzzle. What will be exciting and fun is that it will be VERY EASY to start and to get something that works, but complex

[issue12920] inspect.getsource only works for objects loaded from files, not interactive session

2015-06-24 Thread Zorceta
Zorceta added the comment: When provided object is not from a file should be 'When `inspect` can't find the source file of provided object'. My mistake. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12920

[issue24497] test_decimal.py contains a dead link

2015-06-24 Thread mattyw
New submission from mattyw: The comments in test_decimal contain a url for downloading tests written by Mike Cowlishaw: Cowlishaw's tests can be downloaded from:

[issue24496] Non-idiomatic examples in gzip docs

2015-06-24 Thread Jakub Kadlčík
New submission from Jakub Kadlčík: Hello, I think there are awesome example code snippets in gzip documentation. No doubt, they helped me a lot. The only problem is that they are not idiomatic. They look like C more than Python. I suggest following patch -- assignee: docs@python

[issue24496] Non-idiomatic examples in gzip docs

2015-06-24 Thread Martin Panter
Martin Panter added the comment: It looks like this is for Python 2. I agree with the change, but I suggest back-porting revisions 35c53e7e2280, a01992e219c0 and ae1528beae67 (Issue 21146) instead, to match the Python 3 documentation. -- nosy: +vadmium versions: +Python 2.7

Re: Pure Python Data Mangling or Encrypting

2015-06-24 Thread Steven D'Aprano
On Wed, 24 Jun 2015 05:02 am, Randall Smith wrote: Chunks of data (about 2MB) are to be stored on machines using a peer-to-peer protocol. The recipient of these chunks can't assume that the payload is benign. While the data senders are supposed to encrypt data, that's not guaranteed, and

Re: To write headers once with different values in separate row in CSV

2015-06-24 Thread Steven D'Aprano
On Wed, 24 Jun 2015 09:37 pm, kbtyo wrote: On Tuesday, June 23, 2015 at 9:50:50 PM UTC-4, Steven D'Aprano wrote: On Wed, 24 Jun 2015 03:15 am, Sahlusar wrote: That is not the underlying issue. Any thoughts or suggestions would be very helpful. Thank you for spending over 100 lines to

[issue24497] test_decimal.py contains a dead link

2015-06-24 Thread mattyw
Changes by mattyw mat...@me.com: -- keywords: +patch Added file: http://bugs.python.org/file39797/24497.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24497 ___

[issue24450] Add cr_await calculated property to coroutine object

2015-06-24 Thread Martin Panter
Martin Panter added the comment: For Benno’s original gi_yieldfrom property, I guess the asyncio.coroutines.CoroWrapper class would need updating. The GeneratorWrapper class for @types.coroutine probably should be updated too, since it already supports other internal generator properties.

Re: To write headers once with different values in separate row in CSV

2015-06-24 Thread kbtyo
On Tuesday, June 23, 2015 at 3:12:40 PM UTC-4, John Gordon wrote: In c0ea6bec-b6b1-48fd-9291-0fedcda7b...@googlegroups.com Sahlusar ahlusar.ahluwa...@gmail.com writes: However, when I extrapolate this same logic with a list like:

[issue24484] multiprocessing cleanup occasionally throws exception

2015-06-24 Thread Jorge Herskovic
Jorge Herskovic added the comment: 20,000+ iterations of the test suite with my homebuilt 3.4.3 throw no exceptions. Weirder and weirder. Any suggestions? Without any actual knowledge (unencumbered by the thought process), a concurrency issue in the interpreter itself is my guess.

Re: Organizing function calls once files have been moved to a directory

2015-06-24 Thread kbtyo
On Tuesday, June 23, 2015 at 10:18:43 PM UTC-4, Steven D'Aprano wrote: On Wed, 24 Jun 2015 06:16 am, kbtyo wrote: I am working on a workflow module that will allow one to recursively check for file extensions and if there is a match move them to a folder for processing (parsing, data

Re: To write headers once with different values in separate row in CSV

2015-06-24 Thread kbtyo
On Tuesday, June 23, 2015 at 9:50:50 PM UTC-4, Steven D'Aprano wrote: On Wed, 24 Jun 2015 03:15 am, Sahlusar wrote: That is not the underlying issue. Any thoughts or suggestions would be very helpful. Thank you for spending over 100 lines to tell us what is NOT the underlying issue. I

[issue24450] Add cr_await calculated property to coroutine object

2015-06-24 Thread Armin Rigo
Changes by Armin Rigo ar...@users.sourceforge.net: -- nosy: -arigo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24450 ___ ___ Python-bugs-list

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

2015-06-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I would prefer do not repeat the code, but I afraid this can affect the performance, and the performance of PyDict_GetItem is critical for Python. -- ___ Python tracker rep...@bugs.python.org

[issue24486] http/client.py block indefinitely on line 308 in _read_status

2015-06-24 Thread Julien Palard
Changes by Julien Palard mandark@gmail.com: -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24486 ___ ___

[issue24486] http/client.py block indefinitely on line 308 in _read_status

2015-06-24 Thread Julien Palard
Julien Palard added the comment: OK, so, requests have a `timeout` and take it into account, and it solves my problem. Yet I don't understand one little thing: With both requests `timeout` parameter set or unset, the exact same http.client.py:_read_status call the same socket.readinto. With

Re: To write headers once with different values in separate row in CSV

2015-06-24 Thread kbtyo
On Wednesday, June 24, 2015 at 8:38:24 AM UTC-4, Steven D'Aprano wrote: On Wed, 24 Jun 2015 09:37 pm, kbtyo wrote: On Tuesday, June 23, 2015 at 9:50:50 PM UTC-4, Steven D'Aprano wrote: On Wed, 24 Jun 2015 03:15 am, Sahlusar wrote: That is not the underlying issue. Any thoughts or

[issue24486] http/client.py block indefinitely on line 308 in _read_status

2015-06-24 Thread Martin Panter
Martin Panter added the comment: I assume you meant _without_ an explicit timeout setting in Requests, you see a recvfrom() system call, and _with_ an explicit timeout you see poll(). I guess that would be because Requests is using a blocking socket in the first case, and in the second case

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

2015-06-24 Thread Raymond Hettinger
Raymond Hettinger added the comment: Please let this go forward as Serhiy has written it. That is the way I wrote the existing known hash function. You all should be focused on correctness, not on bike-shedding my and Serhiy's coding style. --

Re: Looking for people who are using Hypothesis and are willing to say so

2015-06-24 Thread Paul Rubin
David MacIver da...@drmaciver.com writes: Author of Hypothesis here. (If you don't know what Hypothesis is, you're probably not the target audience for this email but you should totally check it out: https://hypothesis.readthedocs.org/ Oh very cool: a QuickCheck-like unit test library. I

Re: Pure Python Data Mangling or Encrypting

2015-06-24 Thread Grant Edwards
On 2015-06-24, Randall Smith rand...@tnr.cc wrote: On 06/24/2015 01:29 PM, Grant Edwards wrote: On 2015-06-24, Randall Smith rand...@tnr.cc wrote: On 06/24/2015 06:36 AM, Steven D'Aprano wrote: I don't understand how mangling the data is supposed to protect the recipient. Don't they have the

[issue24504] os.listdir() error if the last folder starts not with the capital letter

2015-06-24 Thread STINNER Victor
STINNER Victor added the comment: 'Z:\Pr Files\norma' looks wrong '\n' is a single character, a new line. Try to write r'Z:\Pr Files\norma'. https://docs.python.org/dev/reference/lexical_analysis.html#string-and-bytes-literals -- nosy: +haypo ___

[issue24506] make fails with gcc 4.9 due to fatal warning of unused variable and empty macro in Parser/pgen.c

2015-06-24 Thread Karl Richter
New submission from Karl Richter: `gcc` 4.9 is more restictive and recognizes that the empty definition of the `REQN` macro doesn't use some variables. It's more suitable to wrap the usage of the macro in the same preprocessor conditionals like the macro definition. experienced with

[issue24505] shutil.which wrong result on Windows

2015-06-24 Thread Bob Alexander
New submission from Bob Alexander: Python session with 3.5b2 Showing existing error: from shutil import which Works OK which(python) 'C:\\Python27\\python.EXE' Also works OK which('C:\\Python27\\python.EXE') 'C:\\Python27\\python.EXE' Fails which('C:\\Python27\\python') Showing better

[issue24400] Awaitable ABC incompatible with functools.singledispatch

2015-06-24 Thread Stefan Behnel
Stefan Behnel added the comment: I originally planned to make the next Cython release patch the Generator and Coroutine ABCs into collections.abc, but I now think it would be worth uploading an abc_backports package to PyPI instead that does that and on which asyncio, tornado and other

[issue24504] os.listdir() error if the last folder starts not with the capital letter

2015-06-24 Thread Denis Gordeev
New submission from Denis Gordeev: My code is: mypath = 'Z:\Pr Files\norma' file_list = [ f for f in listdir(mypath) if isfile(join(mypath,f))] Error: Traceback (most recent call last): File C:\Documents and Settings\Administrator\Desktop\uni\click zhenilo workshop\noise.py, line 13, in

[issue24504] os.listdir() error if the last folder starts not with the capital letter

2015-06-24 Thread Zachary Ware
Changes by Zachary Ware zachary.w...@gmail.com: -- stage: - resolved ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24504 ___ ___ Python-bugs-list

Re: Pure Python Data Mangling or Encrypting

2015-06-24 Thread Billy Earney
Freenet seems to come to mind.. :) On Wed, Jun 24, 2015 at 4:24 PM, Grant Edwards invalid@invalid.invalid wrote: On 2015-06-24, Randall Smith rand...@tnr.cc wrote: On 06/24/2015 01:29 PM, Grant Edwards wrote: On 2015-06-24, Randall Smith rand...@tnr.cc wrote: On 06/24/2015 06:36 AM,

[issue24497] test_decimal.py contains a dead link

2015-06-24 Thread Roundup Robot
Roundup Robot added the comment: New changeset 37c827d9dda4 by Ned Deily in branch '2.7': Issue #24497: update link in test_decimal comments https://hg.python.org/cpython/rev/37c827d9dda4 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org

[issue24484] multiprocessing cleanup occasionally throws exception

2015-06-24 Thread Jorge Herskovic
Jorge Herskovic added the comment: Finally able to repro on my old Mac Pro at work (Universal 64/32bit 3.4.3 from python.org, OS X 10.10.3). For some reason I can't quite fathom, there were two exceptions this time. Error in atexit._run_exitfuncs: Traceback (most recent call last): File

[issue12210] test_smtplib: intermittent failures on FreeBSD

2015-06-24 Thread Stefan Krah
Stefan Krah added the comment: If it is a DNS failure, the timeout of 3s indeed looks too low for me. On a misconfigured machine I'm easily getting timeouts of 20s, (not for this particular test, just in general, e.g. when using ssh). -- ___ Python

[issue24400] Awaitable ABC incompatible with functools.singledispatch

2015-06-24 Thread Roundup Robot
Roundup Robot added the comment: New changeset 3a78be4bcbde by Yury Selivanov in branch '3.4': Issue #24400: Fix CoroWrapper for 'async def' coroutines https://hg.python.org/cpython/rev/3a78be4bcbde New changeset 338597d2e93b by Yury Selivanov in branch '3.5': Issue #24400: Fix CoroWrapper for

[issue24495] asyncio.ensure_future() AttributeError with “async def” coroutines

2015-06-24 Thread Yury Selivanov
Yury Selivanov added the comment: Should be fixed now. Thanks for discovering this, Martin! Victor, I'll make a PR on github/asyncio with some refactoring or CoroWrapper etc. The code became too cumbersome, and has to be properly refactored. At least we should have one wrapper class for

EuroPython 2015: Beginner’s Day

2015-06-24 Thread M.-A. Lemburg
We’re pleased to announce a new venture at this year’s EuroPython... *** The EuroPython Beginner’s Day *** https://ep2015.europython.eu/en/events/beginners-day/ If you’re thinking of coming to the conference but you’re new to Python, this could be the session for you.

[issue24439] Feedback for awaitable coroutine documentation

2015-06-24 Thread Martin Panter
Martin Panter added the comment: Thanks for reviewing this Yury. Here is a new patch: * Drop the “native” term; distinguish by referring to “async def” where necessary * Add generator version of display_date() coroutine example * Change chained coroutine example over to “async def” and updated

[issue12210] test_smtplib: intermittent failures on FreeBSD

2015-06-24 Thread R. David Murray
R. David Murray added the comment: It would have to be a misconfigured machine that doesn't have 'localhost' in /etc/hosts (so that a lookup of localhost goes through DNS). Or, I suppose, one that prioritizes the resolver over /etc/hosts (is that even possible?) I would think other tests

[issue21417] Compression level for zipfile

2015-06-24 Thread Jens Diemer
Changes by Jens Diemer bugs.python@jensdiemer.de: -- nosy: +jens ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21417 ___ ___ Python-bugs-list

[issue24400] Awaitable ABC incompatible with functools.singledispatch

2015-06-24 Thread Roundup Robot
Roundup Robot added the comment: New changeset 8f4e738cb07f by Yury Selivanov in branch '3.5': Issue #24495, #24400: Test asyncio.Task.repr in debug mode https://hg.python.org/cpython/rev/8f4e738cb07f -- ___ Python tracker rep...@bugs.python.org

[issue24495] asyncio.ensure_future() AttributeError with “async def” coroutines

2015-06-24 Thread Roundup Robot
Roundup Robot added the comment: New changeset 8f4e738cb07f by Yury Selivanov in branch '3.5': Issue #24495, #24400: Test asyncio.Task.repr in debug mode https://hg.python.org/cpython/rev/8f4e738cb07f -- nosy: +python-dev ___ Python tracker

EuroPython 2015: Beginner’s Day

2015-06-24 Thread M.-A. Lemburg
We’re pleased to announce a new venture at this year’s EuroPython... *** The EuroPython Beginner’s Day *** https://ep2015.europython.eu/en/events/beginners-day/ If you’re thinking of coming to the conference but you’re new to Python, this could be the session for you.

Re: EuroPython 2015: Beginner’s Day

2015-06-24 Thread Chris Angelico
On Thu, Jun 25, 2015 at 12:06 AM, M.-A. Lemburg m...@europython.eu wrote: * A high-level introduction to Python and programming in general. Where did Python come from, what is programming all about, and what do I need to know to understand all these in-jokes about cheese shops? * A

[issue19894] zipfile ignores deflate level settings in zipinfo object

2015-06-24 Thread Jens Diemer
Jens Diemer added the comment: IMHO it should be possible to set compression level not only for DEFLATE. And it should be similar with the tarfile API. Seems that http://bugs.python.org/issue21417 will cover this. -- nosy: +jens ___ Python tracker

[issue24439] Feedback for awaitable coroutine documentation

2015-06-24 Thread Martin Panter
Changes by Martin Panter vadmium...@gmail.com: Added file: http://bugs.python.org/file39799/tulip_coro.png ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24439 ___

[issue24400] Awaitable ABC incompatible with functools.singledispatch

2015-06-24 Thread Roundup Robot
Roundup Robot added the comment: New changeset f4b702672beb by Yury Selivanov in branch '3.4': asyncio: Merge changes from issue #24400. https://hg.python.org/cpython/rev/f4b702672beb -- ___ Python tracker rep...@bugs.python.org

[issue24498] Shoudl ptags and eptags be removed from repo?

2015-06-24 Thread R. David Murray
New submission from R. David Murray: ctags directly supports python. Is there any reason to keep the ptags and eptags scripts in Tools/scripts? -- messages: 245744 nosy: r.david.murray priority: normal severity: normal status: open title: Shoudl ptags and eptags be removed from repo?

[issue24506] make fails with gcc 4.9 due to fatal warning of unused variable and empty macro in Parser/pgen.c

2015-06-24 Thread Meador Inge
Meador Inge added the comment: What is the exact GCC revision and what are the error messages? I just tried GCC 4.9.3 and GCC 4.10.0 and don't see the errors. Also, what configure and make parameters did you use to trigger the error? I did './configure --with-pydebug' and './configure' with

[issue23883] __all__ lists are incomplete

2015-06-24 Thread Jacek Kołodziej
Jacek Kołodziej added the comment: Nice work with the check__all__() function. Thank you! :) I left some comments on Reitveld. Also, it currently ignores items satisfying either of these checks: * isinstance(module_object, types.ModuleType) * getattr(module_object, '__module__', None)

[issue24503] csv.writer fails when within csv.reader

2015-06-24 Thread Josh Rosenberg
Josh Rosenberg added the comment: Obvious possibility: input.csv is empty, so the loop never executes. You could always add prints within the loop as well, so you know it actually read something. -- nosy: +josh.r ___ Python tracker

Re: Pure Python Data Mangling or Encrypting

2015-06-24 Thread Randall Smith
On 06/24/2015 04:24 PM, Grant Edwards wrote: OK. But if the recipient (the server) mangles the data and then never unmangles or reads the data, there doesn't seem to be any point in storing it. I must be misunderstanding your statement that the data is never read/unmangled. When the

[issue16830] Add skip_host and skip_accept_encoding to HTTPConnection.request()

2015-06-24 Thread Martin Panter
Martin Panter added the comment: I tend to think that this proposal should be rejected. If you need low-level control over the header fields, just use putrequest(), putheader() and endheaders() methods instead. And adding these flags to request() isn’t going to help with urlopen(), unless the

[issue23883] __all__ lists are incomplete

2015-06-24 Thread Jacek Kołodziej
Changes by Jacek Kołodziej kolodzi...@gmail.com: Added file: http://bugs.python.org/file39807/Issue23883_support_check__all__.v3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23883 ___

[issue24502] OS X 2.7 package has zeros for version numbers in sub-packages

2015-06-24 Thread Jim Zajkowski
Jim Zajkowski added the comment: Among the problems this causes, we can't correctly track which version is present on our Macs (~6,000 systems) for upgrading. --Jim -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24502

[issue23883] __all__ lists are incomplete

2015-06-24 Thread Jacek Kołodziej
Changes by Jacek Kołodziej kolodzi...@gmail.com: Added file: http://bugs.python.org/file39808/Issue23883_test_gettext.v2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23883 ___

[issue24503] csv.writer fails when within csv.reader

2015-06-24 Thread Martin Panter
Martin Panter added the comment: It’s working properly for me in 2.7.10: $ cat -A input.csv a,b,c$ 1,2,3$ $ python2 testcase.py $ cat -A output.csv d,a,t,a^M$ d,a,t,a^M$ m,o,r,e, ,d,a,t,a^M$ -- nosy: +vadmium stage: - test needed ___ Python tracker

Could you explain this rebinding (or some other action) on nums = nums?

2015-06-24 Thread fl
Hi, I read a blog written by Ned and find it is very interesting, but I am still unclear it in some parts. In the following example, I am almost lost at the last line: nums = num Could anyone explain it in a more detail to me? Thanks, ... The reason is that list

[issue24506] make fails with gcc 4.9 due to fatal warning of unused variable and empty macro in Parser/pgen.c

2015-06-24 Thread Karl Richter
Karl Richter added the comment: It's a fatal warning of `gcc 4.9.2`, not an error (my bad) for `int i;` in `Parser/pgen.c` line 227. It might be ignored as well, but I think my approach is more elegant and deals with issues sooner than later. --

[issue24439] Feedback for awaitable coroutine documentation

2015-06-24 Thread Martin Panter
Martin Panter added the comment: Hi Yury. It looks like you missed my updated /Doc/library/tulip_coro.dia file. Here it is separately, in case you are having trouble extracting it from the patch. -- Added file: http://bugs.python.org/file39810/tulip_coro.dia

Re: Could you explain this rebinding (or some other action) on nums = nums?

2015-06-24 Thread Chris Angelico
On Thu, Jun 25, 2015 at 9:52 AM, fl rxjw...@gmail.com wrote: The reason is that list implements __iadd__ like this (except in C, not Python): class List: def __iadd__(self, other): self.extend(other) return self When you execute nums += more, you're getting the same

Re: Why does the unit test fail of the pyPDF2 package?

2015-06-24 Thread Steven D'Aprano
On Thu, 25 Jun 2015 03:52 am, fl wrote: Thanks, Steven. I don't know how to copy command console window contents to the forum post. I don't know either, because I don't use Windows, but you can google for instructions: https://duckduckgo.com/html/?q=copy+text+windows+console

[issue19111] 2to3 should remove from future_builtins import *

2015-06-24 Thread Josh Rosenberg
Josh Rosenberg added the comment: Shouldn't it also disable the relevant fixers for map, filter, zip, etc. as appropriate? Otherwise a whole bunch of calls will be wrapper in list() or the like to mimic a behavior the code never had in Py2 in the first place. -- nosy: +josh.r

[issue24400] Awaitable ABC incompatible with functools.singledispatch

2015-06-24 Thread Roundup Robot
Roundup Robot added the comment: New changeset eb6fb8e2f995 by Yury Selivanov in branch '3.5': Issue #24325, #24400: Add more unittests for types.coroutine; tweak wrapper implementation. https://hg.python.org/cpython/rev/eb6fb8e2f995 New changeset 7a2a79362bbe by Yury Selivanov in branch

[issue24325] Speedup types.coroutine()

2015-06-24 Thread Roundup Robot
Roundup Robot added the comment: New changeset eb6fb8e2f995 by Yury Selivanov in branch '3.5': Issue #24325, #24400: Add more unittests for types.coroutine; tweak wrapper implementation. https://hg.python.org/cpython/rev/eb6fb8e2f995 New changeset 7a2a79362bbe by Yury Selivanov in branch

[issue24499] Python Installer text piles up during installation process

2015-06-24 Thread Zach “The Quantum Mechanic” W
New submission from Zach “The Quantum Mechanic” W: A minor visual bug that causes text to pile up in the installer window. Installation finished, python seems to run fine. Operating System: Windows 8.1 64x Installer: Python 3.5.0b2 -- components: Installation files:

Re: Pure Python Data Mangling or Encrypting

2015-06-24 Thread Chris Angelico
On Thu, Jun 25, 2015 at 1:52 AM, Emile van Sebille em...@fenx.com wrote: On 6/24/2015 7:02 AM, Grant Edwards wrote: And how does writing unmangled data to disk expose anybody to anything? I've never heard of an exploit where writing an evilly crafted bit-pattern to disk causes a any sort of

[issue24484] multiprocessing cleanup occasionally throws exception

2015-06-24 Thread Jorge Herskovic
Jorge Herskovic added the comment: Ok, sorry, one more important thing I omitted in the previous comment. ^^^ The second exception above seems to be related to a new test I added, one that includes a daemonic process which itself relies on daemonic threads. The cleanup of that seems to be

[issue24494] Can't specify encoding with fileinput and inplace=True

2015-06-24 Thread R. David Murray
R. David Murray added the comment: I presume this is because openhook could be anything, including something where the inplace code couldn't even find the file to rename. On the other hand, Python is a consenting adults language, so we can assume you know what you are doing if you specify

Re: Pure Python Data Mangling or Encrypting

2015-06-24 Thread Grant Edwards
On 2015-06-24, Steven D'Aprano st...@pearwood.info wrote: On Wed, 24 Jun 2015 05:02 am, Randall Smith wrote: Chunks of data (about 2MB) are to be stored on machines using a peer-to-peer protocol. The recipient of these chunks can't assume that the payload is benign. While the data senders

[issue12210] test_smtplib: intermittent failures on FreeBSD

2015-06-24 Thread Stefan Krah
Stefan Krah added the comment: I think it's also possible to misconfigure /etc/nsswitch.conf. When I opened this issue, my buildbot had the FreeBSD default configuration. I no longer have any FreeBSD machines, so I cannot check this now. -- ___

[issue24439] Feedback for awaitable coroutine documentation

2015-06-24 Thread Roundup Robot
Roundup Robot added the comment: New changeset e31aad001fdb by Yury Selivanov in branch '3.5': Issue #24439: Improve PEP 492 related docs. https://hg.python.org/cpython/rev/e31aad001fdb New changeset d99770da3b2a by Yury Selivanov in branch 'default': Merge 3.5 (issue #24439)

[issue21417] Compression level for zipfile

2015-06-24 Thread Jens Diemer
Jens Diemer added the comment: btw. hacked work-a-round is: zlib.Z_DEFAULT_COMPRESSION = 9 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21417 ___

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

2015-06-24 Thread Yury Selivanov
Yury Selivanov added the comment: I would prefer do not repeat the code, but I afraid this can affect the performance, and the performance of PyDict_GetItem is critical for Python. Static function calls like that one will most likely be inlined by the compiler... But if you don't want to

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

2015-06-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: But if you don't want to rely on that, maybe we can use a macro to avoid code duplication? This will not make the code cleaner. In any case this is other issue. -- title: Avoid repeated hash calculation in C implementation of

[issue23319] Missing SWAP_INT in I_set_sw

2015-06-24 Thread Matthieu Gautier
Matthieu Gautier added the comment: A little ping. With a new patch integrating the unit test. -- Added file: http://bugs.python.org/file39800/ctypes_swap_uint_unittest.patch ___ Python tracker rep...@bugs.python.org

Re: Pure Python Data Mangling or Encrypting

2015-06-24 Thread Emile van Sebille
On 6/24/2015 7:02 AM, Grant Edwards wrote: And how does writing unmangled data to disk expose anybody to anything? I've never heard of an exploit where writing an evilly crafted bit-pattern to disk causes a any sort of problem. Unless that code is executed at boot. Mangling would at least

[issue24507] CRLF issues

2015-06-24 Thread Rusi
New submission from Rusi: While trying to freshly setup a CPython repo, encountered the following CRLF issues: Mixed file -- both LF and CRLF (line 29 LF rest CRLF) Lib/venv/scripts/nt/Activate.ps1 Lib/test/decimaltestdata is a directory with mixed up files -- ie some CRLF some LF files

[issue24508] Backport 3.5's Windows build project files to 2.7

2015-06-24 Thread Steve Dower
Steve Dower added the comment: Feel free to fix up msi.py as much as it needs. I don't particularly understand it - I just run it :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24508

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

2015-06-24 Thread Nick Coghlan
Nick Coghlan added the comment: +1 to what Raymond says here. Concerns regarding code duplication need to be weighed against the likelihood of that code changing in the future, and the impact on the readability of each copy of the code in isolation. In this particular case, I think the

[issue24505] shutil.which wrong result on Windows

2015-06-24 Thread R. David Murray
R. David Murray added the comment: Could you please submit your proposal as a patch? (A diff -u against the existing version). -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24505

[issue7406] int arithmetic relies on C signed overflow behaviour

2015-06-24 Thread Kevin Shweh
Kevin Shweh added the comment: It looks like the fast paths for INPLACE_ADD and INPLACE_SUBTRACT in Python 2 don't have the cast-to-unsigned fix, so they're still relying on undefined behavior. For example, in INPLACE_ADD: /* INLINE: int + int */ register long

[issue24508] Backport 3.5's Windows build project files to 2.7

2015-06-24 Thread Zachary Ware
Zachary Ware added the comment: Do you plan to use the old project files or the new? For the new, there should be no change in Tools/msi, which would make fixing it very easy for me ;) -- ___ Python tracker rep...@bugs.python.org

[issue23883] __all__ lists are incomplete

2015-06-24 Thread Martin Panter
Martin Panter added the comment: I think names should be in __all__ even if they shadow builtins, at least in a new feature release. There is plenty of precedent, e.g. asyncio.TimeoutError; reprlib.repr(); threading.enumerate(). Modules with open() in __all__ include aifc, bz2, codecs, dbm,

[issue24325] Speedup types.coroutine()

2015-06-24 Thread Roundup Robot
Roundup Robot added the comment: New changeset 9aee273bf8b7 by Yury Selivanov in branch '3.5': Issue #24400, #24325: More tests for types._GeneratorWrapper https://hg.python.org/cpython/rev/9aee273bf8b7 New changeset fa097a336079 by Yury Selivanov in branch 'default': Merge 3.5 (issue #24325

[issue24400] Awaitable ABC incompatible with functools.singledispatch

2015-06-24 Thread Roundup Robot
Roundup Robot added the comment: New changeset 9aee273bf8b7 by Yury Selivanov in branch '3.5': Issue #24400, #24325: More tests for types._GeneratorWrapper https://hg.python.org/cpython/rev/9aee273bf8b7 New changeset fa097a336079 by Yury Selivanov in branch 'default': Merge 3.5 (issue #24325

[issue24501] configure does not find (n)curses in /usr/local/libs

2015-06-24 Thread Pete Lancashire
Changes by Pete Lancashire p...@petelancashire.com: -- components: Build nosy: petepdx priority: normal severity: normal status: open title: configure does not find (n)curses in /usr/local/libs type: compile error versions: Python 2.7 ___ Python

Re: Pure Python Data Mangling or Encrypting

2015-06-24 Thread Grant Edwards
On 2015-06-24, Emile van Sebille em...@fenx.com wrote: On 6/24/2015 7:02 AM, Grant Edwards wrote: And how does writing unmangled data to disk expose anybody to anything? I've never heard of an exploit where writing an evilly crafted bit-pattern to disk causes a any sort of problem. Unless

Re: Pure Python Data Mangling or Encrypting

2015-06-24 Thread Chris Angelico
On Thu, Jun 25, 2015 at 2:16 AM, Grant Edwards invalid@invalid.invalid wrote: On 2015-06-24, Emile van Sebille em...@fenx.com wrote: Mangling would at least prevent it from executing. If you don't want a file to be executed, then don't make it executable. Or doesn't Windows have any way to

  1   2   >