Skip to content

Commit 3d0f2f9

Browse files
Fix path-to-URL conversion on Python 3.14+ (#82)
Signed-off-by: Scott K Logan <logans@cottsay.net> Co-authored-by: Leander Stephen D'Souza <leanderdsouza1234@gmail.com>
1 parent 2c92f83 commit 3d0f2f9

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

test/__init__.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,15 @@
66
import tarfile
77
import unittest
88
import zipfile
9+
from pathlib import Path
910
from shutil import which
1011
from tempfile import TemporaryDirectory
11-
from urllib.parse import urljoin
12-
from urllib.request import pathname2url
1312

1413
import yaml
1514

1615

1716
def to_file_url(path):
18-
return urljoin('file:', pathname2url(path))
17+
return Path(path).as_uri()
1918

2019

2120
class StagedReposFile(unittest.TestCase):

0 commit comments

Comments
 (0)