Skip to content

Conversation

@StephenBrown2
Copy link
Contributor

Since httpx targets Python 3.6+, I figured it would be good to use the pathlib.Path object functions rather than os.path.*, for a slightly better interface.

Copy link
Contributor

@sethmlarson sethmlarson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good! Are there any areas in our type definitions where we need to show we accept os.Path?

@StephenBrown2
Copy link
Contributor Author

I don't believe so, as the way I changed it it will still expect a str and initialize a Path object from it. Though I did see the netrc PRs come through that use os.path, so I'll rebase and update those as well, and make sure to check the types for that also.

@StephenBrown2
Copy link
Contributor Author

Rebased as promised and looked over the definitions. I don't know if context.load_verify_locations will accept a Path object, so I've left that as being cast back to a string.

@sethmlarson
Copy link
Contributor

Thanks @StephenBrown2! Will take a look later :)

Copy link
Contributor

@sethmlarson sethmlarson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great, thanks @StephenBrown2!

@sethmlarson sethmlarson merged commit fde30b8 into encode:master Aug 9, 2019
@StephenBrown2 StephenBrown2 deleted the use_pathlib branch November 20, 2019 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants