[issue15398] intermittence on UnicodeFileTests.test_rename at test_pep277 on MacOS X

2012-07-19 Thread Flávio Ribeiro

New submission from Flávio Ribeiro :

Found a intermittent test on UnicodeFileTests.test_rename method.

Python Version: Python 3.3.0b1
Hg commit hash: 3fbfa61634de
MacOS X version 10.6.8 

How can be reproduced:

bumblebee:~/dev/cpython[] $ for i in {1..10}; do ./python.exe  -m test 
test_pep277; done
[1/1] test_pep277
1 test OK.
[103867 refs]
[1/1] test_pep277
1 test OK.
[103867 refs]
[1/1] test_pep277
1 test OK.
[103867 refs]
[1/1] test_pep277
1 test OK.
[103867 refs]
[1/1] test_pep277
1 test OK.
[103867 refs]
[1/1] test_pep277
test test_pep277 failed -- Traceback (most recent call last):
  File "/Users/flavio.barbosa/dev/cpython/Lib/test/test_pep277.py", line 172, 
in test_rename
os.rename("tmp", name)
FileNotFoundError: [Errno 2] No such file or directory: '@test_51143_tmp/8_曨曩曫'

1 test failed:
test_pep277
[103879 refs]
[1/1] test_pep277
1 test OK.
[103867 refs]
[1/1] test_pep277
test test_pep277 failed -- Traceback (most recent call last):
  File "/Users/flavio.barbosa/dev/cpython/Lib/test/test_pep277.py", line 172, 
in test_rename
os.rename("tmp", name)
FileNotFoundError: [Errno 2] No such file or directory: 
'@test_51145_tmp/3_Grüß-Gott'

1 test failed:
test_pep277
[103879 refs]
[1/1] test_pep277
1 test OK.
[103867 refs]
[1/1] test_pep277
test test_pep277 failed -- Traceback (most recent call last):
  File "/Users/flavio.barbosa/dev/cpython/Lib/test/test_pep277.py", line 172, 
in test_rename
os.rename("tmp", name)
FileNotFoundError: [Errno 2] No such file or directory: '@test_51147_tmp/6_にぽん'

1 test failed:
test_pep277
[103879 refs]

--
assignee: ronaldoussoren
components: Macintosh
messages: 165849
nosy: flavio.ribeiro, ronaldoussoren
priority: normal
severity: normal
status: open
title: intermittence on UnicodeFileTests.test_rename at test_pep277 on MacOS X
versions: Python 3.3

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



[issue15398] intermittence on UnicodeFileTests.test_rename at test_pep277 on MacOS X

2012-07-19 Thread Flávio Ribeiro

Flávio Ribeiro  added the comment:

For doc purposes:

My first shot is that in my machine the os.rename isn't atomic and this could 
be generating an overhead somehow. Looking at the code, I found decisions being 
made on posixmodule.c about what `rename` function should be used:

 #ifdef HAVE_RENAMEAT
 if (dir_fd_specified)
 result = renameat(src_dir_fd, src.narrow, dst_dir_fd, dst.narrow);
 else
 #endif
 result = rename(src.narrow, dst.narrow);
 Py_END_ALLOW_THREADS
 

In my machine the second `rename` is being used.

--

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



[issue15398] intermittence on UnicodeFileTests.test_rename at test_pep277 on MacOS X

2012-07-19 Thread Flávio Ribeiro

Flávio Ribeiro  added the comment:

Hi Ned,

I've used ./configure --with-pydebug && make -j2

$ gcc --version
i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5666) (dot 3)
Copyright (C) 2007 Free Software Foundation, Inc.

$ printenv | grep LC_
$ printenv| grep LANG
LANG=en_US.UTF-8

$ mount
/dev/disk0s2 on / (hfs, local, journaled)

--

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



[issue15398] intermittence on UnicodeFileTests.test_rename at test_pep277 on MacOS X

2012-07-20 Thread Flávio Ribeiro

Flávio Ribeiro  added the comment:

Ronald,

I thought it could be an `atomic` issue by the fact that test_rename transforms 
a filename in tmp and then it change again to the original name. Not being 
atomic, the rename will not finish the executation of the first one (even 
though a return code has been sent) and FileNotFoundError is dispatched. 

Anyway, i've added a time.sleep in the middle of the two lines to assert this 
and no more intermittence could be found. Ideas?

--

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



[issue15406] Deprecation Warnings fixes on test suite

2012-07-20 Thread Flávio Ribeiro

New submission from Flávio Ribeiro :

Looking for bugs to be solved on a cPython Sprint, Hynek reported at 
core-mentorship list some Deprecation Warnings running the test suite in 
regression mode. 

This issue aims to solve this warnings.

--
components: Tests
messages: 165933
nosy: flavio.ribeiro
priority: normal
severity: normal
status: open
title: Deprecation Warnings fixes on test suite
versions: Python 3.3

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



[issue15406] Deprecation Warnings fixes on test suite

2012-07-20 Thread Flávio Ribeiro

Flávio Ribeiro  added the comment:

The patch remove this warning:

$ ./python.exe -Wm -m test test_ctypes
[1/1] test_ctypes
/Users/flavio.barbosa/dev/cpython/Lib/ctypes/test/test_bitfields.py:249: 
DeprecationWarning: Please use assertEqual instead.
  self.assertEquals(x.a, 10)
1 test OK.
[155770 refs]

--
keywords: +patch
Added file: http://bugs.python.org/file26455/issue15406_fix_ctypes_warnings.diff

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



[issue15406] Deprecation Warning fix on ctypes module

2012-07-20 Thread Flávio Ribeiro

Flávio Ribeiro  added the comment:

One issue per module will be created to facilitate the issues management.

--
title: Deprecation Warnings fixes on test suite -> Deprecation Warning fix on 
ctypes module

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



[issue15406] Deprecation Warning fix on ctypes module test

2012-07-20 Thread Flávio Ribeiro

Changes by Flávio Ribeiro :


--
title: Deprecation Warning fix on ctypes module -> Deprecation Warning fix on 
ctypes module test

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



[issue15409] Deprecation Warning fix on cookiejar module

2012-07-20 Thread Flávio Ribeiro

New submission from Flávio Ribeiro :

Cookiejar calls some urllib.Request's deprecated methods. This patch fixes this 
deprecated calls.

--
components: Extension Modules
files: cookiejar_fix_deprecated_method_calls.patch
keywords: patch
messages: 165956
nosy: flavio.ribeiro
priority: normal
severity: normal
status: open
title: Deprecation Warning fix on cookiejar module
versions: Python 3.3
Added file: 
http://bugs.python.org/file26457/cookiejar_fix_deprecated_method_calls.patch

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



[issue15409] Deprecation Warning fix on cookiejar module

2012-07-20 Thread Flávio Ribeiro

Changes by Flávio Ribeiro :


--
nosy: +meador.inge

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



[issue15409] Deprecation Warning fix on cookiejar module

2012-07-20 Thread Flávio Ribeiro

Flávio Ribeiro  added the comment:

nice Meador :-) 

Already sent the form to contribut...@python.org. Added also one diff to 
Misc/ACKS, it's up to you add it or not.

Thanks

--
Added file: http://bugs.python.org/file26460/add_flavioribeiro_acks.patch

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



[issue15409] Deprecation Warning fix on cookiejar module

2012-07-20 Thread Flávio Ribeiro

Flávio Ribeiro  added the comment:

wow :) thank you!

--

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