[issue13742] Add a key parameter (like sorted) to heapq.merge

2012-02-07 Thread Giampaolo Rodola'

Changes by Giampaolo Rodola' :


--
nosy: +giampaolo.rodola

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12970] os.walk() consider some symlinks as dirs instead of non-dirs

2012-02-07 Thread Nick Coghlan

Nick Coghlan  added the comment:

This behaviour came up recently when implementing os.fwalk() [1]. There are 
problems with all 3 possible approaches (list as dirs, list as files, don't 
list at all) when followlinks is False. Since all alternatives are potentially 
surprising, the current behaviour wins by default (as people will already have 
written their code to cope with that behaviour and there's no net gain in 
changing the default, since the desired treatment of such links will vary 
according to the task at hand).

As a result, I'm converting this to a pure documentation issue - the os.walk() 
docs should definitely mention this subtlety. The behaviour won't be changing, 
though.

[1] http://bugs.python.org/issue13734,#msg151077

--
components:  -Library (Lib)
nosy: +ncoghlan
type: behavior -> enhancement
versions:  -Python 3.1, Python 3.4

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13960] Handling of broken comments in HTMLParser

2012-02-07 Thread Ezio Melotti

New submission from Ezio Melotti :

html.parser fails to handle the following invalid comments:



The attached patch follows the HTML5 specs [0], and parses them as "bogus 
comments".  Currently the patch fixes the problem only when strict=False, but 
it might be better to make this the default behavior and apply it to 2.7 too.

[0]: http://www.w3.org/TR/html5/tokenization.html#bogus-comment-state

--
components: Library (Lib)
files: issue13960.diff
keywords: patch
messages: 152806
nosy: eric.araujo, ezio.melotti
priority: normal
severity: normal
stage: patch review
status: open
title: Handling of broken comments in HTMLParser
type: behavior
versions: Python 2.7, Python 3.2, Python 3.3
Added file: http://bugs.python.org/file24443/issue13960.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6210] Exception Chaining missing method for suppressing context

2012-02-07 Thread Nick Coghlan

Changes by Nick Coghlan :


--
assignee:  -> ncoghlan

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13609] Add "os.get_terminal_size()" function

2012-02-07 Thread anatoly techtonik

anatoly techtonik  added the comment:

All right, I've found some time to grep conversation related to COLUMNS/ROWS 
environment/shell variable.

+1 for low level system wrapper to get current stdout console size
-1 on COLUMN/ROWS "business logic"


My user story 001:
I need exact values of my console and don't want them to be overridden by 
environment/shell variables. 
-- or --
When troubleshooting problems with console width on user side and don't want 
this feature to implicitly depend on some variables in user environment.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13609] Add "os.get_terminal_size()" function

2012-02-07 Thread STINNER Victor

STINNER Victor  added the comment:

> +1 for low level system wrapper to get current stdout console size

So use os.get_terminal_size()

> -1 on COLUMN/ROWS "business logic"

So don't use shutil.get_terminal_size(), but it looks like their is a
use case for this feature.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6210] Exception Chaining missing method for suppressing context

2012-02-07 Thread Nick Coghlan

Nick Coghlan  added the comment:

I started work on integrating this into 3.3 this evening, but ran into too many 
issues to finish it.

Problems found and fixed:
- traceback.py displayed the wrong exception (test added and impl fixed)

Additional changes:
- eliminated duplicate code paths for __cause__ validation in ceval.c and 
exceptions.c (latter now exposes a private C API for ceval to use)
- documented that Ellipsis may be used as a sentinel when None is not 
appropriate
- broke up the long test case in test_exceptions a bit
- started a placeholder section in What's New

Remaining problems:
- default sys.excepthook implementation currently does the wrong thing
- needs a test for the pythonrun display logic (test_cmd_line_script would be 
the appropriate place)
- testCauseSyntax test should probably be in test_raise, not test_exceptions

Off the top of my head, I'm not even sure where the default sys.excepthook impl 
even *lives*. Making that behave itself is the major blocker at this point, 
though (followed by a test for the pythonrun change - given the problem in 
traceback.py, it may be that it's this code that's buggy and it's affecting the 
interactive interpreter as well).

(I deliberately haven't added a NEWS entry yet - that's best left until last, 
since it's a major cause of merge conflicts otherwise)

--
Added file: http://bugs.python.org/file2/pep409_interactive_broken.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13961] Have importlib use os.replace()

2012-02-07 Thread Brett Cannon

New submission from Brett Cannon :

The new os.replace() function should be used by importlib.

--
components: Library (Lib)
messages: 152810
nosy: brett.cannon
priority: normal
severity: normal
status: open
title: Have importlib use os.replace()
versions: Python 3.3

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13703] Hash collision security issue

2012-02-07 Thread Dave Malcolm

Dave Malcolm  added the comment:

On Mon, 2012-02-06 at 23:00 +, Marc-Andre Lemburg wrote:
> Marc-Andre Lemburg  added the comment:
> 
> Alex Gaynor wrote:
> > There's no need to cover any container types, because if their constituent
> > types are securely hashable then they will be as well.  And of course if
> > the constituent types are unsecure then they're directly vulnerable.
> 
> I wouldn't necessarily take that for granted: since container
> types usually calculate their hash based on the hashes of their
> elements, it's possible that a clever combination of elements
> could lead to a neutralization of the the hash seed used by
> the elements, thereby reenabling the original attack on the
> unprotected interpreter.
> 
> Still, because we have far more vulnerable hashable types out there,
> trying to find such an attack doesn't really make practical
> sense, so protecting containers is indeed not as urgent :-)

FWIW, I'm still awaiting review of my patches.  I don't believe
Marc-Andre's concerns are a sufficient rebuttal to the approach I've
taken.

If anyone is aware of an attack via numeric hashing that's actually
possible, please let me know (privately).  I believe only specific apps
could be affected, and I'm not aware of any such specific apps.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13962] multiple lib and include directories on Linux

2012-02-07 Thread Ray

New submission from Ray :

I'm opening a new ticket based on ticket 13511 
(http://bugs.python.org/issue13511) since the last one was closed.  Read 
ronaldoussoren's post in Ticket 13511 in case you're still confused. 

There is no way to specify multiple lib and include directories on Linux when 
installing Python 2.7; other versions of Python may be affected.

--
assignee: tarek
components: Build, Distutils, Installation
messages: 152812
nosy: eric.araujo, rpq, tarek
priority: normal
severity: normal
status: open
title: multiple lib and include directories on Linux
type: behavior
versions: Python 2.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13963] dev guide has no mention of mechanics of patch review

2012-02-07 Thread Dave Malcolm

New submission from Dave Malcolm :

I've been waiting for patch review of my work on 
http://bugs.python.org/issue13703 only to discover that people *have* been 
reviewing it.

It turns out that next to some of the patches in the issue tracker there's a 
"review" link, which takes me to http://bugs.python.org/review/13703/show and 
there's a whole second conversation going on about the issue there.  I haven't 
been getting any emails about it.

I've been looking through http://docs.python.org/devguide but I can't see any 
mention of the mechanics of patch review, or that this secondary site exists.  
Clearly I missed something big, but was it actually documented anywhere?

http://docs.python.org/devguide/patch.html mentions uploading patches for 
review, and talks about an iterative process of commenting and refining a 
patch, but when I read it, I assumed it was referring to discussion within the 
issue, rather than on this secondary site.

Some questions:
  * Do all patches go into this review site, or do I have to do something extra 
to get them to land there?
  * I have patches for both 2.6 and 3.1 - are they kept separate, or do they 
affect each other's "delta from patch set"?
  * Is there a way to enable notifications, e.g. for me to receive emails when 
someone comments on my patch?  or to put a comment into the *issue* noting that 
someone commented on the patch?

Thanks

--
components: Devguide
messages: 152813
nosy: dmalcolm, ezio.melotti
priority: normal
severity: normal
status: open
title: dev guide has no mention of mechanics of patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13963] dev guide has no mention of mechanics of patch review

2012-02-07 Thread Nadeem Vawda

Changes by Nadeem Vawda :


--
nosy: +nadeem.vawda

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13963] dev guide has no mention of mechanics of patch review

2012-02-07 Thread Tshepang Lekhonkhobe

Changes by Tshepang Lekhonkhobe :


--
nosy: +tshepang

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6210] Exception Chaining missing method for suppressing context

2012-02-07 Thread Raghuram Devarakonda

Changes by Raghuram Devarakonda :


--
nosy:  -draghuram

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2377] Replace __import__ w/ importlib.__import__

2012-02-07 Thread Brett Cannon

Brett Cannon  added the comment:

On Mon, Feb 6, 2012 at 17:06, STINNER Victor  wrote:

>
> STINNER Victor  added the comment:
>
> Is there a benchmark for import? How slow is importlib? :)
>

importlib.test.benchmark

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10287] NNTP authentication should check capabilities

2012-02-07 Thread Hynek Schlawack

Changes by Hynek Schlawack :


--
nosy: +hynek

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13962] multiple lib and include directories on Linux

2012-02-07 Thread Roumen Petrov

Roumen Petrov  added the comment:

hmm,  issue 13511 is perfectly closed as invalid.
Ray you misunderstood  meaning on configure flags --XXXdir.
You properly found that LDFLAGS is what is required bug correct for headers is 
CPPFLAGS . 
Is ./configure --help not clear for you ?

--
nosy: +rpetrov

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13846] Add time.monotonic() function

2012-02-07 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 376ce937823c by Victor Stinner in branch 'default':
Issue #13846: Add time.monotonic(), monotonic clock.
http://hg.python.org/cpython/rev/376ce937823c

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13846] Add time.monotonic() function

2012-02-07 Thread STINNER Victor

Changes by STINNER Victor :


--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13845] Use GetSystemTimeAsFileTime() to get a resolution of 100 ns on Windows

2012-02-07 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset bee7943d38c6 by Victor Stinner in branch 'default':
Issue #13845: time.time() now uses GetSystemTimeAsFileTime() instead of ftime()
http://hg.python.org/cpython/rev/bee7943d38c6

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13845] Use GetSystemTimeAsFileTime() to get a resolution of 100 ns on Windows

2012-02-07 Thread STINNER Victor

Changes by STINNER Victor :


--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13882] PEP 410: Use decimal.Decimal type for timestamps

2012-02-07 Thread STINNER Victor

STINNER Victor  added the comment:

Updated patch (version 11).

--
Added file: http://bugs.python.org/file24445/time_decimal-11.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13882] PEP 410: Use decimal.Decimal type for timestamps

2012-02-07 Thread STINNER Victor

Changes by STINNER Victor :


Removed file: http://bugs.python.org/file24404/time_decimal-9.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13882] PEP 410: Use decimal.Decimal type for timestamps

2012-02-07 Thread STINNER Victor

Changes by STINNER Victor :


Removed file: http://bugs.python.org/file24407/time_decimal-10.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13619] Add a new codec: "locale", the current locale encoding

2012-02-07 Thread STINNER Victor

STINNER Victor  added the comment:

> + encoding = locale.getpreferredencoding()
> It should be locale.getpreferredencoding(False).

Fixed in patch version 3.

--
Added file: http://bugs.python.org/file24446/locale_encoding-3.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13619] Add a new codec: "locale", the current locale encoding

2012-02-07 Thread STINNER Victor

Changes by STINNER Victor :


Removed file: http://bugs.python.org/file23985/locale_encoding.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13619] Add a new codec: "locale", the current locale encoding

2012-02-07 Thread STINNER Victor

Changes by STINNER Victor :


Removed file: http://bugs.python.org/file23987/locale_encoding-2.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13550] Rewrite logging hack of the threading module

2012-02-07 Thread STINNER Victor

STINNER Victor  added the comment:

> Alright, Nick agreed on python-dev to remove the logging hack.

You mean removing complelty debug logging from the threading module? Or just to 
simplify the code to decide if we should log or not?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13286] PEP 3151 breaks backward compatibility: it should be documented

2012-02-07 Thread STINNER Victor

STINNER Victor  added the comment:

The code was fixed in importlib. I don't think that this borderline case should 
be documented anywhere, so I close this issue.

--
resolution:  -> wont fix
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2377] Replace __import__ w/ importlib.__import__

2012-02-07 Thread STINNER Victor

STINNER Victor  added the comment:

bench_startup.py: short script to compute the best startup time (I wrote the 
original script for the hash collision issue, #13703). Result on my PC:
 - original: 22.2 ms
 - importlib: 27.9 ms

So importlib adds an overhead of 25.7% in startup time.

--
Added file: http://bugs.python.org/file24447/bench_startup.py

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13882] PEP 410: Use decimal.Decimal type for timestamps

2012-02-07 Thread STINNER Victor

STINNER Victor  added the comment:

os.stat().st_birthtime should depend on the timestamp argument.

A timestamp optional argument should also be added to os.wait3() and os.wait4() 
for the utime and stime fields of the rusage tuple.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13550] Rewrite logging hack of the threading module

2012-02-07 Thread Nick Coghlan

Nick Coghlan  added the comment:

I believe Charles-François was referring to this message:
http://mail.python.org/pipermail/python-dev/2012-January/115372.html

We shouldn't be encumbering threading *all the time* with stuff that "might be 
useful sometimes". Adding selective output to help debug problems can be 
handled with Thread subclasses, or even temporarily running with a modified 
threading.py (for people hacking on the stdlib itself).

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13964] os.utimensat() and os.futimes() should accept Decimal, drop os.futimens()

2012-02-07 Thread STINNER Victor

New submission from STINNER Victor :

Python 3.3 has 4 new functions to set the access and modification time of a 
file (only os.utime() was already present in Python 3.2). New functions taking 
timestamp with a nanonsecond resolution use a tuple of int because the float 
type doesn't support nanosecond resolution. Thanks to the PEP 410, we can 
simplify the API to use a simple number (int, float or Decimal) instead of a 
tuple of 2 integers.

Current API:

- futimes(fd[, (atime, mtime)]): 1 argument for timestamps
- lutimes(path[, (atime, mtime)]): 1 argument for timestamps
- utime(path[, (atime, mtime)]): 1 argument for timestamps

- futimens(fd[, (atime_sec, atime_nsec), (mtime_sec, mtime_nsec)]): 2 arguments 
for timestamps
- utimensat(dirfd, path[, atime=(atime_sec, atime_nsec), mtime=(mtime_sec, 
mtime_nsec), flags=0]): 2 arguments for timestamps

I propose to:

- support Decimal type in all functions: avoid conversion to float to not lose 
precision
- remove os.futimens(): os.futimes() does already use futimens() if the 
function is present (and Decimal can be used to get nanosecond resolution)
- change os.utimensat() API to: os.utimensat(dirfd, path[, (atime, mtime), 
flags=0])

--
components: Library (Lib)
messages: 152825
nosy: haypo, ncoghlan
priority: normal
severity: normal
status: open
title: os.utimensat() and os.futimes() should accept Decimal, drop os.futimens()
versions: Python 3.3

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13882] PEP 410: Use decimal.Decimal type for timestamps

2012-02-07 Thread STINNER Victor

STINNER Victor  added the comment:

I created the issue #13964 to cleanup the API of os.*utime*() functions.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13964] os.utimensat() and os.futimes() should accept Decimal, drop os.futimens()

2012-02-07 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis :


--
nosy: +Arfrever

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13965] Windows 64-bit installer actually installing a 32-bit version

2012-02-07 Thread Raymond Hettinger

New submission from Raymond Hettinger :

On the downloader page, http://www.python.org/download/releases/2.7.2/ there is 
an entry "•Windows X86-64 MSI Installer" that links to 
http://www.python.org/ftp/python/2.7.2/python-2.7.2.amd64.msi

Running this installer succeeds and show messages that a 64-bit version of 
Python is being installed; however, running Python shows that only a 32-bit 
version is being run despite a welcome message stating that a 64-bit version is 
being run:


C:\Python27>python
Python 2.7.2 (default, Jun 12 2011, 14:24:46) [MSC v.1500 64 bit (AMD64)] on win
32
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.maxint
2147483647

--
assignee: loewis
components: Installation
messages: 152827
nosy: loewis, rhettinger
priority: normal
severity: normal
status: open
title: Windows 64-bit installer actually installing a 32-bit version
versions: Python 2.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13964] os.utimensat() and os.futimes() should accept Decimal, drop os.futimens()

2012-02-07 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset d297f9b10c64 by Victor Stinner in branch 'default':
Issue #13964: Write tests for new os.*utime*() functions
http://hg.python.org/cpython/rev/d297f9b10c64

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13964] os.utimensat() and os.futimes() should accept Decimal, drop os.futimens()

2012-02-07 Thread STINNER Victor

STINNER Victor  added the comment:

> Current API:

Oh, I forgot:
- futimesat(dirfd, path[, (atime, mtime)])

This API looks fine.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13964] os.utimensat() and os.futimes() should accept Decimal, drop os.futimens()

2012-02-07 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset c6e9c4d18b36 by Victor Stinner in branch 'default':
Issue #13964: Test also os.futimesat()
http://hg.python.org/cpython/rev/c6e9c4d18b36

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13964] os.utimensat() and os.futimes() should accept Decimal, drop os.futimens()

2012-02-07 Thread Arfrever Frehtes Taifersar Arahesis

Arfrever Frehtes Taifersar Arahesis  added the comment:

I suggest to support the following functions:
futimes(fd, (atime, mtime), flags=0)
utimes(path, (atime, mtime), flags=0)
utimesat(dirfd, path, (atime, mtime), flags=0)

And deprecate other functions already present in 3.2.
flags argument of utimes*() would specify e.g. if symlinks should be 
dereferenced, so lutime*() wouldn't be needed.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13964] os.utimensat() and os.futimes() should accept Decimal, drop os.futimens()

2012-02-07 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 478fb4869c99 by Victor Stinner in branch 'default':
Issue #13964: Split os.*utime*() subsecond tests into multiple tests to help
http://hg.python.org/cpython/rev/478fb4869c99

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13964] os.utimensat() and os.futimes() should accept Decimal, drop os.futimens()

2012-02-07 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 58bd6a58365d by Victor Stinner in branch 'default':
Issue #13964: Skip os.*utime*() tests if os.stat() doesn't support timestamp
http://hg.python.org/cpython/rev/58bd6a58365d

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13964] os.utimensat() and os.futimes() should accept Decimal, drop os.futimens()

2012-02-07 Thread STINNER Victor

STINNER Victor  added the comment:

> New changeset 478fb4869c99 by Victor Stinner in branch 'default':
> Issue #13964: Split os.*utime*() subsecond tests into multiple tests...

Oops, I also commited my change on extract_time() by mistake. But it is not 
completly a mistake: it was the goal of my patch serie :-)

This commit changes two things on extract_time().

 - always use nanoseconds: if we need microseconds, divide by 1000
 - use (long)(fmod()*1e9) to get nanoseconds instead of the previous code, I'm 
not sure that this change is correct

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13882] PEP 410: Use decimal.Decimal type for timestamps

2012-02-07 Thread STINNER Victor

STINNER Victor  added the comment:

fill_time() should use denominator=1 if the OS doesn't support timestamp with a 
subsecond resolution. See also issue #13964.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11379] Remove "lightweight" from minidom description

2012-02-07 Thread Eli Bendersky

Eli Bendersky  added the comment:

IMHO this wording proposed by Stefan:

"""
[[Note: The xml.dom.minidom module provides an implementation of the W3C-DOM 
whose API is similar to that in other programming languages. Users who are 
unfamiliar with the W3C-DOM interface or who would like to write less code for 
processing XML files should consider using the xml.etree.ElementTree module 
instead.]]
"""

Sounds very reasonable. Perhaps something about a more Pythonic API can also be 
added there, in addition to "to write less code".

Any objections?

--
nosy: +eli.bendersky

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13782] xml.etree.ElementTree: Element.append doesn't type-check its argument

2012-02-07 Thread Eli Bendersky

Changes by Eli Bendersky :


--
nosy: +eli.bendersky

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9257] cElementTree iterparse requires events as bytes; ElementTree uses strings

2012-02-07 Thread Eli Bendersky

Eli Bendersky  added the comment:

At this point, 3.1 won't be fixed with such changes any longer.

Is this fixed in 3.2/3.3?

--
nosy: +eli.bendersky

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13882] PEP 410: Use decimal.Decimal type for timestamps

2012-02-07 Thread STINNER Victor

STINNER Victor  added the comment:

Patch version 12:

 * os.stat().st_birthtime uses also the timestamp argument
 * Add an optional timestamp argument to os.wait3() and os.wait4(): change type 
of utime and stime attributes of the resource usage
 * os.stat() changes the timestamp resolution depending if nanosecond 
resolution is available or not

I realized that resource.getrusage() should also be modified. I will maybe do 
that in another version of the patch, or maybe change resource usage in another 
patch.

--
Added file: http://bugs.python.org/file24448/time_decimal-12.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13964] os.utimensat() and os.futimes() should accept Decimal, drop os.futimens()

2012-02-07 Thread Ross Lagerwall

Changes by Ross Lagerwall :


--
nosy: +rosslagerwall

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13966] Add disable_interspersed_args() to argparse.ArgumentParser

2012-02-07 Thread László Attila Tóth

New submission from László Attila Tóth :

If someone ports his code from optparse to argparse, there is a limit, that 
options and non-options can be mixed by default, and this behaviour cannot be 
disabled easily, an extra '--' argument is required in the command line.

In some cases it is much prettier to explicitly disable this, as was available 
in the deprecated optparse module.

I attach a patch that does this, adds disable_interspersed_args() to 
argparse.ArgumentParser.

--
components: Library (Lib)
files: argparse.patch
keywords: patch
messages: 152839
nosy: Laszlo.Attila.Toth
priority: normal
severity: normal
status: open
title: Add disable_interspersed_args() to argparse.ArgumentParser
versions: Python 2.7
Added file: http://bugs.python.org/file24449/argparse.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com