[issue38811] Pathlib crashes when os module is missing 'link' method

2019-12-16 Thread STINNER Victor


STINNER Victor  added the comment:

If someone cares about the missing os.symlink code path: please open a 
separated issue.

--

___
Python tracker 

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



[issue38811] Pathlib crashes when os module is missing 'link' method

2019-12-16 Thread miss-islington


miss-islington  added the comment:


New changeset 8d0f36940e728989822c3789025b0813a8fe249a by Miss Islington (bot) 
in branch '3.8':
bpo-38811: Check for presence of os.link method in pathlib (GH-17225)
https://github.com/python/cpython/commit/8d0f36940e728989822c3789025b0813a8fe249a


--
nosy: +miss-islington

___
Python tracker 

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



[issue38811] Pathlib crashes when os module is missing 'link' method

2019-12-16 Thread STINNER Victor

STINNER Victor  added the comment:

Thanks Toke Høiland-Jørgensen! I merged your fix.

I don't really get why the Debian/Ubuntu image on Travis CI didn't get 
os.link() function, but I'm not really intersted to dig into this question. 
It's fine to simply skip the feature if it's not available, we do that in many 
places in Python.

I asked Toke Høiland-Jørgensen to revert his changes about os.symlink(): the 
pathlib code to handle missing os.symlink() seems to be broken, but it also 
seems like Python no longer support platforms without os.symlink(). Only old 
Windows version didn't support os.symlink(), but Python don't support these 
versions anymore.

I merged the os.link() change into master and made a 3.8 backport which will be 
merged automatically soon.

I close the issue.

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.9

___
Python tracker 

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



[issue38811] Pathlib crashes when os module is missing 'link' method

2019-12-16 Thread miss-islington


Change by miss-islington :


--
pull_requests: +17094
pull_request: https://github.com/python/cpython/pull/17626

___
Python tracker 

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



[issue38811] Pathlib crashes when os module is missing 'link' method

2019-12-16 Thread STINNER Victor

STINNER Victor  added the comment:


New changeset 092435e932dee1802784ec28f39454f50fdd879a by Victor Stinner (Toke 
Høiland-Jørgensen) in branch 'master':
bpo-38811: Check for presence of os.link method in pathlib (GH-17225)
https://github.com/python/cpython/commit/092435e932dee1802784ec28f39454f50fdd879a


--

___
Python tracker 

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



[issue38811] Pathlib crashes when os module is missing 'link' method

2019-11-18 Thread Toke Høiland-Jørgensen

Change by Toke Høiland-Jørgensen :


--
pull_requests: +16726
pull_request: https://github.com/python/cpython/pull/17225

___
Python tracker 

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



[issue38811] Pathlib crashes when os module is missing 'link' method

2019-11-18 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 59c80889ff3f74230a613732aacf93d4de1e0e04 by Victor Stinner in 
branch 'master':
Revert "bpo-38811: Check for presence of os.link method in pathlib. (GH-17170)" 
(#17219)
https://github.com/python/cpython/commit/59c80889ff3f74230a613732aacf93d4de1e0e04


--

___
Python tracker 

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



[issue38811] Pathlib crashes when os module is missing 'link' method

2019-11-18 Thread STINNER Victor


STINNER Victor  added the comment:

The change failed on x86 Windows7 3.x buildbot:
https://buildbot.python.org/all/#/builders/58/builds/3257

Moreover, PR 17170 was merged whereas the CLA was not signed. So I created PR 
17219 to revert the change to fix the Windows 7 failure and to wait until the 
CLA is signed.

==
ERROR: test_symlink_to_not_implemented (test.test_pathlib.PathTest)
--
Traceback (most recent call last):
  File 
"D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\test_pathlib.py",
 line 2031, in test_symlink_to_not_implemented
link.symlink_to(target)
  File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\pathlib.py", 
line 1395, in symlink_to
self._accessor.symlink(target, self, target_is_directory)
OSError: [WinError 1314] A required privilege is not held by the client: 
'D:\\cygwin\\home\\db3l\\buildarea\\3.x.bolen-windows7\\build\\build\\test_python_848\\test_python_worker_2032\\@test_2032_tmp\\fileA'
 -> 
'D:\\cygwin\\home\\db3l\\buildarea\\3.x.bolen-windows7\\build\\build\\test_python_848\\test_python_worker_2032\\@test_2032_tmp\\dirA\\linkAA'

==
ERROR: test_symlink_to_not_implemented (test.test_pathlib.WindowsPathTest)
--
Traceback (most recent call last):
  File 
"D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\test_pathlib.py",
 line 2031, in test_symlink_to_not_implemented
link.symlink_to(target)
  File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\pathlib.py", 
line 1395, in symlink_to
self._accessor.symlink(target, self, target_is_directory)
OSError: [WinError 1314] A required privilege is not held by the client: 
'D:\\cygwin\\home\\db3l\\buildarea\\3.x.bolen-windows7\\build\\build\\test_python_848\\test_python_worker_2032\\@test_2032_tmp\\fileA'
 -> 
'D:\\cygwin\\home\\db3l\\buildarea\\3.x.bolen-windows7\\build\\build\\test_python_848\\test_python_worker_2032\\@test_2032_tmp\\dirA\\linkAA'

--
nosy: +vstinner

___
Python tracker 

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



[issue38811] Pathlib crashes when os module is missing 'link' method

2019-11-18 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +16720
pull_request: https://github.com/python/cpython/pull/17219

___
Python tracker 

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



[issue38811] Pathlib crashes when os module is missing 'link' method

2019-11-17 Thread miss-islington


Change by miss-islington :


--
pull_requests: +16710
pull_request: https://github.com/python/cpython/pull/17204

___
Python tracker 

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



[issue38811] Pathlib crashes when os module is missing 'link' method

2019-11-17 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset 111772fc27cfe388bc060f019d68a3e33481ec65 by Serhiy Storchaka 
(Toke Høiland-Jørgensen) in branch 'master':
bpo-38811: Check for presence of os.link method in pathlib. (GH-17170)
https://github.com/python/cpython/commit/111772fc27cfe388bc060f019d68a3e33481ec65


--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue38811] Pathlib crashes when os module is missing 'link' method

2019-11-15 Thread Toke Høiland-Jørgensen

Toke Høiland-Jørgensen  added the comment:

Right, sure, that makes sense; thanks for clarifying :)

--

___
Python tracker 

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



[issue38811] Pathlib crashes when os module is missing 'link' method

2019-11-15 Thread Brett Cannon


Brett Cannon  added the comment:

Just an FYI a raised exception isn't considered a crash. For us a crash is a 
C-level crash like a segfault.

--
nosy: +brett.cannon
type: crash -> behavior

___
Python tracker 

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



[issue38811] Pathlib crashes when os module is missing 'link' method

2019-11-15 Thread Toke Høiland-Jørgensen

Change by Toke Høiland-Jørgensen :


--
keywords: +patch
pull_requests: +16678
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/17170

___
Python tracker 

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



[issue38811] Pathlib crashes when os module is missing 'link' method

2019-11-15 Thread Toke Høiland-Jørgensen

New submission from Toke Høiland-Jørgensen :

Commit 6b5b013bcc22 ("bpo-26978: Implement pathlib.Path.link_to (Using os.link) 
(GH-12990)") introduced a new link_to method in pathlib. However, this makes 
pathlib crash when the 'os' module is missing a 'link' method, as can be seen 
in the report in this CI test:

https://travis-ci.org/tohojo/flent/jobs/611950252

--
components: Library (Lib)
messages: 356670
nosy: tohojo
priority: normal
severity: normal
status: open
title: Pathlib crashes when os module is missing 'link' method
type: crash
versions: Python 3.8

___
Python tracker 

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