[issue26763] Update PEP-8 regarding binary operators

2016-04-15 Thread Guido van Rossum
Guido van Rossum added the comment: I've updated the PEP with some more permissive language, mentioning Knuth's recommendation but allowing the old style because it's been recommended (and followed, and enforced) for decades. I've intentionally not updated other examples in the PEP to follow

[issue26763] Update PEP-8 regarding binary operators

2016-04-15 Thread Guido van Rossum
Guido van Rossum added the comment: > Changing indentation level based on operator precedence is acceptable? I think that's a matter of personal taste and I don't think the PEP needs to have an opinion on it. -- ___ Python tracker

[issue4709] Mingw-w64 and python on windows x64

2016-04-15 Thread Ivan Pozdeev
Changes by Ivan Pozdeev : -- nosy: -Ivan.Pozdeev ___ Python tracker ___ ___

Re: Static files load problem Django 1.9

2016-04-15 Thread justin walters
On Fri, Apr 15, 2016 at 5:13 AM, asimkon . wrote: > I have got a problem with static files regarding Django 1.9. These files > are (js,css) in the standard folder static, inside project folder > directory. I got an error Http 404 that can not be loaded. > > Project folder

Re: sum accuracy

2016-04-15 Thread Ben Bacarisse
Oscar Benjamin writes: > On 15 April 2016 at 11:10, Ben Bacarisse wrote: >> Oscar Benjamin writes: >> >>> On 15 April 2016 at 10:24, Robin Becker wrote: >> yes indeed summation is hard :(

[issue26716] EINTR handling in fcntl

2016-04-15 Thread STINNER Victor
STINNER Victor added the comment: Patch version 2: * add a comment to explain the C loop retrying on EINTR error * add an unit test: I checked that the test fails with InterruptedError without the fix * document the change in fcntl documentation -- Added file:

Re: How to parameterize unittests

2016-04-15 Thread Steven D'Aprano
On Fri, 15 Apr 2016 10:48 pm, Antoon Pardon wrote: > Starting from this: > > class Test_AVLTree(unittest.TestCase): > > def test_empty_tree_is_false(self): > instance = avltree() > self.assertFalse(instance) > > Changing it into this: > > def

[issue26771] python-config.sh.in INCDIR does not match python version if exec_prefix != prefix

2016-04-15 Thread Benjamin Berg
New submission from Benjamin Berg: The script contains: INCDIR="-I$includedir/python${VERSION}${ABIFLAGS}" PLATINCDIR="-I$includedir/python${VERSION}${ABIFLAGS}" But looking at the sysconfig module we have: 'include':

Re: help install numpy and scipy in window 7 and 3.5.0 shell

2016-04-15 Thread wrh8609
On Friday, April 15, 2016 at 10:56:28 AM UTC-4, Bob Gailer wrote: > On Apr 15, 2016 10:40 AM, wrote: > > > > Hi all, > > > > I have downloaded the numpy-1.11.01 and scipy-0.17.0 but after running > setup files over IDLE in numpy and scipy, it still can not get through. Can >

Re: sum accuracy

2016-04-15 Thread Matt Wheeler
So we could build on this On 15 April 2016 at 11:10, Ben Bacarisse wrote: >> from fractions import Fraction >> >> def exact_sum(nums): >> return sum(map(Fraction, nums)) >> >> This will give you the exact result with precisely zero rounding >> error. You can convert it

[issue26763] Update PEP-8 regarding binary operators

2016-04-15 Thread Berker Peksag
Berker Peksag added the comment: Please don't create a pull request on GitHub (python/peps is read-only). Attaching wrap-before-binary-operator.patch is enough. -- nosy: +berker.peksag stage: -> patch review ___ Python tracker

help install numpy and scipy in window 7 and 3.5.0 shell

2016-04-15 Thread wrh8609
Hi all, I have downloaded the numpy-1.11.01 and scipy-0.17.0 but after running setup files over IDLE in numpy and scipy, it still can not get through. Can someone give me a hand? or you can provide the installation instruction for both. Thanks, Wen-Ruey --

Re: sum accuracy

2016-04-15 Thread Oscar Benjamin
On 15 April 2016 at 11:10, Ben Bacarisse wrote: > Oscar Benjamin writes: > >> On 15 April 2016 at 10:24, Robin Becker wrote: > >>> yes indeed summation is hard :( >> >> Not with Fraction it isn't: >> >> from fractions

RE: How to print a part of a string?

2016-04-15 Thread Dan Strohl via Python-list
As with lots of things in python, there are lots of ways of approaching this, here are some hints for you to think about (in no particular order): - REGEX - replace() - string[:y] - split() And of course, you could consider creating a table with every possible string that could start with

[issue26763] Update PEP-8 regarding binary operators

2016-04-15 Thread Guido van Rossum
Guido van Rossum added the comment: I don't like the way "):" is indented in that example. I propose: if ((width == 0 and height == 0 and color == 'red' and emphasis == 'strong') or highlight > 100): Aren't there

Re: help install numpy and scipy in window 7 and 3.5.0 shell

2016-04-15 Thread Bob Gailer
On Apr 15, 2016 10:40 AM, wrote: > > Hi all, > > I have downloaded the numpy-1.11.01 and scipy-0.17.0 but after running setup files over IDLE in numpy and scipy, it still can not get through. Can someone give me a hand? or you can provide the installation instruction for both.

[issue26766] The result type of bytearray formatting is not stable

2016-04-15 Thread STINNER Victor
STINNER Victor added the comment: > LGTM, please commit. Ok, done. > Why the behavior is vary in release and debug builds? See _PyBytesWriter_Alloc(): the code is designed to detect bugs earlier in debug mode, it only uses 10 bytes of the "small buffer" (buffer allocated on the stack)

[issue4709] Mingw-w64 and python on windows x64

2016-04-15 Thread Mark Lawrence
Changes by Mark Lawrence : -- nosy: -BreamoreBoy ___ Python tracker ___ ___

Re: Python garbage collection: not releasing memory to OS!

2016-04-15 Thread Michael Torrie
On 04/15/2016 04:25 AM, cshin...@gmail.com wrote: > The input was a 4MB file. Even after returning from the 'fileopen' > function the 4MB memory was not released. I checked htop output while > the loop was running, the resident memory stays at 14MB. So unless > the process is stopped the memory

Re: Python garbage collection: not releasing memory to OS!

2016-04-15 Thread Sam
On 04/15/2016 05:25 AM, cshin...@gmail.com wrote: I have written an application with flask and uses celery for a long running task. While load testing I noticed that the celery tasks are not releasing memory even after completing the task. So I googled and found this group discussion..

[issue26766] The result type of bytearray formatting is not stable

2016-04-15 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1eb586d5b321 by Victor Stinner in branch 'default': Issue #26766: Fix _PyBytesWriter_Finish() https://hg.python.org/cpython/rev/1eb586d5b321 -- nosy: +python-dev ___ Python tracker

[issue26766] The result type of bytearray formatting is not stable

2016-04-15 Thread STINNER Victor
STINNER Victor added the comment: @Berker: bytearray_mod.diff LGTM, you can push it. -- ___ Python tracker ___

[issue26766] The result type of bytearray formatting is not stable

2016-04-15 Thread STINNER Victor
STINNER Victor added the comment: Here is a fix for bytearray%args. As expected, it was a bug in the new _PyBytesWriter API (introduced in Python 3.6 to implementation optimizations). -- Added file: http://bugs.python.org/file42473/writer_bytearray_mod.patch

[issue26763] Update PEP-8 regarding binary operators

2016-04-15 Thread Guido van Rossum
Guido van Rossum added the comment: I also think the PEP needs some language about the previous style being still acceptable as long as it's being used consistently (Knuth notwithstanding), and an acceptable compromise style where and/or go at the start of the line but other binary operators

[issue26763] Update PEP-8 regarding binary operators

2016-04-15 Thread INADA Naoki
INADA Naoki added the comment: On Fri, Apr 15, 2016 at 11:31 PM, Guido van Rossum wrote: > > Guido van Rossum added the comment: > > I don't like the way "):" is indented in that example. Me too. I haven't know about this PEP8 update.

[issue26763] Update PEP-8 regarding binary operators

2016-04-15 Thread INADA Naoki
INADA Naoki added the comment: How about recommend using parentheses to avoid different level operators have same indent level? ok: if (width == 0 and height == 0 and color == 'red' and emphasis == 'strong' or

[issue26766] The result type of bytearray formatting is not stable

2016-04-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: LGTM, please commit. Why the behavior is vary in release and debug builds? -- ___ Python tracker ___

Re: python3 - No module named 'html5lib'

2016-04-15 Thread Sergio Spina
Il giorno giovedì 14 aprile 2016 17:54:00 UTC+2, Wildman ha scritto: > On Thu, 14 Apr 2016 02:31:59 -0700, Sergio Spina wrote: > > > I'm running a python3 program that requires html5lib but I receive the > > error No module named 'html5lib'. > > > > Here are two session of terminal: > > > >

[issue26743] Unable to import random with python2.7 on power pc based machine

2016-04-15 Thread Stefan Krah
Stefan Krah added the comment: Also, I don't understand how the test suite could pass with these kinds of errors. Are you sure this is the Wind-River system Python? Did they run the test suite? -- ___ Python tracker

[issue26772] regex.ENHANCEMATCH crashes interpreter

2016-04-15 Thread SilentGhost
SilentGhost added the comment: regex module is not part of the standard library and issues with it should be reported on its bug tracker https://bitbucket.org/mrabarnett/mrab-regex -- nosy: +SilentGhost resolution: -> third party stage: -> resolved status: open -> closed type: crash

[issue26763] Update PEP-8 regarding binary operators

2016-04-15 Thread Guido van Rossum
Guido van Rossum added the comment: OK, maybe @chrisa can fix the typo. -- ___ Python tracker ___ ___

[issue26739] idle: Errno 10035 a non-blocking socket operation could not be completed immediately

2016-04-15 Thread Terry J. Reedy
Terry J. Reedy added the comment: Michael, when you open an issue, you need to stay nosy so we can ask questions. This is especially true when the issue involved 3rd party modules, like pygame, and even more, when personal files, like the images, are required. In this case: 0. Which patch

[issue26760] Document PyFrameObject

2016-04-15 Thread Brett Cannon
Changes by Brett Cannon : -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___

[issue26744] print() function hangs on MS-Windows 10

2016-04-15 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- nosy: +terry.reedy ___ Python tracker ___ ___

[issue26773] Shelve works inconsistently when carried over to child processes

2016-04-15 Thread SilentGhost
Changes by SilentGhost : -- components: +Extension Modules nosy: +jnoller, sbt ___ Python tracker ___

[issue26760] Document PyFrameObject

2016-04-15 Thread Roundup Robot
Roundup Robot added the comment: New changeset ba6f4f0fe9ea by Brett Cannon in branch '3.5': Issue #26760: Minimally document PyFrameObject https://hg.python.org/cpython/rev/ba6f4f0fe9ea New changeset 5c18598382e9 by Brett Cannon in branch 'default': Merge for issue #26760

[issue26773] Shelve works inconsistently when carried over to child processes

2016-04-15 Thread Paul Ellenbogen
New submission from Paul Ellenbogen: If a shelve is opened, then the processed forked, sometime the shelve will appear to work in the child, and other times it will throw a KeyError. I suspect the order of element access may trigger the issue. I have included a python script that will exhibit

[issue26763] Update PEP-8 regarding binary operators

2016-04-15 Thread Ian Lee
Ian Lee added the comment: > Aren't there many other examples in the PEP that need to be adjusted, since > we're changing the style not just for 'and' and 'or' but for all binary > operators? Admittedly I'd only looked in that one section last night, but I just went through the PEP and

[issue25609] Add a ContextManager ABC and type

2016-04-15 Thread Roundup Robot
Roundup Robot added the comment: New changeset 257dd57dd732 by Brett Cannon in branch '3.5': Issue #25609: Backport typing.ContextManager. https://hg.python.org/cpython/rev/257dd57dd732 New changeset 14cf0011c5e9 by Brett Cannon in branch 'default': Merge for issue #25609

[issue26772] regex.ENHANCEMATCH crashes interpreter

2016-04-15 Thread Rex Dwyer
New submission from Rex Dwyer: regex.findall(r'((brown)|(lazy)){1<=e<=3} ((dog)|(fox)){1<=e<=3}', 'The quick borwn fax jumped over the lzy hog', regex.ENHANCEMATCH) crashes interpreter. regex.__version__ => 2.4.85 python version '3.4.2 (v3.4.2:ab2c023a9432, Oct 6

[issue26743] Unable to import random with python2.7 on power pc based machine

2016-04-15 Thread Raghu
Raghu added the comment: Hey Guys/Gals, are you still debugging the issue? Do you need more info? -- ___ Python tracker ___

Re: how to setup for localhost:8000

2016-04-15 Thread Pierre Quentel
Le jeudi 14 avril 2016 22:50:33 UTC+2, wrh...@gmail.com a écrit : > On Thursday, April 14, 2016 at 2:23:36 PM UTC-4, Andrew Farrell wrote: > > What happens when you type > > > > http://localhost:8000 > > > > Into the address bar of your browser as this is running? > > > > On Thu, Apr 14, 2016

[issue26763] Update PEP-8 regarding binary operators

2016-04-15 Thread Guido van Rossum
Guido van Rossum added the comment: I propose to keep the somewhat questionable examples in the PEP as an illustration of the idea that style is debatable and cannot be reduced to fixed rules. -- ___ Python tracker

Re: How to parameterize unittests

2016-04-15 Thread Chris Angelico
On Sat, Apr 16, 2016 at 2:47 AM, Steven D'Aprano wrote: > If the tests for your AVL tree and it's subclasses are *identical*, then > what's the point of the subclasses? If the tree classes all have the same API but different performance trade-offs, it would make sense to use

[issue26716] EINTR handling in fcntl

2016-04-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Left nitpicks about tests. -- ___ Python tracker ___ ___ Python-bugs-list

[issue26763] Update PEP-8 regarding binary operators

2016-04-15 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +barry ___ Python tracker ___ ___ Python-bugs-list

[issue26743] Unable to import random with python2.7 on power pc based machine

2016-04-15 Thread Stefan Krah
Stefan Krah added the comment: An option would be to use the support of the probably commercial http://www.windriver.com/products/linux/ and ask them why they're still on Python 2.7.3. They'll also have gcc installed and can run the test case proposed in this issue. -- nosy: +skrah

[issue25609] Add a ContextManager ABC and type

2016-04-15 Thread Brett Cannon
Changes by Brett Cannon : -- status: open -> closed ___ Python tracker ___ ___

[issue26763] Update PEP-8 regarding binary operators

2016-04-15 Thread Martín Gaitán
Martín Gaitán added the comment: There is a typo on "reseach" instead of "research" -- nosy: +Martín Gaitán ___ Python tracker ___

[issue26769] Python 2.7: make private file descriptors non inheritable

2016-04-15 Thread Ned Deily
Changes by Ned Deily : -- nosy: +gregory.p.smith ___ Python tracker ___ ___ Python-bugs-list

[issue26535] Minor typo in the docs for struct.unpack

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

Re: good way to avoid recomputations?

2016-04-15 Thread Mike
On Tuesday, April 5, 2016 at 4:54:50 PM UTC-4, Maurice wrote: > Hi. I working on a project where I have 5 scripts loading the same file at > the very beginning so I would like to know the best way I can get this file > without having to compute it 5 times. > > I also perform, in all the

[issue25314] Documentation: argparse's actions store_{true, false} default to False/True (undocumented)

2016-04-15 Thread Martin Panter
Changes by Martin Panter : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue26774] Elide Py_atomic fences when WITH_THREAD is disabled?

2016-04-15 Thread Larry Hastings
New submission from Larry Hastings: Right now the atomic access fence macros in pyatomic.h are unconditional. This means that they're active even even when you "./configure --without-threads". If Python thread support is disabled, surely we don't need to ensure atomic access to variables,

[issue26769] Python 2.7: make private file descriptors non inheritable

2016-04-15 Thread Martin Panter
Martin Panter added the comment: It looks like some of these do make the file descriptor accessible to the Python user. The following are from the RST documentation: oss_audio_device.fileno() oss_mixer_device.fileno() epoll.fileno() kqueue.fileno() audio device.fileno() I did not find any

Re: sys.exit(1) vs raise SystemExit vs raise

2016-04-15 Thread cs
On 12Apr2016 18:20, Ganesh Pal wrote: I m on python 2.7 and Linux , I have a simple code need suggestion if I I could replace sys.exit(1) with raise SystemExit . ==Actual code== def main(): try: create_logdir() create_dataset() unittest.main()

Re: sys.exit(1) vs raise SystemExit vs raise

2016-04-15 Thread Ben Finney
c...@zip.com.au writes: > My preferred pattern is like this: > > def main(argv): >try: > ... >except Exception as e: > logging.exception(e) > return 1 > > if __name__ == '__main__': >sys.exit(main(sys.argv)) > > Notice that main() is back to being a normal function

Re: Looking for feedback on weighted voting algorithm

2016-04-15 Thread sohcahtoa82
On Thursday, April 14, 2016 at 1:48:40 PM UTC-7, Michael Selik wrote: > On Thu, Apr 14, 2016, 7:37 PM justin walters > wrote: > > > On Apr 14, 2016 9:41 AM, "Martin A. Brown" wrote: > > > > > > > > > Greetings Justin, > > > > > > >score =

[issue26763] Update PEP-8 regarding binary operators

2016-04-15 Thread Chris Angelico
Chris Angelico added the comment: Typo fixed in peps repo. -- ___ Python tracker ___ ___ Python-bugs-list

[issue26535] Minor typo in the docs for struct.unpack

2016-04-15 Thread Roundup Robot
Roundup Robot added the comment: New changeset 7889fcb0697b by Martin Panter in branch '3.5': Issue #26535: Correct docs regarding the struct buffer size https://hg.python.org/cpython/rev/7889fcb0697b New changeset 39dc2f39373d by Martin Panter in branch 'default': Issue #26535: Merge struct

[issue25702] Link Time Optimizations support for GCC and CLANG

2016-04-15 Thread Roundup Robot
Roundup Robot added the comment: New changeset f16ec63055ad by Gregory P. Smith in branch '3.5': Issue #25702: A --with-lto configure option has been added that will https://hg.python.org/cpython/rev/f16ec63055ad New changeset 3103af76f4c4 by Gregory P. Smith in branch 'default': Issue #25702:

[issue26657] Directory traversal with http.server and SimpleHTTPServer on windows

2016-04-15 Thread Martin Panter
Martin Panter added the comment: I will try to commit my patch in a couple days if there are no objections. -- stage: patch review -> commit review ___ Python tracker

[issue25314] Documentation: argparse's actions store_{true, false} default to False/True (undocumented)

2016-04-15 Thread Roundup Robot
Roundup Robot added the comment: New changeset c42a9233af04 by Martin Panter in branch '2.7': Issue #25314: Remove confused statement about const argument https://hg.python.org/cpython/rev/c42a9233af04 New changeset 59b8db278e3c by Martin Panter in branch '3.5': Issue #25314: Remove confused

Re: Looking for feedback on weighted voting algorithm

2016-04-15 Thread Michael Selik
On Fri, Apr 15, 2016, 7:56 PM wrote: > On Thursday, April 14, 2016 at 1:48:40 PM UTC-7, Michael Selik wrote: > > I suggest not worrying about sanitizing inputs. If someone provides bad > > data, Python will do the right thing: stop the program and print an > > explanation

[issue25702] Link Time Optimizations support for GCC and CLANG

2016-04-15 Thread Gregory P. Smith
Gregory P. Smith added the comment: What i committed for 3.5 and 3.6 matches lto-cpython3-v04.patch which just adds --with-lto support. 2.7 still needs to be patched. For reference: Using ubuntu's gcc 5.2.1 i was seeing a 2-3% performance increase in the resulting LTO binary vs a plain

[issue26058] PEP 509: Add ma_version to PyDictObject

2016-04-15 Thread STINNER Victor
STINNER Victor added the comment: > The implementation is outdated: ma_version was renamed to ma_version_tag in > the latest version of the PEP 509. Patch version 7 is updated to the latest PEP (rebased and rename ma_version to ma_version_tag). -- Added file:

Re: help install numpy and scipy in window 7 and 3.5.0 shell

2016-04-15 Thread Martin Schöön
Den 2016-04-15 skrev wrh8...@gmail.com : > On Windows (at work) I use Python(x,y) http://python-xy.github.io/ It has yet to fail me. /Martin -- https://mail.python.org/mailman/listinfo/python-list

[issue26766] The result type of bytearray formatting is not stable

2016-04-15 Thread Berker Peksag
Berker Peksag added the comment: Thanks for the reviews! -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___

[issue26743] Unable to import random with python2.7 on power pc based machine

2016-04-15 Thread Raghu
Raghu added the comment: Yes, it is a WindRiver linux. I will check if Commercial WindRiver team can help me. Host details: Linux fpc0 3.10.62-ltsi-WR6.0.0.18_standard #1 SMP PREEMPT Sun Apr 3 23:17:02 PDT 2016 ppc64 ppc64 ppc64 GNU/Linux Also is there a protocol followed in this website?

[issue26743] Unable to import random with python2.7 on power pc based machine

2016-04-15 Thread Stefan Krah
Stefan Krah added the comment: My conclusion is: The error in msg263292 should have been caught by the test suite. I'd ask the WindRiver support if they actually run the test suite before shipping the binaries. -- ___ Python tracker

Re: help install numpy and scipy in window 7 and 3.5.0 shell

2016-04-15 Thread Oscar Benjamin
On 15 April 2016 at 17:29, wrote: >> On Apr 15, 2016 10:40 AM, wrote: >> > >> > I have downloaded the numpy-1.11.01 and scipy-0.17.0 but after running >> setup files over IDLE in numpy and scipy, it still can not get through. Can >> someone give me a hand?

[issue26743] Unable to import random with python2.7 on power pc based machine

2016-04-15 Thread Raghu
Raghu added the comment: Thank you skrah. I raised a support request from WR. I will keep my fingers crossed. -- ___ Python tracker ___

[issue26766] The result type of bytearray formatting is not stable

2016-04-15 Thread Roundup Robot
Roundup Robot added the comment: New changeset b3e3efc5afa4 by Berker Peksag in branch 'default': Issue #26766: Remove redundant bytearray_format() from bytearrayobject.c https://hg.python.org/cpython/rev/b3e3efc5afa4 -- ___ Python tracker

Guido sees the light: PEP 8 updated

2016-04-15 Thread Steven D'Aprano
Until now, PEP 8 has recommended that multi-line expressions should break *after* infix operators: result = (this_value * some_value + another_value - excess_value or default_value ) After a mercifully short discussion on the Python-Ideas

Re: how to setup for localhost:8000

2016-04-15 Thread Vito De Tullio
Chris Angelico wrote: >> Just a note, some browsers will try to resolve this as www.localhost.com >> - try http://127.0.0.1:8000 . > > Huh? Why should the name 'localhost' get a dot com added? ask browser vendors... -- By ZeD -- https://mail.python.org/mailman/listinfo/python-list

[issue26763] Update PEP-8 regarding binary operators

2016-04-15 Thread Chris Angelico
Changes by Chris Angelico : -- nosy: +Rosuav ___ Python tracker ___ ___ Python-bugs-list

Re: How to parameterize unittests

2016-04-15 Thread Antoon Pardon
Op 14-04-16 om 17:05 schreef Steven D'Aprano: > On Fri, 15 Apr 2016 12:08 am, Antoon Pardon wrote: > >> I have a unittest for my avltree module. >> >> Now I want this unittest to also run on a subclass of avltree. >> How can I organise this, so that I can largely reuse the >> original TestCase? >

[issue26763] Update PEP-8 regarding binary operators

2016-04-15 Thread Ian Lee
New submission from Ian Lee: Following up from discussion on python-ideas [1] about updating PEP-8 regarding wrapping lines before rather than after binary operators. -- files: wrap-before-binary-operator.patch keywords: patch messages: 263453 nosy: IanLee1521, gvanrossum priority:

[issue26535] Minor typo in the docs for struct.unpack

2016-04-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: LGTM. -- assignee: docs@python -> martin.panter stage: patch review -> commit review ___ Python tracker ___

[issue26535] Minor typo in the docs for struct.unpack

2016-04-15 Thread Martin Panter
Martin Panter added the comment: Indeed, let me try again -- Added file: http://bugs.python.org/file42462/struct-size.v2.patch ___ Python tracker ___

[issue26359] CPython build options for out-of-the box performance

2016-04-15 Thread Gregory P. Smith
Gregory P. Smith added the comment: --with-optimizations seems fine. As does having the final thing the Makefile prints out when run from a configuration that did not specify any of --with-pgo, --with-lto, --with-pydebug, or --with-optimizations be to echo message reminding people to

Re: Create a forecast estimate updated with actuals weekly

2016-04-15 Thread Steven D'Aprano
On Fri, 15 Apr 2016 02:36 pm, Sayth Renshaw wrote: > Hi > > Wondering if someone has this knowledge, and please forgive my maths > expressions. If I want to estimate need results to achieve a goal at the > end of a term updated weekly with real results how would I structure this? I'm not really

[issue26763] Update PEP-8 regarding binary operators

2016-04-15 Thread Ian Lee
Ian Lee added the comment: Discussion link missing from msg263453: https://mail.python.org/pipermail/python-ideas/2016-April/039774.html -- ___ Python tracker

[issue26763] Update PEP-8 regarding binary operators

2016-04-15 Thread Ian Lee
Ian Lee added the comment: Link to GitHub branch with the patch as a commit [1]. [1] https://github.com/python/peps/compare/master...IanLee1521:issue26763 -- ___ Python tracker

Re: how to setup for localhost:8000

2016-04-15 Thread Chris Angelico
On Fri, Apr 15, 2016 at 3:59 PM, Vito De Tullio wrote: > Chris Angelico wrote: > >>> Just a note, some browsers will try to resolve this as www.localhost.com >>> - try http://127.0.0.1:8000 . >> >> Huh? Why should the name 'localhost' get a dot com added? > > ask browser

Re: How to parameterize unittests

2016-04-15 Thread Chris Angelico
On Fri, Apr 15, 2016 at 4:52 PM, Antoon Pardon wrote: > Op 14-04-16 om 17:05 schreef Steven D'Aprano: >> On Fri, 15 Apr 2016 12:08 am, Antoon Pardon wrote: >> >>> I have a unittest for my avltree module. >>> >>> Now I want this unittest to also run on a subclass of

[issue26765] Factor out common bytes and bytearray implementation

2016-04-15 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Proposed patch factors out the implementation of bytes and bytearray by moving common code in separate files. This is not new approach, the part of the code is already shared. The patch decreases the size of the source code by 862 lines. --

Re: How to parameterize unittests

2016-04-15 Thread Serhiy Storchaka
On 14.04.16 18:05, Steven D'Aprano wrote: On Fri, 15 Apr 2016 12:08 am, Antoon Pardon wrote: I have a unittest for my avltree module. Now I want this unittest to also run on a subclass of avltree. How can I organise this, so that I can largely reuse the original TestCase? class

Re: How to parameterize unittests

2016-04-15 Thread Chris Angelico
On Fri, Apr 15, 2016 at 6:20 PM, Antoon Pardon wrote: > But the tests, at this moment, are not written to instantiate self.tree > but to call avltree directly. So I have to rewrite these tests. That > will IMO involve a lot of cut and paste. Ah. In that case, it

[issue25654] test_multiprocessing_spawn ResourceWarning with -Werror

2016-04-15 Thread STINNER Victor
STINNER Victor added the comment: Thanks. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

Re: Serious error in int() function?

2016-04-15 Thread blindanagram
On 15/04/2016 01:36, Dennis Lee Bieber wrote: > On Thu, 14 Apr 2016 13:07:03 +0100, blindanag...@nowhere.net declaimed the > following: > >> On 14/04/2016 09:13, blindanag...@nowhere.net wrote: >>> On 14/04/2016 08:59, blindanag...@nowhere.net wrote: On 14/04/2016 07:52, ast wrote: >>>

Re: How to parameterize unittests

2016-04-15 Thread Steven D'Aprano
On Fri, 15 Apr 2016 06:20 pm, Antoon Pardon wrote: class Test_MySubclassTree(Test_AVLTree): tree = My_Subclass_Tree >>> I see, that's going to be a lot of cut & pastes. >>> Thanks. >> Not really; the first class has all the tests, and the second one is >> literally just those two lines.

[issue19444] mmap.mmap() allocates a file descriptor that isn't CLOEXEC

2016-04-15 Thread Berker Peksag
Changes by Berker Peksag : -- assignee: docs@python -> components: -Documentation versions: -Python 3.3 ___ Python tracker

Re: sum accuracy

2016-04-15 Thread Robin Becker
On 13/04/2016 18:05, Random832 wrote: . No, it doesn't. Sum works on any type that can be added (except strings), it can't make any assumptions about the characteristics of floating point types. For non-numeric types, the addition operator may not be semantically commutative or

[issue26766] Redundant check in bytearray_mod

2016-04-15 Thread Berker Peksag
New submission from Berker Peksag: I noticed this while looking at issue 26764. bytearray_mod() and bytearray_format() both have checks for PyByteArray_Check(v). The check in bytearray_format() looks redundant to me. Here is a patch. -- components: Interpreter Core files:

Re: How to parameterize unittests

2016-04-15 Thread Ben Finney
Antoon Pardon writes: > But the tests, at this moment, are not written to instantiate > self.tree but to call avltree directly. That is exactly what the ‘TestCase.setUp’ method is for: to have the test case class specify how its test cases will customise

Re: sum accuracy

2016-04-15 Thread Oscar Benjamin
On 15 April 2016 at 10:24, Robin Becker wrote: > On 13/04/2016 18:05, Random832 wrote: > . >> >> >> No, it doesn't. Sum works on any type that can be added (except >> strings), it can't make any assumptions about the characteristics of >> floating point types. For

Re: How to parameterize unittests

2016-04-15 Thread Serhiy Storchaka
On 15.04.16 11:20, Antoon Pardon wrote: But the tests, at this moment, are not written to instantiate self.tree but to call avltree directly. So I have to rewrite these tests. That will IMO involve a lot of cut and paste. There is yet one approach. Import your original test file, patch it by

[issue26764] SystemError in bytes.__rmod__

2016-04-15 Thread STINNER Victor
STINNER Victor added the comment: bytes_rmod.patch LGTM (maybe just a minor PEP 7 issue, see my review). -- nosy: +haypo ___ Python tracker ___

[issue26745] Redundant code in _PyObject_GenericSetAttrWithDict

2016-04-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: LGTM. But there are other redundant code in _PyObject_GenericSetAttrWithDict(). Here is a patch that makes larger refactoring. -- type: -> enhancement Added file: http://bugs.python.org/file42467/_PyObject_GenericSetAttrWithDict_2.patch

  1   2   >