Side-effects [was Re: I am out of trial and error again Lists]

2014-10-26 Thread Steven D'Aprano
Chris Angelico wrote: On Sat, Oct 25, 2014 at 4:40 PM, Rustom Mody rustompm...@gmail.com wrote: Its generally accepted that side-effecting functions are not a good idea -- typically a function that returns something and changes global state. Only in certain circles. Not in Python. There

Re: Side-effects [was Re: I am out of trial and error again Lists]

2014-10-26 Thread Chris Angelico
On Sun, Oct 26, 2014 at 5:12 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: However, mutator methods on a class don't change global state, they change the state of an instance. Even random.random and friends don't change global state, they change a (hidden) instance, and you

Newbie suggestion: nice tutorial

2014-10-26 Thread Martin S
Even after having written three small tool for calculating chess ratings, I felt that I severly lacked a proper understanding of what the BEEP I was actually doing. So I looked at our standard bookshop at work, found a book that I thought neat only to discover that our work account has been

Dive Into Python 3, good tutorial (was: Newbie suggestion: nice tutorial)

2014-10-26 Thread Ben Finney
Martin S shieldf...@gmail.com writes: So it was back to the internet - and this one seems pretty comprehensive and understandable: http://www.diveintopython3.net/ Yes, Mark Pilgrim wrote this originally for Python 2, and it was one of the best even then. The revised edition for Python 3 is

Re: When to use assert

2014-10-26 Thread Steven D'Aprano
Chris Angelico wrote: On Fri, Oct 24, 2014 at 6:49 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: addresses = [get_address(name) for name in database] assert all(address for address in addresses) # ... much later on ... for i, address in enumerate(addresses): if

Re: When to use assert

2014-10-26 Thread Chris Angelico
On Sun, Oct 26, 2014 at 8:39 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: In the absence of correctness proofs for your code, anything you do (unit tests, assertions, regression tests, etc.) is just a statistically sampling of all the potential paths your code might take,

Sample sqlite databases for use in python

2014-10-26 Thread Nicholas Cannon
Hello I am making a data management program and although i can make my own databases I would like a couple sample ones to check out. Of course I searched on google for sample db's and I downloaded some but they are not working and I keep getting: File is not a database or

Re: Sample sqlite databases for use in python

2014-10-26 Thread Peter Otten
Nicholas Cannon wrote: Hello I am making a data management program and although i can make my own databases I would like a couple sample ones to check out. Of course I searched on google for sample db's and I downloaded some but they are not working and I keep getting:

SQLObject 1.6.1

2014-10-26 Thread Oleg Broytman
Hello! I'm pleased to announce version 1.6.1, the first bugfix release of branch 1.6 of SQLObject. What's new in SQLObject === * Allow unicode in .orderBy(u'-column'). Contributor for this release is Andrew Trusty. For a more complete list, please see the news:

Re: Status of side-effecting functions in python

2014-10-26 Thread Dan Sommers
On Sun, 26 Oct 2014 00:45:49 -0700, wxjmfauth wrote: Ditto for fileobj.write(). Why should it return something ? with open('z.txt', 'w') as f: ... f.write('abc') ... 3 OTOH, why shouldn't it return something? In this case, it returns the length of the string written. This value

Lazy-evaluation lists/dictionaries

2014-10-26 Thread Jon Ribbens
I have a need, in a Python C extension I am writing, for lists and dictionaries with lazy evaluation - by which I mean that at least some of the values in the lists/dictionaries are proxy objects which, rather than returning as themselves, should return the thing they are a proxy for when

Re: Status of side-effecting functions in python

2014-10-26 Thread Rustom Mody
On Sunday, October 26, 2014 7:11:43 PM UTC+5:30, Dan Sommers wrote: At one time, on a huge project, millions of lines of C and assembly code, we had a local guideline *not* to write void functions. The idea was to return something that might be useful later, even if it seemed unlikely now.

Finding my way around help

2014-10-26 Thread Rustom Mody
Context: I will be showing the way around to some experienced programmers new to python. Do help() Among other things I get: | Enter the name of any module, keyword, or topic to get help on writing | Python programs and using Python modules. To quit this help utility and | return to the

Re: Status of side-effecting functions in python

2014-10-26 Thread Marko Rauhamaa
wxjmfa...@gmail.com: Yes and no. If something goes wrong in a .write() method, is not Python supposed to raise an error? (!) We have multiple cases: 1. write succeeds with all of the given bytes 2. write succeeds with some but not all of the given bytes 3. write cannot at the moment

XML Patch

2014-10-26 Thread Nicholas Cole
Hi All, I'm looking for a python library that can parse XML Documents and create xml-aware diff files, and then use those to patch documents. In other words, I'd like something similar to the Google diff-match-patch tools, but something which is XML aware. I can see several projects on Pypi that

Re: XML Patch

2014-10-26 Thread Joel Goldstick
On Sun, Oct 26, 2014 at 1:00 PM, Nicholas Cole nicholas.c...@gmail.com wrote: Hi All, I'm looking for a python library that can parse XML Documents and create xml-aware diff files, and then use those to patch documents. In other words, I'd like something similar to the Google

Re: XML Patch

2014-10-26 Thread Stefan Behnel
Nicholas Cole schrieb am 26.10.2014 um 18:00: I'm looking for a python library that can parse XML Documents and create xml-aware diff files, and then use those to patch documents. In other words, I'd like something similar to the Google diff-match-patch tools, but something which is XML aware.

Re: Lazy-evaluation lists/dictionaries

2014-10-26 Thread Tim Delaney
On 27 October 2014 01:14, Jon Ribbens jon+use...@unequivocal.co.uk wrote: I have a need, in a Python C extension I am writing, for lists and dictionaries with lazy evaluation - by which I mean that at least some of the values in the lists/dictionaries are proxy objects which, rather than

Re: (-1)**1000

2014-10-26 Thread Ned Batchelder
On 10/26/14 4:07 PM, Tony the Tiger wrote: On Wed, 22 Oct 2014 10:27:34 +0200, ast wrote: If i am writing (-1)**1000 on a python program, will the interpreter do (-1)*(-1)*...*(-1) or something clever ? Even vs. odd. It ought to know. I would assume from a set of defined rules how math

Re: Test driven programming, was Re: VB to Python migration

2014-10-26 Thread Viorica Gheorghiu
-- https://mail.python.org/mailman/listinfo/python-list

Re: (test) ? a:b

2014-10-26 Thread Terry Reedy
On 10/26/2014 12:15 AM, Steven D'Aprano wrote: Ben Finney wrote: Steven D'Aprano steve+comp.lang.pyt...@pearwood.info writes: I suspect that Guido and the core developers disagree with you, since they had the opportunity to fix that in Python 3 and didn't. That doesn't follow; there are

Re: I am out of trial and error again Lists

2014-10-26 Thread Terry Reedy
On 10/26/2014 1:08 AM, Dennis Lee Bieber wrote: On Sat, 25 Oct 2014 18:48:59 -0400, Terry Reedy tjre...@udel.edu declaimed the following: C:\Users\Wulfraed\Documentspython3 You must have done something extra to make this work on Windows. Possibly hand-edited my system PATH -- I've

Re: Status of side-effecting functions in python

2014-10-26 Thread Roy Smith
In article 683c84d8-d916-4b63-b4b2-92cd2763e...@googlegroups.com, wxjmfa...@gmail.com wrote: Le dimanche 26 octobre 2014 14:41:43 UTC+1, Dan Sommers a écrit : On Sun, 26 Oct 2014 00:45:49 -0700, wxjmfauth wrote: Ditto for fileobj.write(). Why should it return something ? with

Re: Newbie suggestion: nice tutorial

2014-10-26 Thread Terry Reedy
On 10/26/2014 3:22 AM, Martin S wrote: So it was back to the internet - and this one seems pretty comprehensive and understandable: http://www.diveintopython3.net/ It doesn't cover the latest point version of Python (it's still Python 3), but I hope it doesn't matter much? I expect not. The

Re: Lazy-evaluation lists/dictionaries

