[PATCH] D54120: [python] Support PathLike filenames and directories

2018-11-10 Thread Michał Górny via Phabricator via cfe-commits
mgorny added a comment. Merged. I will get back to you if something explodes ;-). Repository: rL LLVM https://reviews.llvm.org/D54120 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D54120: [python] Support PathLike filenames and directories

2018-11-10 Thread Michał Górny via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL346586: [python] Support PathLike filenames and directories (authored by mgorny, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D54120: [python] Support PathLike filenames and directories

2018-11-10 Thread Jakub Stasiak via Phabricator via cfe-commits
jstasiak updated this revision to Diff 173505. jstasiak added a comment. That's fair, changed string to just x, should be obvious from the context what x is. Thank you for the review. As I don't have commit access I'd like to ask you to commit this on my behalf.

[PATCH] D54120: [python] Support PathLike filenames and directories

2018-11-10 Thread Michał Górny via Phabricator via cfe-commits
mgorny accepted this revision. mgorny added a comment. This revision is now accepted and ready to land. LGTM, thanks! Comment at: bindings/python/clang/cindex.py:133 +except AttributeError: +def fspath(string): +return string Optionally: this is

[PATCH] D54120: [python] Support PathLike filenames and directories

2018-11-10 Thread Jakub Stasiak via Phabricator via cfe-commits
jstasiak marked 2 inline comments as done. jstasiak added a comment. Thanks for the feedback, you're right those were things worth improving, I updated the code. https://reviews.llvm.org/D54120 ___ cfe-commits mailing list

[PATCH] D54120: [python] Support PathLike filenames and directories

2018-11-10 Thread Jakub Stasiak via Phabricator via cfe-commits
jstasiak updated this revision to Diff 173496. jstasiak added a comment. Tests are skipped using unittest skipping mechanism now and pathlib imported only when necessary. https://reviews.llvm.org/D54120 Files: bindings/python/clang/cindex.py bindings/python/tests/cindex/test_cdb.py

[PATCH] D54120: [python] Support PathLike filenames and directories

2018-11-10 Thread Michał Górny via Phabricator via cfe-commits
mgorny requested changes to this revision. mgorny added a comment. This revision now requires changes to proceed. Also please remember to submit patches with `-U`, so that Phab has full context. Comment at: bindings/python/tests/cindex/test_cdb.py:42 +if HAS_FSPATH:

[PATCH] D54120: [python] Support PathLike filenames and directories

2018-11-05 Thread Jakub Stasiak via Phabricator via cfe-commits
jstasiak created this revision. jstasiak added reviewers: mgorny, jbcoe. Herald added a subscriber: arphaman. Python 3.6 introduced a file system path protocol (PEP 519[1]). The standard library APIs accepting file system paths now accept path objects too. It could be useful to add this here as