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

Remove deprecated ConnectionRefusedError #366

Merged

Conversation

jurre
Copy link
Contributor

@jurre jurre commented Jul 13, 2020

ConnectionError.new was returning a deprecated ConnectionRefusedError,
this pattern was introduced for backward compatibility at some point,
but there seems to be no other usage of ConnectionRefusedError needed in
the codebase.

If we need to keep the class around for external backward
compatibility, I would recommend that we introduce a private-ish way to
initialize ConnectionRefusedError without raising the deprecation
warning.

I'm happy to PR such a change, but it seems that we could bump the
version and get rid of this deprecation in the library.

LdapError was no longer used internally so has been removed in this PR.

This PR is a semi-duplicate of /~https://github.com/ruby-ldap/ruby-net-ldap/pull/322/files, which I found after making the changes locally, but it's quite old and the author may not have the required context anymore and there are some conflicts, so I decided to open this PR anyway.

jurre added 2 commits July 13, 2020 10:20
ConnectionError.new was returning a deprecated ConnectionRefusedError,
this pattern was introduced for backward compatibility at some point,
but there seems to be no other usage of `ConnectionRefusedError` needed in
the codebase.

If we need to keep the class around for external backward
compatibility, I would recommend that we introduce a private-ish way to
initialize `ConnectionRefusedError` without raising the deprecation
warning.

I'm happy to PR such a change, but it seems that we could bump the
version and get rid of this deprecation in the library.
@jwedoff
Copy link

jwedoff commented Jul 14, 2020

I've submitted a somewhat more complicated PR to handle this (#368), which preserves compatibility with ConnectionRefusedError, and doesn't raise deprecation warning every time a connection is refused.

@jurre
Copy link
Contributor Author

jurre commented Jul 15, 2020

Nice one @jwedoff, that looks like a good option if we need to keep the class around 👍

@jwedoff
Copy link

jwedoff commented Jul 15, 2020

I think we need to do something like that; anyone who is catching connection failures. Currently they have to catch ConnectionRefusedError, if we immediately remove it, taking that upgrade breaks their existing code, which seems like a pretty bad thing to do...

@jurre
Copy link
Contributor Author

jurre commented Jul 15, 2020

The depreciation has been in there for a few years already, if we document it in the changelog the upgrade should be straightforward. I think it should be ok

@jurre
Copy link
Contributor Author

jurre commented Jul 27, 2020

Hi @HarlemSquirrel, any chance you could take a look at this? Thanks <3

@HarlemSquirrel HarlemSquirrel added this to the v0.17 milestone Jul 27, 2020
@HarlemSquirrel
Copy link
Member

This sounds like a good idea for the next minor version. I've been holding out for someone who can release a new patched version since I don't have that access.

@jurre
Copy link
Contributor Author

jurre commented Aug 5, 2020

This sounds like a good idea for the next minor version. I've been holding out for someone who can release a new patched version since I don't have that access.

Fantastic, can I help reaching out to someone to get such a release out? I think some of my colleagues are co-maintainers of this gem.

@HarlemSquirrel
Copy link
Member

I believe the owners listed in https://rubygems.org/gems/net-ldap are capable of publishing.

@cjs
Copy link

cjs commented Aug 6, 2020

@mtodd is this something you can 👀 in a spare moment?

Copy link
Member

@HarlemSquirrel HarlemSquirrel left a comment

Choose a reason for hiding this comment

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

Thanks!

@HarlemSquirrel HarlemSquirrel merged commit d5a2bf1 into ruby-ldap:master Aug 29, 2020
@jurre jurre deleted the jurre/resolve-deprecation-warning branch August 31, 2020 07:38
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.

4 participants