2014-10-26 Thread Terry Reedy
On 10/26/2014 10:14 AM, Jon Ribbens wrote: I have a need, in a Python C extension I am writing, for lists and dictionaries with lazy evaluation - by which I mean that at least some of the values in the lists/dictionaries are proxy objects which, rather than returning as themselves, should return

id == vs is

2014-10-26 Thread Dan Stromberg
Are the following two expressions the same? x is y Id(x) == id(y) ? I ported some Java code to Python, and it was using Java's idea of equality (via ==) in some places. Right now, I have a suite of unit tests working using the second expression above, but I'm thinking about switching to the

Re: id == vs is

2014-10-26 Thread MRAB
On 2014-10-27 00:12, Dan Stromberg wrote: Are the following two expressions the same? x is y Id(x) == id(y) ? Yes. I ported some Java code to Python, and it was using Java's idea of equality (via ==) in some places. Right now, I have a suite of unit tests working using the second

Re: id == vs is

2014-10-26 Thread Joshua Landau
On 27 October 2014 00:12, Dan Stromberg drsali...@gmail.com wrote: Are the following two expressions the same? x is y Id(x) == id(y) Much of the time, but not all the time. The obvious exception is if id is redefined, but that one's kind of boring. The real thing to watch out for is if the

Re: id == vs is

2014-10-26 Thread Ethan Furman
On 10/26/2014 05:23 PM, Ethan Furman wrote: On 10/26/2014 05:12 PM, Dan Stromberg wrote: Are the following two expressions the same? x is y Id(x) == id(y) ? Listen to MRAB, ignore me. That is all. -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Re: id == vs is

2014-10-26 Thread Ethan Furman
On 10/26/2014 05:12 PM, Dan Stromberg wrote: Are the following two expressions the same? x is y Id(x) == id(y) ? Nope. If the value if `id(x)` is not interned, then the two value could be different objects that still represent the same value. -- ~Ethan~ --

Re: (test) ? a:b

2014-10-26 Thread Ben Finney
Steven D'Aprano steve+comp.lang.pyt...@pearwood.info writes: Do you really not see the connection between counting and summing? Connection? Of course. But I also see a huge distinction. I'm surprised you could misunderstand my position to the extent you think such a question needs to be asked.

Re: id == vs is

2014-10-26 Thread MRAB
On 2014-10-27 00:24, Ethan Furman wrote: On 10/26/2014 05:23 PM, Ethan Furman wrote: On 10/26/2014 05:12 PM, Dan Stromberg wrote: Are the following two expressions the same? x is y Id(x) == id(y) ? Listen to MRAB, ignore me. That is all. Well, apart of Joshua's qualifications, that is!

Re: id == vs is

2014-10-26 Thread Ben Finney
Dan Stromberg drsali...@gmail.com writes: Are the following two expressions the same? x is y Id(x) == id(y) It depends what you mean by “the same”. Do they give the same result? Sometimes yes, sometimes no. It depends on what the types of the values are. Do they express the same intent?

Re: (test) ? a:b

2014-10-26 Thread MRAB
On 2014-10-27 00:38, Ben Finney wrote: Steven D'Aprano steve+comp.lang.pyt...@pearwood.info writes: Do you really not see the connection between counting and summing? Connection? Of course. But I also see a huge distinction. I'm surprised you could misunderstand my position to the extent you

Re: id == vs is

2014-10-26 Thread Denis McMahon
On Sun, 26 Oct 2014 17:12:29 -0700, Dan Stromberg wrote: Are the following two expressions the same? x is y Id(x) == id(y) No, although if Id and id were the same function, they might be equivalent in some cases. -- Denis McMahon, denismfmcma...@gmail.com --

Re: (test) ? a:b

2014-10-26 Thread Joshua Landau
On 26 October 2014 01:03, Ben Finney ben+pyt...@benfinney.id.au wrote: Steven D'Aprano steve+comp.lang.pyt...@pearwood.info writes: I suspect that Guido and the core developers disagree with you, since they had the opportunity to fix that in Python 3 and didn't. That doesn't follow; there

Re: (test) ? a:b

2014-10-26 Thread Rustom Mody
On Sunday, October 26, 2014 9:45:22 AM UTC+5:30, Steven D'Aprano wrote: http://legacy.python.org/dev/peps/pep-0285/ snipped Ben Finney wrote: I agree with the decision, because this isn't an issue which often leads to *incorrect* code. But I maintain that it's an unfortunate and

Re: (test) ? a:b

2014-10-26 Thread Ben Finney
Joshua Landau jos...@landau.ws writes: Guido van Rossum answered Jul 28 '11 at 21:20, http://stackoverflow.com/questions/3174392/is-it-pythonic-to-use-bools-as-ints False==0 and True==1, and there's nothing wrong with that. Guido is incorrect. I've already stated what's wrong. That's

Classes and the command line

2014-10-26 Thread Seymore4Head
I am trying to learn classes. I am currently using Python 2.7 at the command line. If you try to type commands at the command line and make the slightest mistake you have to start over. I was trying to copy and paste these instructions into the command prompt.

Re: (test) ? a:b

2014-10-26 Thread Rustom Mody
On Monday, October 27, 2014 7:59:04 AM UTC+5:30, Ben Finney wrote: Joshua Landau writes: Guido van Rossum answered Jul 28 '11 at 21:20, http://stackoverflow.com/questions/3174392/is-it-pythonic-to-use-bools-as-ints False==0 and True==1, and there's nothing wrong with that. Guido is

Re: (test) ? a:b

2014-10-26 Thread Joshua Landau
On 27 October 2014 02:28, Ben Finney ben+pyt...@benfinney.id.au wrote: Joshua Landau jos...@landau.ws writes: Guido van Rossum answered Jul 28 '11 at 21:20, http://stackoverflow.com/questions/3174392/is-it-pythonic-to-use-bools-as-ints False==0 and True==1, and there's nothing wrong with

Re: (test) ? a:b

2014-10-26 Thread Ben Finney
Joshua Landau jos...@landau.ws writes: On 27 October 2014 02:28, Ben Finney ben+pyt...@benfinney.id.au wrote: Guido is incorrect. I've already stated what's wrong. You were arguing about what Guido thinks. I don't know where I did that; to my knowledge, this is the first time I've mentioned

Python tutorials

2014-10-26 Thread Seymore4Head
Python tutorials http://anandology.com/python-practice-book/object_oriented_programming.html This is a good onebut it gets too deep too fast. This is the best thing I have read so far to help me understand classes. What I would like to see is more examples of computing before starting on

Re: Classes and the command line

2014-10-26 Thread Ben Finney
Seymore4Head Seymore4Head@Hotmail.invalid writes: I am trying to learn classes. I am currently using Python 2.7 at the command line. (I think you mean “the interactive Python interpreter”, or just “the Python shell”.) Since you are learning Python, I will strongly recommend you ignore Python

Re: id == vs is

2014-10-26 Thread Cameron Simpson
On 27Oct2014 00:41, MRAB pyt...@mrabarnett.plus.com wrote: On 2014-10-27 00:24, Ethan Furman wrote: On 10/26/2014 05:23 PM, Ethan Furman wrote: On 10/26/2014 05:12 PM, Dan Stromberg wrote: Are the following two expressions the same? x is y Id(x) == id(y) ? Listen to MRAB, ignore me. That

Re: Classes and the command line

2014-10-26 Thread Rustom Mody
On Monday, October 27, 2014 8:00:04 AM UTC+5:30, Seymore4Head wrote: I am trying to learn classes. I am currently using Python 2.7 at the command line. Why not idle? And if in general you are at python 3, why 2.7 here? There are enough factor to learn ( and get confused)! Please dont add new

Re: Classes and the command line

2014-10-26 Thread Chris Angelico
On Mon, Oct 27, 2014 at 2:06 PM, Ben Finney ben+pyt...@benfinney.id.au wrote: Right. There is line-by-line history, and editing enabled with the “readline” plug-in. (This is an advantage of using a programmer-friendly operating system, which MS Windows sadly is not.) You can get block-by-block

Re: id == vs is

