Skip to content

Commit

Permalink
Restore previous behavior of "absolute_path()"
Browse files Browse the repository at this point in the history
The function `absolute_path` that was provided by "pathtools" was redefined and now gives a "Path" object back as return value.

However, this leads to assertion errors when executing the test suite on FreeBSD, because there are now discrepancies between "PosixPath('/some/dir')" and "'/some/dir'".

Thus restore the original return value of "absolute_path" as is was done by "pathtools".  See also:

https://pythonhosted.org/pathtools/_modules/pathtools/path.html#absolute_path
  • Loading branch information
knobix committed Sep 18, 2021
1 parent 5a7022c commit 7b9c8ad
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/watchdog/observers/kqueue.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,6 @@
import os.path
import select

from pathlib import Path

from watchdog.observers.api import (
BaseObserver,
EventEmitter,
Expand Down Expand Up @@ -127,7 +125,7 @@


def absolute_path(path):
return Path(path).resolve()
return os.path.abspath(os.path.normpath(path))

# Flag tests.

Expand Down

0 comments on commit 7b9c8ad

Please sign in to comment.