Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add hook for parsedatetime #11

Merged
merged 3 commits into from
Jul 15, 2020
Merged

Add hook for parsedatetime #11

merged 3 commits into from
Jul 15, 2020

Conversation

bwoodsend
Copy link
Member

Fixes 4995.

I've not really tested it to death. Anything you'd particularly want it tested for?

@bwoodsend bwoodsend requested review from a team and Legorooj and removed request for a team July 14, 2020 23:13
Copy link
Member

@Legorooj Legorooj left a comment

Choose a reason for hiding this comment

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

@bwoodsend nice work with the hook, just one problem: we already have a utility more accurate (PyInstaller.utils.collect_submodules). I've tested this works because I was wondering why you using a manual listing of the submodules:

(venv) D:\PyInstaller-Issues> python -c "import PyInstaller.utils.hooks as pyi, pprint; pprint.pprint(pyi.collect_submodules('parsedatetime.pdt_locales'))"
['parsedatetime.pdt_locales.es',
 'parsedatetime.pdt_locales.en_US',
 'parsedatetime.pdt_locales.icu',
 'parsedatetime.pdt_locales.pt_BR',
 'parsedatetime.pdt_locales',
 'parsedatetime.pdt_locales.en_AU',
 'parsedatetime.pdt_locales.de_DE',
 'parsedatetime.pdt_locales.ru_RU',
 'parsedatetime.pdt_locales.base',
 'parsedatetime.pdt_locales.fr_FR',
 'parsedatetime.pdt_locales.nl_NL']

If you could replace the contents of the hook with hiddenimports = collect_submodules('parsedatetime.pdt_locales') that would be great...

We also need a changelog. See news/README for details.

@bwoodsend
Copy link
Member Author

Ahh very neat. Gets rid of that ugly try except too. I take it you'd rather I squashed these updates into the previous commit so that it's still just the one commit for this PR?

@Legorooj
Copy link
Member

@bwoodsend don't bother; I can squash merge it as a single commit.

Copy link
Member

@Legorooj Legorooj left a comment

Choose a reason for hiding this comment

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

Changelog please... Otherwise looks good!

@bwoodsend
Copy link
Member Author

There we go

@Legorooj Legorooj merged commit 60568d3 into pyinstaller:master Jul 15, 2020
@Legorooj
Copy link
Member

Thanks for this!

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.

AttributeError with parsedatetime module
2 participants