[issue12294] multiprocessing.Pool: Need a way to find out if work are finished.

2016-08-19 Thread Caleb Hattingh
Changes by Caleb Hattingh : -- nosy: +cjrh ___ Python tracker ___ ___

[issue12982] Document that importing .pyo files needs python -O

2016-08-19 Thread Caleb Hattingh
Caleb Hattingh added the comment: Presumably PEP488 (and the 4 years of inactivity) means that this issue could be closed? -- nosy: +cjrh ___ Python tracker

[issue11602] python-config code should be in sysconfig

2016-08-19 Thread Caleb Hattingh
Changes by Caleb Hattingh : -- nosy: +cjrh ___ Python tracker ___ ___

Holding until next value change

2016-08-19 Thread Arshpreet Singh
I am writing a function as main_call() which is continuously producing values. (+ve or -ve) I want to print on screen only for first +ve value and hold until -ve value comes around. here is my code: def main_call(): while True: yield strategy() for value in main_call():

[issue27283] Add a "What's New" entry for PEP 519

2016-08-19 Thread Berker Peksag
Berker Peksag added the comment: pep_519_whatsnew.diff looks pretty good to me, thanks! It would be nice to add a simple example to demonstrate the feature (like we did for PEP 498: https://docs.python.org/3.6/whatsnew/3.6.html#pep-498-formatted-string-literals) >>> import pathlib >>> with

[issue23968] rename the platform directory from plat-$(MACHDEP) to plat-$(PLATFORM_TRIPLET)

2016-08-19 Thread Chi Hsuan Yen
Chi Hsuan Yen added the comment: I've just tried doko's patch on Arch Linux. Before this patch there are three test failures in test_distutils and test_sysconfig, just like Gentoo. After the patch, all tests in test_distutils and test_sysconfig pass. On my PC both `gcc -print-multiarch` and

Re: Does This Scare You?

2016-08-19 Thread Wildman via Python-list
On Sat, 20 Aug 2016 11:20:44 +1000, Chris Angelico wrote: > On Sat, Aug 20, 2016 at 11:11 AM, Wildman via Python-list > wrote: >> Since I am fairly new to Python, I realize there is much that I >> still don't know but I don't understand how Windows can have >> reserved

Re: saving octet-stream png file

2016-08-19 Thread Random832
On Fri, Aug 19, 2016, at 21:09, Steve D'Aprano wrote: > Depends what you mean by "byte", but the short answer is "Yes". > > In the C/C++ standard, bytes must be at least eight bytes. As the below > FAQ > explains, that means that on machines like the PDP-10 a C++ compiler will > define bytes to

[issue27713] Spurious "platform dependent libraries" warnings when running make

2016-08-19 Thread Ned Deily
Ned Deily added the comment: That was easy; thanks, Xiang Zhang! Pushed for release in 3.5.3 and 3.6.0. -- resolution: -> fixed stage: needs patch -> resolved status: open -> closed ___ Python tracker

[issue27713] Spurious "platform dependent libraries" warnings when running make

2016-08-19 Thread Roundup Robot
Roundup Robot added the comment: New changeset 97b996d81c62 by Ned Deily in branch '3.5': Issue #27713: Surpress spurious build warnings when updating importlib's https://hg.python.org/cpython/rev/97b996d81c62 New changeset 751ca458d669 by Ned Deily in branch 'default': Issue #27713: merge from

Re: Python Run Error

2016-08-19 Thread Lawrence D’Oliveiro
On Saturday, August 20, 2016 at 11:57:16 AM UTC+12, MRAB wrote: > > On 2016-08-19 23:31, Lawrence D’Oliveiro wrote: > >> On Saturday, August 20, 2016 at 10:01:08 AM UTC+12, Suzanna McGee wrote: >>> “The program can’t start because api-ms-win-crt-runtime-l1-1-0.dll is >>> missing from your

[issue23968] rename the platform directory from plat-$(MACHDEP) to plat-$(PLATFORM_TRIPLET)

2016-08-19 Thread Matthias Klose
Matthias Klose added the comment: please could somebody test the attached patch (I'm also trying to setup a gentoo env)? The idea is to keep the multiarch and triplet macros in sync. diff -r a7f3678f9509 configure.ac --- a/configure.ac Sat Aug 20 03:05:13 2016 +0200 +++ b/configure.ac

[issue12713] argparse: allow abbreviation of sub commands by users

2016-08-19 Thread Ned Deily
Changes by Ned Deily : -- priority: normal -> release blocker ___ Python tracker ___ ___

[issue26689] Add `has_flag` method to `distutils.CCompiler`

2016-08-19 Thread Ned Deily
Ned Deily added the comment: https://mail.python.org/pipermail/distutils-sig/2016-August/029469.html -- ___ Python tracker ___

[issue22021] shutil.make_archive() root_dir do not work

2016-08-19 Thread bananaapple
bananaapple added the comment: I am sorry. I understand now. Thank you. -- ___ Python tracker ___ ___

Re: Does This Scare You?

2016-08-19 Thread Chris Angelico
On Sat, Aug 20, 2016 at 11:11 AM, Wildman via Python-list wrote: > Since I am fairly new to Python, I realize there is much that I > still don't know but I don't understand how Windows can have > reserved names on a Linux system. What am I missing? The PureWindowsPath

[issue23968] rename the platform directory from plat-$(MACHDEP) to plat-$(PLATFORM_TRIPLET)

2016-08-19 Thread STINNER Victor
STINNER Victor added the comment: Any update on this issue? test_srcdir() of test_sysconfig still fails on "x86 Gentoo Installed with X 3.x" buildbot. I opened the issue #27798 which was closed a duplicate of this issue. First failure of the buildbot:

[issue27800] Regular expressions with multiple repeat codes

2016-08-19 Thread Martin Panter
Martin Panter added the comment: Okay so it sounds like my usage is valid if I add the brackets. I will try to come up with a documentation patch as some stage. The reason why it is not supported without brackets is to maintain a bit of consistency with the question mark (?), which modifies

Re: Does This Scare You?

2016-08-19 Thread Wildman via Python-list
On Sat, 20 Aug 2016 10:57:37 +1000, Chris Angelico wrote: > On Sat, Aug 20, 2016 at 9:42 AM, Lawrence D’Oliveiro > wrote: >> Python 3.5.2+ (default, Aug 5 2016, 08:07:14) >> [GCC 6.1.1 20160724] on linux >> Type "help", "copyright", "credits" or "license" for

Re: saving octet-stream png file

2016-08-19 Thread Steve D'Aprano
On Sat, 20 Aug 2016 06:51 am, Lawrence D’Oliveiro wrote: > On Saturday, August 20, 2016 at 6:03:53 AM UTC+12, Terry Reedy wrote: >> >> An 'octet' is a byte of 8 bits. > > Is there any other size of byte? Depends what you mean by "byte", but the short answer is "Yes". In the C/C++ standard,

[issue26823] Shrink recursive tracebacks

2016-08-19 Thread Roundup Robot
Roundup Robot added the comment: New changeset a7f3678f9509 by Victor Stinner in branch 'default': Fix reference leak in tb_printinternal() https://hg.python.org/cpython/rev/a7f3678f9509 -- ___ Python tracker

Re: Does This Scare You?

2016-08-19 Thread Chris Angelico
On Sat, Aug 20, 2016 at 9:42 AM, Lawrence D’Oliveiro wrote: > Python 3.5.2+ (default, Aug 5 2016, 08:07:14) > [GCC 6.1.1 20160724] on linux > Type "help", "copyright", "credits" or "license" for more information. > >>> from pathlib import PureWindowsPath >

[issue25746] test_unittest failure in leaks searching mode

2016-08-19 Thread STINNER Victor
STINNER Victor added the comment: While checking that I didn't introduce a reference leak recently with my changes around _PyObject_FastCall(), I found the same issue: test_unittest doesn't work with regrtest -R. I get the same error: $ ./python -m test -R 0:1 -v test_unittest

[issue27128] Add _PyObject_FastCall()

2016-08-19 Thread STINNER Victor
STINNER Victor added the comment: I created two new issues: * issue #27809: _PyObject_FastCall(): add support for keyword arguments * issue #27810: Add METH_FASTCALL: new calling convention for C functions -- ___ Python tracker

[issue27366] PEP487: Simpler customization of class creation

2016-08-19 Thread Roundup Robot
Roundup Robot added the comment: New changeset 545bfa4c20eb by Victor Stinner in branch 'default': Issue #27366: Fix init_subclass() https://hg.python.org/cpython/rev/545bfa4c20eb -- ___ Python tracker

[issue27810] Add METH_FASTCALL: new calling convention for C functions

2016-08-19 Thread STINNER Victor
Changes by STINNER Victor : -- dependencies: +_PyObject_FastCall(): add support for keyword arguments ___ Python tracker ___

[issue27810] Add METH_FASTCALL: new calling convention for C functions

2016-08-19 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +serhiy.storchaka ___ Python tracker ___ ___

[issue27805] In Python 3, open('/dev/stdout', 'a') raises OSError with errno=ESPIPE

2016-08-19 Thread STINNER Victor
STINNER Victor added the comment: > Users of Supervisor have been depending on that for a long time. Hum, the workaround is very simple no? Just open /dev/stdout with mode "w", no? -- ___ Python tracker

[issue27810] Add METH_FASTCALL: new calling convention for C functions

2016-08-19 Thread STINNER Victor
New submission from STINNER Victor: The issue #27128 added _PyObject_FastCall() to avoid the creation of temporary tuples when calling functions. I propose to add a new METH_FASTCALL calling convention. The example using METH_VARARGS | METH_KEYWORDS: PyObject* func(DirEntry *self, PyObject

[issue27805] In Python 3, open('/dev/stdout', 'a') raises OSError with errno=ESPIPE

2016-08-19 Thread STINNER Victor
STINNER Victor added the comment: Syscalls made by open("/dev/stdout", "a") in Python 2: open("/dev/stdout", O_WRONLY|O_CREAT|O_APPEND, 0666) = 3 lseek(3, 0, SEEK_END) = -1 ESPIPE (Illegal seek) fstat(3, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0 I used

[issue27809] _PyObject_FastCall(): add support for keyword arguments

2016-08-19 Thread STINNER Victor
New submission from STINNER Victor: _PyObject_FastCall() (added in the issue #27128) already supports keyword arguments for C functions, but not Python functions. Attached patch adds support for keyword arguments in _PyFunction_FastCall(), to allow to use _PyObject_FastCall() in more cases.

[issue27805] In Python 3, open('/dev/stdout', 'a') raises OSError with errno=ESPIPE

2016-08-19 Thread Martin Panter
Martin Panter added the comment: The origin of this seems to be r68835 and Issue 5008. Victor mentioned imitating the Gnu C library. Maybe there is a better way that also supports non-seekable files better, perhaps handle ESPIPE without failing. This also affects Python 2, if you consider

[issue12713] argparse: allow abbreviation of sub commands by users

2016-08-19 Thread paul j3
paul j3 added the comment: I haven't read the discussion in full, but it looks like this patch was added without any recent discussion or testing. Previously if we had `choices=['a','abc']`, any exact match would be accepted, and partial matches rejected. With this change the only choice

Re: The Joys Of Data-Driven Programming

2016-08-19 Thread Lawrence D’Oliveiro
On Thursday, August 18, 2016 at 4:47:28 PM UTC+12, Marko Rauhamaa wrote: > ... as a rule, I dislike rules. Rule languages tend to > grow out of all bounds, always remain deficient and have impenetrable, > ad-hoc semantics. That’s a very peculiar thing to say, considering that data-driven

[issue27808] os.waitpid does not return (0, 0) when child has not exited (FreeBSD)

2016-08-19 Thread Casey Lucas
New submission from Casey Lucas: I'm not sure if this a Python issue or a FreeBSD issue but the return value from os.waitpid is not reliably (0,0) on FreeBSD when the WNOHANG is used and the child process has not yet exited. Python docs say that the return value will be (0,0) but this is not

Re: Python Run Error

2016-08-19 Thread MRAB
On 2016-08-19 23:31, Lawrence D’Oliveiro wrote: On Saturday, August 20, 2016 at 10:01:08 AM UTC+12, Suzanna McGee wrote: “The program can’t start because api-ms-win-crt-runtime-l1-1-0.dll is missing from your computer. Try reinstalling the program to fix this problem.” Why not do what it

[issue27128] Add _PyObject_FastCall()

2016-08-19 Thread Roundup Robot
Roundup Robot added the comment: New changeset c2af917bde71 by Victor Stinner in branch 'default': PyFile_WriteObject() now uses fast call https://hg.python.org/cpython/rev/c2af917bde71 New changeset 0da1ce362d15 by Victor Stinner in branch 'default': import_name() now uses fast call

Does This Scare You?

2016-08-19 Thread Lawrence D’Oliveiro
Python 3.5.2+ (default, Aug 5 2016, 08:07:14) [GCC 6.1.1 20160724] on linux Type "help", "copyright", "credits" or "license" for more information. >>> from pathlib import PureWindowsPath >>> PureWindowsPath("prn").is_reserved() True >>>

Re: Two-Dimensional Expression Layout

2016-08-19 Thread Lawrence D’Oliveiro
On Friday, August 19, 2016 at 8:56:31 PM UTC+12, I wrote: > To avoid lines getting long, why not take advantage of the two available > screen/page dimensions to make [expression] structure clearer? Another aspect of this has to do with line length. I regularly set my editor window width to

[issue27807] Prevent site-packages .pth files from causing test_site failure

2016-08-19 Thread Terry J. Reedy
Terry J. Reedy added the comment: I think hitting adventurous users like Chris who locally compile and test with this failure is wrong. There is no core dev 'site' expert, so I picked 'testing'. -- nosy: +ezio.melotti, michael.foord, terry.reedy

[issue27598] Add Collection to collections.abc and typing

2016-08-19 Thread Neil Girdhar
Neil Girdhar added the comment: (never mind about the comparison operators :) Turns out that would break backwards compatibility.) -- ___ Python tracker

Re: Two-Dimensional Expression Layout

2016-08-19 Thread Lawrence D’Oliveiro
On Saturday, August 20, 2016 at 10:38:34 AM UTC+12, Chris Angelico wrote: > > On Sat, Aug 20, 2016 at 8:31 AM, Lawrence D’Oliveiro wrote: >> >> There is no short-cut evaluation when constructing tuples and lists. > > I'm not sure how that would make difference in these examples. The > three parts

Re: Two-Dimensional Expression Layout

2016-08-19 Thread codewizard
On Friday, August 19, 2016 at 6:38:34 PM UTC-4, Chris Angelico wrote: > On Sat, Aug 20, 2016 at 8:31 AM, Lawrence D’Oliveiro > wrote: > > On Saturday, August 20, 2016 at 9:56:05 AM UTC+12, codew...@gmail.com wrote: > >> > >> On Friday, August 19, 2016 at 5:30:22 PM UTC-4,

[issue27283] Add a "What's New" entry for PEP 519

2016-08-19 Thread Brett Cannon
Brett Cannon added the comment: While I wait on various patches related to PEP 519 to land, I have gone ahead and written the What's New entry. -- keywords: +patch Added file: http://bugs.python.org/file44160/pep_519_whatsnew.diff ___ Python tracker

[issue27283] Add a "What's New" entry for PEP 519

2016-08-19 Thread Brett Cannon
Changes by Brett Cannon : -- stage: needs patch -> patch review ___ Python tracker ___ ___

[issue26689] Add `has_flag` method to `distutils.CCompiler`

2016-08-19 Thread Ned Deily
Ned Deily added the comment: "I posted a couple of messages on distutils-sig and got little attention." OK, for future reference, the start of the discussion was here: https://mail.python.org/pipermail/distutils-sig/2016-May/029010.html It looks like the first item, the one relative to this

Re: Two-Dimensional Expression Layout

2016-08-19 Thread Chris Angelico
On Sat, Aug 20, 2016 at 8:31 AM, Lawrence D’Oliveiro wrote: > On Saturday, August 20, 2016 at 9:56:05 AM UTC+12, codew...@gmail.com wrote: >> >> On Friday, August 19, 2016 at 5:30:22 PM UTC-4, Lawrence D’Oliveiro wrote: >> >>> On Saturday, August 20, 2016 at 7:52:09 AM

Re: Two-Dimensional Expression Layout

2016-08-19 Thread Lawrence D’Oliveiro
On Saturday, August 20, 2016 at 9:56:05 AM UTC+12, codew...@gmail.com wrote: > > On Friday, August 19, 2016 at 5:30:22 PM UTC-4, Lawrence D’Oliveiro wrote: > >> On Saturday, August 20, 2016 at 7:52:09 AM UTC+12, codew...@gmail.com >> wrote: >>> if any([ >>> not isinstance(src, Image),

Re: Python Run Error

2016-08-19 Thread Lawrence D’Oliveiro
On Saturday, August 20, 2016 at 10:01:08 AM UTC+12, Suzanna McGee wrote: > “The program can’t start because api-ms-win-crt-runtime-l1-1-0.dll is > missing from your computer. Try reinstalling the program to fix this > problem.” Why not do what it says? --

[issue26027] Support Path objects in the posix module

2016-08-19 Thread Brett Cannon
Changes by Brett Cannon : -- stage: test needed -> commit review ___ Python tracker ___ ___

[issue27807] Prevent site-packages .pth files from causing test_site failure

2016-08-19 Thread Chris Angelico
New submission from Chris Angelico: Having matplotlib installed globally causes test_site to fail, due to the .pth file importing types. The point of the test is to monitor startup dependencies (and thus time) for the core interpreter and standard library, not third-party libraries, so having

[issue27807] Prevent site-packages .pth files from causing test_site failure

2016-08-19 Thread Chris Angelico
Changes by Chris Angelico : -- keywords: +patch Added file: http://bugs.python.org/file44158/no-site-packages-in-test.patch ___ Python tracker

[issue26027] Support Path objects in the posix module

2016-08-19 Thread Brett Cannon
Brett Cannon added the comment: Here is a patch that incorporates Serhiy's feedback. -- Added file: http://bugs.python.org/file44159/path_converter.diff ___ Python tracker

Python Run Error

2016-08-19 Thread Suzanna McGee
I am unable to run Python on my computer because I keep getting the follow error: “The program can’t start because api-ms-win-crt-runtime-l1-1-0.dll is missing from your computer. Try reinstalling the program to fix this problem.” -- Suzanna McGee Computer Science Teacher Notre Dame High

Re: Two-Dimensional Expression Layout

2016-08-19 Thread codewizard
On Friday, August 19, 2016 at 5:30:22 PM UTC-4, Lawrence D’Oliveiro wrote: > On Saturday, August 20, 2016 at 7:52:09 AM UTC+12, codew...@gmail.com wrote: > > if any([ > > not isinstance(src, Image), > > mask != None and not isinstance(mask, Image), > > not

[issue12713] argparse: allow abbreviation of sub commands by users

2016-08-19 Thread paul j3
Changes by paul j3 : -- nosy: +paul.j3 ___ Python tracker ___ ___ Python-bugs-list

[issue27806] 2.7 32-bit builds fail on future releases of OS X due to dependency on deleted header file

2016-08-19 Thread Ned Deily
New submission from Ned Deily: Attempts to build Python 2.7 using OS X/macOS public beta versions of the latest command-line tools can fail due to the removal of the system header file for QuickTime/QuickTime.h, one of the long deprecated Carbon APIs. Currently, Python only attempts to build

Re: Two-Dimensional Expression Layout

2016-08-19 Thread Lawrence D’Oliveiro
On Saturday, August 20, 2016 at 5:53:22 AM UTC+12, Terry Reedy wrote: > > To me, putting parens and '+' and 'or' on separate lines emphasizes them > too much and makes the layout more, not less, cluttered. So having whitespace around these symbols makes things look *more* cluttered, while

Re: Two-Dimensional Expression Layout

2016-08-19 Thread Lawrence D’Oliveiro
On Saturday, August 20, 2016 at 7:52:09 AM UTC+12, codew...@gmail.com wrote: > if any([ > not isinstance(src, Image), > mask != None and not isinstance(mask, Image), > not isinstance(dest, Image), > ]): > raise TypeError("image args must be Image objects") >

Re: saving octet-stream png file

2016-08-19 Thread Random832
On Fri, Aug 19, 2016, at 16:51, Lawrence D’Oliveiro wrote: > On Saturday, August 20, 2016 at 6:03:53 AM UTC+12, Terry Reedy wrote: > > > > An 'octet' is a byte of 8 bits. > > Is there any other size of byte? Not very often anymore. Used to be some systems had 9-bit bytes, and of course a lot of

Re: saving octet-stream png file

2016-08-19 Thread Lawrence D’Oliveiro
On Saturday, August 20, 2016 at 6:03:53 AM UTC+12, Terry Reedy wrote: > > An 'octet' is a byte of 8 bits. Is there any other size of byte? -- https://mail.python.org/mailman/listinfo/python-list

Re: saving octet-stream png file

2016-08-19 Thread Chris Kaynor
On Fri, Aug 19, 2016 at 12:00 PM, Larry Martell wrote: > On Fri, Aug 19, 2016 at 1:24 PM, Chris Angelico wrote: > > On Sat, Aug 20, 2016 at 3:10 AM, Larry Martell > wrote: > >> I have some python code (part of a django app)

[issue27805] In Python 3, open('/dev/stdout', 'a') raises OSError with errno=ESPIPE

2016-08-19 Thread Shane Hathaway
New submission from Shane Hathaway: With Python 2, the following call worked: open('/dev/stdout', 'a') Users of Supervisor have been depending on that for a long time. With Python 3.5, this is what happens: >>> open('/dev/stdout', 'a') Traceback (most recent call last): File "", line 1,

[issue27804] IDLE 3.5.2 crashes when typing ^ on keyboard

2016-08-19 Thread Ned Deily
Ned Deily added the comment: You are almost certainly seeing a crash due to a critical bug in the Apple-supplied version of Tk 8.5 on OS X systems up through at least OS X 10.11. See here for more information: https://www.python.org/download/mac/tcltk/#apple-8-5-9. The solution is to use a

[issue26689] Add `has_flag` method to `distutils.CCompiler`

2016-08-19 Thread Sylvain Corlay
Sylvain Corlay added the comment: Thanks Ned. I posted a couple of messages on distutils-sig and got little attention. I think that this feature is very important for detecting whether a compiler supports a certain flag like `-std=c++11` and provide a meaningful error when needed. CMake has

Re: Two-Dimensional Expression Layout

2016-08-19 Thread codewizard
For some special cases, I prefer the versions below. On Friday, August 19, 2016 at 4:56:31 AM UTC-4, Lawrence D’Oliveiro wrote: > [snip] > > Computing a variable value (using redundant parentheses to avoid > backslash-continuations): > > dest_rect = \ > ( > draw_bounds

[issue27804] IDLE 3.5.2 crashes when typing ^ on keyboard

2016-08-19 Thread Grégoire Cutzach
New submission from Grégoire Cutzach: When typing ^ (CIRCUMFLEX ACCENT Unicode: U+005E, UTF-8: 5E) on azerty Keyboard, IDLE quits/crashes. Encountered on a mac running OS X 10.11.6 -- assignee: terry.reedy components: IDLE messages: 273155 nosy: Grégoire Cutzach, terry.reedy priority:

Re: saving octet-stream png file

2016-08-19 Thread Larry Martell
On Fri, Aug 19, 2016 at 3:00 PM, Larry Martell wrote: > On Fri, Aug 19, 2016 at 1:24 PM, Chris Angelico wrote: >> On Sat, Aug 20, 2016 at 3:10 AM, Larry Martell >> wrote: >>> I have some python code (part of a django app) that

[issue26988] Add AutoNumberedEnum to stdlib

2016-08-19 Thread Vedran Čačić
Vedran Čačić added the comment: # Just wait until I put the keys to the time machine in their usual place... :-) Ok, while we're talking about whether declarative style is a good idea, Python has already got the initial seed of that style. With Guido's blessing! PEP 526 enables us to mix

python module install manully

2016-08-19 Thread ldompeling
I have a module insteon.py what I need to install manually because it is not in the python index packages. I copied the module in /usr/lib/python2.7/dist-packages and /usr/local/lib/python2.7/dist-packages. When I try to import the module insteon.py I get this error: Does someone knows what the

[issue27128] Add _PyObject_FastCall()

2016-08-19 Thread STINNER Victor
STINNER Victor added the comment: Ok, I updated the most simple forms of function calls. I will open new issues for more complex calls and more sensible parts of the code like ceval.c. Buildbots seem to be happy. -- ___ Python tracker

Re: saving octet-stream png file

2016-08-19 Thread Larry Martell
On Fri, Aug 19, 2016 at 1:24 PM, Chris Angelico wrote: > On Sat, Aug 20, 2016 at 3:10 AM, Larry Martell > wrote: >> I have some python code (part of a django app) that processes a >> request that contains a png file. The request is send with >>

[issue26689] Add `has_flag` method to `distutils.CCompiler`

2016-08-19 Thread Ned Deily
Ned Deily added the comment: Sylvain, have you brought this feature request up on the Distutils mailing list? The PyPA there is responsible for packaging features. One big issue with adding new features to Distutils is the backwards-compatibility tradeoff: many third-party package authors

[issue12713] argparse: allow abbreviation of sub commands by users

2016-08-19 Thread Zachary Ware
Zachary Ware added the comment: There's a bug in this patch, first reported at https://github.com/python/benchmarks/issues/1 Attached patch causes test_parse_args_abbreviation to show the failure: test.test_argparse.ArgumentParserError: ('SystemExit', '', "usage: PROG [-h] [--foo] bar

[issue27802] Add __eq__ and __ne__ to collections.abc.Sequence.

2016-08-19 Thread Guido van Rossum
Changes by Guido van Rossum : -- resolution: -> rejected stage: -> resolved status: open -> closed ___ Python tracker ___

[issue27766] Add ChaCha20 Poly1305 to SSL ciphers

2016-08-19 Thread Francis MB
Francis MB added the comment: Documentation cosmetic: # * Prefer ECDHE over DHE for better performance # * Prefer any AES-GCM over any AES-CBC for better performance and security +# * Prefer any AES-GCM over any AES-CBC for better performance and security The patch seems to be adding

[issue27803] ctypes automatic byref failing on custom classes attributes

2016-08-19 Thread Erwan Le Pape
New submission from Erwan Le Pape: When using a custom class to store a ctype value, passing that class as a function argument explicitly declared to be a pointer type fails to pass the _as_parameter_ class attribute as a pointer and instead raises a TypeError. For example: >>> from ctypes

Re: saving octet-stream png file

2016-08-19 Thread Terry Reedy
On 8/19/2016 1:10 PM, Larry Martell wrote: I have some python code (part of a django app) that processes a request that contains a png file. The request is send with content_type = 'application/octet-stream' An 'octet' is a byte of 8 bits. So the content is a stream of bytes and MUST NOT be

Re: Two-Dimensional Expression Layout

2016-08-19 Thread Terry Reedy
On 8/19/2016 4:56 AM, Lawrence D’Oliveiro wrote: It is handy to be able to keep complex expressions together sometimes, when breaking them up would simply obscure their structure. To avoid lines getting long, why not take advantage of the two available screen/page dimensions to make their

[issue27800] Regular expressions with multiple repeat codes

2016-08-19 Thread Terry J. Reedy
Terry J. Reedy added the comment: This appears to be a doc issue to clarify that * cannot directly follow a repetition code. I believe there have been other (non)bug reports like this before. -- nosy: +terry.reedy ___ Python tracker

[issue27800] Regular expressions with multiple repeat codes

2016-08-19 Thread Matthew Barnett
Matthew Barnett added the comment: "*" and the other quantifiers ("+", "?" and "{...}") operate on the preceding _item_, not the entire preceding expression. For example, "ab*" means "a" followed by zero or more repeats of "b". You're not allowed to use multiple quantifiers together. The

[issue27792] bool % int has inconsistent return type.

2016-08-19 Thread Terry J. Reedy
Terry J. Reedy added the comment: This can only happen because of a hole in the tests. test_bool.BoolTest.test_math appears to test every binary int op, including bitwise, *except* %. After self.assertIsNot(False/1, False) add self.assertEqual(False%1, 0)

Re: saving octet-stream png file

2016-08-19 Thread Chris Angelico
On Sat, Aug 20, 2016 at 3:10 AM, Larry Martell wrote: > I have some python code (part of a django app) that processes a > request that contains a png file. The request is send with > content_type = 'application/octet-stream' > > In the python code I want to write this

saving octet-stream png file

2016-08-19 Thread Larry Martell
I have some python code (part of a django app) that processes a request that contains a png file. The request is send with content_type = 'application/octet-stream' In the python code I want to write this data to a file and still have it still be a valid png file. The data I get looks like this:

[issue26988] Add AutoNumberedEnum to stdlib

2016-08-19 Thread David Hagen
David Hagen added the comment: One solution similar to one proposed by Vedran works with the current Enum: class Color(Enum): red = object() green = object() blue= object() I tested this in PyCharm and it is perfectly happy with the autocomplete and everything. The

[issue27128] Add _PyObject_FastCall()

2016-08-19 Thread Roundup Robot
Roundup Robot added the comment: New changeset 3ab32f7add6e by Victor Stinner in branch 'default': Issue #27128: _pickle uses fast call https://hg.python.org/cpython/rev/3ab32f7add6e -- ___ Python tracker

[issue27128] Add _PyObject_FastCall()

2016-08-19 Thread Roundup Robot
Roundup Robot added the comment: New changeset 73b00fb1dc9d by Victor Stinner in branch 'default': Cleanup call_method() and call_maybe() https://hg.python.org/cpython/rev/73b00fb1dc9d New changeset 8e085070ab28 by Victor Stinner in branch 'default': call_method() and call_maybe() now use fast

[issue27126] Apple-supplied libsqlite3 on OS X is not fork safe; can cause crashes

2016-08-19 Thread Chris Jerdonek
Chris Jerdonek added the comment: FWIW, I just came across an issue in Django's test suite that I believe is caused by the issue reported here. Some of Django's unit tests were hanging for me when run in "parallel" mode (which uses multiprocessing). Here is the ticket I filed there:

[issue27126] Apple-supplied libsqlite3 on OS X is not fork safe; can cause crashes

2016-08-19 Thread Chris Jerdonek
Changes by Chris Jerdonek : -- nosy: +chris.jerdonek ___ Python tracker ___ ___

[issue27713] Spurious "platform dependent libraries" warnings when running make

2016-08-19 Thread Xiang Zhang
Xiang Zhang added the comment: This is the design of getpath.c, when no exec/exec_prefix can be found it will emit warning and use the default one. Fortunately it gives use the ability to suppress the warnings. :) Simply set Py_FrozenFlag in _freeze_importlib.c can solve this problem. Upload

[issue27128] Add _PyObject_FastCall()

2016-08-19 Thread Roundup Robot
Roundup Robot added the comment: New changeset 2da6dc1c30d8 by Victor Stinner in branch 'default': contains and rich compare slots use fast call https://hg.python.org/cpython/rev/2da6dc1c30d8 New changeset 2d4d40da2aba by Victor Stinner in branch '3.5': Fix a refleak in call_method()

[issue27798] test_sysconfig: test_srcdir() fails on "x86 Gentoo Installed with X 3.x" buildbot

2016-08-19 Thread Zachary Ware
Zachary Ware added the comment: This appears to be a duplicate of #23968. -- nosy: +zach.ware resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> rename the platform directory from plat-$(MACHDEP) to plat-$(PLATFORM_TRIPLET) type: -> behavior

[issue27740] Fix doc of Py_CompileStringExFlags

2016-08-19 Thread Xiang Zhang
Xiang Zhang added the comment: > filename is going to be decoded inside of Py_CompileStringExFlags Actually all I want to express is this, *filename* will be decoded inside. But now the wording looks to me is that *filename* is already a decoded string when passed. I don't want to document

[issue27740] Fix doc of Py_CompileStringExFlags

2016-08-19 Thread Berker Peksag
Berker Peksag added the comment: I don't understand the second part of the patch. *filename* is a filesystem encoding (:func:`os.fsdecode`) encoded string [...] Do you want to document that filename should be encoded by using PyUnicode_EncodeFSDefault *before* passing it to

[issue27128] Add _PyObject_FastCall()

2016-08-19 Thread Roundup Robot
Roundup Robot added the comment: New changeset a1a29d20f52d by Victor Stinner in branch 'default': Add _PyObject_FastCall() https://hg.python.org/cpython/rev/a1a29d20f52d New changeset 89e4ad001f3d by Victor Stinner in branch 'default': PyEval_CallObjectWithKeywords() uses fast call

[issue27802] Add __eq__ and __ne__ to collections.abc.Sequence.

2016-08-19 Thread R. David Murray
R. David Murray added the comment: I was wondering the same thing recently, thanks for opening this issue. Here is my use case: I'm implementing a PersistentList, and I want it to be equal to a 'real' list, but not equal to a tuple. Frankly, I hadn't thought about the latter problem before

[issue26988] Add AutoNumberedEnum to stdlib

2016-08-19 Thread Kenneth Reitz
Kenneth Reitz added the comment: There's a difference between boiler-plate and "code". > On Aug 19, 2016, at 10:53 AM, Ethan Furman wrote: > > > Ethan Furman added the comment: > > No magic, but a whole heap of extra boiler-plate. :( > > -- > >

[issue27801] test_update_lines_cols from test.test_curses.MiscTests fails on Ubuntu 14.04 LTS

2016-08-19 Thread Berker Peksag
Changes by Berker Peksag : -- resolution: -> fixed stage: needs patch -> resolved status: open -> closed ___ Python tracker ___

[issue27800] Regular expressions with multiple repeat codes

2016-08-19 Thread R. David Murray
R. David Murray added the comment: It seems perfectly logical and consistent to me. {4} is a repeat count, as is *. You get the same error if you do 'a?*', and the same bypass if you do '(a?)*' (though I haven't tested if that does anything useful :). You don't need the ?:, as far as I can

[issue27801] test_update_lines_cols from test.test_curses.MiscTests fails on Ubuntu 14.04 LTS

2016-08-19 Thread Roundup Robot
Roundup Robot added the comment: New changeset 51368991e858 by Berker Peksag in branch '3.5': Issue #27801: Skip test_update_lines_cols when update_lines_cols() is not available https://hg.python.org/cpython/rev/51368991e858 New changeset bd9183850965 by Berker Peksag in branch 'default':

  1   2   >