[issue25930] os.unlink != os.remove in python3.5

2015-12-22 Thread Anthony Sottile
Anthony Sottile added the comment: When calling shutil.rmtree on windows on a readonly directory, the error handler is called with os.unlink as the first argument `func` which fails the check `func in (os.rmdir, os.remove)` which succeeded on previous python versions -- _

[issue25930] os.unlink != os.remove in python3.5

2015-12-22 Thread Larry Hastings
Larry Hastings added the comment: How does it break? Maybe you could explain more. -- ___ Python tracker ___ ___ Python-bugs-list mai

[issue25930] os.unlink != os.remove in python3.5

2015-12-22 Thread Anthony Sottile
Anthony Sottile added the comment: Breaks this function: ``` def rmtree(path): """On windows, rmtree fails for readonly dirs.""" def handle_remove_readonly(func, path, exc): # pragma: no cover (windows) excvalue = exc[1] if func in (os.rmdir, os.remove) and excvalue.errn

[issue25930] os.unlink != os.remove in python3.5

2015-12-22 Thread Larry Hastings
Larry Hastings added the comment: Unless you can explain what bugs this is causing, I don't see any need to change the behavior. -- resolution: -> not a bug status: open -> closed ___ Python tracker _

[issue25930] os.unlink != os.remove in python3.5

2015-12-22 Thread Eryk Sun
Eryk Sun added the comment: This is due to using argument clinic in Modules/posixmodule.c: /*[clinic input] os.remove = os.unlink builtin_function_or_method instances are equal if m_self (the module in this case) and m_ml->ml_meth (the C function) are the same. In 3.4, the function po

[issue25930] os.unlink != os.remove in python3.5

2015-12-22 Thread Anthony Sottile
New submission from Anthony Sottile: I've confirmed this bug is present on both windows and linux, the outputs below are from linux however. Compare: ``` $ python3.4 --version Python 3.4.3 $ python3.4 -c 'import os; print(os.unlink == os.remove)' True ``` ``` $ python3.5 --version Python 3.5.