[issue13849] Add tests for NUL checking in certain strs

2016-07-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset 9e997c8f4876 by Berker Peksag in branch '3.5': Issue #13849: Fix test_null_bytes under Windows https://hg.python.org/cpython/rev/9e997c8f4876 New changeset a28abe83cf5c by Berker Peksag in branch 'default': Issue #13849: Merge from 3.5

[issue27539] negative Fraction ** negative int not normalized

2016-07-22 Thread Vedran Čačić
Vedran Čačić added the comment: The .diff format of patch for fractions.py is at http://bugs.python.org/file43786/TwCVpiFp.diff The line numbers in it are the newest I could get (from https://hg.python.org/cpython/file/default/Lib/fractions.py). I would also add the test I was talking about

[issue13849] Add tests for NUL checking in certain strs

2016-07-22 Thread Martin Panter
Martin Panter added the comment: http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.5/builds/1072/steps/test/logs/stdio == FAIL: test_null_bytes (test.test_genericpath.TestGenericTest) (attr='getsize')

[issue1621] Do not assume signed integer overflow behavior

2016-07-22 Thread Martin Panter
Changes by Martin Panter : Added file: http://bugs.python.org/file43839/array-size.patch ___ Python tracker ___

[issue1621] Do not assume signed integer overflow behavior

2016-07-22 Thread Martin Panter
Martin Panter added the comment: Perhaps we should add a test for the __length_hint__() overflow to tuple_and_list.patch: >>> a = [1,2,3,4] >>> import sys >>> class B: ... def __iter__(s): return s ... def __next__(s): raise StopIteration() ... def __length_hint__(s): return sys.maxsize ...

[issue1621] Do not assume signed integer overflow behavior

2016-07-22 Thread Martin Panter
Martin Panter added the comment: Apart from the empty “if” statement style (see review), tuple_and_list.patch looks good to me. I understand the patches from 2011 and earlier have all been committed (correct me if I missed something). Here is another patch fixing a 64-bit overflow in

[issue13849] Add tests for NUL checking in certain strs

2016-07-22 Thread Berker Peksag
Berker Peksag added the comment: Thanks for your review, Victor. I don't care about 2.7 at this point so I went with 3.5+ :) -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue13849] Add tests for NUL checking in certain strs

2016-07-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset 899f06eb390c by Berker Peksag in branch '3.5': Issue #13849: Add tests for null byte checking in test_genericpath https://hg.python.org/cpython/rev/899f06eb390c New changeset 9498736fbd8f by Berker Peksag in branch 'default': Issue #13849: Merge

[issue27130] zlib: OverflowError while trying to compress 2^32 bytes or more

2016-07-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset 2192edcfea02 by Martin Panter in branch '2.7': Issue #27130: Fix handling of buffers exceeding (U)INT_MAX in “zlib” module https://hg.python.org/cpython/rev/2192edcfea02 -- ___ Python tracker

[issue27591] multiprocessing: Possible uninitialized pointer use in Windows builds

2016-07-22 Thread Berker Peksag
Berker Peksag added the comment: Thanks! I should read PEP 7 again :) -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue27493] logging module fails with unclear error when supplied a (Posix)Path

2016-07-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5424252ce174 by Berker Peksag in branch 'default': Issue #27493: Fix test_path_objects under Windows https://hg.python.org/cpython/rev/5424252ce174 -- ___ Python tracker

[issue27591] multiprocessing: Possible uninitialized pointer use in Windows builds

2016-07-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset da955567d7c7 by Berker Peksag in branch '3.5': Issue #27591: Set sigint_event to NULL if _PyOS_IsMainThread() returns false https://hg.python.org/cpython/rev/da955567d7c7 New changeset d5f796da4013 by Berker Peksag in branch 'default': Issue

[issue27130] zlib: OverflowError while trying to compress 2^32 bytes or more

2016-07-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset bd61bcd9bee8 by Martin Panter in branch '3.5': Issue #27130: Fix handling of buffers exceeding UINT_MAX in “zlib” module https://hg.python.org/cpython/rev/bd61bcd9bee8 New changeset bd556f748cf8 by Martin Panter in branch 'default': Issue #27130:

[issue27577] Make implementation and doc of tuple and list more compliant

2016-07-22 Thread Raymond Hettinger
Raymond Hettinger added the comment: This should have been changed in Python 3.0 which is when were allowed to make non-backwards compatible changes. Since it wasn't, we have to live this mild annoyance forever (you can't change it without breaking somebody's working code somewhere). I'm

[issue24773] Implement PEP 495 (Local Time Disambiguation)

2016-07-22 Thread Martin Panter
Martin Panter added the comment: This upset the buildbots: http://buildbot.python.org/all/builders/PPC64%20Fedora%203.x/builds/1259/steps/test/logs/stdio == FAIL: test_all (test.datetimetester.ZoneInfoCompleteTest)

[issue27493] logging module fails with unclear error when supplied a (Posix)Path

2016-07-22 Thread Martin Panter
Martin Panter added the comment: Windows fails the test: http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.x/builds/7989/steps/test/logs/stdio == ERROR: test_path_objects (test.test_logging.HandlerTest)

Re: Why not allow empty code blocks?

2016-07-22 Thread Kent Tong
On Saturday, July 23, 2016 at 9:49:51 AM UTC+8, Steven D'Aprano wrote: > Because it cannot tell the difference between an empty code block and > failing to indent the code block: > > for x in sequence: > print('loop') Thanks for the excellent answer! --

Re: Why not allow empty code blocks?

2016-07-22 Thread Steven D'Aprano
On Sat, 23 Jul 2016 01:33 am, Kent Tong wrote: > Hi > > I'm aware that we can use 'pass' as an empty code block. But why doesn't > python allow a code block to be empty and thus eliminate the need for this > null statement? Because it cannot tell the difference between an empty code block and

Re: learning python. learning defining functions . need help

2016-07-22 Thread Steven D'Aprano
On Sat, 23 Jul 2016 01:21 am, justin walters wrote: > That should illustrate why. This is because simply typing '{}' could be > interpreted as > either a dict or a set. No. {} is always an empty dict. That is a language guarantee. Any programming language where {} is not an empty disk is not

How asyncio works? and event loop vs exceptions

2016-07-22 Thread Marco S. via Python-list
I'm developing a web app based on aiohttp, and I find the event loop concept very interesting. I never programmed with it before, but I know that node.js and GUIs are based on it. What I can't understand is how asyncio make it possible to run multiple tasks concurrently, since it's single

[issue27587] Issues, reported by PVS-Studio static analyzer

2016-07-22 Thread Martin Panter
Martin Panter added the comment: Also on python-dev, Chris Angelico pointed out that the _elementtree.c case is a false positive. So that would leave the binascii one, which I think is worth simpifying, but is probably not very serious. -- ___

[issue27591] multiprocessing: Possible uninitialized pointer use in Windows builds

2016-07-22 Thread STINNER Victor
STINNER Victor added the comment: issue27591_v2.diff LGTM except of a minor comment (PEP 7!) on the review. -- ___ Python tracker ___

[issue27591] multiprocessing: Possible uninitialized pointer use in Windows builds

2016-07-22 Thread Berker Peksag
Berker Peksag added the comment: Here is an updated patch. Thanks, Victor. -- Added file: http://bugs.python.org/file43837/issue27591_v2.diff ___ Python tracker

[issue27579] Add a tutorial for AsyncIO in the documentation

2016-07-22 Thread STINNER Victor
STINNER Victor added the comment: The tutorial is happening but outside Python: https://github.com/asyncio-doc/asyncio-doc I suggest to now close this issue. -- ___ Python tracker

[issue27587] Issues, reported by PVS-Studio static analyzer

