Skip to content

Replace with standard libraries such as pathlib #101

Open

Description

@armijnhemel

A lot of the code in certain files, such as src/commoncode/paths.py and src/commoncode/filetype.py and possible others can be replaced by standard methods from the pathlib module. This has a few benefits:

  1. less maintenance on your part
  2. pathlib has seen more testing than your code
  3. possible optimisations in pathlib

Activity

  1. armijnhemel commented on Apr 24, 2026

    @armijnhemel
    Author

    I understand why this code was written, because pathlib was added in Python 3.4, around the same time that Scancode was started, so it was probably necessary back then. But it has been years, so probably it is good time to see if the code can be retired.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions