Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fixed deprecated APIs in lines.py #26902

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

Merged
merged 1 commit into from
Sep 27, 2023
Merged

Fixed deprecated APIs in lines.py #26902

merged 1 commit into from
Sep 27, 2023

Conversation

rsp2210
Copy link
Contributor

@rsp2210 rsp2210 commented Sep 23, 2023

PR summary

Fixed deprecated parts in set_xdata and set_ydata APIs in lines.py

PR checklist

@rsp2210
Copy link
Contributor Author

rsp2210 commented Sep 23, 2023

While working on your suggestions, I tried to update my codebase and squash my commits to 1 but it resulted in a merge conflict which I could not resolve. Therefore, I created a new PR. I hope that's ok.

@ksunden
Copy link
Member

ksunden commented Sep 25, 2023

@rsp2210 I would highly recommend not working on main, which can help avoid some of those conflicts.

Can you rename the file to reflect the PR number (looks like an issue came in that snagged the number you put)?

Also add a blank line to the end of the release note file to make pre-commit CI happy.

@@ -0,0 +1,4 @@
``set_xdata`` and ``set_ydata`` requires an iterable.
Copy link
Member

Choose a reason for hiding this comment

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

This should mention Line2D. Feel free to copy from the original deprecation release note:

``Line2D``
~~~~~~~~~~
When creating a Line2D or using `.Line2D.set_xdata` and `.Line2D.set_ydata`,
passing x/y data as non sequence is deprecated.

@rsp2210
Copy link
Contributor Author

rsp2210 commented Sep 25, 2023

@rsp2210 I would highly recommend not working on main, which can help avoid some of those conflicts.

Can you rename the file to reflect the PR number (looks like an issue came in that snagged the number you put)?

Also add a blank line to the end of the release note file to make pre-commit CI happy.

I'll keep this in mind. Thanks for the guidance.

~~~~~~~~~~

When creating a Line2D or using `.Line2D.set_xdata` and `.Line2D.set_ydata`,
passing x/y data as non sequence is deprecated.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
passing x/y data as non sequence is deprecated.
passing x/y data as non sequence is now an error.

@ksunden
Copy link
Member

ksunden commented Sep 25, 2023

Do you feel comfortable squashing your commits down to avoid adding and deleting the same file?

Comment on lines 1 to 4
``Line2D``
~~~~~~~~~~

When creating a Line2D or using `.Line2D.set_xdata` and `.Line2D.set_ydata`,
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
``Line2D``
~~~~~~~~~~
When creating a Line2D or using `.Line2D.set_xdata` and `.Line2D.set_ydata`,
``Line2D``
~~~~~~~~~~
When creating a Line2D or using `.Line2D.set_xdata` and `.Line2D.set_ydata`,

Trailing whitespace

Copy link
Member

@QuLogic QuLogic left a comment

Choose a reason for hiding this comment

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

LGTM other than the trailing whitespace and squashing.

@ksunden ksunden mentioned this pull request Sep 25, 2023
14 tasks
@rsp2210
Copy link
Contributor Author

rsp2210 commented Sep 26, 2023

LGTM other than the trailing whitespace and squashing.

I addressed the white space issue and followed the standard approach of squashing but it somehow increased the commits

@QuLogic
Copy link
Member

QuLogic commented Sep 26, 2023

It appears you rebased commits from upstream/main onto your main, not your own main on to upstream/main. This is usually why it's best to start from a separate branch.

@ksunden
Copy link
Member

ksunden commented Sep 26, 2023

Looks like the changes got lost in the rebase/sync with main, which made it so there are no commits here and this got closed...

@rsp2210 rsp2210 reopened this Sep 26, 2023
@rsp2210
Copy link
Contributor Author

rsp2210 commented Sep 26, 2023

Looks like the changes got lost in the rebase/sync with main, which made it so there are no commits here and this got closed...

Yes, I'm trying to resolve the conflicts and I've never faced such issues before, learned much more about GitHub functionalities and good practices. I'll definitely keep in mind to not work on the main branch again, as this PR was made from the main branch I had no options but to reset and work on it to squash my commits. Therefore, I reopened it after applying changes. I really appreciate your patience with me.

~~~~~~~~~~

When creating a Line2D or using `.Line2D.set_xdata` and `.Line2D.set_ydata`,
passing x/y data as non sequence is now an error.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
passing x/y data as non sequence is now an error.
passing x/y data as non sequence is now an error.

This should fix pre-commit ci, which is complaining about the end of the file here

@ksunden ksunden added this to the v3.9.0 milestone Sep 27, 2023
@ksunden ksunden merged commit 870293a into matplotlib:main Sep 27, 2023
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.

4 participants