[RELEASED] Python 3.2.2

2011-09-05 Thread Georg Brandl
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On behalf of the Python development team, I'm happy to announce the Python 3.2.2 maintenance release. Python 3.2.2 mainly fixes `a regression http://bugs.python.org/12576`_ in the ``urllib.request`` module that prevented opening many HTTP resources

Hello, and request for help with 'dynamic grids'

2011-09-05 Thread Simon Cropper
Hi, I am a applications developer - originally from Windows using primarily Visual Foxpro, although I am familiar with a variety of other xbase derivatives. I now use Linux / Ubuntu, and have been actively teaching myself Python with the view to migrate most of my applications to

Need help with simple OOP Python question

2011-09-05 Thread Kristofer Tengström
Hi, I'm having trouble creating objects that in turn can have custom objects as variables. The code looks like this: - class A: sub = dict() def sub_add(self, cls): obj = cls() self.sub[obj.id] = obj class B(A): id = 'inst'

Re: Need help with simple OOP Python question

2011-09-05 Thread Stephen Hansen
On 9/4/11 11:47 PM, Kristofer Tengström wrote: Hi, I'm having trouble creating objects that in turn can have custom objects as variables. The code looks like this: - class A: sub = dict() You are sharing this single sub dictionary with all

Re: Need help with simple OOP Python question

2011-09-05 Thread Peter Otten
Kristofer Tengström wrote: Hi, I'm having trouble creating objects that in turn can have custom objects as variables. The code looks like this: - class A: sub = dict() Putting it into the class like this means sub is shared by all

Re: Hello, and request for help with 'dynamic grids'

2011-09-05 Thread Steven D'Aprano
On Mon, 5 Sep 2011 03:18 pm Simon Cropper wrote: I am looking for the ability to create dynamic grids in a window but can't for the life of me find how to do this. What GUI toolkit are you using? -- Steven -- http://mail.python.org/mailman/listinfo/python-list

Re: Need help with simple OOP Python question

2011-09-05 Thread Ben Finney
Kristofer Tengström krille...@gmail.com writes: Hi, I'm having trouble creating objects that in turn can have custom objects as variables. That terminology is rather confused. I think what you want is to have instances with their own attributes. class A: sub = dict() This binds a

Re: Installing WebDAV server

2011-09-05 Thread becky_lewis
Possibly. I tried this: server.py -n -c config.ini Once again, the server is up and running and when I am logging in with my browser (10.0.0.140:8081) I can see information showing up at the command prompt, showing somebody is logging is, but the same error: fshandler:get_data:

Re: Need help with simple OOP Python question

2011-09-05 Thread srinivas hn
Hi, You are getting same object because you are overriding the dictionary update. Its printing the proper value with the last updated instance of B. If you want to see the two different instances of class B give print self.sub inside the sub_add method in class A. CHEERS CNA 9986229891 On Mon,

Re: Hello, and request for help with 'dynamic grids'

2011-09-05 Thread Simon Cropper
On 05/09/11 17:19, Steven D'Aprano wrote: On Mon, 5 Sep 2011 03:18 pm Simon Cropper wrote: I am looking for the ability to create dynamic grids in a window but can't for the life of me find how to do this. What GUI toolkit are you using? I have looked at wxGlade, Boa Constructor,

Re: Hello, and request for help with 'dynamic grids'

2011-09-05 Thread Thomas Jollans
On 05/09/11 07:18, Simon Cropper wrote: I am looking for the ability to create dynamic grids in a window but can't for the life of me find how to do this. It depends on which windowing toolkit you're planning to use. If you use PyGTK, you'd want a TreeView widget to display the list. Fill a

Re: Hello, and request for help with 'dynamic grids'

2011-09-05 Thread Simon Cropper
On 05/09/11 20:40, Thomas Jollans wrote: It depends on which windowing toolkit you're planning to use. If you use PyGTK, you'd want a TreeView widget to display the list. Fill a ListStore instance with your data and give that to the TreeView. You can implement filtering and sorting on top of

Re: Hello, and request for help with 'dynamic grids'

2011-09-05 Thread python
Hi Simon, I am a applications developer - originally from Windows using primarily Visual Foxpro, although I am familiar with a variety of other xbase derivatives. Check out dabodev.com. Dabo is a Python framework created by former VFP developers. Highly recommended. Malcolm --

Re: Hello, and request for help with 'dynamic grids'

2011-09-05 Thread Simon Cropper
On 05/09/11 23:23, pyt...@bdurham.com wrote: Check out dabodev.com. Dabo is a Python framework created by former VFP developers. Dabo is a great product. Spoke extensively with Ed Leafe and Paul McNett. Unfortunately the framework is not 'dynamic'. If you have an fixed database and tables

Re: Need help with simple OOP Python question

2011-09-05 Thread Peter Otten
Kristofer Tengström wrote: Thanks everyone, moving the declaration to the class's __init__ method did the trick. Now there's just one little problem left. I'm trying to create a list that holds the parents for each instance in the hierarchy. This is what my code looks like now:

Re: Need help with simple OOP Python question

2011-09-05 Thread Kristofer Tengström
Thanks everyone, moving the declaration to the class's __init__ method did the trick. Now there's just one little problem left. I'm trying to create a list that holds the parents for each instance in the hierarchy. This is what my code looks like now: -

Re: Why do class methods always need 'self' as the first parameter?

2011-09-05 Thread Piet van Oostrum
Chris Torek nos...@torek.net writes: [snip] Instead, we have a syntax where you, the programmer, write out the name of the local variable that binds to the first parameter. This means the first parameter is visible. Except, it is only visible at the function definition -- when you have the

Re: Hello, and request for help with 'dynamic grids'

2011-09-05 Thread alex23
On Sep 5, 3:18 pm, Simon Cropper simoncrop...@fossworkflowguides.com wrote: My investigations have generally found that windows/forms/data entry screen can be created for a specific table or view, but these are hard-wired during development. Is there anyway of rapidly defining the grid during

Re: Closures and Partial Function Application

2011-09-05 Thread Piet van Oostrum
Travis Parks jehugalea...@gmail.com writes: I also like partial function application. What is the easiest way of achieving this in Python? Would it look something like this: def foo(x, y): return x + y xFoo = lambda y: foo(10, y) from functools import partial xfoo = partial(foo, 10)

Re: Installing WebDAV server

2011-09-05 Thread Fokke Nauta
becky_lewis bex.le...@gmail.com wrote in message news:a7cd34d7-ed2b-4449-8edc-a6a45b59e...@hb5g2000vbb.googlegroups.com... Possibly. I tried this: server.py -n -c config.ini Once again, the server is up and running and when I am logging in with my browser (10.0.0.140:8081) I can

Re: Need help with simple OOP Python question

2011-09-05 Thread Jon Clements
On Sep 5, 3:43 pm, Peter Otten __pete...@web.de wrote: Kristofer Tengström wrote: Thanks everyone, moving the declaration to the class's __init__ method did the trick. Now there's just one little problem left. I'm trying to create a list that holds the parents for each instance in the

[OT] Anyone here familiar with installing Open Watcom F77?

2011-09-05 Thread W. eWatson
See Subject. -- http://mail.python.org/mailman/listinfo/python-list

Best way to print a module?

2011-09-05 Thread Martin De Kauwe
Hi, If I wanted to print an entire module, skipping the attributes starting with __ is there an *optimal* way? Currently I am doing something like this. Note I am just using sys here to make the point import sys data = [] for attr in sys.__dict__.keys(): if not attr.startswith('__') and not

Re: [OT] Anyone here familiar with installing Open Watcom F77?

2011-09-05 Thread Chris Angelico
On Tue, Sep 6, 2011 at 1:15 AM, W. eWatson wolftra...@invalid.com wrote: See Subject. -- http://mail.python.org/mailman/listinfo/python-list To what extent familiar? I have it installed on several computers, but only because it comes with Open Wat C/C++. With something off-topic like this,

Re: Need help with simple OOP Python question

2011-09-05 Thread Peter Otten
Jon Clements wrote: I must say I'm not 100% sure what the OP wants to achieve... Learn Python? ;) -- http://mail.python.org/mailman/listinfo/python-list

Re: [OT] Anyone here familiar with installing Open Watcom F77?

2011-09-05 Thread W. eWatson
On 9/5/2011 8:24 AM, Chris Angelico wrote: On Tue, Sep 6, 2011 at 1:15 AM, W. eWatsonwolftra...@invalid.com wrote: See Subject. -- http://mail.python.org/mailman/listinfo/python-list To what extent familiar? I have it installed on several computers, but only because it comes with Open Wat

Re: [OT] Anyone here familiar with installing Open Watcom F77?

2011-09-05 Thread Dan Nagle
Hello, On 2011-09-05 16:15:20 +, W. eWatson said: On 9/5/2011 8:24 AM, Chris Angelico wrote: On Tue, Sep 6, 2011 at 1:15 AM, W. eWatsonwolftra...@invalid.com wrote: See Subject. snip To what extent familiar? I have it installed on several computers, but only because it comes with

Re: [OT] Anyone here familiar with installing Open Watcom F77?

2011-09-05 Thread Colin J. Williams
On 05-Sep-11 12:22 PM, Dan Nagle wrote: Hello, On 2011-09-05 16:15:20 +, W. eWatson said: On 9/5/2011 8:24 AM, Chris Angelico wrote: On Tue, Sep 6, 2011 at 1:15 AM, W. eWatsonwolftra...@invalid.com wrote: See Subject. snip To what extent familiar? I have it installed on several

Re: Best way to print a module?

2011-09-05 Thread rantingrick
On Sep 5, 10:06 am, Martin De Kauwe mdeka...@gmail.com wrote: Hi, If I wanted to print an entire module, skipping the attributes starting with __ is there an *optimal* way? Currently I am doing something like this. Note I am just using sys here to make the point import sys data = [] for

Re: Need help with simple OOP Python question

2011-09-05 Thread Terry Reedy
On 9/5/2011 9:15 AM, Kristofer Tengström wrote: Thanks everyone, moving the declaration to the class's __init__ method did the trick. Now there's just one little problem left. I'm trying to create a list that holds the parents for each instance in the hierarchy. This is what my code looks like

Re: Functions vs OOP

2011-09-05 Thread William Gill
On 9/4/2011 9:13 AM, rusi wrote: On Sep 3, 9:15 pm, William Gillnore...@domain.invalid wrote: During some recent research, and re-familiarization with Python, I came across documentation that suggests that programming using functions, and programming using objects were somehow opposing

Re: Functions vs OOP

2011-09-05 Thread William Gill
On 9/3/2011 12:25 PM, Steven D'Aprano wrote: William Gill wrote: Are they suggesting that any function that takes an object as an argument should always be a method of that object? Yes. I can think of times when a special application, such as a converter, would take an object as an

Re: Functions vs OOP

2011-09-05 Thread Jean-Michel Pichavant
William Gill wrote: Not to split hairs, but syntactically f(x) is a function in many programming paradigms. As I understand it functional programming places specific requirements on functions, i.e.referential transparency. So f(x) may or may not be functional. x.f() is also a function,

Re: Best way to print a module?

2011-09-05 Thread Tim Roberts
Martin De Kauwe mdeka...@gmail.com wrote: If I wanted to print an entire module, skipping the attributes starting with __ is there an *optimal* way? Your question is somewhat ambiguous. When I read print an entire module, I assumed you were asking for a way to print the source code, perhaps

One line command line filter

2011-09-05 Thread Jon Redgrave
It seems unreasonably hard to write simple one-line unix command line filters in python: eg: ls | python -c something print x.upper() to get at sys.stdin or similar needs an import, which makes a subsequent for-loop illegal. python -c import sys; for x in sys.stdin(): print x - SyntaxError Am

Re: One line command line filter

2011-09-05 Thread Thomas Jollans
On 05/09/11 22:38, Jon Redgrave wrote: It seems unreasonably hard to write simple one-line unix command line filters in python: eg: ls | python -c something print x.upper() to get at sys.stdin or similar needs an import, which makes a subsequent for-loop illegal. python -c import sys;

Re: One line command line filter

2011-09-05 Thread Jon Redgrave
Am I missing something obvious? ls | python -c for line in __import__('sys').stdin: print (line.upper()) Ah, so I am missing something - it is possible - but 'obvious'? Do people think it should be more accessible -- http://mail.python.org/mailman/listinfo/python-list

Running Python Demo on the Web?

2011-09-05 Thread Python Fiddle Admin
Python has been ported to the web browser at pythonfiddle.com. Python Fiddle can import snippets of code that you are reading on a web page and run them in the browser. It supports a few popular libraries. Another common usage is to post code on the site to allow other people to play around with

Re: One line command line filter

2011-09-05 Thread Terry Reedy
On 9/5/2011 4:38 PM, Jon Redgrave wrote: It seems unreasonably hard to write simple one-line unix command line filters in python: eg: ls | python -c something print x.upper() to get at sys.stdin or similar needs an import, which makes a subsequent for-loop illegal. python -c import sys; for

Re: Functions vs OOP

2011-09-05 Thread Terry Reedy
On 9/5/2011 1:45 PM, William Gill wrote: On 9/4/2011 9:13 AM, rusi wrote: On Sep 3, 9:15 pm, William Gillnore...@domain.invalid wrote: During some recent research, and re-familiarization with Python, I came across documentation that suggests that programming using functions, and programming

Re: One line command line filter

2011-09-05 Thread Terry Reedy
On 9/5/2011 5:32 PM, Jon Redgrave wrote: Am I missing something obvious? ls | python -c for line in __import__('sys').stdin: print (line.upper()) Ah, so I am missing something - it is possible - but 'obvious'? Do people think it should be more accessible __import__ is well-documented and

Re: Best way to print a module?

2011-09-05 Thread Martin De Kauwe
Hi, Tim yes I had a feeling my posting might be read as ambiguous! Sorry I was trying to quickly think of a good example. Essentially I have a set of .ini parameter files which I read into my program using configobj, I then replace the default module parameters if the user file is different (in

Re: Hello, and request for help with 'dynamic grids'

2011-09-05 Thread Simon Cropper
On 06/09/11 00:40, alex23 wrote: On Sep 5, 3:18 pm, Simon Croppersimoncrop...@fossworkflowguides.com wrote: My investigations have generally found that windows/forms/data entry screen can be created for a specific table or view, but these are hard-wired during development. Is there anyway of

Re: One line command line filter

2011-09-05 Thread Steven D'Aprano
Terry Reedy wrote: The doc says -c command Execute the Python code in command. command can be one or more statements separated by newlines, However, I have no idea how to put newlines into a command-line string. I imagine that it depends on the shell you are using, but bash on Linux makes

Re: Best way to print a module?

2011-09-05 Thread Martin De Kauwe
Trying to follow the suggestion this would be the alternate implementation. import sys sys.path.append(/Users/mdekauwe/Desktop/) import params #params.py contains #apples = 12.0 #cats = 14.0 #dogs = 1.3 fname = test.asc try: ofile = open(fname, 'w') except IOError: raise IOError(Can't

Re: One line command line filter

2011-09-05 Thread Steven D'Aprano
Jon Redgrave wrote: It seems unreasonably hard to write simple one-line unix command line filters in python: eg: ls | python -c something print x.upper() Python is neither bash nor Perl. It is not intended to compete in the quick and dirty one-liner commands stakes. However, you might

Re: Best way to print a module?

2011-09-05 Thread Steven D'Aprano
Tim Roberts wrote: Martin De Kauwe mdeka...@gmail.com wrote: If I wanted to print an entire module, skipping the attributes starting with __ is there an *optimal* way? Your question is somewhat ambiguous. When I read print an entire module, I assumed you were asking for a way to print the

Re: Functions vs OOP

2011-09-05 Thread William Gill
On 9/5/2011 3:04 PM, Jean-Michel Pichavant wrote: William Gill wrote: Not to split hairs, but syntactically f(x) is a function in many programming paradigms. As I understand it functional programming places specific requirements on functions, i.e.referential transparency. So f(x) may or may

Re: Why do class methods always need 'self' as the first parameter?

2011-09-05 Thread Chris Torek
Chris Torek nos...@torek.net writes: [snip] when you have [an] instance and call [an] instance or class method: [note: I have changed the names very slightly here, and removed additional arguments, on purpose] black_knight = K() black_knight.spam() black_knight.eggs() the first

Re: One line command line filter

2011-09-05 Thread Terry Reedy
On 9/5/2011 7:18 PM, Steven D'Aprano wrote: Terry Reedy wrote: The doc says -ccommand Execute the Python code in command. command can be one or more statements separated by newlines, However, I have no idea how to put newlines into a command-line string. I imagine that it depends on the

Re: Why do class methods always need 'self' as the first parameter?

2011-09-05 Thread rantingrick
On Aug 31, 9:35 am, T. Goodchild tgoodch...@gmail.com wrote: I’m new to Python, and I love it.  The philosophy of the language (and of the community as a whole) is beautiful to me. Welcome aboard mate! But one of the things that bugs me Oh here we go! :-) is the requirement that all class

Re: Why do class methods always need 'self' as the first parameter?

2011-09-05 Thread Steven D'Aprano
On Tue, 6 Sep 2011 11:10 am Chris Torek wrote: black_knight = K() black_knight.spam() black_knight.eggs() the first parameters ... are magic, and invisible. Thus, Python is using the explicit is better than implicit rule in the definition, but not at the call site. ... In

[issue3132] implement PEP 3118 struct changes

2011-09-05 Thread Stefan Krah
Stefan Krah stefan-use...@bytereef.org added the comment: Yes, definitely. I'm going to push a new memoryview implementation (complete for all 1D/native format cases) in a couple of days. Once that is done, perhaps we could create a memoryview-struct branch on top of that. -- nosy:

[issue11682] PEP 380 reference implementation for 3.3

2011-09-05 Thread Zbyszek Szmek
Zbyszek Szmek zbys...@in.waw.pl added the comment: I've created some documentation... The patches are the bitbucket repo. Nothing is added to the tutorial, because I think that this isn't material for a newcomer to python. The tutorial doesn't mention generator.throw() and send() either, just

[issue1172711] long long support for array module

2011-09-05 Thread Armin Rigo
Changes by Armin Rigo ar...@users.sourceforge.net: -- nosy: -arigo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1172711 ___ ___ Python-bugs-list

[issue12897] Support for iterators in multiprocessing map

2011-09-05 Thread andrew cooke
New submission from andrew cooke and...@acooke.org: http://stackoverflow.com/questions/7306522/combining-itertools-and-multiprocessing/7307078 suggests (and the idea itself seems reasonable) that it would sometimes be useful for multiprocessing to operate correctly (ie lazily) with lazy input

[issue12888] html.parser.HTMLParser.unescape works only with the first 128 entities

2011-09-05 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 9896fc2a8167 by Ezio Melotti in branch '3.2': #12888: Fix a bug in HTMLParser.unescape that prevented it to escape more than 128 entities. Patch by Peter Otten. http://hg.python.org/cpython/rev/9896fc2a8167 New

[issue12888] html.parser.HTMLParser.unescape works only with the first 128 entities

2011-09-05 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: Fixed, thanks for the report and the patch! -- components: +Library (Lib) -None resolution: - fixed stage: commit review - committed/rejected status: open - closed versions: +Python 3.3 ___

[issue12117] Failures with PYTHONDONTWRITEBYTECODE: test_importlib, test_imp, test_distutils, test_packaging, test_runpy, test_import

2011-09-05 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Alright, closing. -- resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12117

