Uploaded image for project: 'Qt for Python'
  1. Qt for Python
  2. PYSIDE-2080

Use pathlib instead of os.path

    XMLWordPrintable

Details

    • User Story
    • Resolution: Fixed
    • P3: Somewhat important
    • 6.4.0
    • None
    • PySide
    • None
    • 67292776a (dev), 2d7c438cc (dev), 9ef643830 (dev), 3f55d2fde (dev)

    Description

      pathlib has been around for a while (since Python 3.4) and we have been encourage its usage in the examples and many places of the pyside-setup repository, but still there are many usages around the build_scripts and other tools that rely on os.path.

      Sadly, pathlib cannot replace fully os.path, particularly there is a function os.path.relpath that cannot be migrated to Path.relative_to due to the inability of generating relative paths when there is no direct parent-child relationship between the paths, but os.path.relpath is capable of generating things like ../../something.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            crmaurei Cristian Maureira-Fredes
            crmaurei Cristian Maureira-Fredes
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: