Skip to content

Accept pathlib paths across the board #1311

@Jwink3101

Description

@Jwink3101

This is an issue in preparation for a patch I will be trying to make.

I want to update Bottle to accept pathlib.Path paths across the board. My plan is to do this in a backwards COMPATIBLE way by adding something like str(inputfile) so that if you pass a native string or unicode, nothing happens but if you pass a pathlib object, it gets converted.

First question: Does this plan make sense? I use this in my tools so that I don't have to think about what is passed and it is explicitly converted

Second question: Where should I be looking? I think the goal should be as much coverage as possible but I would take better over perfect*. Off the top of my head:

  • lookup paths for SimpleTemplate
  • Upload handling
  • (maybe) config options

Anywhere else?

Other thoughts?

*It took the python standard library a few major versions to transition too.

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