[issue12886] datetime.strptime parses input wrong

2011-09-05 Thread Heiðar Rafn Harðarson
Heiðar Rafn Harðarson heidar.r...@hrolfsskali.net added the comment: My understanding of the python documentation and the ISO 8601 standard is that the digits in a timestamp representing hours, minutes and seconds shall always be in pairs of 2 digits (hh, mm, ss), i.e. when a number is less

[issue12659] Add tests for packaging.tests.support

2011-09-05 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Follow the link titled “review” on the right of your patch in the list of files above the messages. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12659

[issue12886] datetime.strptime parses input wrong

2011-09-05 Thread Heiðar Rafn Harðarson
Heiðar Rafn Harðarson heidar.r...@hrolfsskali.net added the comment: This issue is also discussed here: http://bugs.python.org/issue5979 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12886

[issue10914] Python sub-interpreter test

2011-09-05 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Except that it didn't work under Windows... Ah. If it was an extension module, I’d have a clue (the debug thing), but I know nothing about embedding. An alternative would be to install the file with the msi system and use a project file to

[issue10914] Python sub-interpreter test

2011-09-05 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Ah. If it was an extension module, I’d have a clue (the debug thing), but I know nothing about embedding. An alternative would be to install the file with the msi system and use a project file to have it compiled (sounds like much hassle).

[issue11957] re.sub confusion between count and flags args

2011-09-05 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: See also #12888 for an error in the stdlib caused by this. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11957 ___

[issue12841] Incorrect tarfile.py extraction

2011-09-05 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 2bc122347351 by Lars Gustäbel in branch '3.2': Issue #12841: Fix tarfile extraction of non-existent uids/gids. http://hg.python.org/cpython/rev/2bc122347351 New changeset da59abc0ce3b by Lars Gustäbel in branch

[issue7219] Unhelpful error message when a distutils package install fails due to a permissions error

2011-09-05 Thread higery
higery shoulderhig...@gmail.com added the comment: I have run the 'test_install_lib' on cpython3.3(windows version), the 'test_install_error' failed. The detail is: *FAIL: test_install_error (__main__.InstallLibTestCase) --

[issue12898] add opendir() for POSIX platforms

2011-09-05 Thread Ross Lagerwall
Ross Lagerwall rosslagerw...@gmail.com added the comment: Also see fdopendir(3) which allows you to pass an open file descriptor to get a C dirent struct. This is implemented in the os module too but instead of returning a struct, it returns a list. --

[issue12841] Incorrect tarfile.py extraction

2011-09-05 Thread Lars Gustäbel
Lars Gustäbel l...@gustaebel.de added the comment: Close as fixed. Thanks all! -- resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12841

[issue12898] add opendir() for POSIX platforms

2011-09-05 Thread Larry Hastings
New submission from Larry Hastings la...@hastings.org: With the recent spate of POSIX *at() functions added to os, we now have a bunch of places in the API that take directory fds. But afaict there's no way to get a directory fd in Python! The only calls to opendir() in the tree are

[issue7219] Unhelpful error message when a distutils package install fails due to a permissions error

2011-09-05 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: I really don't think C error messages are portable, so you shouldn't test for them :) Too bad. I’ll have to be satisfied with a manual test from Michael then. -- ___ Python tracker

[issue12898] add opendir() for POSIX platforms

2011-09-05 Thread Ross Lagerwall
Ross Lagerwall rosslagerw...@gmail.com added the comment: opendir opens a C dirent structure with an underlying file descriptor. However, to open a directory file descriptor, simple use: os.open(/tmp, os.O_RDONLY) This can then be used as the fd to the functions which require a directory fd

[issue12899] Change os.utimensat() and os.futimens() to use float for atime mtime

2011-09-05 Thread Larry Hastings
New submission from Larry Hastings la...@hastings.org: The new functions os.futimens() and os.utimensat() update the timestamps of a file with nanosecond precision. However, both functions take atime and mtime as a tuple: (seconds since epoch, nanoseconds). Contrast this with os.utime(),

[issue8286] distutils: path '[...]' cannot end with '/' -- need better error message

2011-09-05 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 6cd8c1582dff by Éric Araujo in branch '3.2': Warn instead of crashing because of invalid path in MANIFEST.in (#8286). http://hg.python.org/cpython/rev/6cd8c1582dff New changeset b42661daa5cc by Éric Araujo in branch

[issue8286] distutils: path '[...]' cannot end with '/' -- need better error message

2011-09-05 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: This should now be fixed. -- resolution: - fixed stage: test needed - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8286

[issue11155] multiprocessing.Queue's put() signature differs from docs

2011-09-05 Thread Senthil Kumaran
Senthil Kumaran sent...@uthcode.com added the comment: anikom15's first patch seems correct. In the multiprocessing.py, the the arg 'obj' can be safely replaced with 'item' to be consistent with the docs. As this is not a keyword arg, it does not stand any chance of breaking any backwards

[issue12897] Support for iterators in multiprocessing map

2011-09-05 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Since it's a feature request, I would suggest to look whether it can apply to concurrent.futures instead. -- nosy: +pitrou versions: +Python 3.3 -Python 3.4 ___ Python tracker rep...@bugs.python.org

[issue12885] distutils.filelist.findall() fails on broken symlink in Py2.x

2011-09-05 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: I've come across it as I'm creating a Debian package of the Python package in the same tree I think a lot of people are doing this. The broken symlinks are relative and in debian/tmp, and will point to locations provided by other Debian

[issue8286] distutils: path '[...]' cannot end with '/' -- need better error message

2011-09-05 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 9cdc845d5f2e by Éric Araujo in branch '2.7': Warn instead of crashing because of invalid path in MANIFEST.in (#8286). http://hg.python.org/cpython/rev/9cdc845d5f2e -- ___

[issue12898] add opendir() for POSIX platforms

2011-09-05 Thread Larry Hastings
Larry Hastings la...@hastings.org added the comment: Well, there's no os.fdopendir(); I think you're referring to fdlistdir(), which uses the C function fdopendir() internally. The DIR structure is not exposed to the Python caller at any point. I did miss the whole

[issue12898] add opendir() for POSIX platforms

2011-09-05 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Well, is there any case where fdlistdir() is not sufficient? -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12898 ___

[issue12898] add opendir() for POSIX platforms

2011-09-05 Thread Larry Hastings
Larry Hastings la...@hastings.org added the comment: fdlistdir() is largely irrelevant to the discussion. I was proposing adding a function to open directory fds, because there isn't one; fdlistdir(), like many other POSIX functions available in Python, consumes directory fds. --

[issue12900] Use universal newlines mode for setup.cfg

2011-09-05 Thread Éric Araujo
New submission from Éric Araujo mer...@netwok.org: We need tests to make sure that setup.cfg files using CRLF or CR as newline character work. We could require that people use LF in the spec, but I don’t think it’s worth it, as it’s simple enough to support all newlines whereas Windows users

[issue12899] Change os.utimensat() and os.futimens() to use float for atime mtime

2011-09-05 Thread Ross Lagerwall
Ross Lagerwall rosslagerw...@gmail.com added the comment: See #11457 for a long discussion about the API and whether to use decimal or not to get the full precision. -- nosy: +rosslagerwall ___ Python tracker rep...@bugs.python.org

[issue5876] __repr__ returning unicode doesn't work when called implicitly

2011-09-05 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: I think it’s not an implicit vs. explicit call problem, rather repr vs. str. IIRC, in 2.x it is allowed that __str__ returns a unicode object, and str will convert it to a str. To do that, it will use the default encoding, which is ASCII in

[issue7425] Improve the robustness of pydoc -k in the face of broken modules

2011-09-05 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Does this patch solves only pydoc -k, not all “invalid spam module makes pydoc crash”? (I wanted to consolidate the handful of reports we have into one but did not get the time.) -- nosy: +eric.araujo title: [PATCH] Improve the

[issue11155] multiprocessing.Queue's put() signature differs from docs

2011-09-05 Thread Senthil Kumaran
Senthil Kumaran sent...@uthcode.com added the comment: Well, I should take back my previous comment. I realized that the positional arg in this case can be called as keyword arg. It would be wrong to change multiprocessing.py and it is correct to change the docs. --

[issue11473] upload command no longer accepts repository by section name

2011-09-05 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: I started working on a test for this in packaging and it’s worse than I expected: it does not support multiple repositories at all. The config parser has bogus tests and the upload command has no test for this. I will work on fixing this in

[issue12898] add opendir() for POSIX platforms

2011-09-05 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: I was proposing adding a function to open directory fds, because there isn't one; fdlistdir(), like many other POSIX functions available in Python, consumes directory fds. I don't think I understand. This already works: fd = os.open(Misc,

[issue12898] add opendir() for POSIX platforms

2011-09-05 Thread Larry Hastings
Larry Hastings la...@hastings.org added the comment: Is there anything you want to do on a directory fd except listing its contents? In the first message in this bug, I wrote: With the recent spate of POSIX *at() functions added to os, we now have a bunch of places in the API that take

[issue11155] multiprocessing.Queue's put() signature differs from docs

2011-09-05 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset c6d4d4d64405 by Senthil Kumaran in branch '3.2': Fix closes Issue11155 - Correct the multiprocessing.Queue.put's arg (replace 'item' with 'obj') in the docs. Patch by Westley Martínez.

[issue12898] add opendir() for POSIX platforms

2011-09-05 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: -- resolution: - works for me status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12898 ___

[issue5845] rlcompleter should be enabled automatically

2011-09-05 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: We can’t just decide to enable completion by checking “'readline' in sys.modules” in site, because it always returns False. site is imported in Python/pythonrun.c, and I guess that Modules/main.c is run afterwards. More importantly, I think

[issue12898] add opendir() for POSIX platforms

2011-09-05 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: At the time I created this ticket I didn't realize you could just call open() on a directory. Yes, os.open or os.openat. -- nosy: +haypo ___ Python tracker rep...@bugs.python.org

[issue5876] __repr__ returning unicode doesn't work when called implicitly

2011-09-05 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: I think that this issue is a duplicate of #4947 which has been fixed in Python 2.7.1. Can you retry with Python 2.7.2 (or 2.7.1)? -- nosy: +haypo ___ Python tracker

[issue12779] Update packaging documentation

2011-09-05 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: To make commit review possible, I thought I’d make two patches for this: the first would be only markup fixes and minimal updates to match the reality of the code (i.e. convert setup.py examples to setup.cfg or pysetup, remove obsolete parts,

[issue12901] Nest class/methods directives in documentation

2011-09-05 Thread Éric Araujo
New submission from Éric Araujo mer...@netwok.org: I picked up a few files in Doc/library and updated their markup to use directives nesting. The attached patch is the result; it’s a lot of changes for small benefit. If we think it’s a good change anyway, I have two questions - Do you think

[issue12901] Nest class/methods directives in documentation

2011-09-05 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- keywords: +patch Added file: http://bugs.python.org/file23102/doc-nest-methods-3.2.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12901 ___

[issue5876] __repr__ returning unicode doesn't work when called implicitly

2011-09-05 Thread Tomasz Melcer
Tomasz Melcer li...@o2.pl added the comment: Debian SID. No, it wasn't. Python 2.7.2+ (default, Aug 16 2011, 09:23:59) [GCC 4.6.1] on linux2 Type help, copyright, credits or license for more information. class T(object): ... def __repr__(self): return u'あみご' ... T().__repr__()

[issue5845] rlcompleter should be enabled automatically

2011-09-05 Thread Cherniavsky Beni
Cherniavsky Beni b...@google.com added the comment: Easily detecting interactive mode is of general interest for customization. 1. What if C also set sys.flags.interactive in python mode, or exposed sys.flags.implicit_interactive (but with better name)? 2. It's more useful to have a hook

  1   2   >