2016-07-22 Thread Martin Panter
Martin Panter added the comment: Christian Heimes posted a patch for _PyState_AddModule() on Python-dev: https://marc.info/?l=python-dev=146922730716425=2 -- ___ Python tracker

[issue24773] Implement PEP 495 (Local Time Disambiguation)

2016-07-22 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- resolution: -> fixed stage: commit review -> resolved status: open -> closed superseder: -> Document PEP 495 (Local Time Disambiguation) features ___ Python tracker

[issue27595] Document PEP 495 (Local Time Disambiguation) features

2016-07-22 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- dependencies: +Implement PEP 495 (Local Time Disambiguation) ___ Python tracker ___

[issue27595] Document PEP 495 (Local Time Disambiguation) features

2016-07-22 Thread Alexander Belopolsky
New submission from Alexander Belopolsky: PEP 495 has been implemented in issue 24773. This issue is created to track the necessary changes to the datetime module documentation. -- assignee: belopolsky components: Documentation messages: 271041 nosy: akira, belopolsky, haypo, stub,

[issue24773] Implement PEP 495 (Local Time Disambiguation)

2016-07-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset 7c0917670ab8 by Alexander Belopolsky in branch 'default': Closes issue #24773: Implement PEP 495 (Local Time Disambiguation). https://hg.python.org/cpython/rev/7c0917670ab8 -- nosy: +python-dev ___

[issue24773] Implement PEP 495 (Local Time Disambiguation)

2016-07-22 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I am posting the final version of the patch complete with the NEWS entry. Compared with the previous patch, issue24773-final.diff contains a fix for a reference leak. I would like to use this opportunity to thank Zachary Ware for providing a Windows

[issue27594] Assertion failure when running "test_ast" tests with coverage.

2016-07-22 Thread ap
New submission from ap: This is with a build of the default branch on OS X 10.11.6: $ hg identify fada654c5f72 tip $ ./python.exe --version Python 3.6.0a3+ $ The "test_ast" tests appear to run fine without coverage tracking enabled: $ ./python.exe -m test test_ast Run tests sequentially

[issue27593] Deprecate sys._mercurial and create sys._git

2016-07-22 Thread Brett Cannon
New submission from Brett Cannon: This is part of the GitHub migration. And by "deprecate" sys._mercurial I mean fill it with default values (https://www.python.org/dev/peps/pep-0512/#deprecate-sys-mercurial). -- components: Library (Lib) messages: 271037 nosy: brett.cannon priority:

[issue27592] FIPS_mode() and FIPS_mode_set() functions in Python (ssl)

2016-07-22 Thread Cristi Fati
Cristi Fati added the comment: Thank you all for chiming in (so quickly). I did this in 2013 (maybe back then the situation was different), and have successfully used it since. Regarding comments: - Alex: 1: I'm not an expert, so I'm not going to argue with it. However I thought that if

[issue27579] Add a tutorial for AsyncIO in the documentation

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

[issue27577] Make implementation and doc of tuple and list more compliant

2016-07-22 Thread Terry J. Reedy
Terry J. Reedy added the comment: >>> help(tuple) Help on class tuple in module builtins: class tuple(object) | tuple() -> empty tuple | tuple(iterable) -> tuple initialized from iterable's items ... >>> tuple(sequence=[1,2,3]) (1, 2, 3) I am surprised. Searches with Google, Githup,

Re: Dynamically call methods where method is known by address vs name

2016-07-22 Thread Malcolm Greene
Hi Michael, > Out[3]: 'HELLO' > In [4]: g = str.upper > In [5]: g(s) > Out[5]: 'HELLO' That's perfect! My mistake was trying to use the method returned by ''.upper vs. str.upper. Thank you, Malcolm   -- https://mail.python.org/mailman/listinfo/python-list

[issue27271] asyncio lost udp packets

2016-07-22 Thread Марк Коренберг
Марк Коренберг added the comment: @yselivanov Can you prove that packets may be lost even in UNIX sockets ? (it is not related to this task directly) -- nosy: +mmarkk ___ Python tracker

[issue27590] tarfile module next() method hides exceptions

2016-07-22 Thread Yujie Chen
Yujie Chen added the comment: Yeah, I just tried on Python3.5 and it didn't report any errors either. -- ___ Python tracker ___

[issue27547] Crash or freeze trying to execute b'a' * 0xFFFFFFFFFFFFFFF

2016-07-22 Thread Terry J. Reedy
Terry J. Reedy added the comment: Crash reports should include the minimum code needed to produce the crash. Adding function calls that never happen because the arguments cannot be computed adds noise that obscures the problem. Here, b"a"*0xFFF would require more memory that any

Re: Dynamically call methods where method is known by address vs name

2016-07-22 Thread Michael Selik
On Fri, Jul 22, 2016 at 4:05 PM Malcolm Greene wrote: > I know I can do the following: > > >>> s = 'lower' > >>> getattr(s, 'upper')() > 'LOWER' > > But how could I do the same if I had the method 'address' (better > name???) vs. method name? > > >>> upper_method = s.upper >

[issue27366] PEP487: Simpler customization of class creation

2016-07-22 Thread Martin Teichmann
Changes by Martin Teichmann : Added file: http://bugs.python.org/file43835/pep487.patch ___ Python tracker ___

[issue27366] PEP487: Simpler customization of class creation

2016-07-22 Thread Martin Teichmann
Changes by Martin Teichmann : Removed file: http://bugs.python.org/file43834/pep487.patch ___ Python tracker ___

[issue27544] Document the ABCs for instance/subclass checks of dict view types

2016-07-22 Thread Terry J. Reedy
Terry J. Reedy added the comment: The view objects *are* built-ins, but are not exposed in the __builtins__ module. This is true of many internal types, perhaps even a majority. The function and list_iterator classes are other examples. >>> type(lambda: 0) >>> type(iter([])) A few such

[issue27586] Is this a regular expression library bug?

2016-07-22 Thread Bruce Eckel
Bruce Eckel added the comment: Thank you ebarry, very helpful. Tim, sorry I missed you at Pycon. -- ___ Python tracker ___

[issue27366] PEP487: Simpler customization of class creation

2016-07-22 Thread Berker Peksag
Changes by Berker Peksag : -- components: +Interpreter Core -Library (Lib) nosy: +berker.peksag stage: -> patch review ___ Python tracker

[issue27561] Warn against subclassing builtins, and overriding their methods

2016-07-22 Thread Raymond Hettinger
Raymond Hettinger added the comment: Will do. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue27592] FIPS_mode() and FIPS_mode_set() functions in Python (ssl)

2016-07-22 Thread R. David Murray
R. David Murray added the comment: Heh, I should have said "an" expert. With two weighing in I think I'll close this. Thanks for the contribution, though. Sorry we aren't going to make use of it. -- resolution: -> rejected stage: -> resolved status: open -> closed

Dynamically call methods where method is known by address vs name

2016-07-22 Thread Malcolm Greene
I know I can do the following: >>> s = 'lower' >>> getattr(s, 'upper')() 'LOWER' But how could I do the same if I had the method 'address' (better name???) vs. method name? >>> upper_method = s.upper How do I combine this upper_method with string s to execute the method and return 'LOWER'?

[issue27592] FIPS_mode() and FIPS_mode_set() functions in Python (ssl)

2016-07-22 Thread Christian Heimes
Christian Heimes added the comment: I second Alex's statement, too. Am 22. Juli 2016 21:48:20 MESZ, schrieb "R. David Murray" : > >R. David Murray added the comment: > >See also issue 9216 and issue 9146. Even if we wanted to do it it >sounds like it isn't quite as

[issue27366] PEP487: Simpler customization of class creation

2016-07-22 Thread Martin Teichmann
Changes by Martin Teichmann : Added file: http://bugs.python.org/file43834/pep487.patch ___ Python tracker ___

[issue27366] PEP487: Simpler customization of class creation

2016-07-22 Thread Martin Teichmann
Changes by Martin Teichmann : Removed file: http://bugs.python.org/file43611/pep487a.patch ___ Python tracker ___

[issue14218] include rendered output in addition to markup

2016-07-22 Thread Brett Cannon
Brett Cannon added the comment: Moved to https://github.com/python/devguide/issues/14 -- nosy: +brett.cannon resolution: -> out of date status: open -> closed ___ Python tracker

[issue18041] mention issues with code churn in the devguide

2016-07-22 Thread Brett Cannon
Changes by Brett Cannon : -- resolution: -> out of date status: open -> closed ___ Python tracker ___

[issue23320] devguide should mention rules about "paragraph reflow" in the documentation

2016-07-22 Thread Brett Cannon
Brett Cannon added the comment: Moved to https://github.com/python/devguide/issues/12 -- nosy: +brett.cannon resolution: -> out of date status: open -> closed ___ Python tracker

[issue27539] negative Fraction ** negative int not normalized

2016-07-22 Thread Terry J. Reedy
Terry J. Reedy added the comment: Vedran: The migration to git and GitHub is in progress. The devguide is being moved today. CPython itself should be done by the end of the year, but after 3.6.0 is released in Sept. I am on Windows and yes, setting up on Windows can be a nuisance. Learning

[issue16931] mention work-around to create diffs in default/non-git mode

2016-07-22 Thread Brett Cannon
Brett Cannon added the comment: With the pending migration to git, this probably isn't worth the effort. -- nosy: +brett.cannon resolution: -> out of date status: open -> closed ___ Python tracker

[issue16930] mention limitations and/or alternatives to hg graft

2016-07-22 Thread Brett Cannon
Brett Cannon added the comment: With the migration to git pending, this won't be worth the effort. -- nosy: +brett.cannon resolution: -> out of date status: open -> closed ___ Python tracker

[issue17227] devguide: buggy heading numbers

2016-07-22 Thread Brett Cannon
Brett Cannon added the comment: Moved to https://github.com/python/devguide/issues/11 -- nosy: +brett.cannon resolution: -> out of date status: open -> closed ___ Python tracker

[issue10965] dev task of documenting undocumented APIs

2016-07-22 Thread Brett Cannon
Brett Cannon added the comment: Moved to https://github.com/python/devguide/issues/10 -- resolution: -> out of date status: open -> closed ___ Python tracker

[issue24689] Add tips for effective online communication to devguide

2016-07-22 Thread Brett Cannon
Brett Cannon added the comment: Moved to https://github.com/python/devguide/issues/9 -- resolution: -> out of date status: open -> closed ___ Python tracker

[issue20851] Update devguide to cover testing from a tarball

2016-07-22 Thread Brett Cannon
Brett Cannon added the comment: I don't think this is worth doing. -- resolution: -> rejected status: open -> closed ___ Python tracker ___

[issue24682] Add Quick Start: Communications section to devguide

2016-07-22 Thread Brett Cannon
Brett Cannon added the comment: Moved to https://github.com/python/devguide/issues/8 -- resolution: -> out of date status: open -> closed ___ Python tracker

[issue27592] FIPS_mode() and FIPS_mode_set() functions in Python (ssl)

2016-07-22 Thread R. David Murray
R. David Murray added the comment: See also issue 9216 and issue 9146. Even if we wanted to do it it sounds like it isn't quite as easy as allowing the mode to be set. I'm inclined to agree with Alex, since he's the expert. Especially since it *is* possible to set it from outside the

[issue24016] Add a Sprints organization/preparation section to devguide

2016-07-22 Thread Brett Cannon
Brett Cannon added the comment: Moved to https://github.com/python/devguide/issues/7 -- resolution: -> out of date status: open -> closed ___ Python tracker

[issue23951] Update devguide style to use a similar theme as Docs

2016-07-22 Thread Brett Cannon
Brett Cannon added the comment: Moved to https://github.com/python/devguide/issues/6 -- nosy: +brett.cannon resolution: -> out of date status: open -> closed ___ Python tracker

[issue27590] tarfile module next() method hides exceptions

2016-07-22 Thread R. David Murray
R. David Murray added the comment: OK, I've closed #16858 in favor of this one, since we at least had some discussion here. I see you selected 2.7. Does python3 have the same issues? (I'm guessing it does, though there has been some work done on the module.) -- nosy: +mmarkk

[issue16858] tarfile silently hides errors

2016-07-22 Thread R. David Murray
R. David Murray added the comment: Closing this in favor of issue 27590, which at least got a little discussion. -- nosy: +r.david.murray resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> tarfile module next() method hides exceptions

Re: Stupid question, just need a quick and dirty fix

2016-07-22 Thread Michael Selik
On Fri, Jul 22, 2016 at 2:11 AM Steven D'Aprano wrote: > On Fri, 22 Jul 2016 03:18 pm, Michael Selik wrote: > >> On Jul 22, 2016, at 12:39 AM, Jordan Bayless > wrote: > >> > >> Posting the entire code snippet is tough because it's thousands of lines >

Re: learning python. learning defining functions . need help

2016-07-22 Thread MRAB
On 2016-07-22 16:41, D'Arcy J.M. Cain wrote: On Fri, 22 Jul 2016 08:21:17 -0700 justin walters wrote: You could also replace that line with: if stock is None or type(stock) != dict: Use isinstance(). That handles classes that subclass dict as well. If

[issue27572] Support bytes-like objects when base is given to int()

2016-07-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: No, the fix was applied to all maintained versions (2.7 and 3.4+). This means that we need some deprecation period before dropping this feature (if decide to drop it). What about other Python implementations? Are they support byte-likes objects besides

[issue27592] FIPS_mode() and FIPS_mode_set() functions in Python (ssl)

2016-07-22 Thread Alex Gaynor
Alex Gaynor added the comment: I'm opposed to adding FIPS knobs to Python's SSL module for a few reasons: - FIPS is a bad standard (which I'm happy to talk at length about) - OpenSSL is regularly on the verge of dropping FIPS support (https://www.openssl.org/blog/blog/2016/07/20/fips/ is the

Re: learning python. learning defining functions . need help

2016-07-22 Thread D'Arcy J.M. Cain
On Fri, 22 Jul 2016 08:21:17 -0700 justin walters wrote: > You could also replace that line with: > > if stock is None or type(stock) != dict: Use isinstance(). That handles classes that subclass dict as well. -- D'Arcy J.M. Cain System Administrator, Vex.Net

[issue27493] logging module fails with unclear error when supplied a (Posix)Path

2016-07-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset fada654c5f72 by Vinay Sajip in branch 'default': Closes #27493: accepted Path objects in file handlers for logging. https://hg.python.org/cpython/rev/fada654c5f72 -- nosy: +python-dev resolution: -> fixed stage: needs patch -> resolved

[issue27592] FIPS_mode() and FIPS_mode_set() functions in Python (ssl)

2016-07-22 Thread Cristi Fati
New submission from Cristi Fati: During last years, the FIPS mode, has become more and more popular, especially in US (probably because it was "promoted" by government institutions). All OpenSSL versions (didn't check 1.0.0 or lower since they're no longer supported), have the "basic FIPS

[issue27590] tarfile module next() method hides exceptions

2016-07-22 Thread Yujie Chen
Yujie Chen added the comment: The other issue is http://bugs.python.org/issue16858 -- ___ Python tracker ___

[issue27591] multiprocessing: Possible uninitialized pointer use in Windows builds

2016-07-22 Thread STINNER Victor
STINNER Victor added the comment: I suggested a different way to fix the issue on the review. Python 2.7 is not affected by the bug, but Python 3.5 and 3.6 are affected. -- ___ Python tracker

[issue27591] multiprocessing: Possible uninitialized pointer use in Windows builds

2016-07-22 Thread STINNER Victor
STINNER Victor added the comment: It's a little strange that nobody reports a multiprocessing crash on Windows before. It looks like ResetEvent() is called with a random number (coming from the uninitialized stack memory). Windows is probably smart and does nothing if the argument is not a

[issue27587] Issues, reported by PVS-Studio static analyzer

2016-07-22 Thread Berker Peksag
Berker Peksag added the comment: > V547 Expression 's->sock_fd < 0' is always false. Unsigned type value is > never < 0. Modules/socketmodule.c:655 > V547 Expression 's->sock_fd < 0' is always false. Unsigned type value is > never < 0. Modules/_ssl.c:1702 > V547 Expression 'sock->sock_fd < 0'

[issue27587] Issues, reported by PVS-Studio static analyzer

2016-07-22 Thread Chris Rebert
Changes by Chris Rebert : -- nosy: +cvrebert ___ Python tracker ___ ___

[issue27561] Warn against subclassing builtins, and overriding their methods

2016-07-22 Thread Chris Rebert
Changes by Chris Rebert : -- nosy: +cvrebert ___ Python tracker ___ ___

Re: Algorithm for sequencing a collection of dependent equations

2016-07-22 Thread Malcolm Greene
Hi Tim, > I think that what you're looking for is a topological sort BINGO! That's *exactly* what I was searching for. Thank you very much, Malcolm -- https://mail.python.org/mailman/listinfo/python-list

Re: Why not allow empty code blocks?

2016-07-22 Thread Rob Gaddi
Kent Tong wrote: > Hi > > I'm aware that we can use 'pass' as an empty code block. But why doesn't > python allow a code block to be empty and thus eliminate the need for this > null statement? > > thanks in advance Because it's more likely that you have an indentation error than an

[issue27591] multiprocessing: Possible uninitialized pointer use in Windows builds

2016-07-22 Thread Chris Angelico
Chris Angelico added the comment: Cool cool! Then someone will need to notify the PVS-Studio people that we've fixed the two bugs that are actually our bugs :) -- ___ Python tracker

Re: Algorithm for sequencing a collection of dependent equations

2016-07-22 Thread Tim Golden
On 22/07/2016 17:01, Malcolm Greene wrote: We're working on a DSL (domain specific language) that we translate into a list of tokenized expressions. My challenge is to figure out how to sequence evaluation of these expressions so that we evaluate these expressions in the proper order given that

[issue27591] multiprocessing: Possible uninitialized pointer use in Windows builds

2016-07-22 Thread Berker Peksag
Berker Peksag added the comment: Yes, that's why I assigned it to myself :) Thanks for the patch! -- ___ Python tracker ___

[issue27572] Support bytes-like objects when base is given to int()

2016-07-22 Thread R. David Murray
R. David Murray added the comment: So less than a year means only some versions of 3.5? So we could drop it in 3.6 and hope we don't break anybody's code? I'm not sure I like that...I think the real problem is the complexity of handling multiple bytes types, and that ought to have a more

Re: Floating point equality [was Re: What exactly is "exact" (was Clean Singleton Docstrings)]

2016-07-22 Thread Ben Bacarisse
Chris Kaynor writes: > On Thu, Jul 21, 2016 at 4:54 PM, Ben Bacarisse wrote: > >> Steven D'Aprano writes: >> >> > Or you might be using a language like Javascript, which intentionally has >> > only floats for numbers. That's

[issue27590] tarfile module next() method hides exceptions

2016-07-22 Thread R. David Murray
R. David Murray added the comment: That would be my guess. If we are reading along and we hit garbage data, we assume we've reached the end of the tar. That doesn't mean there isn't room for improvement, or perhaps issuing a warning message about why we think we hit the end of the tar.

[issue27588] Type (typing) objects are hashable and comparable for equality but this is not documented

2016-07-22 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: I am not sure that this feature will survive the resolution of https://github.com/python/typing/issues/136 Types in typing are primarily intended for use with static type checkers and similar tools, their runtime properties are still under some discussions.

[issue8406] Make some setup.py paths exclude-able

2016-07-22 Thread Matthias Bussonnier
Matthias Bussonnier added the comment: > [2 nice response] Thanks for the nice responses, we all know it can be hard to find the right balance between making a concise comment, and being delicate enough. Thanks all for your hard work on CPython, and looking forward to have time to

Algorithm for sequencing a collection of dependent equations

2016-07-22 Thread Malcolm Greene
We're working on a DSL (domain specific language) that we translate into a list of tokenized expressions. My challenge is to figure out how to sequence evaluation of these expressions so that we evaluate these expressions in the proper order given that expressions have dependencies on other

[issue27591] multiprocessing: Possible uninitialized pointer use in Windows builds

2016-07-22 Thread Chris Angelico
Chris Angelico added the comment: Berker, I don't push code to CPython (I have the commitbit for PEP editing), so do you want to push that? -- ___ Python tracker

Re: Stupid question, just need a quick and dirty fix

2016-07-22 Thread Cousin Stanley
Jordan Bayless wrote: > > desired = Id < 10 or Id > 133 or Id in good_ids > > When I try to validate whether I passed that check, > I'm told there's a Name error and it's not defined > On the outside chance that failing to define Id produces the Name error, I defined Id in a

Re: learning python. learning defining functions . need help

2016-07-22 Thread Random832
On Fri, Jul 22, 2016, at 11:21, justin walters wrote: > Try opening the interactive terminal on your command line and type the > following: > > type({}) == dict() > > That should illustrate why. That doesn't illustrate anything relevant at all. The reason this is false is because dict() is

Re: learning python. learning defining functions . need help

2016-07-22 Thread Chris Angelico
On Sat, Jul 23, 2016 at 1:21 AM, justin walters wrote: > Hi Chris, > > Try opening the interactive terminal on your command line and type the > following: > > type({}) == dict() > > That should illustrate why. This is because simply typing '{}' could be >

Why not allow empty code blocks?

2016-07-22 Thread Kent Tong
Hi I'm aware that we can use 'pass' as an empty code block. But why doesn't python allow a code block to be empty and thus eliminate the need for this null statement? thanks in advance -- https://mail.python.org/mailman/listinfo/python-list

[issue27572] Support bytes-like objects when base is given to int()

2016-07-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It looks to me that the support of bytes-like objects besides bytes and bytearray was added accidentally, as a side effect of supporting Unicode. Note, that this support had a bug until issue24802, thus correct support of other bytes-like objects exists

[issue26559] logging.handlers.MemoryHandler flushes on shutdown but not removal

2016-07-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset a399daacb591 by Vinay Sajip in branch 'default': Closes #26559: Allow configuring flush-on-close behaviour of MemoryHandler. https://hg.python.org/cpython/rev/a399daacb591 -- nosy: +python-dev resolution: -> fixed stage: -> resolved

[issue27591] multiprocessing: Possible uninitialized pointer use in Windows builds

2016-07-22 Thread Berker Peksag
Berker Peksag added the comment: LGTM -- assignee: -> berker.peksag components: +Extension Modules nosy: +berker.peksag stage: -> patch review type: -> behavior versions: +Python 3.5 ___ Python tracker

Re: learning python. learning defining functions . need help

2016-07-22 Thread justin walters
On Fri, Jul 22, 2016 at 6:24 AM, Chris Angelico wrote: > On Fri, Jul 22, 2016 at 11:13 PM, Dennis Lee Bieber > wrote: > > Now... Going much beyond the assignment (if you were having > trouble > > with the assignment, this will seem like magic)

  1   2   >