Re: Comparisons and sorting of a numeric class....
Ian Kelly wrote: Wait, are you actually asking why bool is a doubleton? If nobody has answered that, I think probably nobody understood you were asking it, because it shouldn't need to be explained. What does perhaps need explaining is why Python goes out of its way to *enforce* the doubleton-ness of bool. I don't know all of Guido's reasoning on this, but part of it is probably to do with implementation efficiencies. There are several places in the CPython source where it's assumed that, if an object is known to be of type bool, then its truth or falseness can be determined with a pointer comparison. -- Greg -- https://mail.python.org/mailman/listinfo/python-list
Re: List of python -m tools
Thanks for all the answers! -- https://mail.python.org/mailman/listinfo/python-list
EuroPython 2015: Your chance to sign up as a launch sponsor
Companies who would like to sign up as a EuroPython 2015 launch sponsor are encouraged to contact the sponsor work group at: sponsor...@europython.eu Launch sponsors will get the additional benefit of being listed on the website when we launch - for free. You just need to be quick, since the launch is planned for early in February. More Booths and more Sponsor Slots -- The Euskalduna Conference Center and Concert Hall (ECC) venue in Bilbao was chosen as conference venue for EuroPython 2015: http://www.euskalduna.net/Index.asp?idioma=en It offers plenty of room for sponsor booths, so we will try to make EuroPython 2015 as effective as possible for you as sponsors by offering more booth space and sponsor slots than ever before: http://www.euskalduna.net/espacios/espacios_hall_exposiciones.asp This is your chance to reach out to more than a thousand enthusiastic and highly motivated EuroPython attendees ! Please email us at sponsor...@europython.eu and we’ll send you the sponsor brochure. Thanks, — EuroPython Society (EPS) http://www.europython-society.org/ PS: Please help spread the word and forward this email to companies you know, your local lists, user groups, etc. Many thanks ! -- https://mail.python.org/mailman/listinfo/python-list
Re: Comparisons and sorting of a numeric class....
Andrew Robinson wrote: I never said subclassing bool is the 'only' solution; I have indicated it's a far better solution than many. An assertion with which we very much disagree. I have spent well over twenty years on and off dealing with boolean values that are very often mixed indistinguishably with 'don't care' or 'tri-state' or 'metastable states'. I think you're overestimating how useful it will be to pass one of your extended boolean values to existing code expecting a plain boolean. The purpose of the bool type in Python and other languages is for making control-flow decisions. When you hit if x: do_something() else: do_something_else() and x is Undefined or TriState or 47% true, what is supposed to happen? The right thing to do will depend on the circumstances, so you're going to need custom code for dealing with those values. I'm not even sure it's right to single out two of the extended values as corresponding to True and False in all cases. It may seem obvious that the high state of a digital logic signal should be True and the low state should be False, but -- what about active-low signals? They use the opposite convention! Then I look at python development historically and look at the built in class's return values for compares; and I notice; they have over time become more and more tied to the 'type' bool. Actually, it's the opposite. Originally, all the comparison operators got funneled through a single special method __cmp__, which was required to return a negative, zero or positive integer; hard-coded logic in the interpreter then derived a boolean from that. When rich comparisons were introduced (i.e. the ability to override all the comparison operators individually), that restriction was lifted. I expect sometime in the future that python may implement an actual type check on all comparison operators so they can not be used to return anything but a bool. That's not going to happen. If nothing else, it would break NumPy, which compares arrays element-by-element and returns an array of booleans. I already noticed a type check on the return value of len() so that I can't return infinity, even when a method clearly is returning an infinitely long iterator That's acknowledged as being less than desirable, but fixing it would have performance implications, as well as breaking the C extension API. It's not really much of a limitation, anyway. Iterators don't actually have a __len__; they can optionally have a __length_hint__ method, but infinite iterators can just leave that undefined. That suggests to me that there is significant risk in python of having type checking on all __xx__ methods in the future. You need have no fear of that. The trend has actually been towards *less* restrictions on return types, and I can't imagine that changing. - use delegation to proxy True and False; That sounds like a far more likely to succeed alternative, and is one of a handful of alternatives I have been exploring on my own. A proxy is still a different type. Whether you use a proxy or a completely new type for this is entirely a matter of implementation convenience. You won't magically gain any capabilities that you couldn't have implemented otherwise. python may not be able to do it totally from the python side because there is a difference in how Python handles type() checks and isinstance() checks. There's no way I know of to make type() lie about the true type of an object, proxy or not. But that would only be a problem for code relying on type(x) is bool, which I expect to be extremely rare if it exists at all. Though I DO want to point out that Charles Bool did not invent the computer, That's correct, because he didn't exist. :-) Boolean algebra is named after George Boole. You're probably thinking of Charles Babbage, who design (although never fully implemented) what could be regarded as the first general purpose programmable computer. Name recognition is great for honoring a man -- but makes for a poor reason to choose a strict implementation of bool. This is utter nonsense. The strict implementation of bool you speak of isn't chosen to honour George Boole. It's chosen because it's perfectly suited for its intended application of flow-control in programming -- which is the vast majority of the use of logic *above* the hardware level. And since it happens to be a true Boolean algebra, the name is entirely appropriate. And those truth tables are not part of Boolean algebra. Oh wow I never expected to hear that -- But I guess you were never trained to do boolean algebra, formally ? A Boolean algebra is a mathematical structure with a precise definition. There exist Boolean algebras with more than two values, but the don't-care states found in data sheets don't fit into any of them. The data sheets call them truth tables, not Boolean algebra tables. :-) The truth tables on data sheets are VERY VERY much intended
Re: lambdak: multi-line lambda implementation in native Python
Dennis Lee Bieber wrote: On Fri, 16 Jan 2015 01:50:00 +1100, Chris Angelico ros...@gmail.com declaimed the following: Problem: You have a smartphone with a 4x4 pixel screen. BIG problem, considering that a late 70s DECWriter needed 5x7 pixels for glyphs in an 8x10 pixel character cell {as I recall...} If those are 24-bit RGB pixels, you could encode 3 characters in each pixel. You'd need eyes with rather good colour perception to read it, though. -- Greg -- https://mail.python.org/mailman/listinfo/python-list
Re: Comparisons and sorting of a numeric class....
On Friday, January 16, 2015 at 7:20:13 AM UTC+5:30, Andrew Robinson wrote: snipped 542 lines Disclaimers 1. Ive not really read the above 542 lines and earlier 2. I am not a fan of OOP Still some thoughts... Electrical engineering (EE) and computer science (CS) may seem related but are quite different disciplines. In fact there is some amount of 'client-supplier' in this relation - you folks make the machines we use. Now one of the basic things that needs to be effected to make this transition is the so-called digital abstraction To start with we say (say) that 0V is 0-logic, 3.3V is 1-logic. But that's hardly enough, we need margins, forbidden regions, Postel's law etc. This mapping is hardly straightforward. And that is still the 'static-discipline'. When time comes in we need to deal with the fact that when a gate switches it will willy-nilly go through the forbidden region. From here we have to go through/into clock disciplines, delay insensitie circuits etc. Should CS-ists deal with all this?? If you say yes then what are you EE-guys doing? If no then you are agreeing with all the others here. In some more detail: You seem to want a multi-valued logic. How many values? There are quite a few answers: - 4 -- {0,1,Z,X} - http://en.wikipedia.org/wiki/Four-valued_logic - 9 -- above + weak drives http://en.wikipedia.org/wiki/IEEE_1164 And probably half a dozen others. You say you REALLY NEED these in your work. Yes, many people need many things, eg. 1. Mars orbiter was lost due to a mismatch of MKS and FPS systems http://edition.cnn.com/TECH/space/9909/30/mars.metric.02/ Does that make a case for building in units into programming languages? 2. C.A.R Hoare said the invention of the null-pointer was a billion-dollar mistake. Do C programmers agree with him? 3. He also considered exception handling as a terrible disaster since it confuses flow of control. Are python (or most modern language) users likely to agree? All these are instances of a basic principle that Niklaus Wirth enunciated: The most important decision of a language designer are what to leave out of the language. Finally in python 3.4 onwards there are enums. You can do this from enum import IntEnum class Bool4(IntEnum): ... F=0 ... T=1 ... Z=2 ... X=3 -- https://mail.python.org/mailman/listinfo/python-list
Re: lambdak: multi-line lambda implementation in native Python
Gregory Ewing greg.ew...@canterbury.ac.nz: Dennis Lee Bieber wrote: On Fri, 16 Jan 2015 01:50:00 +1100, Chris Angelico ros...@gmail.com declaimed the following: Problem: You have a smartphone with a 4x4 pixel screen. BIG problem, considering that a late 70s DECWriter needed 5x7 pixels for glyphs in an 8x10 pixel character cell {as I recall...} If those are 24-bit RGB pixels, you could encode 3 characters in each pixel. Not since Python3. Characters are Unicode now so you'll need to dedicate a pixel for each character. Marko -- https://mail.python.org/mailman/listinfo/python-list
How to wow someone new to Python
Scenario: You're introducing someone to Python for the first time. S/he may have some previous programming experience, or may be new to the whole idea of giving a computer instructions. You have a couple of minutes to show off how awesome Python is. What do you do? I was thinking along the lines of a simple demo in the REPL, showing off some of Python's coolest features. But then I got stuck on the specifics. What are Python's best coolnesses? What makes for a good demo? Ideally, this should be something that can be demo'd quickly and easily, and it should be impressive without going into great details of and see, this is how it works on the inside. So, how would you brag about this language? ChrisA -- https://mail.python.org/mailman/listinfo/python-list
Re: How to wow someone new to Python
If you want to show off the REPL, I'd got for iPython and show them some simple matplotlib examples (plotting sin waves, maybe dig up a CSV file on the net with some data your friend is familiar with, etc) Skip On Fri, Jan 16, 2015 at 9:03 AM, Chris Angelico ros...@gmail.com wrote: Scenario: You're introducing someone to Python for the first time. S/he may have some previous programming experience, or may be new to the whole idea of giving a computer instructions. You have a couple of minutes to show off how awesome Python is. What do you do? I was thinking along the lines of a simple demo in the REPL, showing off some of Python's coolest features. But then I got stuck on the specifics. What are Python's best coolnesses? What makes for a good demo? Ideally, this should be something that can be demo'd quickly and easily, and it should be impressive without going into great details of and see, this is how it works on the inside. So, how would you brag about this language? ChrisA -- https://mail.python.org/mailman/listinfo/python-list -- https://mail.python.org/mailman/listinfo/python-list
Re: How to wow someone new to Python
On 2015.01.16 09:03, Chris Angelico wrote: Scenario: You're introducing someone to Python for the first time. S/he may have some previous programming experience, or may be new to the whole idea of giving a computer instructions. You have a couple of minutes to show off how awesome Python is. What do you do? I was thinking along the lines of a simple demo in the REPL, showing off some of Python's coolest features. But then I got stuck on the specifics. What are Python's best coolnesses? What makes for a good demo? Ideally, this should be something that can be demo'd quickly and easily, and it should be impressive without going into great details of and see, this is how it works on the inside. So, how would you brag about this language? If the person is already familiar with programming, you could show off how Python doesn't do a best effort guess at what to do when you make a mistake (explicit is better than implicit). Many other languages will, for example, make an undefined variable into a variable defined as an empty string or allow silly things like 5 + cheese, whereas Python will let you know that you made a mistake somewhere instead of letting garbage propagate. This behavior can be frustrating for newbies to Python, but with someone there to explain why it works that way, they can learn to appreciate it instead of giving up in anger after Python keeps throwing exceptions at them. If the person is not familiar with programming, show them how easy it is to get something useful written quickly, even with only the stdlib. Low-level details are handled so that you can focus on what you want the program to do, and there is a ton of stuff in the stdlib so that it's likely you don't need to go searching for a bunch of different libraries so that again, you can focus what you want the program to do. For this, chances are, that person has some things in mind already that are not difficult to get started with using Python. Also, using the REPL for this makes it an even better demo. You can probably have the basic functionality of whatever cool thing they want right there in the REPL. -- https://mail.python.org/mailman/listinfo/python-list
Re: How to wow someone new to Python
Chris Angelico ros...@gmail.com: Scenario: You're introducing someone to Python for the first time. S/he may have some previous programming experience, or may be new to the whole idea of giving a computer instructions. You have a couple of minutes to show off how awesome Python is. What do you do? My experience is that if you have your customer try their hand on programming and complete a simple challenge, they'll be extremely impressed. Did I manage that? On the other hand, if you want to demo your greatest achievements at the screen, they will be left unmoved. Even my favorite Zynga game looks cooler than that. I was thinking along the lines of a simple demo in the REPL, showing off some of Python's coolest features. But then I got stuck on the specifics. What are Python's best coolnesses? What makes for a good demo? I would advise steering clear of the REPL and go directly to writing a program and executing it. Maybe the classic ASCII graphics presentation of the sine wave: #!/usr/bin/env python3 import time import math def main(): for angle in range(0, 10, 5): print(int((1 + math.sin(math.radians(angle))) * 35) * *) time.sleep(0.1) if __name__ == __main__: main() Ideally, this should be something that can be demo'd quickly and easily, and it should be impressive without going into great details of and see, this is how it works on the inside. So, how would you brag about this language? I'd recommend not skipping the traditional boilerplate (see my example). Be professional from the start. Marko -- https://mail.python.org/mailman/listinfo/python-list
Re: lambdak: multi-line lambda implementation in native Python
On 01/15/2015 10:29 PM, Ian Kelly wrote: On Thu, Jan 15, 2015 at 9:00 PM, Chris Angelico ros...@gmail.com wrote: My first response was going to be Well, you can always add another layer of indirection to try to solve your problem, but then I went and looked up builders on Wikipedia. Now I'm confused. What can you do with a builder that you can't do with a constructor? In Java you have to write a separate constructor for every conceivable combination of arguments. If there are a lot of optional arguments, that's an exponentially large number of constructors. The builder pattern provides a solution to that problem. In Python you just have one initializer with defaults for the optional arguments, so it's not an issue. Which seems to confirm my understanding that these patterns are in large part a response to limitations in the language, which certainly doesn't engender a fondness for the Java. -- https://mail.python.org/mailman/listinfo/python-list
Re: How to wow someone new to Python
On 16/01/2015 16:03, Chris Angelico wrote: Scenario: You're introducing someone to Python for the first time. S/he may have some previous programming experience, or may be new to the whole idea of giving a computer instructions. You have a couple of minutes to show off how awesome Python is. What do you do? The batteries included: some useful and simple examples with only core data type objects, built-in functions and standard library -- Marco Buttu INAF-Osservatorio Astronomico di Cagliari Via della Scienza n. 5, 09047 Selargius (CA) Phone: 070 711 80 217 Email: mbu...@oa-cagliari.inaf.it -- https://mail.python.org/mailman/listinfo/python-list
Re: How to wow someone new to Python
On Friday, January 16, 2015 at 8:34:20 PM UTC+5:30, Chris Angelico wrote: Scenario: You're introducing someone to Python for the first time. S/he may have some previous programming experience, or may be new to the whole idea of giving a computer instructions. You have a couple of minutes to show off how awesome Python is. What do you do? There is this story -- maybe apocryphal -- that the tendency to vote democratic or republican runs so deep it can be detected from genetic markers. Similar things apply to programming: Some people are drawn to a mathematical style; some are not Some people love cute little scripts; some are left cold Some love graphics; some dislike etc etc All corollary to: Some people can think like programmers; most cant [Who does the last quote? Steve Jobs?] So to start with, you need to 'fingerprint' (is that the word?) your subject. I was thinking along the lines of a simple demo in the REPL, showing off some of Python's coolest features. But then I got stuck on the specifics. What are Python's best coolnesses? What makes for a good demo? The reason I find the REPL particularly cool for such demos [I am surprised that Marko doesn't] is that at least to some extent you can straddle some of the divides above. How about a little web-scrape with beautiful-soup? Followed by maybe a throw the results into a csv-file and open in the local spreadsheet? -- https://mail.python.org/mailman/listinfo/python-list
Re: How to wow someone new to Python
On 01/16/2015 08:33 PM, Chris Angelico wrote: Scenario: You're introducing someone to Python for the first time. S/he may have some previous programming experience, or may be new to the whole idea of giving a computer instructions. You have a couple of minutes to show off how awesome Python is. What do you do? I was thinking along the lines of a simple demo in the REPL, showing off some of Python's coolest features. But then I got stuck on the specifics. What are Python's best coolnesses? What makes for a good demo? Ideally, this should be something that can be demo'd quickly and easily, and it should be impressive without going into great details of and see, this is how it works on the inside. So, how would you brag about this language? ChrisA hello, I am a newbie to python, I have dwelled in c,qt none in java. php a lot, though I don't make money with any of those. The best thing I find is python is very easy, the best part maybe because of my inexperience with other languages are the List and Dict data types that just solved problems I had in real life made solvable with python very easily. when I had to worry about memory and pointers to memory in those other languages, python just made me focus on the solution I want. also the way I can read python program just like they are written in plain eglish :) a personal problem I tried to solve is that how many characters exist in a sequence statistically (with 2 or more characters in len) in any given file and then their count. For a 100kb file I used practially all programming knowledge in from the other languages but failed miserably as the computation were taking more time with each bigger chunck of file. I would have to do a lot of memery management with python using those style like deleting list and dict before adding another. but when I tried to solve the problem natively with python it just took a blink of an eye for them to solve upto 50kb file. but for larger files although instant it is just memory consuming since I was limit with 2 gb I ddin't poke further. this was my exp and I find programming fun in python like ironman talking to jarvis keep computing!!! GCM -- https://mail.python.org/mailman/listinfo/python-list
Re: How to wow someone new to Python
On Fri, Jan 16, 2015 4:24 PM CET Andrew Berg wrote: On 2015.01.16 09:03, Chris Angelico wrote: Scenario: You're introducing someone to Python for the first time. S/he may have some previous programming experience, or may be new to the whole idea of giving a computer instructions. You have a couple of minutes to show off how awesome Python is. What do you do? I was thinking along the lines of a simple demo in the REPL, showing off some of Python's coolest features. But then I got stuck on the specifics. What are Python's best coolnesses? What makes for a good demo? Ideally, this should be something that can be demo'd quickly and easily, and it should be impressive without going into great details of and see, this is how it works on the inside. So, how would you brag about this language? If the person is already familiar with programming, you could show off how Python doesn't do a best effort guess at what to do when you make a mistake (explicit is better than implicit). Many other languages will, for example, make an undefined variable into a variable defined as an empty string or allow silly things like 5 + cheese, whereas Python will let you know that you made a mistake somewhere instead of letting garbage propagate. This behavior can be frustrating for newbies to Python, but with someone there to explain why it works that way, they can learn to appreciate it instead of giving up in anger after Python keeps throwing exceptions at them. If the person is not familiar with programming, show them how easy it is to get something useful written quickly, even with only the stdlib Completely agree! Find out that person's itch and make a scratch.py that shows how problem-oriented the language is, with code that somewhat reads like regular English. REPL will also work, if you prepare it well enough. Ipython Notebook! Low-level details are handled so that you can focus on what you want the program to do, and there is a ton of stuff in the stdlib so that it's likely you don't need to go searching for a bunch of different libraries so that again, you can focus what you want the program to do. For this, chances are, that person has some things in mind already that are not difficult to get started with using Python. Also, using the REPL for this makes it an even better demo. You can probably have the basic functionality of whatever cool thing they want right there in the REPL. -- https://mail.python.org/mailman/listinfo/python-list -- https://mail.python.org/mailman/listinfo/python-list
Re: How to wow someone new to Python
On Friday, January 16, 2015 at 10:51:52 PM UTC+5:30, Mirage Web Studio wrote: On 01/16/2015 08:33 PM, Chris Angelico wrote: Scenario: You're introducing someone to Python for the first time. S/he may have some previous programming experience, or may be new to the whole idea of giving a computer instructions. You have a couple of minutes to show off how awesome Python is. What do you do? I was thinking along the lines of a simple demo in the REPL, showing off some of Python's coolest features. But then I got stuck on the specifics. What are Python's best coolnesses? What makes for a good demo? Ideally, this should be something that can be demo'd quickly and easily, and it should be impressive without going into great details of and see, this is how it works on the inside. So, how would you brag about this language? ChrisA hello, I am a newbie to python, I have dwelled in c,qt none in java. php a lot, though I don't make money with any of those. The best thing I find is python is very easy, the best part maybe because of my inexperience with other languages are the List and Dict data types that just solved problems I had in real life made solvable with python very easily. when I had to worry about memory and pointers to memory in those other languages, python just made me focus on the solution I want. Nice point! First class concrete data structures is a blessing especially for a C programmer. Here is an old Guido workout of dicts https://www.python.org/doc/essays/graphs/ Probably can be improved to use comprehensions -- https://mail.python.org/mailman/listinfo/python-list
Re: How to wow someone new to Python
On Sat, Jan 17, 2015 at 4:31 AM, Rustom Mody rustompm...@gmail.com wrote: Nice point! First class concrete data structures is a blessing especially for a C programmer. Definitely! Worth noting. There've been some nice concepts mentioned; concrete suggestions would be good too. Some specific feature or exact line of code that would show off Python's awesomeness. ChrisA -- https://mail.python.org/mailman/listinfo/python-list
recursive function: use a global or pass a parameter?
I have this type of situation and wonder if I should use a global variable outside the recursive function instead of passing the updated parameter through. I want to get a union of all the values that any 'things' key may have, even in a nested dictionary (and I do not know beforehand how deep the nesting might go): d = {'things':1, 'two':{'things':2}} def walk(obj, res): if not hasattr(obj, 'keys'): return set(), set() if 'things' in obj: res.add(obj['things']) for k in obj: walk(obj[k], res) return res walk(d, set()) # returns {1, 2} Is it better to use a global to keep track of the values or does it even matter? thanks, --Tim -- https://mail.python.org/mailman/listinfo/python-list
Re: recursive function: use a global or pass a parameter?
On Sat, Jan 17, 2015 at 4:49 AM, Tim jtim.arn...@gmail.com wrote: I want to get a union of all the values that any 'things' key may have, even in a nested dictionary (and I do not know beforehand how deep the nesting might go): d = {'things':1, 'two':{'things':2}} def walk(obj, res): if not hasattr(obj, 'keys'): return set(), set() if 'things' in obj: res.add(obj['things']) for k in obj: walk(obj[k], res) return res walk(d, set()) # returns {1, 2} Is it better to use a global to keep track of the values or does it even matter? I would use a parameter rather than a global, but I'd make the parameter optional: def all_keys(obj, accum=None): if accum is None: accum=set() if 'things' in obj: res.add(obj['things']) for val in obj.values(): all_keys(val, accum) return all_keys ChrisA -- https://mail.python.org/mailman/listinfo/python-list
Re: How to wow someone new to Python
On 2015-01-17 02:03, Chris Angelico wrote: Ideally, this should be something that can be demo'd quickly and easily, and it should be impressive without going into great details of and see, this is how it works on the inside. So, how would you brag about this language? First, I agree with Andrew Berg's suggestion about the breadth of the stdlib. This always irks me when I have to return to the C/C++ world where there's no standard library for things like networking (and thus no stock libraries for IMAP, SMTP, HTTP, FTP, etc or email-message handling), CSV processing, regular expressions, zip/tar/zlib files, SHA1/MD5, command-line option processing, threading, and no available-everywhere GUI. In the Java world, it feels like much of this is available, but that the glommed-on standards have multiple ways to do them (the old way(s) and the new/improved way). In PHP, well...that's just PHP (difficult-to-grok equality testing, inconsistent naming conventions and parameter ordering, lack of namespacing, easy-to-screw-up string interpolation, hacky OOP, etc). My fast-introduction go-to items are dir() and help() within the REPL interface. Nothing speeds up my development like being able to drop to a PDB prompt and inspect an object, ask what properties it supports, dump them, get help on them, etc. There's also the bigint stuff that means I don't have to worry about over/underflow errors. I'm sure there are more great ideas, but how you market might depend on your audience's background in programming (what language did they use and what pain-points did they experience). -tkc -- https://mail.python.org/mailman/listinfo/python-list
Re: How to wow someone new to Python
On 1/16/2015 9:44 AM, Chris Angelico wrote: snip exact line of code that would show off Python's awesomeness. a,b = b,a Emile -- https://mail.python.org/mailman/listinfo/python-list
Android Native Build Help: python build_ext
I'm building python on my Android tablet and, while the executable and library builds successfully, I run into a problem when the newly built python runs build_ext; it builds the _struct module and then immediately afterwards my build environment throws an 'undefined reference to dlopen' error. To figure out what is missing dlopen, I need to somehow figure out what build_ext is trying to do. I've tried running the command manually with the --verbose option with no results. Does build_ext build modules in a certain order? If so, what is that order? -- https://mail.python.org/mailman/listinfo/python-list
Re: recursive function: use a global or pass a parameter?
On Friday, January 16, 2015 at 11:26:46 PM UTC+5:30, Chris Angelico wrote: On Sat, Jan 17, 2015 at 4:49 AM, Tim wrote: I want to get a union of all the values that any 'things' key may have, even in a nested dictionary (and I do not know beforehand how deep the nesting might go): d = {'things':1, 'two':{'things':2}} def walk(obj, res): if not hasattr(obj, 'keys'): return set(), set() if 'things' in obj: res.add(obj['things']) for k in obj: walk(obj[k], res) return res walk(d, set()) # returns {1, 2} Is it better to use a global to keep track of the values or does it even matter? I would use a parameter rather than a global, but I'd make the parameter optional: def all_keys(obj, accum=None): if accum is None: accum=set() if 'things' in obj: res.add(obj['things']) for val in obj.values(): all_keys(val, accum) return all_keys ChrisA I dont like the hardwired this. However keeping that... def all_keys(obj): if not isinstance(obj, type({})): return set() return ((set([obj['things']]) if 'things' in obj else set()) | set(v for s in obj.values() for v in all_keys(s))) -- https://mail.python.org/mailman/listinfo/python-list
Re: recursive function: use a global or pass a parameter?
Tim wrote: I have this type of situation and wonder if I should use a global variable outside the recursive function instead of passing the updated parameter through. I want to get a union of all the values that any 'things' key may have, even in a nested dictionary (and I do not know beforehand how deep the nesting might go): d = {'things':1, 'two':{'things':2}} def walk(obj, res): if not hasattr(obj, 'keys'): return set(), set() if 'things' in obj: res.add(obj['things']) for k in obj: walk(obj[k], res) return res walk(d, set()) # returns {1, 2} Is it better to use a global to keep track of the values or does it even matter? Globals are generally bad as they make code non-reentrant; when two calls of the function run simultaneously the data will be messed up. I recommend that you use a generator: def walk(obj): ... if not hasattr(obj, keys): ... return ... if things in obj: ... yield obj[things] ... for v in obj.values(): ... yield from walk(v) ... d = {'things':1, 'two':{'things':2}} set(walk(d)) {1, 2} In Python before 3.3 you have to replace yield from walk(v) with a loop: for t in walk(v): yield t -- https://mail.python.org/mailman/listinfo/python-list
Re: recursive function: use a global or pass a parameter?
On Friday, January 16, 2015 at 1:34:51 PM UTC-5, Peter Otten wrote: Tim wrote: Globals are generally bad as they make code non-reentrant; when two calls of the function run simultaneously the data will be messed up. I recommend that you use a generator: def walk(obj): ... if not hasattr(obj, keys): ... return ... if things in obj: ... yield obj[things] ... for v in obj.values(): ... yield from walk(v) ... d = {'things':1, 'two':{'things':2}} set(walk(d)) {1, 2} In Python before 3.3 you have to replace yield from walk(v) with a loop: for t in walk(v): yield t Ah, a generator, I wouldn't have seen the problem in this way, but with your example, it looks so natural. thanks, --Tim -- https://mail.python.org/mailman/listinfo/python-list
[ANN] Pylint 1.4.1 / Astroid 1.3.3 released
Hello, It's my pleasure to announce the release of both Pylint 1.4.1 and Astroid 1.3.3 respectively. The following bug fixes and features made their way into Astroid 1.3.3: * Restore file_stream to a property, but deprecate it in favour of the newly added method Module.stream. * Add inference tips for 'tuple', 'list', 'dict' and 'set' builtins. * Add brain definition for most string and unicode methods * Add a new method to Class nodes, 'mro', for obtaining the the method resolution order of the class. * Add brain tips for six.moves. Closes issue #63. * .slots() can contain unicode strings on Python 2. * Add inference tips for nose.tools. The complete list of changes can be seen here: https://bitbucket.org/logilab/astroid/src/15cff6016b793bb64c92d04acc4da001a2c98683/ChangeLog?at=default#cl-4 For Pylint, we have the following fixes and features: * Add a new JSON reporter, usable through -f flag. * Add a new warning, 'redundant-unittest-assert', emitted when using unittest's methods assertTrue and assertFalse with constant value as argument. * Check the return of properties when checking for not-callable. Closes issue #406. * Warn about using the input() or round() built-ins for Python 3. Closes issue #411. * Use a mro traversal for finding abstract methods. Closes issue #415. * Fix a false positive on Python 2 for raising-bad-type, when raising tuples in the form 'raise (ZeroDivisionError, None)'. * Fix a false positive with invalid-slots-objects, where the slot entry was an unicode string on Python 2. Closes issue #421. The complete list of changes can be found here: https://bitbucket.org/logilab/pylint/src/02eabae6b72569876e7104db7724ad26a7de0af3/ChangeLog?at=default#cl-4 If you find any bugs, don't hesitate to open a new issue on our issue tracker (https://bitbucket.org/logilab/pylint/) Enjoy! -- https://mail.python.org/mailman/listinfo/python-list
Re: lambdak: multi-line lambda implementation in native Python
Marko Rauhamaa wrote: Gregory Ewing greg.ew...@canterbury.ac.nz: If those are 24-bit RGB pixels, you could encode 3 characters in each pixel. Not since Python3. Characters are Unicode now so you'll need to dedicate a pixel for each character. Depends on which characters you want. With the Flexible Chromatic Representation, it could be anything from 1 to 3. -- Greg -- https://mail.python.org/mailman/listinfo/python-list
Re: Factories and Builders [was Re: lambdak...]
Steven D'Aprano wrote: I've never really understand why abstract factory, factory method and builder are considered different design patterns. They're variants on the same idea. I think it's because they address different problems. Factories are for hiding the details of how an object is constructed. Builders are for working around the fact that there are no keyword arguments in your language. Builders are sometimes also used for algorithmic reasons; e.g. Java's StringBuilder exists to save you from O(n**2) behaviour when creating a string from many small parts. Factories of various kinds can be useful in Python; builders, not so much. -- Greg -- https://mail.python.org/mailman/listinfo/python-list
Re: lambdak: multi-line lambda implementation in native Python
Chris Angelico wrote: Is this to get around style guides that reject this kind of model: x = Foo( opt1=True, opt2=True, color=Yellow, ) It's to get around the fact that you *can't* do that in Java, because it doesn't have keyword arguments. This is a source of a lot of the complexity and boilerplate found in Java code -- the need to work around deficencies in the language. But if you can pass a mapping object to the constructor, you can do the same job that way, Yes, but constructing the mapping object is just as tedious. :-( you could pass an array of item,value,item,value,item,value or something. That's certainly possible, but then you have to write tedious code in the constructor to parse the arguments, you lose compile-time type safety, incur runtime overhead, etc. We're really quite spoiled in Python-land. It's easy to forget just *how* spoiled we are until you go back and try to do something in one of the more primitive languages... -- Greg -- https://mail.python.org/mailman/listinfo/python-list
Re: recursive function: use a global or pass a parameter?
Tim wrote: I have this type of situation and wonder if I should use a global variable outside the recursive function instead of passing the updated parameter through. No! Globals are evil, at least for that sort of thing. The way you're doing it is fine. The only thing I would change is to wrap it all up in a top-level function that takes care of creating the result set and returning it. def walk(obj): res = set() _walk(obj, res) return res def _walk(obj, res): ... -- Greg -- https://mail.python.org/mailman/listinfo/python-list
Re: recursive function: use a global or pass a parameter?
On Sat, Jan 17, 2015 at 9:20 AM, Gregory Ewing greg.ew...@canterbury.ac.nz wrote: The only thing I would change is to wrap it all up in a top-level function that takes care of creating the result set and returning it. def walk(obj): res = set() _walk(obj, res) return res def _walk(obj, res): ... Point of style: I like to put these kinds of helpers _above_ the corresponding public functions, to maintain a general policy of Define-Before-Use. Tends to make code easier to read; the first reference to a function name is its definition, then all usage comes after that. It's not always possible, of course (eg mutual recursion), but in simple cases like this, it's easy enough. ChrisA -- https://mail.python.org/mailman/listinfo/python-list
Re: recursive function: use a global or pass a parameter?
On Friday, January 16, 2015 at 1:34:51 PM UTC-5, Peter Otten wrote: [...] I recommend that you use a generator: def walk(obj): ... if not hasattr(obj, keys): ... return ... if things in obj: ... yield obj[things] ... for v in obj.values(): ... yield from walk(v) Cool ... but it looks like this can still potentially hit the max recursion limit? Perhaps better to convert to an iterative style: def walk(obj): Yield any value(s) contained within `obj` that is (are) indexed by the key 'things'. `obj` must be dict-like. from collections import deque vals = deque() vals.append(obj) while True: try: curr_obj = vals.popleft() except IndexError: return if not hasattr(curr_obj, keys): continue if things in curr_obj: yield curr_obj[things] vals.extend(curr_obj.values()) # Examples d1 = list(walk({ things: 1, two: { things: 2 } })) d2 = list(walk({ things: 1, two: { things: 2 }, three: { four: 4, things: { five: 5, six: 6, things: { seven: 7, things: 8 } } } })) So this effectively 'flattens' a dictionary at each level into a queue made up of the dictionary's values, and meanwhile yields the values one by one if they are indexed by the key 'things'. The output for `d1` should be the same as Peter Otten's example, except I'm using a list instead of a set because I think the yielded objects could themselves be dictionaries or other non-hashable values. When you're looking at the output for `d2`, remember that `walk` here will yield _any_ object that's indexed by the key, and as I mentioned, that could be an entire dictionary object contained within the main one. Regards, Yawar -- https://mail.python.org/mailman/listinfo/python-list
pyqtdeploy on windows
hi i have a code with pyqt4 and i want run in android with this tutorial http://pyqt.sourceforge.net/Docs/pyqtdeploy/command_line.html my project include of : m.py m.pyw m.ui when run pyqtdeploy myproject.pdy in cmd get error installing py 3.4.2 pyqt5 for pyqtdeploy any one know good tutorial for this module tnx -- https://mail.python.org/mailman/listinfo/python-list
Re: recursive function: use a global or pass a parameter?
On Friday, January 16, 2015 at 9:24:15 PM UTC-5, Yawar Amin wrote: [...] vals.extend(curr_obj.values()) Ah, I should mention that the above will do a breadth-first search. If we want to do a depth-first search we simply replace the above line with: vals.extendleft(curr_obj.values()) Regards, Yawar -- https://mail.python.org/mailman/listinfo/python-list
EuroPython 2015: Your chance to sign up as a launch sponsor
Companies who would like to sign up as a EuroPython 2015 launch sponsor are encouraged to contact the sponsor work group at: sponsor...@europython.eu Launch sponsors will get the additional benefit of being listed on the website when we launch - for free. You just need to be quick, since the launch is planned for early in February. More Booths and more Sponsor Slots -- The Euskalduna Conference Center and Concert Hall (ECC) venue in Bilbao was chosen as conference venue for EuroPython 2015: http://www.euskalduna.net/Index.asp?idioma=en It offers plenty of room for sponsor booths, so we will try to make EuroPython 2015 as effective as possible for you as sponsors by offering more booth space and sponsor slots than ever before: http://www.euskalduna.net/espacios/espacios_hall_exposiciones.asp This is your chance to reach out to more than a thousand enthusiastic and highly motivated EuroPython attendees ! Please email us at sponsor...@europython.eu and we’ll send you the sponsor brochure. Thanks, — EuroPython Society (EPS) http://www.europython-society.org/ PS: Please help spread the word and forward this email to companies you know, your local lists, user groups, etc. Many thanks ! -- https://mail.python.org/mailman/listinfo/python-announce-list Support the Python Software Foundation: http://www.python.org/psf/donations/
xlwings v0.3.1 released
I am happy to announce the release of xlwings v0.3.1: This fixes a long-standing bug that caused Excel to close/reopen under certain circumstances. It also adds a Workbook.set_mock_caller() method that makes it a lot easier to call code from Excel and Python without changes. See the full Release Notes here: http://docs.xlwings.org/whatsnew.html About xlwings: xlwings is a BSD-licensed python library that makes it easy to call python from Excel and vice versa: Interact with Excel from python using a syntax that is close to VBA yet pythonic. Replace your VBA macros with python code and still pass around your workbooks as easily as before. xlwings fully supports NumPy arrays and Pandas DataFrames. It works with Microsoft Excel on Windows and Mac. http://xlwings.org -- https://mail.python.org/mailman/listinfo/python-announce-list Support the Python Software Foundation: http://www.python.org/psf/donations/
[issue23248] Update ssl data
New submission from Antoine Pitrou: Amusingly OpenSSL has removed some error codes, so perhaps we should only apply this to the default branch. -- components: Library (Lib) files: update_ssl_data.patch keywords: patch messages: 234114 nosy: alex, christian.heimes, dstufft, giampaolo.rodola, janssen, pitrou priority: normal severity: normal stage: patch review status: open title: Update ssl data type: behavior versions: Python 3.5 Added file: http://bugs.python.org/file37722/update_ssl_data.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23248 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15955] gzip, bz2, lzma: add option to limit output size
Antoine Pitrou added the comment: I've posted a review of the latest lzma decompressor patch. I think it'll be able to go in once the comments are addressed. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15955 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23051] multiprocessing.pool methods imap()[_unordered()] deadlock
Antoine Pitrou added the comment: The patch would at least need to add a unit test in order to avoid regressions. -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23051 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14953] Reimplement subset of multiprocessing.sharedctypes using memoryview
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +davin ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14953 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21354] PyCFunction_New no longer exposed by python DLL breaking bdist_wininst installers
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +steve.dower, tim.golden, zach.ware ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21354 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1103213] Adding the missing socket.recvall() method
Antoine Pitrou added the comment: I'm frankly not sure why this is useful. If you want a guaranteed read size you should use the buffered layer - i.e. socket.makefile(). No need to complicate the raw socket implementation. -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1103213 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20544] Use specific asserts in operator tests
Changes by Antoine Pitrou pit...@free.fr: -- assignee: - serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20544 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23133] Pickling of ipaddress classes
Antoine Pitrou added the comment: Patch looks good to me. For further efficiency, addresses could be pickled as ints (but beware of interfaces and networks). -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23133 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23249] test_win32 fails on aarch64
New submission from Robert Kuska: Original bug report at https://bugzilla.redhat.com/show_bug.cgi?id=1174037 Additional informations at Issue #20160 Note that this was reproduced not only with separate libffi package but also with libffi bundled in python. Reproduced with Python 2.7.9 but same issue should exists also in 3.4.x. Richard Henderson provided fix in original bug report at bugzilla (attached). Summary: == FAIL: test_struct_by_value (ctypes.test.test_win32.Structures) -- Traceback (most recent call last): File /builddir/build/BUILD/Python-2.7.9/Lib/ctypes/test/test_win32.py, line 112, in test_struct_by_value self.assertEqual(ret.left, left.value) AssertionError: -200 != 10 -- (gdb) b ReturnRect Function ReturnRect not defined. Make breakpoint pending on future shared library load? (y or [n]) y Breakpoint 1 (ReturnRect) pending. (gdb) run test_win32.py Starting program: /usr/bin/python test_win32.py Missing separate debuginfos, use: debuginfo-install glibc-2.20.90-12.fc22.aarch64 [Thread debugging using libthread_db enabled] Using host libthread_db library /lib64/libthread_db.so.1. Breakpoint 1, ReturnRect (i=0, ar=..., br=0x59b750, cp=..., dr=..., er=0x59b750, fp=..., gr=error reading variable: Cannot access memory at address 0x) at /usr/src/debug/Python-2.7.9/Modules/_ctypes/_ctypes_test.c:552 552 if (ar.left + br-left + dr.left + er-left + gr.left != left * 5) (gdb) p fp $1 = {x = 4396722194992, y = 5879632} (gdb) p cp $2 = {x = 15, y = 25} (gdb) Consider to apply a patch or update bundled libffi. -- components: ctypes files: libffi-henderson messages: 234119 nosy: rkuska priority: normal severity: normal status: open title: test_win32 fails on aarch64 type: crash versions: Python 2.7, Python 3.4 Added file: http://bugs.python.org/file37723/libffi-henderson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23249 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23249] test_win32 fails on aarch64
Changes by Robert Kuska rku...@gmail.com: -- keywords: +patch Added file: http://bugs.python.org/file37724/libffi-mattip.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23249 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20160] broken ctypes calling convention on MSVC / 64-bit Windows (large structs)
Robert Kuska added the comment: I have created #23249. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20160 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23133] Pickling of ipaddress classes
Changes by Serhiy Storchaka storch...@gmail.com: Added file: http://bugs.python.org/file37726/ipaddress_pickle_3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23133 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23133] Pickling of ipaddress classes
Changes by Serhiy Storchaka storch...@gmail.com: Removed file: http://bugs.python.org/file37725/ipaddress_lightweight_2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23133 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23133] Pickling of ipaddress classes
Changes by Serhiy Storchaka storch...@gmail.com: Removed file: http://bugs.python.org/file37726/ipaddress_pickle_3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23133 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23133] Pickling of ipaddress classes
Changes by Serhiy Storchaka storch...@gmail.com: Added file: http://bugs.python.org/file37728/ipaddress_pickle_3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23133 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23133] Pickling of ipaddress classes
Changes by Serhiy Storchaka storch...@gmail.com: Added file: http://bugs.python.org/file37727/ipaddress_pickle_2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23133 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20132] Many incremental codecs don’t handle fragmented data
Martin Panter added the comment: There is a flaw with inheriting the readline() method in my patch, and I have decided to give up fixing the StreamReader classes. I did update the documentation in my copy of the patch based on Marc-Andre Lemburg’s feedback if anyone is interested in it, otherwise I am going to focus on some of the incremental codecs now. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20132 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23133] Pickling of ipaddress classes
Serhiy Storchaka added the comment: ipaddress_pickle_3.patch breaks one test (testMissingAddressVersion). Is this test needed? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23133 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23133] Pickling of ipaddress classes
Antoine Pitrou added the comment: I don't understand what the test is for. I think it's safe it's remove it. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23133 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23249] test_win32 fails on aarch64
Changes by Matěj Stuchlík matej.stuch...@gmail.com: -- nosy: +sYnfo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23249 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22995] Restrict default pickleability
Antoine Pitrou added the comment: How many cases does the patch catch? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22995 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1103213] Adding the missing socket.recvall() method
STINNER Victor added the comment: The patch uses the flag MSG_WAITALL for recv() if available. Extract of the manual page: MSG_WAITALL (since Linux 2.2) This flag requests that the operation block until the full request is satisfied. However, the call may still return less data than requested if a signal is caught, an error or discon- nect occurs, or the next data to be received is of a different type than that returned. It looks interesting, but it doesn't guarantee that you will always get exactly the expected size. You still have to call again recv() to get more data if a signal was received. Jean-Paul Calderone wrote: Since MSG_WAITALL is already exposed to Python (when the underlying platform provides it), I wonder if this could all be implemented more simply in pure Python. Can you elaborate on the motivation to use C? sendall() is implemented in C while it would be possible to implement it in Python. The same rationale can be used on a large part of the stdlib :-) (The io module is implemented in Python in Python 2.6!) The C gives you a full control on the GIL, signal handle, and it might be faster. Antoine Pitrou wrote: I'm frankly not sure why this is useful. recvall() allows to easily fix existing code: just replace recv() with recvall(), no need to refactor code to call makefile() which has a different API (ex: read/recv, write/send). The addition is small and well defined. -- About the exception: asyncio.StreamReader.read_exactly() raises an IncompleteReadError which contains the read bytes and inherits from EOFError: see https://docs.python.org/dev/library/asyncio-stream.html#asyncio.StreamReader.readexactly and https://docs.python.org/dev/library/asyncio-stream.html#asyncio.IncompleteReadError The following issue discussed the design on this exception in asyncio: https://code.google.com/p/tulip/issues/detail?id=111 http.client uses an IncompleteRead (which inherits from HTTPException): https://docs.python.org/dev/library/http.client.html#http.client.IncompleteRead -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1103213 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23013] Tweak wording for importlib.util.LazyLoader in regards to Loader.create_module()
Brett Cannon added the comment: Change went in through making create_module() required. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23013 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21581] Consider dropping importlib.abc.Loader.create_module()
Brett Cannon added the comment: create_module() is now slated to be required in Python 3.6. -- resolution: - out of date status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21581 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23246] distutils fails to locate vcvarsall with Visual C++ Compiler for Python
Steve Dower added the comment: Setuptools has the code to find the compiler package. We deliberately put it there instead of in distutils to make sure more people would get it. I should probably port the extra check into 2.7.10, but the immediate fix is to import setuptools. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23246 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23211] test.test_logging.SMTPHandlerTest failing on Snow Leopard
Vinay Sajip added the comment: No objections from me. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23211 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22995] Restrict default pickleability
Serhiy Storchaka added the comment: All public classes not designed for pickling explicitly. I tested only operator.methodcaller, mmap.mmap, sqlite3 classes (Connect, Cursor, Row), _socket.socket, select.epoll, _csv.Dialect, but should be more. Instances of these classes can be pickled, but unpickling either raise an exception (usually TypeError), or returns default or underinitialized object. For other classes the patch changes raised exception type. E.g. pickling zlib.compressobj() raised _pickle.PicklingError: Can't pickle class 'zlib.Compress': attribute lookup Compress on zlib failed and with the patch it raises TypeError: can't pickle zlib.Compress objects -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22995 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23250] http.cookies HttpOnly attribute does not use suggested case-style of HTTP standard
New submission from Jon Dufresne: See http://tools.ietf.org/html/rfc6265#section-5.2.6 Relevant section: --- 5.2.6. The HttpOnly Attribute If the attribute-name case-insensitively matches the string HttpOnly, the user agent MUST append an attribute to the cookie-attribute-list with an attribute-name of HttpOnly and an empty attribute-value. ... If the cookie-attribute-list contains an attribute with an attribute-name of HttpOnly, set the cookie's http-only-flag to true. Otherwise, set the cookie's http-only-flag to false. --- http.cookies creates this attribute as `httponly` not `HttpOnly`. It is true, when interpreted by the user agent, this attribute is case insensitive, but it seems odd that Python would go out of its way to purposely use a different case then stated in the standard. When looking at other web technologies, the case used in the standard is most typical. The examples in the standard also use the `HttpOnly` style. (Same applies to the Secure flag.) -- components: Library (Lib) messages: 234132 nosy: jdufresne priority: normal severity: normal status: open title: http.cookies HttpOnly attribute does not use suggested case-style of HTTP standard type: behavior versions: Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23250 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23250] http.cookies HttpOnly attribute does not use suggested case-style of HTTP standard
Changes by Jon Dufresne jon.dufre...@gmail.com: -- keywords: +patch Added file: http://bugs.python.org/file37729/http-only-case.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23250 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23233] TypeError in ./setup.py
Serhiy Storchaka added the comment: On one of my computer on one workspace it is reproduced constantly, but I don't know how to reproduce it from clean checkout. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23233 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23133] Pickling of ipaddress classes
Changes by Serhiy Storchaka storch...@gmail.com: -- assignee: - serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23133 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23250] http.cookies HttpOnly attribute does not use suggested case-style of HTTP standard
Changes by R. David Murray rdmur...@bitdance.com: -- nosy: +r.david.murray stage: - commit review versions: +Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23250 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23095] asyncio: race condition when cancelling a _WaitHandleFuture
Changes by STINNER Victor victor.stin...@gmail.com: -- title: asyncio: race condition in IocpProactor.wait_for_handle() - asyncio: race condition when cancelling a _WaitHandleFuture ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23095 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23095] asyncio: race condition when cancelling a _WaitHandleFuture
STINNER Victor added the comment: The race condition occurs when _WaitHandleFuture().cancel() is called. This object is created by IocpProactor.wait_for_handle(). _WaitHandleFuture().cancel() is only called by 4 tests: - test_cancel_post_init() - test_cancel_make_subprocess_transport_exec - test_wait_for_handle - test_wait_for_handle_cancel It looks like the GetQueuedCompletionStatus() returned an unexpected event error is logged when test_wait_for_handle() and/or test_wait_for_handle_cancel() is executed(). Disabling these tests is enough to workaround this issue. Using Tulip, use python3 runtests.py -r to reproduce the issue. You may have to run this command multiple times to see the error, the bug is random. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23095 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23251] mention in time.sleep() docs that it does not block other Python threads
New submission from Akira Li: There is the corresponding StackOverflow question with 60K view time.sleep — sleeps thread or process? [1] The documentation patch is attached. [1] http://stackoverflow.com/questions/92928/time-sleep-sleeps-thread-or-process -- assignee: docs@python components: Documentation files: docs-time.sleep-other-threads-are-not-blocked.diff keywords: patch messages: 234135 nosy: akira, docs@python priority: normal severity: normal status: open title: mention in time.sleep() docs that it does not block other Python threads type: enhancement versions: Python 3.5 Added file: http://bugs.python.org/file37730/docs-time.sleep-other-threads-are-not-blocked.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23251 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23251] mention in time.sleep() docs that it does not block other Python threads
R. David Murray added the comment: Can you re-upload the patch without reflowing the paragraph? I think the only thing needed is the addition of the word thread, to mirror the equivalent unix man page phrasing, and I think that's what you've done, but I can't easily tell from the provided patch. -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23251 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23246] distutils fails to locate vcvarsall with Visual C++ Compiler for Python
Gregory Szorc added the comment: Thanks, Steve. The package I was trying to build has its setup.py importing setup from distutils, not setuptools. I'll see about porting them to the future. For posterity, https://bitbucket.org/pypa/setuptools/issue/258, which was first released in setuptools 6.0. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23246 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22992] Adding a git developer's guide to Mercurial to devguide
Roundup Robot added the comment: New changeset 51c89a0c30b4 by Brett Cannon in branch 'default': Issue #22992: A git developer's guide to hg. https://hg.python.org/devguide/rev/51c89a0c30b4 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22992 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22992] Adding a git developer's guide to Mercurial to devguide
Brett Cannon added the comment: Thanks for the hard work, Demian! I don't remember how often the devguide is updated online, but it should hopefully be no longer than a day (probably more like an hour). -- resolution: - fixed stage: patch review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22992 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23246] distutils fails to locate vcvarsall with Visual C++ Compiler for Python
Steve Dower added the comment: FWIW, at some point I will need to do some serious work on this code for Python 3.5, so I'll certainly take your suggestions into account there. But I won't be doing the same for old versions of Python - at most 2.7 may get a check for the extra registry key, but 2.6 and 3.0-3.2 will still need to be using setuptools=6.0 (which 2.7.10 will ship with). Also, pip forces setuptools onto packages whether they like it or not, so pip installs should always build. Because it's a monkeypatch, import setuptools is sufficient to port old setup.py files. All together, there doesn't seem to be an urgent need to get this into the core release. If someone comes up with a simple patch I'll happily review and apply it (and Jason will want a setuptools patch to skip the monkeypatch there), but I need to spend my own dev time on the next release. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23246 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22619] Possible implementation of negative limit for traceback functions
Serhiy Storchaka added the comment: Thank you for your patches Dmitry. But I think that the code can be made simpler. Here is a patch which refactors extracting code. It splits the code on few generators which do different tasks: iterate over tracebacks or frames linked list, limit the size of proceeded sequence, and generates required fields. Note that the behavior of extract_stack() with negative limit differs if sys.tracebacklimit is specified and less than the length of full traceback. Tests are changed too, now they test all combinations of the limit parameter and sys.tracebacklimit. -- stage: - patch review Added file: http://bugs.python.org/file37731/traceback_negative_limit_2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22619 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14099] ZipFile.open() should not reopen the underlying file
Serhiy Storchaka added the comment: Thank you for your report Matt. There is other problem. It is nowhere documented and newer granted and newer mentioned when ZipFile.open() was added, but file-like objects returned by ZipFile.open() could be read in different threads simultaneously. It makes sense because decompressors release GIL and parallel reading compressed file can has benefit. It is easy to fix both issues (I prefer to do this in separate paths), but due to the overall complexity it is safer to withdraw committed changes in maintained releases and apply additional patches only in default branch. -- stage: - patch review Added file: http://bugs.python.org/file37732/zipfile_tellable.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14099 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14099] ZipFile.open() should not reopen the underlying file
Changes by Serhiy Storchaka storch...@gmail.com: -- versions: -Python 2.7, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14099 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14099] ZipFile.open() should not reopen the underlying file
Serhiy Storchaka added the comment: Adding locks almost not affects performance, because reads are done by relative large chunks and locking overhead is small. -- Added file: http://bugs.python.org/file37733/zipfile_threadsafe.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14099 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22286] Allow backslashreplace error handler to be used on input
Serhiy Storchaka added the comment: Could you make a review Nick to get this feature in the first alpha. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22286 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23252] Add support of writing to unseekable file in zipfile
New submission from Serhiy Storchaka: ZIP files can be created to transfer it via unseekable streams (pipes, sockets). Mercurial uses a workaround to write ZIP files right to wsgirequest, but this is possible only with writestr(). write() needs seek() to updated file size, compressed sized and CRC. However ZIP file format supports streamed data without writing sizes and CRC before file data. It is possible and desirable to add full support of unseekable output files in zipfile. -- assignee: serhiy.storchaka components: Library (Lib) messages: 234145 nosy: serhiy.storchaka priority: normal severity: normal stage: needs patch status: open title: Add support of writing to unseekable file in zipfile type: enhancement versions: Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23252 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14099] ZipFile.open() should not reopen the underlying file
Serhiy Storchaka added the comment: See also issue23252. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14099 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5309] distutils doesn't parallelize extension module compilation
Julian Taylor added the comment: very nice, thanks for adding this. coincidentally numpy added the same to numpy.distutils independently just a week later, though numpy also accepts an environment variable to set the number of jobs. This is useful for e.g. pip installations where one does not control the command line. Also an environment variable allows parallel jobs in environments where it is not guaranteed that the feature is available. E.g. you could just put it into your .bashrc and when building with 3.5 it will just work and 2.7 will not fail. Is the naming --parallel/j already fixed? I'll change the numpy options to the same name then. Please also add it to the release notes so the feature can be discovered easier. -- nosy: +jtaylor ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5309 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23249] test_win32 fails on aarch64
STINNER Victor added the comment: libffi-3.2.1 was released on November 12, 2014. You can ftp it from sourceware.org:/pub/libffi/libffi-3.2.1.tar.gz. Does this version include libffi-henderson patch? -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23249 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23251] mention in time.sleep() docs that it does not block other Python threads
Martin Panter added the comment: There is also a new sentence about the GIL at the end, but leaving the inbetween lines as they were would verify this -- nosy: +vadmium ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23251 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23251] mention in time.sleep() docs that it does not block other Python threads
Akira Li added the comment: I do not understand. Have you tried to look at the patch in Rietveld? The new content is highlighted in a darker green. It is clearly visible. I've tested on Chromium, Firefox, Safari. If I won't reflow then the first line will be longer than the recommended 80 in devguide: The maximum line length is 80 characters for normal text, but tables, deeply indented code samples and long links may extend beyond that. I've set *fill-column* to 80 in emacs. Do you suggest other settings? Anyway, it doesn't affect how the final text is shown in a web browser. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23251 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23253] Delay-load ShellExecute[AW] in os.startfile
New submission from Steve Dower: Currently, pythonXY.dll has a dependency on shell32.dll solely for the os.startfile (Modules/posixmodule.c) function. This is quite a heavy dependency that many would rather not have to load (e.g. lightweight server configurations). It would be nice to delay load the DLL and fail the operation if it is not available. (This is as much a reminder for myself as anything else, but if someone wants to do it then feel free.) -- components: Windows messages: 234151 nosy: steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Delay-load ShellExecute[AW] in os.startfile type: enhancement versions: Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23253 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23251] mention in time.sleep() docs that it does not block other Python threads
Andrew Svetlov added the comment: I guess R. David Murray asked you to make the least minimal change, even it breaks the formatting rules. Paragraph reflow is safe when it's done by the Core Developer but it requires additional check (and probably mercurial conflict errors on merging the change with default branch if the last has changes also). In your case I see no problems though, but the final decision is on R. David Murray On Sat, Jan 17, 2015 at 12:56 AM, Akira Li rep...@bugs.python.org wrote: Akira Li added the comment: I do not understand. Have you tried to look at the patch in Rietveld? The new content is highlighted in a darker green. It is clearly visible. I've tested on Chromium, Firefox, Safari. If I won't reflow then the first line will be longer than the recommended 80 in devguide: The maximum line length is 80 characters for normal text, but tables, deeply indented code samples and long links may extend beyond that. I've set *fill-column* to 80 in emacs. Do you suggest other settings? Anyway, it doesn't affect how the final text is shown in a web browser. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23251 ___ ___ docs mailing list d...@python.org https://mail.python.org/mailman/listinfo/docs -- nosy: +asvetlov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23251 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23251] mention in time.sleep() docs that it does not block other Python threads
Martin Panter added the comment: What I have sometimes done in this situation is just break the overly long line into two short lines -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23251 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23250] http.cookies HttpOnly attribute does not use suggested case-style of HTTP standard
Roundup Robot added the comment: New changeset 0d8380c493ad by Benjamin Peterson in branch '3.4': capitialize HttpOnly and Secure as they appear in the standard and other impls (closes #23250) https://hg.python.org/cpython/rev/0d8380c493ad -- nosy: +python-dev resolution: - fixed stage: commit review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23250 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22986] Improved handling of __class__ assignment
Roundup Robot added the comment: New changeset d3671e6ba106 by Benjamin Peterson in branch 'default': merge 3.4 (#22986) https://hg.python.org/cpython/rev/d3671e6ba106 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22986 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22986] Improved handling of __class__ assignment
Benjamin Peterson added the comment: (That message should have gone to #23250.) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22986 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1103213] Adding the missing socket.recvall() method
Irmen de Jong added the comment: I created the patch about 5 years ago and in the meantime a few things have happened: - I've not touched C for a very long time now - I've learned that MSG_WAITALL may be unreliable on certain systems, so any implementation of recvall depending on MSG_WAITALL may inexplicably fail on such systems - I've been using a python implementation of a custom recv loop in Pyro4 for years - it is unclear that a C implementation will provide a measurable performance benefit because I think most of the time is spent in the network I/O anyway, and the GIL is released when doing a normal recv (I hope?) In other words, I will never follow up on my original C-based patch from 5 years ago. I do still like the idea of having a reliable recvall in the stdlib instead of having to code a page long one in my own code. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1103213 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15745] Numerous utime ns tests fail on FreeBSD w/ ZFS (update: and NetBSD w/ FFS, Solaris w/ UFS)
Changes by Terry J. Reedy tjre...@udel.edu: -- versions: +Python 3.4, Python 3.5 -Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15745 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23251] mention in time.sleep() docs that it does not block other Python threads
R. David Murray added the comment: I actually didn't know that reitveld was smart enough to highlight just the text changes in a reflowed paragraph. Nevertheless, for ease of looking at diff in the repository using the hg command (which is not that smart), I prefer to commit doc changes without the reflow, then do the reflow in a separate commit. I don't know if other developers do this or not. I think the patch is fine. -- stage: - commit review versions: +Python 2.7, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23251 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15608] Improve socketserver doc
Martin Panter added the comment: The post makes a bit more sense once you realize the dotted numbers refer to old section numbers (which have moved on now): 20.19.2 → “Server Objects” section 20.19.1 → “Server Creation Notes” Regarding point 2: Instructions for the user to make a threading or forking are still relevant when using a subclass (e.g. HTTPServer) that does not come with a predefined subclass. However documenting which predefined classes exist would be nice too. -- nosy: +vadmium ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15608 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14307] Make subclassing SocketServer simpler for non-blocking frameworks
Changes by Martin Panter vadmium...@gmail.com: -- nosy: +vadmium ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14307 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1429] FD leak in SocketServer when request handler throws exception
Changes by Martin Panter vadmium...@gmail.com: -- title: FD leak in SocketServer - FD leak in SocketServer when request handler throws exception ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1429 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com