ANN: Urwid 1.0.2

2012-07-14 Thread Ian Ward
Announcing Urwid 1.0.2 -- Urwid home page: http://excess.org/urwid/ Manual: http://excess.org/urwid/wiki/UrwidManual Tarball: http://excess.org/urwid/urwid-1.0.2.tar.gz About this release: === This is a stable bug-fix-only release. A number of bugs

[ANN] ftputil 2.7.1 released

2012-07-14 Thread Stefan Schwarzer
ftputil 2.7.1 is now available from http://ftputil.sschwarzer.net/download . Changes since version 2.7.1 --- A packaging problem was fixed. [1] What is ftputil? ftputil is a high-level FTP client library for the Python programming language. ftputil

Re: Tkinter.event.widget: handler gets name instead of widget.

2012-07-14 Thread Peter Otten
Terry Reedy wrote: On 7/13/2012 4:24 PM, Frederic Rentsch wrote: On Fri, 2012-07-13 at 09:26 +0200, Peter Otten wrote: Another random idea: run your code on a more recent python/tcl installation. That might have been clearer as python + tcl/tk installation. Yes, sorry; I meant that both

Re: lambda in list comprehension acting funny

2012-07-14 Thread Steven D'Aprano
On Fri, 13 Jul 2012 21:53:10 -0700, rusi wrote: On Jul 14, 8:43 am, Steven D'Aprano steve +comp.lang.pyt...@pearwood.info wrote: On Fri, 13 Jul 2012 19:31:24 -0700, rusi wrote: Consider the following def foo(x):     i = 100     if x:         j = [i for i in range(10)]        

Re: code review

2012-07-14 Thread Ian Kelly
On Fri, Jul 13, 2012 at 5:09 PM, Terry Reedy tjre...@udel.edu wrote: From now on, for each operator I would have to remember wether it is a supposedly comparison operator or not. I believe the following rule is true: if a op b is True or False raises, I don't follow. Raises what? then op

Re: lambda in list comprehension acting funny

2012-07-14 Thread 88888 Dihedral
Alister於 2012年7月12日星期四UTC+8下午5時44分15秒寫道: On Wed, 11 Jul 2012 08:43:11 +0200, Daniel Fetchinson wrote: gt;gt; funcs = [ lambda x: x**i for i in range( 5 ) ] gt;gt; print funcs[0]( 2 ) gt;gt; print funcs[1]( 2 ) gt;gt; print funcs[2]( 2 ) gt;gt; gt;gt; This gives me gt;gt; gt;gt; 16 16 16

from octave to python

2012-07-14 Thread invis
Hello everyone ! I used Octave for matrix computations, but looks like Python will be useful everywhere so it is good idea to migrate (imho ofc). But I am novice here and dont know how to get things that was easy in Octave, for example: [intersect iA iB] = intersect(a, b) To do this in Python

Re: How to safely maintain a status file

2012-07-14 Thread Christian Heimes
Am 13.07.2012 03:52, schrieb Steven D'Aprano: And some storage devices (e.g. hard drives, USB sticks) don't actually write data permanently even when you sync the device. They just write to a temporary cache, then report that they are done (liar liar pants on fire). Only when the cache is

Re: from octave to python

2012-07-14 Thread invis
суббота, 14 июля 2012 г., 15:27:24 UTC+4 пользователь invis написал: Hello everyone ! I used Octave for matrix computations, but looks like Python will be useful everywhere so it is good idea to migrate (imho ofc). But I am novice here and dont know how to get things that was easy in

Re: Python and Qt4 Designer

2012-07-14 Thread Michael Torrie
On 07/13/2012 03:12 PM, Jean Dubois wrote: Thanks for the extra docu references In this day and age, I think compiling ui files to code is probably on the way out. Instead you should consider using the ui files directly in your code. This has the advantage of letting you change the gui

Re: Python and Qt4 Designer

2012-07-14 Thread rusi
On Jul 14, 7:45 pm, Michael Torrie torr...@gmail.com wrote: On 07/13/2012 03:12 PM, Jean Dubois wrote: Thanks for the extra docu references In this day and age, I think compiling ui files to code is probably on the way out.  Instead you should consider using the ui files directly in your

Re: howto do a robust simple cross platform beep

2012-07-14 Thread Dieter Maurer
Steven D'Aprano steve+comp.lang.pyt...@pearwood.info writes: How do others handle simple beeps? I just want to use them as alert, when certain events occur within a very long running non GUI application. Why? Do you hate your users? I, too, would find it useful -- for me (although I do not

Re: howto do a robust simple cross platform beep

2012-07-14 Thread Miki Tebeka
How do others handle simple beeps? http://pymedia.org/ ? I *think* the big UI frameworks (Qt, wx ...) have some sound support. -- http://mail.python.org/mailman/listinfo/python-list

Re: howto do a robust simple cross platform beep

2012-07-14 Thread Chris Angelico
On Sun, Jul 15, 2012 at 3:54 AM, Dieter Maurer die...@handshake.de wrote: I, too, would find it useful -- for me (although I do not hate myself). Surely, you know an alarm clock. Usually, it gives an audible signal when it is time to do something. A computer can in principle be used as a

Re: code review

2012-07-14 Thread Terry Reedy
On 7/14/2012 5:26 AM, Ian Kelly wrote: On Fri, Jul 13, 2012 at 5:09 PM, Terry Reedy tjre...@udel.edu wrote: I believe the following rule is true: if a op b is True or False raises, Sorry, left out 'or' in 'or raises' I don't follow. Raises what? an Exception. then op is a potentially

Re: lambda in list comprehension acting funny

2012-07-14 Thread Steven D'Aprano
On Fri, 13 Jul 2012 12:54:02 -0600, Ian Kelly wrote: On Fri, Jul 13, 2012 at 11:53 AM, Hans Mulder han...@xs4all.nl wrote: The function `function` refers to a variable `VERBOSE` that isn't local. In some programming langauages, the interpreter would then scan the call stack at run-time,

Request for useful functions on dicts

2012-07-14 Thread Leif
Hi, everybody. I am trying to collect all the functions I've found useful for working with dicts into a library: https://github.com/leifp/dictutil If you have a favorite dict-related func / class, or know of similar projects, please let me know (or open an issue on github). Bear in mind that

Re: lambda in list comprehension acting funny

2012-07-14 Thread Dan Stromberg
On Sat, Jul 14, 2012 at 4:29 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: I don't remember whether it is Javascript or PHP that uses dynamic binding, but whichever it is, it is generally considered to be a bad idea, at least as the default or only behaviour. Bash is

Re: [OT] Simulation Results Managment

2012-07-14 Thread Neal Becker
moo...@yahoo.co.uk wrote: Hi, This is a general question, loosely related to python since it will be the implementation language. I would like some suggestions as to manage simulation results data from my ASIC design. For my design, - I have a number of simulations testcases

Re: lambda in list comprehension acting funny

2012-07-14 Thread Chris Angelico
On Sun, Jul 15, 2012 at 9:29 AM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: Not necessarily *compile* time, but the distinction is between when the function is defined (which may at compile time, or it may be at run time) versus when the function is called. I'd treat the

Re: howto do a robust simple cross platform beep

2012-07-14 Thread Hans Mulder
On 14/07/12 20:49:11, Chris Angelico wrote: On Sun, Jul 15, 2012 at 3:54 AM, Dieter Maurer die...@handshake.de wrote: I, too, would find it useful -- for me (although I do not hate myself). Surely, you know an alarm clock. Usually, it gives an audible signal when it is time to do something. A

Re: howto do a robust simple cross platform beep

2012-07-14 Thread Chris Angelico
On Sun, Jul 15, 2012 at 10:39 AM, Hans Mulder han...@xs4all.nl wrote: The other prerequisite is that the use is physically near the compueter where your Python process is running. If, for exmple, I'm ssh'ed into my webserver, then sending a sound file to the server's speaker may startle

Re: howto do a robust simple cross platform beep

2012-07-14 Thread rantingrickjohnson
On Friday, July 13, 2012 8:00:05 PM UTC-5, gelonida wrote: I just want to use a beep command that works cross platform. [...] I just want to use them as alert, when certain events occur within a very long running non GUI application. I can see a need for this when facing a non GUI interface.

Re: Tkinter.event.widget: handler gets name instead of widget.

2012-07-14 Thread rantingrickjohnson
On Thursday, July 12, 2012 1:53:54 PM UTC-5, Frederic Rentsch wrote: The hit list is a table of investment titles (stock, funds, bonds) that displays upon entry of a search pattern into a respective template. The table displays the matching records: name, symbol, ISIN, CUSIP, Sec. Any line

Re: Simulation Results Managment

2012-07-14 Thread rusi
On Jul 14, 10:50 am, moo...@yahoo.co.uk wrote: Hi, This is a general question, loosely related to python since it will be the implementation language. I would like some suggestions as to manage simulation results data from my ASIC design. For my design, - I have a number of simulations

Re: Keeping the Console Open with IDLE

2012-07-14 Thread rantingrickjohnson
On Thursday, February 19, 2009 10:06:42 PM UTC-6, W. eWatson wrote: I'm using IDLE for editing, but execute programs directly. If there are execution or compile errors, the console closes before I can see what it contains. How do I prevent that? Q: If you are in fact using IDLE to edit your

Re: help needed with subprocess, pipes and parameters

2012-07-14 Thread Chris Rebert
On Friday, July 13, 2012, nuffi wrote: If I copy and paste the following command into a command window, it does what I need. c:\Programs\bob\bob.exe -x -y C:\text\path\to some\file.txt | c:\Programs\kate\kate.exe -A 2 --dc Print Media Is Dead --da Author --dt Title --hf Times --bb 14

Re: [OT] Simulation Results Managment

2012-07-14 Thread moogyd
On Sunday, July 15, 2012 2:42:39 AM UTC+2, Neal Becker wrote: me wrote: gt; Hi, gt; This is a general question, loosely related to python since it will be the gt; implementation language. I would like some suggestions as to manage simulation gt; results data from my ASIC design. gt;

Re: Simulation Results Managment

2012-07-14 Thread moogyd
On Sunday, July 15, 2012 5:25:14 AM UTC+2, rusi wrote: On Jul 14, 10:50 am, moo...@yahoo.co.uk wrote: gt; Hi, gt; This is a general question, loosely related to python since it will be the implementation language. gt; I would like some suggestions as to manage simulation results data from

Re: Python and Qt4 Designer

2012-07-14 Thread Michael Torrie
On 07/14/2012 11:13 AM, rusi wrote: I looked at the second link and find code like this: app = None if ( not app ): app = QtGui.QApplication([]) Maybe I'm dense but whats that if doing there? Frankly I seem to be a bit jinxed with gui stuff. A few days ago someone was singing the

[issue15301] os.chown: OverflowError: Python int too large to convert to C long

2012-07-14 Thread Larry Hastings
Larry Hastings la...@hastings.org added the comment: That patch from Victor looks pretty good. I'll try to get it in for beta 2, however I'm on the road right now. I'm back Sunday night and will try to do it then. If someone else wants to jump in that's fine with me. -- assignee:

[issue15331] Codecs docs should explain that the bytes-bytes shorthand aliases are missing

2012-07-14 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: While you're right about that, the docs shouldn't be claiming they're available as long as that is the case. Updated the issue to make it clear this is a problem with the current docs and the change in the nature of the encode() and decode()

[issue7475] codecs missing: base64 bz2 hex zlib hex_codec ...

