[issue12541] Accepting Badly formed headers in urllib HTTPBasicAuth

2011-08-09 Thread Alex Leon

Alex Leon  added the comment:

It could have a 2 phase regex match. We match the first one, and if it fails, 
match the second and produce a warning. 

I think producing a warning is a good idea, as it allows the programmer to know 
that the implementation of basic auth they are trying to connect to is broken, 
and might help with future connection attempts. Also there are currently no 
warnings produced by python if it fails to parse the auth header, and its hard 
for a developer to know why.

--

___
Python tracker 

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



[issue10181] Problems with Py_buffer management in memoryobject.c (and elsewhere?)

2011-08-09 Thread Lenard Lindstrom

Changes by Lenard Lindstrom :


--
nosy:  -kermode

___
Python tracker 

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



[issue12608] crash in PyAST_Compile when running Python code

2011-08-09 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

Officially fixed by #12575.

--

___
Python tracker 

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



[issue6203] 3.x locale does not default to C, contrary to the documentation and to 2.x behavior

2011-08-09 Thread R. David Murray

R. David Murray  added the comment:

This issue is about the fact that it doesn't return (None, None).  We should 
probably decide what we are going to do about that before changing the docs if 
they need it.

--

___
Python tracker 

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



[issue9528] Add pure Python implementation of time module to CPython

2011-08-09 Thread Alan Justino

Changes by Alan Justino :


--
nosy: +alanjds
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



[issue12711] Explain tracker components in devguide

2011-08-09 Thread Ezio Melotti

Ezio Melotti  added the comment:

Attached a new patch.
I addressed most of your comments.
AFAICT there are no extension modules in Lib.  All the C modules are in 
Modules, and if they also have a Python "frontend", that's in Lib.  I think the 
point of having Extension Modules and Library is to distinguish between C 
modules and Python modules.

I split the "Tests" component in two different entries:
  1) about our tests, regrtest and test/support.py;
  2) unittest/doctest;
I think the "Tests" component applies to both, and for unittest/doctest it can 
be used together with "Library".

Listing the paths is both good for people that are submitting ("the error comes 
from this module"), and for people fixing it ("this component is selected, I 
should look in that module").

--
Added file: http://bugs.python.org/file22870/issue12711-2.diff

___
Python tracker 

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



[issue10588] imp.find_module raises unexpected SyntaxError

2011-08-09 Thread Stefan Krah

Changes by Stefan Krah :


--
nosy: +skrah

___
Python tracker 

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



[issue12719] Direct access to tp_dict can lead to stale attributes

2011-08-09 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 6ef65516fd7a by Benjamin Peterson in branch '3.2':
note mutating tp_dict is bad (closes #12719)
http://hg.python.org/cpython/rev/6ef65516fd7a

New changeset 69df5a8d164e by Benjamin Peterson in branch 'default':
merge 3.2 (#12719)
http://hg.python.org/cpython/rev/69df5a8d164e

--
nosy: +python-dev
resolution:  -> fixed
stage:  -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue12575] add a AST validator

2011-08-09 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 4090dfdf91a4 by Benjamin Peterson in branch 'default':
add a AST validator (closes #12575)
http://hg.python.org/cpython/rev/4090dfdf91a4

--
nosy: +python-dev
resolution:  -> fixed
stage: patch review -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue12717] ConfigParser._Chainmap error in 2.7.2

2011-08-09 Thread Mike Garabedian

Mike Garabedian  added the comment:

Happy to help!

Raymond - I came across this issue while reviewing notes from your OSCON 
Advanced Python talk - thanks for the great tutorial!

--

___
Python tracker 

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



[issue12720] Expose linux extended filesystem attributes

2011-08-09 Thread Benjamin Peterson

New submission from Benjamin Peterson :

These allow extra metadata to be attached to files.

--
components: Extension Modules
files: xattrs.patch
keywords: patch
messages: 141842
nosy: benjamin.peterson
priority: normal
severity: normal
stage: patch review
status: open
title: Expose linux extended filesystem attributes
type: feature request
versions: Python 3.3
Added file: http://bugs.python.org/file22869/xattrs.patch

___
Python tracker 

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



[issue12719] Direct access to tp_dict can lead to stale attributes

2011-08-09 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

This is forbidden, and I agree there should be a doc note. See #1878.

--
assignee:  -> docs@python
components: +Documentation -Extension Modules
nosy: +benjamin.peterson, docs@python

___
Python tracker 

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



[issue12719] Direct access to tp_dict can lead to stale attributes

2011-08-09 Thread Martin von Gagern

New submission from Martin von Gagern :

The attached C extension provides a way to manually set an element in the dict 
of an extension type. As the test case exposes, this can result in a 
discrepancy between cls.__dict__['key'] and cls.key.

Please tell me up front if my extension simply does something explixitely 
forbidden, and point me at the documentation saying so.
http://docs.python.org/py3k/c-api/typeobj.html#PyTypeObject.tp_dict at least 
doesn't appear to explicitely forbid my approach, even if it probably is not 
the preferred way.

If you consider what I'm doing to be really evil, you might want to ban that 
practice more clearly, by adding a suitable note to the documentation of the 
tp_dict member.

In case you cannot reproduce, running the attached testcase script with "test" 
as its sole command line argument, I get the following lines, among others:

Traceback (most recent call last):
  File ".../setDictTest.py", line 10, in test1
self.assertEqual(setDictCls.__dict__['key'], setDictCls.key)
AssertionError: 'bar' != 'foo'

I assume that the attribute-style setDictCls.key access will somehow cache its 
result, thus missing the modification to the underlying dict. Just a guess, 
though.

I've had this issue involved in segmentation faults, where the stale object had 
already been finalized. But as the code involved there might have been broken 
in other ways as well, I'll not classify this as type "crash" but only as 
"behaviour".

--
components: Extension Modules
files: setup.py
messages: 141840
nosy: gagern
priority: normal
severity: normal
status: open
title: Direct access to tp_dict can lead to stale attributes
type: behavior
versions: Python 3.2
Added file: http://bugs.python.org/file22868/setup.py

___
Python tracker 

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



[issue10087] HTML calendar is broken

2011-08-09 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Le Mon, 08 Aug 2011 10:46:20 +,
Senthil Kumaran  a écrit :
> 
> Antoine - I was specifically interested to know if
> sys.stdout.buffer.write as in the patch was good(/proper) way to go
> forward writing the bytes?

Yes, it is.

--

___
Python tracker 

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



[issue12717] ConfigParser._Chainmap error in 2.7.2

2011-08-09 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

Fixed.  Thanks for the report.

Éric, the test suite didn't catch this because the error wasn't user visible -- 
the chainmap is only used internally and only __getitem__ was needed.

--
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



[issue12717] ConfigParser._Chainmap error in 2.7.2

2011-08-09 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 7d5a37ce42d5 by Raymond Hettinger in branch '2.7':
Issue 12717: Fix-up an earlier backport in ConfigParser.
http://hg.python.org/cpython/rev/7d5a37ce42d5

--
nosy: +python-dev

___
Python tracker 

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



[issue12613] itertools fixer fails

2011-08-09 Thread Petri Lehtinen

Petri Lehtinen  added the comment:

A smaller snippet to reproduce:

izip().next()

This gets converted to:

next(izip())

It seems to me that the pattern of the itertools fixer doesn't match to 
izip().something(), and thus this is skipped.

--

___
Python tracker 

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



[issue12717] ConfigParser._Chainmap error in 2.7.2

2011-08-09 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

Thanks, I'll fix that shortly.

--
priority: normal -> high

___
Python tracker 

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



[issue12613] itertools fixer fails

2011-08-09 Thread Petri Lehtinen

Changes by Petri Lehtinen :


--
nosy: +petri.lehtinen

___
Python tracker 

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



[issue12718] Logical mistake of importer method in logging.config.BaseConfigurator

2011-08-09 Thread Benjamin Peterson

Changes by Benjamin Peterson :


--
assignee:  -> vinay.sajip
nosy: +vinay.sajip

___
Python tracker 

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



[issue12718] Logical mistake of importer method in logging.config.BaseConfigurator

2011-08-09 Thread Александр

New submission from Александр :

At line 377 __import__ function assing to class variable importer.

__import__ get module name as first argument, but when we use self.importer at 
line 391 
(http://hg.python.org/cpython/file/10f20ad2fbb6/Lib/logging/config.py#l391) we 
give class instance(self) as the first argument. Not module name

As result raised ImportError with message: "__import__() argument 1 must be 
string, not DictConfigurator" or "__import__() argument 1 must be string, not 
BaseConfigurator"

--
components: Library (Lib)
files: config_importer_patch.diff
keywords: patch
messages: 141834
nosy: Alexandr
priority: normal
severity: normal
status: open
title: Logical mistake of importer method in logging.config.BaseConfigurator
versions: Python 2.7
Added file: http://bugs.python.org/file22867/config_importer_patch.diff

___
Python tracker 

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



[issue12716] Reorganize os docs for files/dirs/fds

2011-08-09 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

Also, symbolic constants should be close to the functions they are used in. For 
example, open() flags shouldn't be in their own section.

--

___
Python tracker 

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



[issue8617] Better document user site-packages in site module doc

2011-08-09 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 74179a79d673 by Éric Araujo in branch '3.2':
Improve documentation for PEP 370 support in site module (#8617).
http://hg.python.org/cpython/rev/74179a79d673

New changeset d354802a637d by Éric Araujo in branch 'default':
Merge doc changes from 3.2 (#8617, #10745).
http://hg.python.org/cpython/rev/d354802a637d

--
nosy: +python-dev

___
Python tracker 

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



[issue10745] setup.py install --user option undocumented

2011-08-09 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 1b0b5f644090 by Éric Araujo in branch '3.2':
Add documentation for PEP 370 features in distutils (#10745).
http://hg.python.org/cpython/rev/1b0b5f644090

--
nosy: +python-dev

___
Python tracker 

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



[issue6203] 3.x locale does not default to C, contrary to the documentation and to 2.x behavior

2011-08-09 Thread Alexis Metaireau

Alexis Metaireau  added the comment:

Maybe could it be useful to specify in the documentation that getlocale() is 
not intended to be used to get information about what is the locale of the 
system? 

It's not explained currently and thus it's a bit weird to have getlocale 
returning (None, None) even if you have your locales set.

--
nosy: +alexis

___
Python tracker 

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



[issue9552] ssl build under Windows always rebuilds OpenSSL

2011-08-09 Thread Éric Araujo

Éric Araujo  added the comment:

Can this be backported, or just closed?

--
nosy: +eric.araujo

___
Python tracker 

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



[issue12699] strange behaviour of locale.getlocale() -> None, None

2011-08-09 Thread STINNER Victor

STINNER Victor  added the comment:

It should be related to #6203.

--
nosy: +haypo

___
Python tracker 

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



[issue1438480] shutil.move raises OSError when copystat fails

2011-08-09 Thread Éric Araujo

Éric Araujo  added the comment:

> In my opinion, anyone wanting to deal with low-level details like
> mtimes and modes is probably not using shutil

As a moderately experienced UNIX user, I would say that file permissions are 
not low-level details.  I see shutil functions as convenient wrappers to 
automate looping and calling a function, but I do care about file permissions.

If people are still interested in this modification, I think it would need a 
backward-compatible change, for example in the form of a new argument 
ignore_permission_errors, or a more generic onerror callback like rmtree has.

--
nosy: +eric.araujo
versions: +Python 3.3 -Python 2.7, Python 3.1, Python 3.2

___
Python tracker 

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



[issue12711] Explain tracker components in devguide

2011-08-09 Thread Éric Araujo

Éric Araujo  added the comment:

+2to3 (2.x to 3.0 conversion tool)
+the 2to3 conversion tool and `Lib/lib2to3/`_
Hm, given that the tool (IOW the script) is only a few lines, I find the line a 
bit strange; 2to3 == Lib/lib2to3.  (See also below before you reply to that.)

Personal style thing: I don’t like putting os.sep at the end of directory paths.

+the benchmarks in the `benchmarks`_ repo
reST protip: For sequences of characters without spaces, you can use just 
benchmarks_.

+Demos and Tools
+the scripts in `Tools/`_ and `Tools/demo/`_
The files in* (they are not all scripts).  Sidenote: I think English typography 
would have us capitalize the definition lines.

+Devguide
+the `devguide`_
The `Developer’s Guide`_

+Distutils
+the distutil package in `Lib/distutils/`_
Typo: distutils*.

+Distutils2
+the packaging package in `Lib/packaging/`_
I always call it “the packaging module”, to avoid the weird-sounding, 
potentially confusing “packaging package”.

+Documentation
+the documentation in `Doc/`_
Maybe also mention that it’s the source for what’s published at docs.python.org

+Extension Modules
+C modules in `Modules/`_
I believe some of them are under Lib.  I also don’t know whether imp for 
example should be Core or Extension Modules.

+IO
+the IO, `Lib/io.py`_ and `Modules/_io/`_
Maybe “the I/O system”

+Macintosh
+the Macintosh operating system
That’s vague.  What about “Used for bugs specific to Mac OS X”?

+Regular Expressions
+regular expressions, and the `Lib/re.py`_ and `Modules/_sre.c`_ modules
Here again, I’m a bit startled by “and”: regular expressions == re.py and _sre.c

+Tests
+the tests in `Lib/test/`_, the unittest and doctest frameworks in
+`Lib/unittest/`_, `Lib/doctest.py`_

To make people able to answer “Is this Library or Tests?”, I think we could say 
something like this: Issues and improvements for tests and test frameworks 
(unittest, doctest, regrtest).

I’m not sure putting emphasis on the paths, like your patch does, is enough to 
explain for example the difference between Library and Extension Modules.  If I 
understand the components correctly, their main utility is to let people be 
auto-assigned/nosied, or to let people find things that interest them or that 
they can help with, so for example “Mac-only bug” vs. “universal bug” is a 
useful distinction, “Documentation” lets people with reST skill find things to 
work on, “written in Python” vs. “written in C” is also useful, etc.

If the above analysis seems good, then I propose to update your patch, to be 
fair, as you put time to do this and now I’m basically saying that no line is 
good :)

--

___
Python tracker 

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



[issue1492704] distinct error type from shutil.move()

2011-08-09 Thread Éric Araujo

Éric Araujo  added the comment:

I have re-read PEP 3151 and think it has no bearing on this bug: the PEP is 
about adding exception classes that map to errno values, and this report is 
about a library function that returns a custom exception unrelated to errnos.

I’m willing to review a patch with tests and docs updates for this, or write 
one myself.

--
assignee: tarek -> eric.araujo
versions: +Python 3.3 -Python 3.2

___
Python tracker 

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



[issue12717] ConfigParser._Chainmap error in 2.7.2

2011-08-09 Thread Éric Araujo

Éric Araujo  added the comment:

Thanks for catching this.  I’m baffled that the test suite did not catch that.

--
assignee:  -> rhettinger
nosy: +eric.araujo
stage:  -> test needed
type: compile error -> behavior

___
Python tracker 

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



[issue12717] ConfigParser._Chainmap error in 2.7.2

2011-08-09 Thread Mike Garabedian

New submission from Mike Garabedian :

Issue 11089 submitted a patch to 3.2 and 2.7 to address performance concerns 
with the latest updates to ConfigParser.  In the implementation for 2.7.2, this 
patch was misapplied in the keys() function on line 573:

  for mapping in self_maps:

should be:

  for mapping in self._maps:

As a result the following raises a NameError:

>>> import ConfigParser
>>> ConfigParser._Chainmap()
Traceback (most recent call last):
  File "", line 1, in 
  File "C:\Python27\lib\UserDict.py", line 172, in __repr__
return repr(dict(self.iteritems()))
  File "C:\Python27\lib\UserDict.py", line 110, in iteritems
for k in self:
  File "C:\Python27\lib\UserDict.py", line 97, in __iter__
for k in self.keys():
  File "C:\Python27\lib\ConfigParser.py", line 573, in keys
for mapping in self_maps:
NameError: global name 'self_maps' is not defined

--
components: Extension Modules
messages: 141823
nosy: georg.brandl, lukasz.langa, mgarabed, rhettinger, skip.montanaro, skrah, 
vlachoudis
priority: normal
severity: normal
status: open
title: ConfigParser._Chainmap error in 2.7.2
type: compile error
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



[issue1666318] shutil.copytree doesn't give control over directory permissions

2011-08-09 Thread Éric Araujo

Éric Araujo  added the comment:

> The result should be uniform; either preserve permissions across the
> board, or leave it to the mercy of the caller.
I’m surprised by this report, as the code does a copystat(sourcedir, targetdir) 
since 2004 (#1048878).  Anyhow, I think the second option would be better.

>  I know there's an enhancement request already open to supply a
> 'func=' kw argument to copytree.
This is now implemented (copy_function argument), but does not help with 
directories, only with files.  Recently I needed to call copytree and change 
the permissions of the destination, so I wanted to use a two-line custom 
copy_function (one line to call shutil.copy, one line for os.chmod), but I 
hadn’t understood that the custom function was not used for directory creation. 
 I found out that shutil does a copystat on the created directories behind my 
back.  So, I think this problem can be solved in a nice and b/w-compatible way 
by adding a new keyword argument, makedirs_func.  I would like to fix this in 
stable versions too, but if another core developer argues that it should be 
considered a new feature, I won’t argue.

--
nosy: +eric.araujo, georg.brandl, jlgijsbers
title: shutil.copytree doesn't preserve directory permissions -> 
shutil.copytree doesn't give control over directory permissions
versions: +Python 3.3 -Python 3.1

___
Python tracker 

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



[issue12715] Add symlink support to shutil functions

2011-08-09 Thread Petri Lehtinen

Petri Lehtinen  added the comment:

> Doing what UNIX’ cp program does would be best here.

$ cp --version
cp (GNU coreutils) 8.5

$ touch file
$ ln -s file link_to_file 
$ mkdir directory
$ ln -s directory link_to_directory
$ cp -a link_to_file link_to_directory
$ ls -l directory
lrwxrwxrwx 1 user user 4 2011-08-09 17:46 link_to_file -> file

So at least cp from GNU coreutils seems to copy the link into the directory, 
dereferencing the dst link.

--

___
Python tracker 

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



[issue12716] Reorganize os docs for files/dirs/fds

2011-08-09 Thread Benjamin Peterson

New submission from Benjamin Peterson :

Right now many of the os function docs are split up into "Files and 
directories" and "file descriptor operations". This means, for example, that 
fchmod() and fchmodat() are in a different section than chmod(). It would make 
more sense to organize the docs such that functions that do the same thing are 
right next to each other.

--
assignee: docs@python
components: Documentation
keywords: easy
messages: 141820
nosy: benjamin.peterson, docs@python
priority: low
severity: normal
status: open
title: Reorganize os docs for files/dirs/fds
versions: Python 2.7, Python 3.2, Python 3.3

___
Python tracker 

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



[issue12715] Add symlink support to shutil functions

2011-08-09 Thread Éric Araujo

Éric Araujo  added the comment:

> Problem: What if dst is a symlink to a directory? Should it be
> replaced or should the symlink copied inside that directory?

Doing what UNIX’ cp program does would be best here.

--
nosy: +eric.araujo

___
Python tracker 

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



[issue12715] Add symlink support to shutil functions

2011-08-09 Thread Hynek Schlawack

Hynek Schlawack  added the comment:

Additionally copyfile() might be fixed to understand symlinks=True too.

Currently working on a patch for all 5 of them.

--

___
Python tracker 

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



[issue12715] Add symlink support to shutil functions

2011-08-09 Thread Petri Lehtinen

Petri Lehtinen  added the comment:

We could also have symlinks='require' to have copymode() and copystat() raise 
an error unless both src and dst are symlinks.

--

___
Python tracker 

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



[issue12714] argparse.ArgumentParser.add_argument() documentation error

2011-08-09 Thread Petri Lehtinen

Petri Lehtinen  added the comment:

Yes, but required=True/False makes an *option* required or optional. Setting 
required=False is not allowed with *positionals*:

>>> import argparse
>>> parser = argparse.ArgumentParser()
>>> parser.add_argument('foo', required=False)
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/lib/python2.7/argparse.py", line 1262, in add_argument
kwargs = self._get_positional_kwargs(*args, **kwargs)
  File "/usr/lib/python2.7/argparse.py", line 1367, in _get_positional_kwargs
raise TypeError(msg)
TypeError: 'required' is an invalid argument for positionals

I assume that this is the case that is being documented here, so it should read 
"options only" meaning "not allowed for positionals". Am I correct?

--

___
Python tracker 

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



[issue12714] argparse.ArgumentParser.add_argument() documentation error

2011-08-09 Thread R. David Murray

R. David Murray  added the comment:

Nope, optionals is what argparse calls them.

--
nosy: +r.david.murray
resolution:  -> invalid
stage:  -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue12702] shutil.copytree() should use os.lutimes() to copy the metadata of symlinks

2011-08-09 Thread Petri Lehtinen

Petri Lehtinen  added the comment:

Added issue 12715 as a dependency for this issue, as shutil.copy2(src, dst, 
symlinks=True) would be an obvious way to implement this.

--

___
Python tracker 

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



[issue12702] shutil.copytree() should use os.lutimes() to copy the metadata of symlinks

2011-08-09 Thread Petri Lehtinen

Changes by Petri Lehtinen :


--
dependencies: +Add symlink support to shutil functions

___
Python tracker 

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



[issue12715] Add symlink support to shutil functions

2011-08-09 Thread Petri Lehtinen

New submission from Petri Lehtinen :

The shutil.copytree() function aknowledges symlinks when given
the symlink=True argument. Other shutil functions should do this
too:

copymode(src, dst, symlinks=True)
   If both src and dst are symlinks, copy the source symlink mode
   to the destination symlink. If only one of them is a symlink,
   dereference it normally.

copystat(src, dst, symlinks=True)
   If both src and dst are symlinks, copy the statinfo of the
   source symlink to the destination symlink. If only one of them
   is a symlink, dereference it normally.

copy(src, dst, symlinks=True)
   If the src argument is a symlink, copy the source symlink
   instead of dereferencing it.

   Problem: What if dst is a symlink to a directory? Should it be
   replaced or should the symlink copied inside that directory?

copy2(src, dst, symlinks=True)
   Like copy(src, dst, symlinks=True), but copy the metadata too.
   The same problem applies.

--
components: Library (Lib)
messages: 141813
nosy: hynek, petri.lehtinen, tarek
priority: normal
severity: normal
status: open
title: Add symlink support to shutil functions
type: feature request
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



[issue12714] argparse.ArgumentParser.add_argument() documentation error

2011-08-09 Thread Petri Lehtinen

New submission from Petri Lehtinen :

The documentation of argparse.ArgumentParser.add_argument() says:

* required - Whether or not the command-line option may be omitted (optionals 
only).

I believe it should be "options only" instead of "optionals only".

--
assignee: docs@python
components: Documentation
keywords: easy
messages: 141812
nosy: docs@python, petri.lehtinen
priority: normal
severity: normal
status: open
title: argparse.ArgumentParser.add_argument() documentation error
versions: Python 2.7, Python 3.2, Python 3.3

___
Python tracker 

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



[issue12680] cPickle.loads is not thread safe due to non-thread-safe imports

2011-08-09 Thread Sagiv Malihi

Sagiv Malihi  added the comment:

As I said - it certainly happenes on 3.2 (tested).

@pitrou - what you suggested will not work since the actual import will block 
on the import lock.
The optimization there is not needed, it's already implemented in __import__.

--

___
Python tracker 

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



[issue12540] "Restart Shell" command leaves pythonw.exe processes running

2011-08-09 Thread Aneesh

Aneesh  added the comment:

I too retested this on a Windows 7 32 and 64 bit machines and is working fine 
when the provided PyShell.py is used.

As Terry mentioned, IDLE seems be running better. The process in Task Manager 
disappears quickly after I close the IDLE.

--

___
Python tracker 

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