Happy New Year
Hi, ALL, I want to wish everybody who is reading and involved with the list Happy and oyful New Year! Let's have a great time in it and lets make a lot of good products and new releases with the software that everybody involve with. Thank you. -- https://mail.python.org/mailman/listinfo/python-list
Re: Python/Django Extract and append only new links
Max Cuban edze...@gmail.com writes: I am putting together a project using Python 2.7 Django 1.5 on Windows 7. I believe this should be on the django group but I haven't had help from there so I figured I would try the python list I have the following view: views.py: [snip] Right now as my code stands, anytime I run it, it scraps all the links on the frontpage of the sites selected and presents them paginated all afresh. However, I don't think its a good idea for the script to read/write all the links that had previously extracted links all over again and therefore would like to check for and append only new links. I would like to save the previously scraped links so that over the course of say, a week, all the links that have appeared on the frontpage of these sites will be available on my site as older pages. It's my first programming project and don't know how to incorporate this logic into my code. Any help/pointers/references will be greatly appreciated. regards, Max I don't know anything about Django, but I don't think this is a Django question. I think the best way would be to put the urls in a database with the time that they have been retrieved. Then you could retrieve the links from the database next time, and when present, sort them on time retrieved and put them at the end of the list. Now if you want to do this on a user basis you should add user information with it also (and then it would be partly a Django problem because you would get the user id from Django). -- Piet van Oostrum p...@vanoostrum.org WWW: http://pietvanoostrum.com/ PGP key: [8DAE142BE17999C4] -- https://mail.python.org/mailman/listinfo/python-list
Re: Python 2.x and 3.x usage survey
On Mon, 30 Dec 2013 13:56:30 -0800, Dan Stromberg drsali...@gmail.com wrote: I keep hearing naysayers, nay saying about Python 3.x. Here's a 9 question, multiple choice survey I put together about Python 2.x use vs Python 3.x use. I'd be very pleased if you could take 5 or 10 minutes to fill it out. I had a look at it, but I've got about as far as Hello World in both. I borrowed a book called Learning Python by Lutz and Asher, which is geared for 2.2/2.3. But the version I have in Windows is 3.2, and it seems that even Hello World presents and insurmountable problem. Eventually I discovered that one of the differences bytween 2.x and 3.x is that the former has print and the latter has print() but weven using that it tells me it cant find the PRN device or something. I've got 2.x on Linux, so I booted into that and it seemed to work there, but it seems that the differences between the versions are not trivial. So perhaps I should just try to install 2.x in Windows, and learn that. -- Steve Hayes from Tshwane, South Africa Web: http://www.khanya.org.za/stevesig.htm Blog: http://khanya.wordpress.com E-mail - see web page, or parse: shayes at dunelm full stop org full stop uk -- https://mail.python.org/mailman/listinfo/python-list
Re: Python 2.x and 3.x usage survey
On Wed, Jan 1, 2014 at 9:41 PM, Steve Hayes hayes...@telkomsa.net wrote: I borrowed a book called Learning Python by Lutz and Asher, which is geared for 2.2/2.3. That's really REALLY old. Even Red Hat isn't still supporting 2.2. You can quite easily get started on 3.2 on Windows - though I would recommend grabbing 3.3 and using that - just start with this tutorial: http://docs.python.org/3/tutorial/ I don't know exactly what will be different in 2.2, but there's no point learning a version that old. If nothing else, you'll miss out on a lot of neat features. ChrisA -- https://mail.python.org/mailman/listinfo/python-list
Re: Python 2.x and 3.x usage survey
Steve Hayes wrote: I borrowed a book called Learning Python by Lutz and Asher, which is geared for 2.2/2.3. But the version I have in Windows is 3.2, and it seems that even Hello World presents and insurmountable problem. It certainly is not *insurmountable*. Not unless you consider typing brackets ( ) to be an inhumanly difficult task, in which case you might as well give up on being a programmer and take up something easier like brain surgery. # Python 2 version print Hello World! # Python 3 version print(Hello World!) Eventually I discovered that one of the differences bytween 2.x and 3.x is that the former has print and the latter has print() but weven using that it tells me it cant find the PRN device or something. Possibly you're trying to run print(Hello World) at the DOS command prompt rather than using Python. I'm not sure exactly what you're doing, but I do know that you shouldn't get any errors about the PRN device from Python. That sounds like it is a Windows error. I've got 2.x on Linux, so I booted into that and it seemed to work there, but it seems that the differences between the versions are not trivial. For the most part, they are trivial. With only a few exceptions, everything in Python 2 can be easily, even mechanically, translated to Python 3. Python 3 includes a lot of new features that a Python 2.3 book won't even mention. But if course, since the book doesn't mention them, you won't need to deal with them. It also includes a few changes from statements to functions, like print and exec (but as a beginner, you shouldn't be using exec). A few modules have been renamed. In my personal opinion, the most annoying change from Python 2 to 3 is renaming modules, because I can never remember the new name. None of these are *difficult* changes. As a beginner, of course, you cannot be expected to automatically know how to deal with a problem like this one: py from StringIO import StringIO Traceback (most recent call last): File stdin, line 1, in module ImportError: No module named 'StringIO' But let me give you a secret known only to a few: to solve this problem is not hard. Just google for StringIO renamed Python 3. which will take you to the What's New in Python 3 document, which reveals that the StringIO module is renamed to io.StringIO, and so you should use this instead: from io import StringIO https://duckduckgo.com/?q=StringIO%20renamed%20Python%203 If googling fails, feel free to ask here! -- Steven -- https://mail.python.org/mailman/listinfo/python-list
Re: Python 2.x and 3.x usage survey
On Wed, 01 Jan 2014 22:37:45 +1100, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: Steve Hayes wrote: I borrowed a book called Learning Python by Lutz and Asher, which is geared for 2.2/2.3. But the version I have in Windows is 3.2, and it seems that even Hello World presents and insurmountable problem. It certainly is not *insurmountable*. Not unless you consider typing brackets ( ) to be an inhumanly difficult task, in which case you might as well give up on being a programmer and take up something easier like brain surgery. # Python 2 version print Hello World! # Python 3 version print(Hello World!) I was thinking or of this: python g:\work\module1.py File stdin, line 1 python g:\work\module1.py ^ Which gave a different error the previous time I did it. But, hey, it worked from the DOS prompt C:\Python32python g:\work\module1.py Hello Module World But hey, don't mind me. The biggest problem I have is that when something doesn't work, I don't know if I have done something stupid, or if it's just an incompatibility of the different versions. -- Steve Hayes from Tshwane, South Africa Web: http://www.khanya.org.za/stevesig.htm Blog: http://khanya.wordpress.com E-mail - see web page, or parse: shayes at dunelm full stop org full stop uk -- https://mail.python.org/mailman/listinfo/python-list
Re: Python 2.x and 3.x usage survey
On Wed, Jan 1, 2014 at 11:38 PM, Steve Hayes hayes...@telkomsa.net wrote: I was thinking or of this: python g:\work\module1.py File stdin, line 1 python g:\work\module1.py ^ Which gave a different error the previous time I did it. But, hey, it worked from the DOS prompt C:\Python32python g:\work\module1.py Hello Module World That's how you invoke a script. Python isn't fundamentally a shell scripting language (like bash, REXX, batch, etc), so there's a distinct difference between Python commands (which go into .py files or are executed at the prompt) and shell commands (including python, which invokes the Python interpreter). The biggest problem I have is that when something doesn't work, I don't know if I have done something stupid, or if it's just an incompatibility of the different versions. Easiest way to eliminate the confusion is to match your tutorial and your interpreter. That's why I recommend going with the python.org tutorial; you can drop down the little box in the top left and choose the exact version of Python that you're running. It WILL match. ChrisA -- https://mail.python.org/mailman/listinfo/python-list
Re: Python 2.x and 3.x usage survey
On 01/01/2014 12:38, Steve Hayes wrote: On Wed, 01 Jan 2014 22:37:45 +1100, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: Steve Hayes wrote: I borrowed a book called Learning Python by Lutz and Asher, which is geared for 2.2/2.3. But the version I have in Windows is 3.2, and it seems that even Hello World presents and insurmountable problem. It certainly is not *insurmountable*. Not unless you consider typing brackets ( ) to be an inhumanly difficult task, in which case you might as well give up on being a programmer and take up something easier like brain surgery. # Python 2 version print Hello World! # Python 3 version print(Hello World!) I was thinking or of this: python g:\work\module1.py File stdin, line 1 python g:\work\module1.py ^ Which gave a different error the previous time I did it. But, hey, it worked from the DOS prompt C:\Python32python g:\work\module1.py Hello Module World But hey, don't mind me. The biggest problem I have is that when something doesn't work, I don't know if I have done something stupid, or if it's just an incompatibility of the different versions. Almost inevitably if you search for the last line of the error that you get you'll find more than enough hits to point you in the right direction. Failing that ask here as we don't bite. There's also the tutor mailing list https://mail.python.org/mailman/listinfo/tutor -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence -- https://mail.python.org/mailman/listinfo/python-list
Re: Python 2.x and 3.x usage survey
On 1 January 2014 23:38, Steve Hayes hayes...@telkomsa.net wrote: I was thinking or of this: python g:\work\module1.py File stdin, line 1 python g:\work\module1.py ^ Which gave a different error the previous time I did it. But, hey, it worked from the DOS prompt C:\Python32python g:\work\module1.py Hello Module World Your windows command shell prompt looks like this: C:\Python32 It indicates that windows shell is waiting for you to type something. It expects the first word you type to be an executable command. If you do this: C:\Python32python g:\work\module1.py it tells the shell to run the python interpreter and feed it all the python statments contained in the file g:\work\module1.py If you do this: C:\Python32python it tells the shell to run the python interpreter interactively, and wait for you to directly type python statements. When the python intepreter is ready for you to type a python statement, it gives you a prompt. It expects you to type a valid python language statement. The reason this gave an error: python g:\work\module1.py is because you are using the python interpreter as shown by , but you typed a windows shell command, not a python statement. -- https://mail.python.org/mailman/listinfo/python-list
Re: Python 2.x and 3.x usage survey
On Wed, 01 Jan 2014 14:38:59 +0200, Steve Hayes hayes...@telkomsa.net wrote: python g:\work\module1.py File stdin, line 1 python g:\work\module1.py ^ Which gave a different error the previous time I did it. But, hey, it worked from the DOS prompt C:\Python32python g:\work\module1.py Hello Module World You need to understand that you are using two VERY different languages, one at the DOS prompt, the other at the python prompt and in .py files. You cannot use shell syntax at the python prompt, any more than you can do the reverse. -- DaveA -- https://mail.python.org/mailman/listinfo/python-list
Retaining drawing across paintevents
Hi all, I am sub-classing the paintevent at the moment to create a 2D plot. I find that I have to re-paint the whole widget every time I call an update(), as I have create a new QPainter() instance. Is there a way to update only a small part of the widget, while retaining the rest of the widget? Thanks in advance Ed BTW if this is the wrong forum to post this, pls let me know. -- https://mail.python.org/mailman/listinfo/python-list
[OT] Culture and Empire
Héllo everybody, I stumbled on Culture and Empire a few days ago and I've been reading it since then. I'm not finished yet. It's insigthful, smart and provocative. It bridge past, present and future. I will put it in my armory *ahem* library between Fundation and The Cathedral and the Bazaar until I read Present Shock. This is the book you want, need and will read this year if any. I quick glimpse into the very readable book: ---8-8-8-8-8-8-8-8-8 Chapter 1. Magic Machines Far away, in a different place, a civilization called Culture had taken seed, and was growing. It owned little except a magic spell called Knowledge. In this chapter, I’ll examine how the Internet is changing our society. It’s happening quickly. The most significant changes have occurred during just the last 10 years or so. More and more of our knowledge about the world and other people is transmitted and stored digitally. What we know and who we know are moving out of our minds and into databases. These changes scare many people, whereas in fact they contain the potential to free us, empowering us to improve society in ways that were never before possible. -8-8-8-8-8-8-8-8- There is also a presentation of the content of the book that I didn't review yet. But it seems like you don't need to read all the book to understand what is in inside. There is also a related crowdfunding project, but I don't know more that since I want to finish the book first. http://cultureandempire.com/ Happy new year (indeed), Amirouche ~ http://hypermove.net/ -- https://mail.python.org/mailman/listinfo/python-list
Re: Retaining drawing across paintevents
On Thu, Jan 2, 2014 at 1:53 AM, angedwa...@gmail.com wrote: I find that I have to re-paint the whole widget every time I call an update(), as I have create a new QPainter() instance. Is there a way to update only a small part of the widget, while retaining the rest of the widget? In general, it would help to say which windowing toolkit you're using :) Fortunately you mention something that implies you're using QT, so I'm going to forge ahead with that. When you call update(), you're effectively saying the whole object needs to be repainted. If you can restrict that to just a particular rectangle, simply pass those coordinates to the update call: http://pyqt.sourceforge.net/Docs/PyQt4/qwidget.html#update-4 I'm not sure if you're using PyQt4 or not, but if you're using something else, look through its docs for a similar function. Same goes for pretty much any windowing toolkit; it's always possible to report that a small area needs updating. Once you then get the update event, you should be given a rectangle that tells you which part needs to be repainted. But painting outside that area will be reasonably fast, so don't stress too much about that part if it's a lot of trouble. For instance, I have a MUD client that will always attempt to draw complete lines, even if only part of a line needs to be redrawn - but it'll repaint only those lines which need repainting (so it looks at the Y coordinates of the please repaint me rectangle, but not the X coords). ChrisA -- https://mail.python.org/mailman/listinfo/python-list
Project from github
Hi, I'm trying to install this Django project https://github.com/changer/socialschools-cms and it 'success'. The problem is, there's no manage.py file in it and i don't know how to run this script on the server. May someone try to help me, please? Thank you very much! Ivan -- https://mail.python.org/mailman/listinfo/python-list
Re: Python 2.x and 3.x usage survey
On Thu, 2 Jan 2014 01:07:54 +1100, David bouncingc...@gmail.com wrote: On 1 January 2014 23:38, Steve Hayes hayes...@telkomsa.net wrote: I was thinking or of this: python g:\work\module1.py File stdin, line 1 python g:\work\module1.py ^ Which gave a different error the previous time I did it. But, hey, it worked from the DOS prompt C:\Python32python g:\work\module1.py Hello Module World Your windows command shell prompt looks like this: C:\Python32 It indicates that windows shell is waiting for you to type something. It expects the first word you type to be an executable command. If you do this: C:\Python32python g:\work\module1.py it tells the shell to run the python interpreter and feed it all the python statments contained in the file g:\work\module1.py If you do this: C:\Python32python it tells the shell to run the python interpreter interactively, and wait for you to directly type python statements. When the python intepreter is ready for you to type a python statement, it gives you a prompt. It expects you to type a valid python language statement. The reason this gave an error: python g:\work\module1.py is because you are using the python interpreter as shown by , but you typed a windows shell command, not a python statement. Thank you. Back to the book! -- Steve Hayes from Tshwane, South Africa Web: http://www.khanya.org.za/stevesig.htm Blog: http://khanya.wordpress.com E-mail - see web page, or parse: shayes at dunelm full stop org full stop uk -- https://mail.python.org/mailman/listinfo/python-list
Re: PySerial for Python 2 vs. Python 3
On 1/1/2014 1:48 AM, Chris Angelico wrote: On Wed, Jan 1, 2014 at 5:39 PM, Travis McGee nob...@gmail.com wrote: What OS? If Windows, did you install the -py3k version for 3.x? Anyway, I finally got it installed, but when I try to use a statement of the sort ser.write(string) I get an exception which seems to imply that the argument needs to be an integer, rather than a string. According to a Stackoverflow issue, .write(n) will write n 0 bytes because it will send bytes(n) == n * bytes(b'\0'). PySerial is written in Python, so you could look at the .write method of the Serial class (presuming that 'ser' is an instance thereof) to see what it does. Quoting the full exception would help! My suspicion is that it works with byte strings, not Unicode strings. That is what the doc either says or implies. So you could do: ser.write(bstring) or: ser.write(string.encode()) to turn it into a stream of bytes (the latter uses UTF-8, the former would use your source file encoding). -- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/python-list
Re: [OT] Culture and Empire
On 1/1/2014 10:01 AM, Amirouche Boubekki wrote: I stumbled on Culture and Empire a few days ago and I've been reading it since then. I'm not finished yet. It's insigthful, smart and provocative. It bridge past, present and future. I will put it in my armory *ahem* library between Fundation and The Cathedral and the Bazaar until I read Present Shock. This is the book you want, need and will read this year if any. ---8-8-8-8-8-8-8-8-8 Chapter 1. Magic Machines Far away, in a different place, a civilization called Culture had taken seed, and was growing. It owned little except a magic spell called Knowledge. In this chapter, I’ll examine how the Internet is changing our society. It’s happening quickly. The most significant changes have occurred during just the last 10 years or so. More and more of our knowledge about the world and other people is transmitted and stored digitally. What we know and who we know are moving out of our minds and into databases. These changes scare many people, whereas in fact they contain the potential to free us, empowering us to improve society in ways that were never before possible. -8-8-8-8-8-8-8-8- http://cultureandempire.com/ The entire book appears to be free and online with a liberal licence Free to share and remix under CC-BY-SA-3.0 so this is not a commercial ad. I am reading it now. -- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/python-list
ipython and pyglet
Hello! Has anyone here tried to get ipython to interact with the event loop for pyglet? If so, would you be willing to share come example code? I would like to be able to interactively code in pyglet, creating and updating objects while the program is running. Thanks! -- https://mail.python.org/mailman/listinfo/python-list
Django filer plugins for django-cms installation
I'm trying to set up a python django_cms system using: Debian OS Wheezy distribution Python 2.7.3 ` Django 1.5.5 PostgreSQL 9.1 with pip and virtualenv. The last test errored out and I traced the problem to the missing cmsplugin-filer-0.9.4.tar.gz package not being installed. The settings.py file has been properly annotated. Where should I put the untared files in a typical Debian Wheezy installation. All help will be sincerely appreciated. Gary R. -- https://mail.python.org/mailman/listinfo/python-list
Suggest an open-source log analyser?
I use the Python logger class; with the example syntax of: Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s') Can of course easily use e.g.: a JSON syntax here instead. Are there any open-source log viewers (e.g.: with a web-interface) that you'd recommend; for drilling down into my logs? Thanks for your suggestions, Alec Taylor -- https://mail.python.org/mailman/listinfo/python-list
Re: Suggest an open-source log analyser?
In article mailman.4787.1388641227.18130.python-l...@python.org, Alec Taylor alec.tayl...@gmail.com wrote: I use the Python logger class; with the example syntax of: Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s') Can of course easily use e.g.: a JSON syntax here instead. Are there any open-source log viewers (e.g.: with a web-interface) that you'd recommend; for drilling down into my logs? Thanks for your suggestions, Alec Taylor I've been experimenting with elasticsearch (to store JSON-format log messages) and kibana (as a front-end search tool). The jury is still out on how well it's going to work. It seems like a pretty powerful combination, but there's definitely a bit of a learning curve to using it. I certainly like the idea of logging structured data, as opposed to plain text. It opens up a world of better ways to search, slice, and dice your log data. -- https://mail.python.org/mailman/listinfo/python-list
Re: looking for a quote on age and technology
Rustom Mody rustompm...@gmail.com writes: For a new technology: If you are a kid when it comes out, you just take it as a matter of course If you are a young adult, then it becomes a hot topic for discussion If you are past middle-age you never get it Anyone knows/remembers it? I think you're referring to an article by the late, great Douglas Adams, “How to Stop Worrying and Learn to Love the Internet”: I suppose earlier generations had to sit through all this huffing and puffing with the invention of television, the phone, cinema, radio, the car, the bicycle, printing, the wheel and so on, but you would think we would learn the way these things work, which is this: 1) everything that’s already in the world when you’re born is just normal; 2) anything that gets invented between then and before you turn thirty is incredibly exciting and creative and with any luck you can make a career out of it; 3) anything that gets invented after you’re thirty is against the natural order of things and the beginning of the end of civilisation as we know it until it’s been around for about ten years when it gradually turns out to be alright really. Apply this list to movies, rock music, word processors and mobile phones to work out how old you are. URL:http://www.douglasadams.com/dna/19990901-00-a.html -- \ “For fast acting relief, try slowing down.” —Jane Wagner, via | `\ Lily Tomlin | _o__) | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list
[issue19108] Benchmark runner tries to execute external Python command and fails on error reporting
Stefan Behnel added the comment: *bump* - patch pending review. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19108 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20065] Python-3.3.3/Modules/socketmodule.c:1660:14: error: 'CAN_RAW' undeclared (first use in this function)
Changes by Charles-François Natali cf.nat...@gmail.com: -- assignee: - neologix ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20065 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20102] shutil._make_zipfile possible resource leak
New submission from Peter Santoro: Now that zipfile.ZipFile supports the context manager protocol, shouldn't shutil._make_zipfile make use of it to avoid the possibility of the archive file not being closed properly if an exception occurs? It should be noted that shutil._unpack_zipfile does use try/finally to ensure that files are closed. -- components: Library (Lib) files: shutil.diff keywords: patch messages: 207132 nosy: pe...@psantoro.net priority: normal severity: normal status: open title: shutil._make_zipfile possible resource leak type: behavior versions: Python 3.3, Python 3.4, Python 3.5 Added file: http://bugs.python.org/file33291/shutil.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20102 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20101] Determine correct behavior for time functions on Windows
Changes by Jeremy Kloth jeremy.kloth+python-trac...@gmail.com: -- nosy: +jkloth ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20101 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20077] Format of TypeError differs between comparison and arithmetic operators
Mitchell Model added the comment: Patch looks good to me. I like the choice to drop the parens. This is my first time reviewing a change; did I go through the right mechanics? I clicked Review on the issue's patch, looked at the diff, and a published a message similar to this one. Was I supposed to do something else? Is that message what Review is looking for? Was the Please review directed at me? Am I supposed to make a comment like looks good here? do something else? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20077 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20075] help(open) eats first line
Gennadiy Zlobin added the comment: Zachary, thank you for review. Here's the updated patch. -- Added file: http://bugs.python.org/file33292/20075-3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20075 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20103] Documentation of itertools.accumulate is confused
New submission from Mitchell Model: The documentation of itertools.accumulate (10.1) starts out with 2 misleading sentences: Make an iterator that returns accumulated sums. Elements may be any addable type... It then goes on to show examples of using the func parameter added in 3.3 that are not additions. It should be changed to something like: Make an iterator that returns accumulated values. Elements may be any type that can be an argument to func. Func defaults to addition, so by default elements can be any addable types, ... My wording is awkward, but you get the idea. I think this is a significant documentation issue, not just a nit. -- assignee: docs@python components: Documentation messages: 207135 nosy: MLModel, docs@python priority: normal severity: normal status: open title: Documentation of itertools.accumulate is confused versions: Python 3.3, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20103 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20098] email policy needs a mangle_from setting
Gennadiy Zlobin added the comment: I created the patch, please review it. -- keywords: +patch nosy: +gennad Added file: http://bugs.python.org/file33293/20098.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20098 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20103] Documentation of itertools.accumulate is confused
Changes by Benjamin Peterson benja...@python.org: -- nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20103 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20104] expose posix_spawn(p)
New submission from Benjamin Peterson: posix_spawn is a nice, efficient replacement for fork()/exec(). We should expose it and possibly use it in subprocess where possible. -- components: Extension Modules messages: 207137 nosy: benjamin.peterson priority: normal severity: normal stage: needs patch status: open title: expose posix_spawn(p) type: performance versions: Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20104 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20104] expose posix_spawn(p)
Changes by Gennadiy Zlobin gennad.zlo...@gmail.com: -- nosy: +gennad ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20104 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20104] expose posix_spawn(p)
Changes by Alex Gaynor alex.gay...@gmail.com: -- nosy: +alex ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20104 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19108] Benchmark runner tries to execute external Python command and fails on error reporting
R. David Murray added the comment: The patch looks good to me, but since I'm not familiar with perf.py I'm not a good person to do a final review and commit it. One trivial question: why do you check for tupleness in PythonRuntime's init? Don't you control the input on both code paths to obtaining the version? -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19108 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20104] expose posix_spawn(p)
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +gregory.p.smith, neologix ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20104 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20104] expose posix_spawn(p)
Gregory P. Smith added the comment: Unless it could replace the fork+exec code path in its entirety, which I do not believe is possible, I see posix_spawn() as a distraction and additional maintenance burden with no benefit. http://pubs.opengroup.org/onlinepubs/759899/functions/posix_spawn.html Read the RATIONALE section. The posix_spawn API was not created to make subprocess creation easier (i'd argue that it is the same burden to setup a proper call to posix_spawn as it is to do everything right for fork and exec). One notable thing posix_spawn() does not support: setsid() (start_new_session=True) of the child process. Obviously it also couldn't handle the arbitrary preexec_fn but preexec_fn is in general considered harmful. -- priority: normal - low ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20104 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20065] Python-3.3.3/Modules/socketmodule.c:1660:14: error: 'CAN_RAW' undeclared (first use in this function)
Changes by STINNER Victor victor.stin...@gmail.com: -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20065 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20098] email policy needs a mangle_from setting
R. David Murray added the comment: Sorry, my message wasn't clear. The current default needs to remain the same. What needs to be added is email.policy.Policy.mange_from, which should be True in the compat32 policy and False in EmailPolicy. Then it needs to be hooked up the Generator, so that an explicit specificaion in the __init__ overrides the policy, but specifying one of EmailPolicy dervived policies will override the default value of the __init__ argument if the argument is not speicifed explicitly in the Generator constructor call. (Backward compatibility is a pain.) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20098 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20101] Determine correct behavior for time functions on Windows
Tim Peters added the comment: I'm not sanguine about fixing any of this :-( The Microsoft docs are awful, and the more web searches I do the more I realize that absolutely everyone is confused, just taking their best guesses. FYI, here are results from your new program on my 32-bit Vista box: 3.4.0b1 (default:9d1fb265b88a, Dec 10 2013, 18:48:53) [MSC v.1600 32 bit (Intel)] Windows-Vista-6.0.6002-SP2 Running: ... monotonic namespace(adjustable=False, implementation='GetTickCount64()', monotonic=True, resolution=0.015625) . total: 25 good: 25 bad: 0 [(0.5, 25)] time namespace(adjustable=True, implementation='GetSystemTimeAsFileTime()', monotonic=False, resolution=0.015625) F total: 25 good: 0 bad: 25 [(0.4999678134918213, 5), (0.4999680519104004, 20)] clock namespace(adjustable=False, implementation='QueryPerformanceCounter()', monotonic=True, resolution=2.793651148400146e-07) . total: 25 good: 1 bad: 24 [(0.49919109830998076, 1), (0.4996682539261279, 1), (0.4997051301212867, 1), (0.4997221713932909, 1), (0.49972636187001385, 1), (0.499727479330474, 1), (0.49973139044208104, 1), (0.49973390472811463, 1), (0.4997383745699526, 1), (0.49974479996759325, 1), (0.4997501079047755, 1), (0.4997501079047756, 1), (0.49975318092104004, 1), (0.499756533302417, 1), (0.4997598856837939, 1), (0.49976239996982863, 1), (0.49976714917678144, 1), (0.49977078092327387, 1), (0.49977189838373315, 1), (0.4997724571139628, 1), (0.49965051145, 1), (0.49979173330688553, 1), (0.4997973206091828, 1), (0.4998065396579734, 1), (0.500726488981142, 1)] perf_counter namespace(adjustable=False, implementation='QueryPerformanceCounter()', monotonic=True, resolution=2.793651148400146e-07) Same clock as time.clock -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20101 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20105] Codec exception chaining is losing traceback details
New submission from Nick Coghlan: The exception chaining in the codecs subsystem is currently losing the details of the original traceback. Compare this traceback from Python 3.3: codecs.decode(babcdefgh, hex_codec) Traceback (most recent call last): File stdin, line 1, in module File /usr/lib64/python3.3/encodings/hex_codec.py, line 20, in hex_decode return (binascii.a2b_hex(input), len(input)) binascii.Error: Non-hexadecimal digit found With the current behaviour of Python 3.4: codecs.decode(babcdefgh, hex) binascii.Error: Non-hexadecimal digit found The above exception was the direct cause of the following exception: Traceback (most recent call last): File stdin, line 1, in module binascii.Error: decoding with 'hex' codec failed (Error: Non-hexadecimal digit found) The original traceback header and details are missing in the latter. It should look more like the following: try: ... 1/0 ... except Exception as e: ... raise Exception(Explicit chaining) from e ... Traceback (most recent call last): File stdin, line 2, in module ZeroDivisionError: division by zero The above exception was the direct cause of the following exception: Traceback (most recent call last): File stdin, line 4, in module Exception: Explicit chaining -- assignee: ncoghlan components: Interpreter Core keywords: 3.4regression messages: 207142 nosy: ncoghlan priority: deferred blocker severity: normal stage: test needed status: open title: Codec exception chaining is losing traceback details type: behavior versions: Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20105 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20097] Bad use of `self` in importlib
Eric Snow added the comment: Here's a patch with tests that cover find_module() and find_spec() for WindowsRegistryFinder (the missing case) and fixes the bug. -- keywords: +patch nosy: +eric.snow stage: test needed - patch review Added file: http://bugs.python.org/file33294/issue20097-tests.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20097 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20097] Bad use of `self` in importlib
Eric Snow added the comment: The patch passes on my linux box and on my windows 7 laptop (using Visual Studio 2010 Express). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20097 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20097] Bad use of `self` in importlib
Changes by Eric Snow ericsnowcurren...@gmail.com: Removed file: http://bugs.python.org/file33294/issue20097-tests.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20097 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20097] Bad use of `self` in importlib
Eric Snow added the comment: Here's an updated patch that fixes as copy-and-paste mistake. -- Added file: http://bugs.python.org/file33295/issue20097-tests.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20097 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20080] Unused variable in Lib/sqlite3/test/factory.py
Vajrasky Kok added the comment: Thanks, Eric! Attached the patch to address Eric's concern. -- Added file: http://bugs.python.org/file33296/unused_variable_in_factory_py_v2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20080 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com