2012-07-14 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: FWIW it's, I've been thinking further about this recently and I think implementing this feature as builtin methods is the wrong way to approach it. Instead, I propose the addition of codecs.encode and codecs.decode methods that are type

[issue15339] document the threading facts of life in Python

2012-07-14 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: Given the scope of the issue, a concurrent programming howto that lists some of the available options and the caveats associated with each of them seems worthwhile. -- nosy: +ncoghlan ___ Python

[issue15349] SyntaxError b0rked grammar

2012-07-14 Thread Ztatik Light
New submission from Ztatik Light ztatik.li...@gmail.com: SyntaxError: import * is not allowed in function '__init__' because it is contains a nested function with free variables ^ /s/because it is contains/because it contains -- components: Interpreter Core messages: 165437

[issue14455] plistlib unable to read json and binary plist files

2012-07-14 Thread d9pouces
d9pouces pyt...@19pouces.net added the comment: The plutil (Apple's command-line tool to convert plist files from a format to another) returns an error if you try to convert a XML plist with dates to JSON. -- ___ Python tracker

[issue7475] codecs missing: base64 bz2 hex zlib hex_codec ...

2012-07-14 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7475 ___ ___ Python-bugs-list

[issue13866] {urllib, urllib.parse}.urlencode should not use quote_plus

2012-07-14 Thread samwyse
samwyse samw...@gmail.com added the comment: Since no one else seems willing to do it, here's a patch that adds a 'quote_via' keyword parameter to the urlencode function. import urllib.parse query={foo: + } urllib.parse.urlencode(query) 'foo=%2B+' urllib.parse.urlencode(query,

[issue15350] {urllib,urllib.parse}.urlencode.__doc__ is unclear

2012-07-14 Thread samwyse
New submission from samwyse samw...@gmail.com: The doc string for url encode states: The query arg may be either a string or a bytes type. When query arg is a string, the safe, encoding and error parameters are sent to the quote_via function for encoding IMHO, this implies that the

[issue15350] {urllib,urllib.parse}.urlencode.__doc__ is unclear

2012-07-14 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- stage: - needs patch type: behavior - enhancement versions: -Python 2.6, Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15350

[issue15327] Argparse: main arguments and subparser arguments indistinguishable

2012-07-14 Thread samwyse
samwyse samw...@gmail.com added the comment: The Namespace object contains a combined list of all of the arguments, from both the main parser and the subparser. I don't see any way to resolve identically name augments without breaking a lot of code that relies on the current behavior. I

[issue15280] Don't use builtins as variable names in urllib.request

2012-07-14 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: We don’t do code cleanups for their own sake, but rather as part of a bug fix or feature addition. Please see #15137 for a longer explanation. -- nosy: +eric.araujo, r.david.murray, terry.reedy ___

[issue15311] Developer Guide doesn't get updated once a day

2012-07-14 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15311 ___ ___ Python-bugs-list

[issue15314] Use importlib instead of pkgutil in runpy

2012-07-14 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15314 ___ ___ Python-bugs-list

[issue15317] Source installation sets incorrect permissions for Grammar3.2.3.final.0.pickle

2012-07-14 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: How did you configure and build? If you ran make as root it may explain this. -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15317

[issue15280] Don't use builtins as variable names in urllib.request

2012-07-14 Thread Brian Brazil
Brian Brazil brian.bra...@gmail.com added the comment: This patch is a result of frustration encountered when debugging #15002. Not being able to use 'type' directly is rather annoying, so after figuring that bug out I set some time aside to make it easier for the next person. This could be

[issue15323] Provide target name in output message when Mock.assert_called_once_with fails

2012-07-14 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Nice idea! A small question: Why print 'time' in the message and not 'time.time'? -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15323

[issue15328] datetime.strptime slow

2012-07-14 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- components: +Extension Modules -None versions: +Python 3.4 -Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15328 ___

[issue15336] Argparse required arguments incorrectly displayed as optional arguments

2012-07-14 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15336 ___ ___ Python-bugs-list

[issue15337] The cmd module incorrectly lists help as an undocumented command

2012-07-14 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- nosy: +eric.araujo title: The cmd module incorrectly lists help as an undocument command - The cmd module incorrectly lists help as an undocumented command ___ Python tracker rep...@bugs.python.org

[issue15343] pydoc -w package writes out page with empty Package Contents section

2012-07-14 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- nosy: +brett.cannon, ncoghlan ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15343 ___ ___

[issue15343] pydoc -w package writes out page with empty Package Contents section

2012-07-14 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Sounds like a pkgutil-related issue to me. -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15343 ___

[issue15299] pkgutil.ImpImporter(None).iter_modules() does not search sys.path

2012-07-14 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- nosy: +brett.cannon, eric.araujo, ncoghlan ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15299 ___

[issue5815] locale.getdefaultlocale() missing corner case

2012-07-14 Thread Serhiy Storchaka
Serhiy Storchaka storch...@gmail.com added the comment: Here is yet some inconsistency: $ LANG=uk_ua.microsoftcp1251 ./python -c import locale; print(locale.getdefaultlocale()) ('uk_UA', 'CP1251') $ LANG=uk_ua.microsoft-cp1251 ./python -c import locale; print(locale.getdefaultlocale())

[issue5815] locale.getdefaultlocale() missing corner case

2012-07-14 Thread Serhiy Storchaka
Serhiy Storchaka storch...@gmail.com added the comment: Here is a complex patch for more careful locale parsing. -- Added file: http://bugs.python.org/file26380/locale_parse.patch ___ Python tracker rep...@bugs.python.org

[issue15327] Argparse: main arguments and subparser arguments indistinguishable

2012-07-14 Thread samwyse
samwyse samw...@gmail.com added the comment: One change and one minor problem with my suggestion. First, you don't need the second alias, since it's a prefix of the argument name. Also, HelpFormatter._format_actions_usage ends with a bit of code labeled clean up separators for mutually

[issue15230] runpy.run_path doesn't set __package__ correctly

2012-07-14 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 3b05cf877124 by Nick Coghlan in branch '3.2': Close #15230: runpy.run_path now sets __package__ correctly. Also refactored the runpy tests to use a more systematic approach

[issue14935] PEP 384 Refactoring applied to _csv module

2012-07-14 Thread Robin Schreiber
Robin Schreiber robin.schrei...@me.com added the comment: Added missing INCREF and DECREF inside the dealloc, and new methods of the types. -- Added file: http://bugs.python.org/file26381/csv_pep384_v1.patch ___ Python tracker rep...@bugs.python.org

[issue15230] runpy.run_path doesn't set __package__ correctly

2012-07-14 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 4880aac5c665 by Nick Coghlan in branch '3.2': Issue #15230: Update runpy docs to clarify a couple of points that came up in this issue http://hg.python.org/cpython/rev/4880aac5c665 New changeset 416cd57d38cf by

[issue15343] pydoc -w package writes out page with empty Package Contents section

2012-07-14 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: Indeed, pydoc relies on pkgutil.walk_packages to work out what to document, and that's broken currently due to the reliance on a non-standard importer API that isn't in PEP 302 (not even as an optional extension, like the get_filename() used

[issue15351] Add to unittest.TestCase support for using context managers

2012-07-14 Thread Chris Jerdonek
New submission from Chris Jerdonek chris.jerdo...@gmail.com: The setUp() and tearDown() methods of unittest.TestCase are of course extremely useful. But sometimes one has set up and tear down functionality that one would like to apply in the form of an existing context manager (and that may

[issue15299] pkgutil.ImpImporter(None).iter_modules() does not search sys.path

2012-07-14 Thread Chris Jerdonek
Chris Jerdonek chris.jerdo...@gmail.com added the comment: In addition, before changing ImpImporter.iter_modules(), we should probably also add some tests of the method for values of self.path that do work (i.e. for when self.path is not None). The method is currently untested. I can work on

[issue15299] pkgutil.ImpImporter(None).iter_modules() does not search sys.path

2012-07-14 Thread Brett Cannon
Changes by Brett Cannon br...@python.org: -- nosy: -brett.cannon ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15299 ___ ___ Python-bugs-list

[issue15343] pydoc -w package writes out page with empty Package Contents section

2012-07-14 Thread Brett Cannon
Brett Cannon br...@python.org added the comment: Ugh, I don't exactly love the idea of adding a method to any of importlib's finders simply because PJE didn't try to make this non-standard API part of PEP 302 or something. But basically pkgutil is worthless without doing something about this

[issue15228] os.utime() docs not clear on behavior on nonexistant files

2012-07-14 Thread Larry Hastings
Larry Hastings la...@hastings.org added the comment: I don't think this needs clarifying. If you think the reference to touch currently only muddles the issue, let's remove it entirely. -- ___ Python tracker rep...@bugs.python.org

[issue15343] pydoc -w package writes out page with empty Package Contents section

2012-07-14 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Not great, but that sounds reasonable. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15343 ___

[issue15337] The cmd module incorrectly lists help as an undocumented command

2012-07-14 Thread Roger Serwy
Roger Serwy roger.se...@gmail.com added the comment: On 3.3.0b1 and 3.2 I get: (Cmd) help Documented commands (type help topic): help I only see help under Undocumented with 2.7. It looks like this changeset f8c896ad787f never got backported to

[issue15343] pydoc -w package writes out page with empty Package Contents section

2012-07-14 Thread Chris Jerdonek
Chris Jerdonek chris.jerdo...@gmail.com added the comment: I agree pkgutil is pretty much useless right now and deprecation worth considering. But isn't another option simply to change pkgutil's internals to provide its own iter_modules whenever it finds that method missing? This seems to

[issue15280] Don't use builtins as variable names in urllib.request

2012-07-14 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Not being able to use 'type' directly is rather annoying, so after figuring that bug out I set some time aside to make it easier for the next person. If you make a patch for #15002 then by all means rename “type” to “filetype” so that you can

[issue15343] pydoc -w package writes out page with empty Package Contents section

2012-07-14 Thread Chris Jerdonek
Chris Jerdonek chris.jerdo...@gmail.com added the comment: In Python 2.7, I just did this test: import sys, pkgutil for path in sys.path: ... print pkgutil.get_importer(path) And got only pkgutil.ImpImporter instances and imp.NullImporter objects. So even before, at least in the most

[issue15343] pydoc -w package writes out page with empty Package Contents section

2012-07-14 Thread Brett Cannon
Brett Cannon br...@python.org added the comment: Right, you aren't getting ImpImporters because they are only used when a module doesn't define __loader__. But in Python 3.3, by default *all* modules get that attribute defined. And yes, we could either tweak pkgutil to recognize FileFinder

[issue9522] xml.etree.ElementTree forgets the encoding

2012-07-14 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9522 ___ ___ Python-bugs-list

[issue15352] importlib.h should be regenerated when the marshaling code changes

2012-07-14 Thread Meador Inge
New submission from Meador Inge mead...@gmail.com: Today I was hacking on a patch that changes the marshaling format for Code objects. When building the patch I was met with: ValueError: bad marshal data (unknown type code) make: *** [Lib/_sysconfigdata.py] Abort trap: 6 This is

[issue15352] importlib.h should be regenerated when the marshaling code changes

2012-07-14 Thread Meador Inge
Meador Inge mead...@gmail.com added the comment: Patch attached. -- keywords: +patch stage: needs patch - patch review Added file: http://bugs.python.org/file26382/issue15352-v0.patch ___ Python tracker rep...@bugs.python.org

[issue15351] Add to unittest.TestCase support for using context managers

2012-07-14 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Well, if you want to invoke the context in setup/teardown for some reason (as opposed to in the test methods themselves), you can do this: def setUp(self): self.foo = MyContextManager.__enter__()

[issue15351] Add to unittest.TestCase support for using context managers

2012-07-14 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: That should have been self.addCleanup(MyContextManager.__exit__) You could alternatively call __exit__() explicitly in tearDown, of course, but I believe addCleanup is a more reliable cleanup than tearDown. --

[issue15352] importlib.h should be regenerated when the marshaling code changes

2012-07-14 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Looks good to me. It probably won't cover all cases (such as e.g. changing the bytecode format), but it's a good step forward. -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org

[issue15353] ld: library not found for -lpython3.3m because of wrong LDFLAGS_PYTHON

2012-07-14 Thread Jerry Jacobs
New submission from Jerry Jacobs je...@xor-gate.org: Dear all, I'm using python in a application (sigrok.org) and want to ship it as a framework with a .app folder. I'm building python-3.3b1 from source to a .framework. It is correctly compiled and installed in the given directory. Only the

[issue15353] ld: library not found for -lpython3.3m because of wrong LDFLAGS_PYTHON

2012-07-14 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +hynek, ned.deily ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15353 ___ ___ Python-bugs-list

[issue15353] ld: library not found for -lpython3.3m because of wrong LDFLAGS_PYTHON

2012-07-14 Thread Ned Deily
Changes by Ned Deily n...@acm.org: -- assignee: ronaldoussoren - ned.deily ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15353 ___ ___

[issue15351] Add to unittest.TestCase support for using context managers

2012-07-14 Thread Chris Jerdonek
Chris Jerdonek chris.jerdo...@gmail.com added the comment: Thanks for the interesting background and feedback. I was aware of the __enter__/__exit__ option but not the other information. And yes, I agree on the importance of trying and discussing any API before settling on it. The one I

[issue14340] Update embedded copy of expat - fix security crash issues

2012-07-14 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset e4dc8be9a72f by Gregory P. Smith in branch 'default': Update the embedded copy of the expat XML parser to 2.1.0. It brings http://hg.python.org/cpython/rev/e4dc8be9a72f -- nosy: +python-dev

[issue14340] Update embedded copy of expat - fix security crash issues

2012-07-14 Thread Gregory P. Smith
Gregory P. Smith g...@krypto.org added the comment: Updated in 3.3 for beta2. I'll leave it up to release managers to decide if they want to apply these updates for future 2.7 and 3.2 releases (trivial, just be sure to keep our one local modification adding the #define XML_HAS_SET_HASH_SALT

[issue14340] Update embedded copy of expat - fix security crash issues

2012-07-14 Thread Gregory P. Smith
Gregory P. Smith g...@krypto.org added the comment: Reasons why it is a good idea to apply this change to 2.7.4 and 3.2.4: * Memory leak in poolGrow (CVE-2012-1148) * Resource leak in readfilemap.c (CVE-2012-1147) * Buffer over-read and crash in big2_toUtf8 (CVE-2009-3560) * Parser crash with

[issue15354] _PyObject_LengthHint only accepts longs

2012-07-14 Thread Philip Jenvey
New submission from Philip Jenvey pjen...@underboss.org: The __length_hint__ optimization was broken a while ago for many iterators due to a bug introduced in 44c090c74202. It only accepts longs as valid hints, not ints This affects 2.6 too (but that's in security-only fix mode), but not 3.x

[issue15354] _PyObject_LengthHint only accepts longs

2012-07-14 Thread Philip Jenvey
Philip Jenvey pjen...@underboss.org added the comment: attached a fix for review -- keywords: +patch Added file: http://bugs.python.org/file26383/lengthhint-fix.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15354

[issue15355] generator.__next__() docs should mention exception if already executing

2012-07-14 Thread Chris Jerdonek
New submission from Chris Jerdonek chris.jerdo...@gmail.com: I think the generator.__next__() documentation should say that it raises an exception if the generator is already executing: http://docs.python.org/dev/reference/expressions.html#generator.__next__ I don't think this is currently

[issue15301] os.chown: OverflowError: Python int too large to convert to C long

2012-07-14 Thread Larry Hastings
Larry Hastings la...@hastings.org added the comment: It looks like #1747858 is another duplicate. Though arguably all these dups aren't really dups because I rewrote chown's argument parsing for 3.3. -- ___ Python tracker rep...@bugs.python.org

[issue15354] _PyObject_LengthHint only accepts longs

2012-07-14 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: It's probably easier just to use PyNumber_Check. -- nosy: +benjamin.peterson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15354 ___

[issue15238] shutil.copystat should copy Linux extended attributes

2012-07-14 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 5f62c317c202 by Larry Hastings in branch 'default': - Issue #15238: shutil.copystat now copies Linux extended attributes. http://hg.python.org/cpython/rev/5f62c317c202 -- nosy: +python-dev

[issue15354] _PyObject_LengthHint only accepts longs

2012-07-14 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 872afada51b0 by Benjamin Peterson in branch '2.7': allow any number to be returned from __length_hint__ (closes #15354) http://hg.python.org/cpython/rev/872afada51b0 -- nosy: +python-dev resolution: - fixed

[issue15238] shutil.copystat should copy Linux extended attributes

2012-07-14 Thread Larry Hastings
Changes by Larry Hastings la...@hastings.org: -- resolution: - fixed stage: needs patch - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15238 ___

[issue15301] os.chown: OverflowError: Python int too large to convert to C long

2012-07-14 Thread Larry Hastings
Larry Hastings la...@hastings.org added the comment: Here's a first cut at a patch. It's really just an update of Victor's patch to #4591 (done with his blessing). I tweaked it slightly; the parsing functions are now O converter functions. I also added a reasonable unit test. Note however

[issue15233] atexit: guarantee order of execution of registered functions?

2012-07-14 Thread Larry Hastings
Larry Hastings la...@hastings.org added the comment: Okay, I'll remove the .. note. Checking in shortly. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15233 ___

[issue15233] atexit: guarantee order of execution of registered functions?

2012-07-14 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset f8b520b6f654 by Larry Hastings in branch 'default': - Issue #15233: Python now guarantees that callables registered with http://hg.python.org/cpython/rev/f8b520b6f654 --

[issue15233] atexit: guarantee order of execution of registered functions?

2012-07-14 Thread Larry Hastings
Larry Hastings la...@hastings.org added the comment: So, it's checked in to trunk. Shall I also backport to 2.7 and 3.2 as the issue suggests? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15233

[issue15202] followlinks/follow_symlinks/symlinks flags unification

2012-07-14 Thread Larry Hastings
Larry Hastings la...@hastings.org added the comment: The .4 patches both LGTM, please commit! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15202 ___

[issue15356] '\xa0' isspace returns true while compiling python on solaris 10 by users using gcc 3.4.6

2012-07-14 Thread zoupl
New submission from zoupl zoupen...@gmail.com: Compile python (from 2.4.6 to version 2.6.8) on solaris 5.10 sparc using gcc 3.4.6. When using UTf-8, the \xa0 is a space. Howeve this is wrong. Version 2.7 is OK. s = '\xa0' assert s.strip() == s import locale locale.setlocale(locale.LC_ALL,

[issue15343] pydoc -w package writes out page with empty Package Contents section

2012-07-14 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: *sigh* And, of course, there's no meaningful regression test defined for pkgutil.walk_packages, which is why the test suite didn't pick this up :( Oh well, at least I have a clear place to start. -- assignee: - ncoghlan

[issue15357] Deprecate redundant pieces of pkgutil

2012-07-14 Thread Nick Coghlan
New submission from Nick Coghlan ncogh...@gmail.com: To set the stage for fixing the regression reported in #15343, I'm going through and clearly marking the parts of pkgutil which should no longer be used now that the default import system is PEP 302 compliant. -- assignee: ncoghlan

  1   2   >