Skip to content

Fix CLI file argument deprecations#134

Closed
neuralsorcerer wants to merge 1 commit intofacebookresearch:mainfrom
neuralsorcerer:fix-dep
Closed

Fix CLI file argument deprecations#134
neuralsorcerer wants to merge 1 commit intofacebookresearch:mainfrom
neuralsorcerer:fix-dep

Conversation

@neuralsorcerer
Copy link
Copy Markdown
Collaborator

Replaced deprecated argparse FileType usage in the CLI with pathlib.Path arguments and relied on pandas to handle file opening, eliminating the need for manual handle cleanup and resolving the PendingDeprecationWarning noise.

@meta-cla meta-cla bot added the cla signed label Nov 9, 2025
@talgalili
Copy link
Copy Markdown
Contributor

Thanks @neuralsorcerer

I see this adds dependency on
pathlib

Questions

  1. Is it worth it? Will it support all python versions and OS?
  2. If yes, could you please update setup.py and README.md files, and any other place that mentions dependencies?

Thanks.

@neuralsorcerer
Copy link
Copy Markdown
Collaborator Author

  1. Is it worth it? Will it support all python versions and OS?

pathlib is a built-in module in Python and yes it supports all versions and OS.

  1. If yes, could you please update setup.py and README.md files, and any other place that mentions dependencies?

Since pathlib is a built-in module anyways users should have it by default if they are using Python. It was introduced after Python v3.4 ig. Should we mention it? What do you think?

@talgalili
Copy link
Copy Markdown
Contributor

Thanks for teaching me this.
I don't think it needs mentioning then.

I'll need another person to accept the diff, I believe it should land within 24 hours.

Thanks for the contribution.

@meta-codesync
Copy link
Copy Markdown

meta-codesync bot commented Nov 9, 2025

@talgalili has imported this pull request. If you are a Meta employee, you can view this in D86629212.

@talgalili
Copy link
Copy Markdown
Contributor

talgalili commented Nov 9, 2025

@neuralsorcerer this should land in the next ~1 hour.
Thank you for your contribution :)

@meta-codesync
Copy link
Copy Markdown

meta-codesync bot commented Nov 9, 2025

@talgalili merged this pull request in 5714d1c.

@neuralsorcerer neuralsorcerer deleted the fix-dep branch November 10, 2025 10:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants