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

[WIP] Replaced logger.warn by logger.warning #1295

Merged
merged 3 commits into from
May 2, 2017

Conversation

chinmayapancholi13
Copy link
Contributor

This PR updates logger.warn to logger.warning in the code since logging.warn has been deprecated since Python 3.3 and it is advisable to use logging.warning (Reference).

Relevant Google mailing list discussion here.

@@ -264,7 +264,7 @@ def init_shards(self, output_prefix, corpus, shardsize=4096, dtype=_default_dtyp
logger.info('Deriving dataset dimension from corpus: '
'{0}'.format(proposed_dim))
else:
logger.warn('Dataset dimension derived from input corpus diffe'
logger.warning('Dataset dimension derived from input corpus diffe'
Copy link
Owner

Choose a reason for hiding this comment

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

Unrelated, but could you please replace the vertical indent with hanging indent in these warnings? This is a great example of why we don't want vertical indent -- harder to maintain.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure! I'll replace vertical indent with hanging indent for all the warnings here.

@chinmayapancholi13 chinmayapancholi13 changed the title Replaced logger.warn by logger.warning [WIP] Replaced logger.warn by logger.warning Apr 30, 2017
@tmylk tmylk merged commit b6c3c2d into piskvorky:develop May 2, 2017
@tmylk
Copy link
Contributor

tmylk commented May 2, 2017

Thanks for the improvement!

@chinmayapancholi13 chinmayapancholi13 deleted the updates_logger branch May 23, 2017 17:52
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.

3 participants