2014-10-26 Thread Ben Finney
Ben Finney ben+pyt...@benfinney.id.au writes: Dan Stromberg drsali...@gmail.com writes: Are the following two expressions the same? […] It depends what you mean by “the same”. My apologies, I mis-read the question. My answers were for a different question (one you didn't ask). Please ignore

Re: Classes and the command line

2014-10-26 Thread Rustom Mody
On Monday, October 27, 2014 8:40:48 AM UTC+5:30, Chris Angelico wrote: On Mon, Oct 27, 2014 at 2:06 PM, Ben Finney wrote: Right. There is line-by-line history, and editing enabled with the readline plug-in. (This is an advantage of using a programmer-friendly operating system, which MS

Re: Classes and the command line

2014-10-26 Thread Chris Angelico
On Mon, Oct 27, 2014 at 2:18 PM, Rustom Mody rustompm...@gmail.com wrote: On Monday, October 27, 2014 8:40:48 AM UTC+5:30, Chris Angelico wrote: On Mon, Oct 27, 2014 at 2:06 PM, Ben Finney wrote: Right. There is line-by-line history, and editing enabled with the readline plug-in. (This is

Re: Classes and the command line

2014-10-26 Thread Rustom Mody
On Monday, October 27, 2014 8:48:52 AM UTC+5:30, Rustom Mody wrote: On Monday, October 27, 2014 8:40:48 AM UTC+5:30, Chris Angelico wrote: On Mon, Oct 27, 2014 at 2:06 PM, Ben Finney wrote: Right. There is line-by-line history, and editing enabled with the readline plug-in. (This is an

Re: Classes and the command line

2014-10-26 Thread Seymore4Head
Your message showed up as unavailable on my server I have to cut and paste Google Groups to reply. (I am going to change news servers probably tomorrow to try to fix that) So the quoting is going to be bad. Why not idle? And if in general you are at python 3, why 2.7 here? There are enough

Re: Classes and the command line

2014-10-26 Thread Seymore4Head
On Mon, 27 Oct 2014 14:06:11 +1100, Ben Finney ben+pyt...@benfinney.id.au wrote: Seymore4Head Seymore4Head@Hotmail.invalid writes: I am trying to learn classes. I am currently using Python 2.7 at the command line. (I think you mean “the interactive Python interpreter”, or just “the Python

Re: Classes and the command line

2014-10-26 Thread Seymore4Head
On Mon, 27 Oct 2014 14:10:01 +1100, Chris Angelico ros...@gmail.com wrote: On Mon, Oct 27, 2014 at 2:06 PM, Ben Finney ben+pyt...@benfinney.id.au wrote: Right. There is line-by-line history, and editing enabled with the “readline” plug-in. (This is an advantage of using a programmer-friendly

Python Fabric on Windows :

2014-10-26 Thread Ganesh Pal
Hi Team , Iam new to Fabric and Iam using the fab command-line tool to run a set of task on Linux clients. I just started coding and Iam pretty new to fabric, Iam hoping I will be able to launch my fabric scripts from both Windows and Linux Machine . Installing Cygwin might help in

Re: 403 forbidden error

2014-10-26 Thread Diya Rai
On Wednesday, October 22, 2014 5:07:00 PM UTC+5:30, Diya Rai wrote: Hai, Could anyone please help me to resolve 403 forbidden error while logging into an application. Following is the error details: Traceback (most recent call last): File ./example6.py, line 18, in module

Re: 403 forbidden error

2014-10-26 Thread Chris Angelico
On Mon, Oct 27, 2014 at 4:12 PM, Diya Rai diyar...@gmail.com wrote: This is the part of the code which im trying to execute. We are trying to load test a web application through python script, currently checking the login part. Does it work when you log in using a web browser? If so, grab a

[issue22650] set up and use VM for net access in the test suite

2014-10-26 Thread Georg Brandl
Georg Brandl added the comment: OK, a hopefully complete overview of the network-using tests and the services they use, checked by tracing connect() calls during a test run: * test_codecencodings_*, test_normalization, test_ucn: some Unicode-related data files from unicode.org:80

[issue22724] byte-compile fails for cross-builds

2014-10-26 Thread Roumen Petrov
Changes by Roumen Petrov bugtr...@roumenpetrov.info: -- nosy: +rpetrov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22724 ___ ___

[issue13319] IDLE: Menu accelerator conflict between Format and Options

2014-10-26 Thread Ned Deily
Ned Deily added the comment: I believe it is the case that none of these proposed changes would have any effect on Aqua (native, non-X11) OS X Tk variants (Cocoa or Carbon). Unlike on Windows and X11, standard OS X menus in conforming GUI apps do not have underline letter shortcuts. (OS X

[issue22724] byte-compile fails for cross-builds

2014-10-26 Thread Stefan Krah
Changes by Stefan Krah stefan-use...@bytereef.org: -- nosy: +doko ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22724 ___ ___ Python-bugs-list

[issue22674] strsignal() missing from signal module

2014-10-26 Thread Vajrasky Kok
Vajrasky Kok added the comment: Here is the preliminary patch. It's a thin wrapper of strsignal. Some issues and things: 1. About Benjamin Peterson's request, what is the name of the dictionary supposed to be? Is everyone okay with Benjamin's suggestion? 2. About George Brandl's question: Is

[issue16561] bdist_wininst installers don't use UAC, then crash

2014-10-26 Thread Christian Boos
Christian Boos added the comment: `--user-access-control auto` doesn't work for me... With Python 2.7.8 installed ''for all'' in C:/Program Files (x86)/Python27, an installer built with `bdist_wininst --user-access-control auto` will *not* ask for permission elevation and will crash as

[issue22728] Deprecate spurious benchmarks

2014-10-26 Thread Brett Cannon
Brett Cannon added the comment: LGTM -- assignee: - pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22728 ___ ___ Python-bugs-list mailing

[issue19980] Improve help('non-topic') response

2014-10-26 Thread Mark Lawrence
Mark Lawrence added the comment: ping. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19980 ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue16561] bdist_wininst installers don't use UAC, then crash

2014-10-26 Thread Christian Boos
Christian Boos added the comment: The reason of the crash is pretty trivial, there's no check for success of the creation of the installation logfile. Trapping this and aborting (with a hint to use Run as administrator) would be enough to fix the issue, I think. -- keywords: +patch

[issue19980] Improve help('non-topic') response

2014-10-26 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19980 ___ ___

[issue13719] bdist_msi upload fails

2014-10-26 Thread Kieran Colford
Changes by Kieran Colford colfo...@gmail.com: -- nosy: +Kieran.Colford ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13719 ___ ___

[issue20069] Add unit test for os.chown

2014-10-26 Thread R. David Murray
R. David Murray added the comment: Added a couple review comments on possible further improvements. -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20069 ___

[issue22730] ensurepip should work with pythonw.exe

2014-10-26 Thread Steve Dower
New submission from Steve Dower: I'd like to be able to run ensurepip in the 3.5 installer with pythonw.exe, to avoid having the console window appear. Unfortunately, pip requires a valid value for sys.__stdout__. This patch adds a dummy value for __stdout__ that allows pip to be

[issue22730] ensurepip should work with pythonw.exe

2014-10-26 Thread Donald Stufft
Donald Stufft added the comment: This looks OK to me. I'm not a Windows person are there changes in pip that would make sense to make it work without this patch? -- nosy: +Marcus.Smith, pmoore ___ Python tracker rep...@bugs.python.org

[issue22731] test_capi test fails because of mismatched newlines

2014-10-26 Thread Steve Dower
New submission from Steve Dower: The test_capi.test_forced_io_encoding test currently requires that newlines match when checking the results. This apparently does not occur with VC10 builds, but does appear with newer versions of the compiler. This patch normalises the line endings in the

[issue22732] ctypes tests don't set correct restype for intptr_t functions

2014-10-26 Thread Steve Dower
New submission from Steve Dower: The test_pass_pointer and test_int_pointer_arg tests are inconsistent between 32-bit and 64-bit builds because c_long is always 32 bits but the function being called may return a 64-bit value (it's a pointer, so c_long may truncate it). I'd prefer to have a

[issue22733] MSVC ffi_prep_args doesn't handle 64-bit arguments properly

2014-10-26 Thread Steve Dower
New submission from Steve Dower: The ffi_prep_args function in libffi_msvc/ffi.c needs the attached patch to handle 64-bit parameters with the correct padding. Without this patch, garbage may appear in the top part of 64-bit arguments as the values are not zeroed out by the memcpy. I'm not

[issue22734] marshal needs a lower stack depth for debug builds on Windows

2014-10-26 Thread Steve Dower
New submission from Steve Dower: This patch decreases the stack depth limit for Windows debug builds to prevent the recursion test from failing. (Apparently VC14 uses more stack space for each frame than VC10, but the release build is unaffected.) Not sure who the correct nosy for marshal is,

[issue22731] test_capi test fails because of mismatched newlines

2014-10-26 Thread R. David Murray
R. David Murray added the comment: I don't understand why this patch is necessary. The test already joins the expected output with os.linesep (and doesn't test against err, that's just for verbose informational purposes). Are you saying that the generated output is not using os.linesep? In

[issue22256] pyvenv should display a progress indicator while creating an environment

2014-10-26 Thread Steve Dower
Steve Dower added the comment: virtualenv is definitely chattier - it prints out the path where the env will be and when it is installing setuptools and pip. That's all that's really needed here too, IMHO - just enough to let users know that venv has heard them and is doing something (not

[issue22730] ensurepip should work with pythonw.exe

2014-10-26 Thread Steve Dower
Steve Dower added the comment: I think the only thing pip could do is to stop using print(), which is not a reasonable request. It may be reasonable to change pythonw to use dummy IO streams by default, but that may cause programs to print() messages expecting the user to see them. It's also

[issue22730] ensurepip should work with pythonw.exe

2014-10-26 Thread Donald Stufft
Donald Stufft added the comment: The development version of pip switches things over to using the Python logging framework instead of a homegrown one which more or less relies on print(). Probably we could detect if we don't have a stdout and just not output anything? People can pass a

[issue22731] test_capi test fails because of mismatched newlines

2014-10-26 Thread Steve Dower
Steve Dower added the comment: The generated output is using os.linesep, but the result from run_embedded_interpreter() is not. I assume there's a difference (fix) in MSVCRT between VC10 and VC12 (maybe VC11 - didn't test) that causes '\n' to flow through Popen.communicate() where it

[issue22730] ensurepip should work with pythonw.exe

2014-10-26 Thread Steve Dower
Steve Dower added the comment: That change sounds like it'll be enough, and I'd be surprised if the logging module doesn't already handle the case with no streams. (Aside: it'd be nice for ensurepip to have a log file parameter that can be passed through.) I'll hold off on merging this in

[issue22735] Fix various crashes exposed through mro() customization

2014-10-26 Thread Eldar Abusalimov
New submission from Eldar Abusalimov: The attached patch fixes several bugs revealed by providing a custom mro(). Most of these bugs are reentrancy issues (mainly, cls.__bases__ assignment within mro() which causes incorrect refcounting), but there are also some issues when using incomplete

[issue22735] Fix various crashes exposed through mro() customization

2014-10-26 Thread Eldar Abusalimov
Changes by Eldar Abusalimov eldar.abusali...@gmail.com: Added file: http://bugs.python.org/file37026/0001-minor-test_mro-test-case-stub-and-helpers.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22735

[issue22735] Fix various crashes exposed through mro() customization

2014-10-26 Thread Eldar Abusalimov
Changes by Eldar Abusalimov eldar.abusali...@gmail.com: Added file: http://bugs.python.org/file37029/0004-minor-type_set_bases-move-undoing-logic-to-the-end.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22735

[issue22735] Fix various crashes exposed through mro() customization

2014-10-26 Thread Eldar Abusalimov
Changes by Eldar Abusalimov eldar.abusali...@gmail.com: Added file: http://bugs.python.org/file37027/0002-test-crashers-NULL-old_mro-and-over-decref-on-reent.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22735

[issue22735] Fix various crashes exposed through mro() customization

2014-10-26 Thread Eldar Abusalimov
Changes by Eldar Abusalimov eldar.abusali...@gmail.com: Added file: http://bugs.python.org/file37030/0005-minor-type_set_bases-extract-add_all_subclasses.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22735

[issue22735] Fix various crashes exposed through mro() customization

2014-10-26 Thread Eldar Abusalimov
Changes by Eldar Abusalimov eldar.abusali...@gmail.com: Added file: http://bugs.python.org/file37028/0003-minor-mro_internal-extract-mro_invoke-and-mro_check.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22735

[issue22735] Fix various crashes exposed through mro() customization

2014-10-26 Thread Eldar Abusalimov
Changes by Eldar Abusalimov eldar.abusali...@gmail.com: Added file: http://bugs.python.org/file37031/0006-minor-mro_subclasses-loop-over-a-list-of-subclasses.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22735

[issue22735] Fix various crashes exposed through mro() customization

2014-10-26 Thread Eldar Abusalimov
Eldar Abusalimov added the comment: This is a patch with most significant changes, please review it carefully. -- Added file: http://bugs.python.org/file37032/0007-fix-handle-tp_mro-overwritten-through-reentrancy.patch ___ Python tracker

[issue22735] Fix various crashes exposed through mro() customization

2014-10-26 Thread Eldar Abusalimov
Changes by Eldar Abusalimov eldar.abusali...@gmail.com: Added file: http://bugs.python.org/file37033/0008-test-crashers-tp_base-tp_subclasses-inherit-cycles.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22735

[issue22735] Fix various crashes exposed through mro() customization

2014-10-26 Thread Eldar Abusalimov
Changes by Eldar Abusalimov eldar.abusali...@gmail.com: Added file: http://bugs.python.org/file37034/0009-minor-PyType_IsSubtype-extract-a-check-using-tp_base.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22735

[issue22735] Fix various crashes exposed through mro() customization

2014-10-26 Thread Eldar Abusalimov
Changes by Eldar Abusalimov eldar.abusali...@gmail.com: Added file: http://bugs.python.org/file37035/0010-fix-type_set_bases-inherit-cycles-and-reent-checks.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22735

[issue22735] Fix various crashes exposed through mro() customization

2014-10-26 Thread Eldar Abusalimov
Changes by Eldar Abusalimov eldar.abusali...@gmail.com: Added file: http://bugs.python.org/file37037/0012-minor-mro_implementation-pmerge-refactory.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22735

[issue22735] Fix various crashes exposed through mro() customization

2014-10-26 Thread Eldar Abusalimov
Changes by Eldar Abusalimov eldar.abusali...@gmail.com: Added file: http://bugs.python.org/file37038/0013-fix-mro_implementation-check-base-tp_mro-is-not-NULL.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22735

[issue22735] Fix various crashes exposed through mro() customization

2014-10-26 Thread Eldar Abusalimov
Changes by Eldar Abusalimov eldar.abusali...@gmail.com: Added file: http://bugs.python.org/file37036/0011-test-behavior-error-on-extending-an-incomplete-type.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22735

[issue22735] Fix various crashes exposed through mro() customization

2014-10-26 Thread Eldar Abusalimov
Changes by Eldar Abusalimov eldar.abusali...@gmail.com: Added file: http://bugs.python.org/file37039/0014-test-crasher-attr-lookup-on-super-with-uninitialized.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22735

[issue22735] Fix various crashes exposed through mro() customization

2014-10-26 Thread Eldar Abusalimov
Changes by Eldar Abusalimov eldar.abusali...@gmail.com: Added file: http://bugs.python.org/file37040/0015-fix-super_getattro-check-type-tp_mro-and-refactory.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22735

[issue22735] Fix various crashes exposed through mro() customization

2014-10-26 Thread Eldar Abusalimov
Eldar Abusalimov added the comment: Just in case, the previous message about reviewing is about [PATCH 07/15] (fix) handle tp_mro overwritten through reentrancy -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22735

[issue22730] ensurepip should work with pythonw.exe

2014-10-26 Thread Paul Moore
Paul Moore added the comment: This looks reasonable to me. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22730 ___ ___ Python-bugs-list mailing

[issue22730] ensurepip should work with pythonw.exe

2014-10-26 Thread Paul Moore
Paul Moore added the comment: Wait, sorry I misread the discussion (long day here). If we can do this in pip yes that would be better. It looks like we can detect when we're being run via pythonw by checking if sys.stdout is None. -- ___ Python

  1   2   >