Start migration of Message init to use is_extended_id#440
Merged
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #440 +/- ##
===========================================
+ Coverage 62.5% 62.51% +0.01%
===========================================
Files 55 55
Lines 4657 4661 +4
===========================================
+ Hits 2911 2914 +3
- Misses 1746 1747 +1 |
can/message.py
Outdated
| @id_type.setter | ||
| def id_type(self, value): | ||
| # TODO remove in 3.0 | ||
| # TODO remove in >3.1 |
Collaborator
There was a problem hiding this comment.
Shouldn’t it be 4.0?
felixdivo
approved these changes
Sep 30, 2018
| else: | ||
| if not extended_id: | ||
| # Passed extended_id=False (default argument is True) so we warn to update | ||
| warnings.warn("extended_id is a deprecated parameter, use is_extended_id", DeprecationWarning) |
Collaborator
There was a problem hiding this comment.
A little late but I don't really understand this. We only want to warn when extended_id=False is used but not extended_id=True?
And I think we should wait with issuing a warning until one or two versions later. Otherwise it won't be possible to support more than the latest python-can version without having thousands of warnings in the log.
Collaborator
There was a problem hiding this comment.
Or we could print a single warning per interpreter "session".
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
First part of #424