[issue14807] Move tarfile.filemode() into stat module

2013-01-04 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
status: open - pending

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



[issue14807] Move tarfile.filemode() into stat module

2013-01-04 Thread Giampaolo Rodola'

Giampaolo Rodola' added the comment:

Previous issue should have been fixed by now.
Closing.

--
status: pending - closed

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



[issue14807] Move tarfile.filemode() into stat module

2012-05-16 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

And there are test failures under Windows too :)

==
ERROR: test_link (test.test_stat.TestFilemode)
--
Traceback (most recent call last):
  File 
D:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\test\test_stat.py, 
line 42, in test_link
os.symlink(os.getcwd(), TESTFN)
NotImplementedError: CreateSymbolicLinkW not found

==
FAIL: test_directory (test.test_stat.TestFilemode)
--
Traceback (most recent call last):
  File 
D:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\test\test_stat.py, 
line 38, in test_directory
self.assertEqual(get_mode(), 'drwx--')
AssertionError: 'drwxrwxrwx' != 'drwx--'
- drwxrwxrwx
+ drwx--


==
FAIL: test_mode (test.test_stat.TestFilemode)
--
Traceback (most recent call last):
  File 
D:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\test\test_stat.py, 
line 27, in test_mode
self.assertEqual(get_mode(), '-rwx--')
AssertionError: '-rw-rw-rw-' != '-rwx--'
- -rw-rw-rw-
+ -rwx--


http://www.python.org/dev/buildbot/all/builders/x86%20Windows7%203.x/builds/4962/steps/test/logs/stdio

--
status: closed - open

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



[issue14807] Move tarfile.filemode() into stat module

2012-05-16 Thread Roundup Robot

Roundup Robot devn...@psf.upfronthosting.co.za added the comment:

New changeset 39d24533c6b7 by Giampaolo Rodola' in branch 'default':
#14807: fix BB failures on Windows - avoid to to rely too many details of the 
mode string.
http://hg.python.org/cpython/rev/39d24533c6b7

--

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



[issue14807] Move tarfile.filemode() into stat module

2012-05-16 Thread Giampaolo Rodola'

Giampaolo Rodola' g.rod...@gmail.com added the comment:

Let's see how it goes now.

--

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



[issue14807] Move tarfile.filemode() into stat module

2012-05-15 Thread Roundup Robot

Roundup Robot devn...@psf.upfronthosting.co.za added the comment:

New changeset 492e6c6a01bb by Giampaolo Rodola' in branch 'default':
#14807: move undocumented tarfile.filemode() to stat.filemode(). Add 
tarfile.filemode alias with deprecation warning.
http://hg.python.org/cpython/rev/492e6c6a01bb

--
nosy: +python-dev

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



[issue14807] Move tarfile.filemode() into stat module

2012-05-15 Thread Giampaolo Rodola'

Changes by Giampaolo Rodola' g.rod...@gmail.com:


--
resolution:  - fixed
stage: patch review - committed/rejected
status: open - closed

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



[issue14807] Move tarfile.filemode() into stat module

2012-05-15 Thread Giampaolo Rodola'

Changes by Giampaolo Rodola' g.rod...@gmail.com:


--
assignee:  - giampaolo.rodola

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



[issue14807] Move tarfile.filemode() into stat module

2012-05-15 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

Buildbot failures:
http://www.python.org/dev/buildbot/all/builders/AMD64%20FreeBSD%209.0%203.x/builds/2540
http://www.python.org/dev/buildbot/all/builders/x86%20Tiger%203.x/builds/4572

--
status: closed - open

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



[issue14807] Move tarfile.filemode() into stat module

2012-05-15 Thread Roundup Robot

Roundup Robot devn...@psf.upfronthosting.co.za added the comment:

New changeset 539fbd6e58f6 by Giampaolo Rodola' in branch 'default':
#14807: fix bb failure due to symlink test relying on hard-coded permissions
http://hg.python.org/cpython/rev/539fbd6e58f6

--

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



[issue14807] Move tarfile.filemode() into stat module

2012-05-15 Thread Giampaolo Rodola'

Giampaolo Rodola' g.rod...@gmail.com added the comment:

Thanks. It should now be fixed.

--
status: open - closed

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



[issue14807] Move tarfile.filemode() into stat module

2012-05-14 Thread Giampaolo Rodola'

New submission from Giampaolo Rodola' g.rod...@gmail.com:

As per:
http://mail.python.org/pipermail/python-ideas/2012-May/015104.html
Patch is in attachment.

--
components: Library (Lib)
files: filemode.patch
keywords: easy, patch
messages: 160621
nosy: giampaolo.rodola, terry.reedy
priority: normal
severity: normal
status: open
title: Move tarfile.filemode() into stat module
versions: Python 3.3
Added file: http://bugs.python.org/file25577/filemode.patch

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



[issue14807] Move tarfile.filemode() into stat module

2012-05-14 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

I'm not sure filemode() is the best name for this. On the other hand, I don't 
have any suggestion.
I don't understand why you're using atexit. tearDown() and addCleanup() are 
your friends.
The call_safely thing also looks unwarranted. support.unlink() should be able 
to help you.

--
nosy: +pitrou
stage:  - patch review

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



[issue14807] Move tarfile.filemode() into stat module

2012-05-14 Thread Lars Gustäbel

Changes by Lars Gustäbel l...@gustaebel.de:


--
nosy: +lars.gustaebel

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



[issue14807] Move tarfile.filemode() into stat module

2012-05-14 Thread Terry J. Reedy

Terry J. Reedy tjre...@udel.edu added the comment:

1. After careful check, I am convince that converted _filemode_table (now 
private) is correct. Ditto for copied filemode function with adjusted docstring.

2. New test_stat.py is nice. I believe there is a new style of actually running 
the tests that somehow collects the list of TestCase subclasses without having 
to hand edit the run_unittest() call when new ones are added. I think it was 
briefly discussed on pydev list, but remenber nothing else. 

I mention this because I wonder if you think stat should have more tests (and 
TestCase classes). If so, a new issue could be opened after this is applied and 
mentioned on mentor list as an entry level issue for newer contributors.

3. I think the back compatibility alias should be wrapped with a deprecation 
warning. I believe the standard method would be something like the following

import warnings
def filemode(mode):
Deprecated in this location; use stat.filemode.
warnings.warn(The undocumented tarfile.filemode function\n
  has been moved to stat and documented there.,
   DeprecationWarning, 2)
return stat.filemode(mode)

Removal could be scheduled for 3.5 if not 3.4. There apparently is a way 
(unknown to me) to add a test that will fail in the future as a reminder.

4. Misc/NEWS entry suggestion:

- Issue 14807: Move undocumented tarfile.filemode() to stat.filemode() and add 
doc entry. Add tarfile.filemode alias with deprecation warning. Schedule alias 
for removal in 3.5.

5. stat module doc entry.

--
type:  - enhancement

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



[issue14807] Move tarfile.filemode() into stat module

2012-05-14 Thread Giampaolo Rodola'

Giampaolo Rodola' g.rod...@gmail.com added the comment:

Updated patch in attachment.

--
Added file: http://bugs.python.org/file25585/filemode.patch

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



[issue14807] Move tarfile.filemode() into stat module

2012-05-14 Thread Terry J. Reedy

Terry J. Reedy tjre...@udel.edu added the comment:

Looks good enough to me except for the alias docstring. If someone does 
dir(tarfile) and help(filemode), they should get the message that it is a 
deprecated alias and should not use it.

--

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