[issue11397] os.path.realpath() may produce incorrect results

2011-08-20 Thread Martin Panter
Martin Panter vadmium...@gmail.com added the comment: Another infinite loop that isn't caught in Python 3.2.1: With the symbolic link link = link/inside a readlink(link) call will keep looping. Anyhow, the proposed solution in issue11397_py32_2.patch does not account for paths with

[issue12791] Yield leaks exception being handled as garbage

2011-08-20 Thread Martin Panter
New submission from Martin Panter vadmium...@gmail.com: See attached leaky_generator.py demo. Python doesn't appear to delete the exception variable if an exception is thrown back into it (via throw, close or by deleting it). The result is a reference cycle that needs garbage collecting. This

[issue12787] xmlrpc.client documentation (MultiCall Objects) points to a broken link

2011-08-20 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: AFAIU xmlrpclib.MultiCall implements the technique described on the broken link, and the examples look pretty clear to me, so the user doesn't have to follow the link to understand how to use it. I think it's good to keep a link around, in

[issue12791] Yield leaks exception being handled as garbage

2011-08-20 Thread Georg Brandl
Changes by Georg Brandl ge...@python.org: -- assignee: - pitrou nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12791 ___ ___

[issue6584] gzip module has no custom exception

2011-08-20 Thread Michele Orrù
Michele Orrù maker...@gmail.com added the comment: The attached patch follows Ezio's hints. -- nosy: +maker Added file: http://bugs.python.org/file22956/6584_4.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6584

[issue12713] argparse: allow abbreviation of sub commands by users

2011-08-20 Thread Christian Ziemski
Christian Ziemski cz...@gmx.de added the comment: I attached a patch against argparse.py from Python 2.7.1. Subcommmands can now be abbreviated as long as they are unambiguous. Otherwise an error message 'ambigous choice' will be thrown (like the 'invalid choice' one). (It's my first patch,

[issue12789] re.Scanner don't support more then 2 groups on regex

2011-08-20 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti, mrabarnett ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12789 ___ ___

[issue12713] argparse: allow abbreviation of sub commands by users

2011-08-20 Thread Christian Ziemski
Christian Ziemski cz...@gmx.de added the comment: Since there seems to be no means to edit (my last) message a little followup regarding aliases: I found http://bugs.python.org/issue9234 argparse: aliases for positional arguments (subparsers) That one is for version 3.2 and already closed.

[issue6584] gzip module has no custom exception

2011-08-20 Thread Michele Orrù
Changes by Michele Orrù maker...@gmail.com: Added file: http://bugs.python.org/file22958/6584_5.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6584 ___

[issue12792] Document the type field of the tracker in the devguide

2011-08-20 Thread Ezio Melotti
New submission from Ezio Melotti ezio.melo...@gmail.com: The attached patch adds documentation for the type field of the tracker to the devguide/triaging page. This is also related to the meta issue #393 [0]. [0]: http://psf.upfronthosting.co.za/roundup/meta/issue393 -- assignee:

[issue6669] TarFile.getmembers fails at struct.unpack: unpack requires a string argument of length 4

2011-08-20 Thread Michele Orrù
Michele Orrù maker...@gmail.com added the comment: Would it be better to use TarError as Sridhar suggested, or create a new class BadTarfile(TarError, IOError), following the convention used for gzip and zipfile? -- nosy: +maker ___ Python tracker

[issue12791] reference cycle with exception state not broken by generator.close()

2011-08-20 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: The problem is probably that the frame keeps the last execution state around, and since the exception itself has a reference to a frame, a cycle is created. Note that it doesn't happen if you catch the GeneratorExit that gets raised inside the

[issue12793] allow filters in os.walk

2011-08-20 Thread Jacek Pliszka
New submission from Jacek Pliszka jacek.plis...@gmail.com: I suggest a small change in os.walk module. Instead of: def walk(top, topdown=True, onerror=None, followlinks=False): I would like to have: def walk(top, topdown=True, onerror=None, skipnames=lambda x : False, skipdirs=islink):

[issue12793] allow filters in os.walk

2011-08-20 Thread Jacek Pliszka
Changes by Jacek Pliszka jacek.plis...@gmail.com: -- versions: +Python 2.7 -Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12793 ___ ___

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-08-20 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 800d45e51dd7 by Victor Stinner in branch '3.2': Issue #12326: sys.platform is now always 'linux2' on Linux http://hg.python.org/cpython/rev/800d45e51dd7 New changeset c816479f6aaf by Victor Stinner in branch '2.7':

[issue12793] allow filters in os.walk

2011-08-20 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- assignee: - rhettinger nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12793 ___

[issue12791] reference cycle with exception state not broken by generator.close()

2011-08-20 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Here is a patch. -- keywords: +patch Added file: http://bugs.python.org/file22961/genexcstate.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12791

[issue12791] reference cycle with exception state not broken by generator.close()

2011-08-20 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 867ce75b885c by Antoine Pitrou in branch '3.2': Issue #12791: Break reference cycles early when a generator exits with an exception. http://hg.python.org/cpython/rev/867ce75b885c New changeset 7d390c3a83c6 by

[issue12791] reference cycle with exception state not broken by generator.close()

2011-08-20 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Thanks for the report, fixed. -- resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12791

[issue12213] BufferedRandom, BufferedRWPair: issues with interlaced read-write

2011-08-20 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 5330af45f777 by Antoine Pitrou in branch '3.2': Issue #12213: Fix a buffering bug with interleaved reads and writes that http://hg.python.org/cpython/rev/5330af45f777 New changeset d7f6391954cf by Antoine Pitrou in

[issue12213] BufferedRandom: issues with interlaced read-write

2011-08-20 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: This should be fixed for BufferedRandom. As I said, I don't think BufferedRWPair is buggy. -- resolution: - fixed stage: patch review - committed/rejected status: open - pending title: BufferedRandom, BufferedRWPair: issues with

[issue12213] BufferedRandom, BufferedRWPair: issues with interlaced read-write

2011-08-20 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: You should not use BufferedRWPair with the same underlying stream (that's the whole point of BufferedRWPair). It might be documented. Something like Warning: don't use the same stream as reader and writer, or the BufferedRWPair

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-08-20 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: I'm working on a patch to remove the major version of sys.platform. The patch is much bigger than expected. You will see when it will be done :-) -- ___ Python tracker

[issue12213] BufferedRandom, BufferedRWPair: issues with interlaced read-write

2011-08-20 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset cf2010e9f941 by Antoine Pitrou in branch '2.7': Issue #12213: Fix a buffering bug with interleaved reads and writes that http://hg.python.org/cpython/rev/cf2010e9f941 --

[issue12703] Improve error reporting for packaging.util.resolve_name

2011-08-20 Thread Rémy HUBSCHER
Rémy HUBSCHER remy.hubsc...@ionyse.com added the comment: Hello, I did the patch, but I have no idea of how to make a test for it. More over, I have seen a similar problem each time there is this code in the Python code (here in distutils.util.Distribution.get_command_class) :

[issue12703] Improve error reporting for packaging.util.resolve_name

2011-08-20 Thread Rémy HUBSCHER
Rémy HUBSCHER remy.hubsc...@ionyse.com added the comment: Actually it is not the same problem for `distutils.util.Distribution.get_command_class` my mistake. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12703

[issue8713] multiprocessing needs option to eschew fork() under Linux

2011-08-20 Thread Vivek Sekhar
Changes by Vivek Sekhar vi...@viveksekhar.ca: -- nosy: +vsekhar ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8713 ___ ___ Python-bugs-list

[issue12703] Improve error reporting for packaging.util.resolve_name

2011-08-20 Thread Alexis Metaireau
Alexis Metaireau ale...@notmyidea.org added the comment: Thanks Rémy, About testing, I would go for modules with errors in it and check that when imported trough this function it does what it is supposed to do. IOW: 1. Create a test python module with errors in their definition (Throw an

[issue12787] xmlrpc.client documentation (MultiCall Objects) points to a broken link

2011-08-20 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset e8f878837eae by Sandro Tosi in branch '2.7': #12787: link original MultiCall proposal to webarchive and in a footnote http://hg.python.org/cpython/rev/e8f878837eae New changeset ab11edca2310 by Sandro Tosi in branch

[issue12787] xmlrpc.client documentation (MultiCall Objects) points to a broken link

2011-08-20 Thread Sandro Tosi
Sandro Tosi sandro.t...@gmail.com added the comment: Thanks Ezio for the suggestions. -- resolution: - fixed stage: needs patch - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12787

[issue12213] BufferedRandom, BufferedRWPair: issues with interlaced read-write

2011-08-20 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- title: BufferedRandom, BufferedRWPair: issues with interlaced read-write - BufferedRandom, BufferedRWPair: issues with interlaced read-write ___ Python tracker

[issue12213] BufferedRandom: issues with interlaced read-write

2011-08-20 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- title: BufferedRandom, BufferedRWPair: issues with interlaced read-write - BufferedRandom: issues with interlaced read-write ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12213

[issue12794] platform: add a major function to get the system major version

2011-08-20 Thread STINNER Victor
New submission from STINNER Victor victor.stin...@haypocalc.com: #12326 proposes to remove the major version from sys.platform. If we remove it, we will need another easy way to get this information. I don't think that we need the version used to build Python, but the version at runtime.

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-08-20 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: I'm working on a patch to remove the major version of sys.platform As expected by Marc-Andre: we need this information and so it has to be available somewhere else. I created #12794 to add platform.major(). I prefer to get the

[issue12794] platform: add a major function to get the system major version

2011-08-20 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12794 ___

[issue12795] Remove the major version from sys.platform

2011-08-20 Thread STINNER Victor
New submission from STINNER Victor victor.stin...@haypocalc.com: sys.platform contains the major system version. If you test the sys.platform value (e.g. sys.platform == 'linux2'), your program doesn't work anymore with the new system major version (e.g. Linux 3). This problem is common with

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-08-20 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: I'm working on a patch to remove the major version of sys.platform Done. I created the issue #12795: Remove the major version from sys.platform. -- ___ Python tracker

[issue12795] Remove the major version from sys.platform

2011-08-20 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: To have an idea of how much code has to be changed for the sys.platform change, there is the diffstat : $ diffstat sys_platform_without_major.patch Lib/ctypes/util.py |6 --

[issue12789] re.Scanner don't support more then 2 groups on regex

2011-08-20 Thread Matthew Barnett
Matthew Barnett pyt...@mrabarnett.plus.com added the comment: Even if this bug is fixed, it still won't work as you expect, and this s why. The Scanner function accepts a list of 2-tuples. The first item of the tuple is a regex and the second is a function. For example: re.Scanner([(r\d+,

[issue12789] re.Scanner doesn't support more than 2 groups on regex

2011-08-20 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- title: re.Scanner don't support more then 2 groups on regex - re.Scanner doesn't support more than 2 groups on regex ___ Python tracker rep...@bugs.python.org

[issue12795] Remove the major version from sys.platform

2011-08-20 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12795 ___

[issue12792] Document the type field of the tracker in the devguide

2011-08-20 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: This documents the current list, but ;-) I think the current list should be modified. 1. Put behavior at the top of the list, as it is the most common (a 'human factor' principle). 2. Combine performance and resource usage. Both are

[issue12213] BufferedRandom: issues with interlaced read-write

2011-08-20 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 524896c305ce by Antoine Pitrou in branch '3.2': Issue #12213: make it clear that BufferedRWPair shouldn't be called with the http://hg.python.org/cpython/rev/524896c305ce New changeset a423bd492d6c by Antoine Pitrou

[issue12213] BufferedRandom: issues with interlaced read-write

2011-08-20 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: I think it can be closed now. -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12213 ___

[issue12678] test_packaging and test_distutils failures under Windows

2011-08-20 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 4136acaf03de by Éric Araujo in branch 'default': Fix sdist test on Windows (#12678). Patch by Jeremy Kloth. http://hg.python.org/cpython/rev/4136acaf03de -- nosy: +python-dev

[issue12141] sysconfig.get_config_vars('srcdir') fails in specific cases

2011-08-20 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 7d9fa30c5588 by Éric Araujo in branch '3.2': Refactor the copying of xxmodule.c in distutils tests (#12141). http://hg.python.org/cpython/rev/7d9fa30c5588 New changeset 900738175779 by Éric Araujo in branch

[issue12782] Multiple context expressions do not support parentheses for continuation across lines

2011-08-20 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: I agree it’s unfortunate that we have to use backslashes to have multi-line with statements. -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12782

[issue12782] Multiple context expressions do not support parentheses for continuation across lines

2011-08-20 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: is the only other example I can think of One similar example would be raise in Python 2. all compound statements uniformly allowed the same continuation syntax. This is not true: only import-as allows this syntax. All other uses of

[issue12794] platform: add a major function to get the system major version

2011-08-20 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: Can you please elaborate why we need it? -- nosy: +loewis ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12794 ___

[issue12795] Remove the major version from sys.platform

2011-08-20 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: I think this change should be much much smaller in scope. It was (nearly) agreed to drop the major version if the system is Linux. There is no consensus (that I'm aware of) to drop the major OS version for all systems. So I would propose

[issue12772] fractional day attribute in datetime class

2011-08-20 Thread Miguel de Val Borro
Miguel de Val Borro miguel.de...@gmail.com added the comment: Thanks, I need the fractional day added to the ordinal day of the month. Using the timedelta division it would be: from __future__ import division dt = datetime.datetime(2008, 5, 8, 13, 35, 41, 56) dt.day +

[issue12795] Remove the major version from sys.platform

2011-08-20 Thread Nadeem Vawda
Changes by Nadeem Vawda nadeem.va...@gmail.com: -- nosy: +nadeem.vawda ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12795 ___ ___

[issue12789] re.Scanner doesn't support more than 2 groups on regex

2011-08-20 Thread Ângelo Otávio Nuffer Nunes
Ângelo Otávio Nuffer Nunes angelonuf...@gmail.com added the comment: Ah, ok, thanks... Then I think my idea is impossible. I will use the Scanner in normal way. :) -- status: open - closed ___ Python tracker rep...@bugs.python.org

[issue12783] test_posix failure on FreeBSD 6.4: test_get_and_set_scheduler_and_param

2011-08-20 Thread Charles-François Natali
Charles-François Natali neolo...@free.fr added the comment: Here's a patch skipping this part of the test on FreeBSD (it actually also fails on FreeBSD 7.2). Note that while calling sched_setparam(param) results in EINVAL with SCHED_OTHER processes, calling sched_setscheduler(SCHED_OTHER,

[issue12789] re.Scanner doesn't support more than 2 groups on regex

2011-08-20 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- resolution: - invalid stage: - committed/rejected ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12789 ___

[issue12782] Multiple context expressions do not support parentheses for continuation across lines

2011-08-20 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12782 ___ ___

[issue12555] PEP 3151 implementation

2011-08-20 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: Added file: http://bugs.python.org/file22966/aa9e276a791d.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12555 ___

[issue12555] PEP 3151 implementation

2011-08-20 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: New patch incorporating Ezio's comments and synchronized with latest default. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12555 ___

[issue12794] platform: add a major function to get the system major version

2011-08-20 Thread Marc-Andre Lemburg
Marc-Andre Lemburg m...@egenix.com added the comment: STINNER Victor wrote: New submission from STINNER Victor victor.stin...@haypocalc.com: #12326 proposes to remove the major version from sys.platform. If we remove it, we will need another easy way to get this information. I don't

[issue12794] platform: add a major function to get the system major version

2011-08-20 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- title: platform: add a major function to get the system major version - platform: add a major function to get the system major version ___ Python tracker

[issue12796] total_ordering goes into infinite recursion when NotImplemented is returned

2011-08-20 Thread Antoine Pitrou
New submission from Antoine Pitrou pit...@free.fr: This small test file exhibits the issue. When @total_ordering is not applied, the '' operator raises TypeError as expected. When @total_ordering is applied, there is an infinite recursion error. -- components: Library (Lib) files:

[issue12786] subprocess wait() hangs when stdin is closed

2011-08-20 Thread Idan Kamara
Idan Kamara idank...@gmail.com added the comment: Thanks for getting on top of this so quickly Charles. Setting close_fds=True worked like a charm. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12786

[issue12768] docstrings for the threading module

2011-08-20 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12768 ___ ___ Python-bugs-list

[issue12797] io.FileIO and io.open should support openat

2011-08-20 Thread Antoine Pitrou
New submission from Antoine Pitrou pit...@free.fr: Right now it is painful to integrate openat() with the normal IO classes. You have to figure out the low-level flags yourself (i.e. replicate the logic and error handling from the FileIO constructor), then replicate the open() logic yourself

[issue12794] platform: add a major function to get the system major version

2011-08-20 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: That other ticket is #9878. -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12794 ___

[issue9878] Avoid parsing pyconfig.h and Makefile by autogenerating extension module

2011-08-20 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9878 ___

[issue12794] platform: add a major function to get the system major version

2011-08-20 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Can you please elaborate why we need it? platform.major() will be needed if we remove the major version for all platforms from sys.platform (issue #12795). See sys_platform_without_major.patch attached to issue #12795 see how it

[issue12792] Document the type field of the tracker in the devguide

2011-08-20 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: I believe you can’t capitalize “behavior” in English. About Terry’s 3): I think the usefulness of having separate types is the same as components, to let people search for what they can help with. --

[issue12795] Remove the major version from sys.platform

2011-08-20 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: At the beginning, I thaught that it would be better to remove the major version from sys.platform on all platforms. When I started to write the patch, I expected to change only 2 or 3 files. But the patch is now huge (26 files

[issue12797] io.FileIO and io.open should support openat

2011-08-20 Thread Nadeem Vawda
Changes by Nadeem Vawda nadeem.va...@gmail.com: -- nosy: +nadeem.vawda ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12797 ___ ___

[issue12797] io.FileIO and io.open should support openat

2011-08-20 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: A third idea is to find a way to override the low-level open() function (the one that returns a fd). openat() seems to exist only on Linux, so I'm -1 on adding new parameters to support this function only. -- nosy:

[issue12794] platform: add a major function to get the system major version

2011-08-20 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: I'm not sure I understand why platform.release() isn't sufficient for this purpose. Note that some systems return alphanumeric values for platform.release(), e.g. for Windows you get 'NT' or 'XP'. It's not easy to get 2 (int)

[issue12797] io.FileIO and io.open should support openat

2011-08-20 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: A third idea is to find a way to override the low-level open() function (the one that returns a fd). Why not. It would e.g. allow to use CreateFile under Windows (the hg guys do this in order to change the sharing mode to something more

[issue12713] argparse: allow abbreviation of sub commands by users

2011-08-20 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Yes, I checked and aliases are already supported. You seem to have overlooked the Versions field on the top of this page: new features don’t go in stable releases, so your patch would have to apply to default, a.k.a. 3.3. --

[issue12783] test_posix failure on FreeBSD 6.4: test_get_and_set_scheduler_and_param

2011-08-20 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Sounds fine to me. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12783 ___ ___

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-08-20 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset b072e1559d6b by Victor Stinner in branch 'default': Close #12326: sys.platform is now always 'linux' on Linux http://hg.python.org/cpython/rev/b072e1559d6b -- resolution: - fixed stage: needs patch -

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-08-20 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: For the sys.build_info, I opened #12794 (platform.major()) but then quickly closed it because it was only useful if the issue #12795 (Remove the major version from sys.platform) was accepted, but I closed it. -- Update votes for

[issue12798] Update mimetypes documentation

2011-08-20 Thread Sandro Tosi
New submission from Sandro Tosi sandro.t...@gmail.com: Following http://mail.python.org/pipermail/docs/2011-June/004727.html I've updated the mimetypes module doc. Some changes I would like to do (but I didn't, since I'd like to hear comments): - move the example of the module before the

[issue12799] realpath not resolving symbolic links under Windows

2011-08-20 Thread Antoine Pitrou
New submission from Antoine Pitrou pit...@free.fr: From a look at the code, realpath() does not seem to resolve symlinks under Windows, even though we have the _getfinalpathname function to do that. Please indulge with me if I'm wrong :) -- components: Library (Lib) messages: 142573

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-08-20 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 85e091c83f9a by Victor Stinner in branch 'default': Issue #12326: woops, I really mean 'linux', not 'linux2' http://hg.python.org/cpython/rev/85e091c83f9a -- ___ Python

[issue5301] add mimetype for image/vnd.microsoft.icon (patch)

2011-08-20 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 4964215ddcba by Sandro Tosi in branch '2.7': #5301: add image/vnd.microsoft.icon (.ico) MIME type http://hg.python.org/cpython/rev/4964215ddcba New changeset d9a0781c24b8 by Sandro Tosi in branch '3.2': #5301: add

[issue5301] add mimetype for image/vnd.microsoft.icon (patch)

2011-08-20 Thread Sandro Tosi
Sandro Tosi sandro.t...@gmail.com added the comment: Thanks Drew for the issue and the patch: it has now been committed on all the active branches! -- assignee: - sandro.tosi nosy: +sandro.tosi resolution: - fixed stage: patch review - committed/rejected status: open - closed

[issue9878] Avoid parsing pyconfig.h and Makefile by autogenerating extension module

2011-08-20 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: avoid parsing pyconfig.h and Makefile in the sysconfig module by autogenerating an extension module This feature will be appreciated by small devices embeding Python: on such device, headers and Makefile are not copied to not

[issue12797] io.FileIO and io.open should support openat

2011-08-20 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: allow an optional dirfd argument at the end of the arglist I prefer this suggestion. I didn't know openat(). Antoine told me that it can be used, for example, to fix security vulnerabilities like #4489. --

[issue12794] platform: add a major function to get the system major version

2011-08-20 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: -- resolution: - invalid status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12794 ___

[issue11362] image/webp missing from mimetypes.py

2011-08-20 Thread Sandro Tosi
Changes by Sandro Tosi sandro.t...@gmail.com: -- nosy: +sandro.tosi ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11362 ___ ___ Python-bugs-list

[issue1043134] Add preferred extensions for MIME types

2011-08-20 Thread Sandro Tosi
Changes by Sandro Tosi sandro.t...@gmail.com: -- nosy: +sandro.tosi ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1043134 ___ ___ Python-bugs-list

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-08-20 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset b5ccdf7c032a by Victor Stinner in branch 'default': Issue #12326: refactor usage of sys.platform http://hg.python.org/cpython/rev/b5ccdf7c032a -- ___ Python tracker

[issue12800] 'tarfile.StreamError: seeking backwards is not allowed' when extract symlink

2011-08-20 Thread Aurélien Dunand
New submission from Aurélien Dunand aurelien.dunand+pyt...@gmail.com: When you extractall a tarball containing a symlink in stream mode ('r|'), an Exception happens: Traceback (most recent call last): File ./test_extractall_stream_symlink.py, line 26, in module

[issue12797] io.FileIO and io.open should support openat

2011-08-20 Thread Ned Deily
Ned Deily n...@acm.org added the comment: I believe openat is new to POSIX (mandatory as of POSIX 2008). For example, it's not currently in OS X and apparently was first added to FreeBSD in 8.0. So it would have to be checked by configure and documented as platform-dependent. --

[issue12797] io.FileIO and io.open should support openat

2011-08-20 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: I believe openat is new to POSIX (mandatory as of POSIX 2008). For example, it's not currently in OS X and apparently was first added to FreeBSD in 8.0. So it would have to be checked by configure and documented as platform-dependent. We

[issue12801] C realpath not used by os.path.realpath

2011-08-20 Thread Antoine Pitrou
New submission from Antoine Pitrou pit...@free.fr: We have our own quirky implementation of C realpath() in posixpath.py. It would probably be simpler, safer and more efficient to simply call the POSIX function instead (but it most be exposed somewhere, by posixmodule.c I suppose). --

[issue12799] realpath not resolving symbolic links under Windows

2011-08-20 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: You are right, but this issue is a duplicate of #9949. -- nosy: +haypo resolution: - duplicate status: open - closed ___ Python tracker rep...@bugs.python.org

[issue9949] os.path.realpath on Windows does not follow symbolic links

2011-08-20 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: The issue #12799 has been marked as a duplicate of this issue: From a look at the code, realpath() does not seem to resolve symlinks under Windows, even though we have the _getfinalpathname function to do that. Please indulge with

[issue1298813] sysmodule.c: realpath() is unsafe

2011-08-20 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: The latest POSIX versions (*) allow NULL to be passed for the target memory area, meaning that realpath() will allocate as much memory as necessary by itself. This essentially does the same thing as canonicalize_file_name(), but in a standard

[issue12801] C realpath not used by os.path.realpath

2011-08-20 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: The Python implementation (os.path.realpath) was introduced 10 years ago by the issue #461781. The Python implemtation has known bugs: - #9949: os.path.realpath on Windows does not follow symbolic links - #11397:

[issue12797] io.FileIO and io.open should support openat

2011-08-20 Thread Ned Deily
Ned Deily n...@acm.org added the comment: We already have os.openat Ah, right. The comment still applies, though, to future documentation of the proposed feature. +1 on it. -- ___ Python tracker rep...@bugs.python.org

[issue12800] 'tarfile.StreamError: seeking backwards is not allowed' when extract symlink

2011-08-20 Thread Ned Deily
Changes by Ned Deily n...@acm.org: -- nosy: +lars.gustaebel ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12800 ___ ___ Python-bugs-list mailing

[issue12802] Windows error code 267 should be mapped to ENOTDIR, not EINVAL

2011-08-20 Thread Antoine Pitrou
New submission from Antoine Pitrou pit...@free.fr: Windows error 3 is returned when a directory path doesn't exist, but 267 is returned when an existing path is not a directory. This corresponds straight to the definition of ENOTDIR, but Python translates it to EINVAL: os.listdir(xx)

[issue12802] Windows error code 267 should be mapped to ENOTDIR, not EINVAL

2011-08-20 Thread Vlad Riscutia
Vlad Riscutia riscutiav...@gmail.com added the comment: Attached new mapping though I don't know where unit test for this should go... -- keywords: +patch nosy: +vladris Added file: http://bugs.python.org/file22969/issue12802.diff ___ Python tracker

  1   2   >