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

Use ruby2_keywords for authenticator forwarding #68

Closed
wants to merge 1 commit into from

Conversation

nevans
Copy link
Collaborator

@nevans nevans commented Oct 14, 2022

Without this, authenticators need to accept keywords for compatibility with older ruby versions. Ruby 2.6 will send an empty hash for **properties, and that can crash (or be interpreted as an optional argument) if the authenticator doesn't accept keyword arguments.

Actually... is that a bad thing? Maybe the error will motivate people to upgrade to ruby 2.7+ or contribute their custom authenticators to net-imap? 😉

It's easy to stay compatible with ruby2_keywords, so let's do that.

@nevans nevans requested a review from shugo October 14, 2022 18:34
Without this, authenticators need to accept keywords for compatibility
with older ruby versions.  Ruby 2.6 will send an empty hash for
`**properties`, and that can crash (or be interpreted as an optional
argument) if the authenticator doesn't accept keyword arguments.

Actually... is that a bad thing?  Maybe the error will motivate people
to upgrade to ruby 2.7+ or contribute their custom authenticators to
net-imap? 😉

It's easy to stay compatible with `ruby2_keywords`, so let's do that.
@nevans nevans force-pushed the ruby2_keywords-authenticate branch from 11c1106 to 0971919 Compare October 26, 2022 17:44
@shugo
Copy link
Member

shugo commented Oct 30, 2022

I'd like to drop Ruby 2.6 support instead, because it's EOL.
What do you think?

@nevans
Copy link
Collaborator Author

nevans commented Oct 31, 2022

I'd like to drop Ruby 2.6 support instead, because it's EOL. What do you think?

I think I'm going to add some pattern matching to my parser comparisons and benchmarks right away. And... how do you feel about numbered parameters? 😉

More seriously, I wouldn't want to drop support unless there is a motivating feature or incompatibility. But that is exactly what this ticket is. 🙂 Let's bump the minor version when we drop support.

As someone who maintains a few old apps that aren't always upgraded before the ruby EOL, I have appreciated when libraries give me an extra few months before they drop support.

But it has been a few months already now, the kwparam situation makes supporting everything before 2.7 more annoying than usual, and the new features from 2.7 and 3.0 are very enticing to me. Also, I want to experiment with both Fiber.scheduler and Ractor support (to replace the receiver thread). If we had something ready by then, I'd be very happy to drop 2.7 support as soon as April or May.

@nevans nevans closed this Oct 31, 2022
@shugo
Copy link
Member

shugo commented Nov 1, 2022

@nevans
I don't want to drop old Ruby versions support as long as the code as-is works.
However, I don't want to add code for EOL versions of Ruby.

It's OK for me to drop Ruby 2.7 support after it will reach EOL.

@nevans nevans deleted the ruby2_keywords-authenticate branch November 1, 2022 02:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants