net-imap icon indicating copy to clipboard operation
net-imap copied to clipboard

🔊 Warn about deprecated `#responses` usage

Open nevans opened this issue 2 years ago • 4 comments

This was extracted from #93 and split into a separate PR.

This allows us to prepare dependent projects for the new behavior before their logs are flooded with deprecation warnings.

Also adds Net::IMAP.attr_accessor :silence_thread_safety_deprecation_warnings. This is provided as a temporary workaround, until dependant projects can update their usage.

nevans avatar Jan 07 '23 15:01 nevans

@shugo Because #93 is such a big change to existing usage, I split the deprecation warnings into a separate PR. I'd like to take a look at the top reverse dependencies and submit forward-compatible PRs to them, before we start flooding their logs with new warnings!

nevans avatar Jan 07 '23 15:01 nevans

FYI, warn(msg, category: :deprecated) doesn't show warnings by default. However, Net::IMAP users may not use -W:deprecated....

shugo avatar Jan 10 '23 09:01 shugo

FYI, warn(msg, category: :deprecated) doesn't show warnings by default. However, Net::IMAP users may not use -W:deprecated....

Thanks. I had forgotten about that.

If I remember correctly, I did try to use category: :deprecated on the deprecated SASL mechanisms, but I removed it because that kwarg wasn't supported in 2.6 or 2.7. When we do require ruby 3.0+, should we switch to use category: :deprecated?

nevans avatar Jan 10 '23 18:01 nevans

If I remember correctly, I did try to use category: :deprecated on the deprecated SASL mechanisms, but I removed it because that kwarg wasn't supported in 2.6 or 2.7. When we do require ruby 3.0+, should we switch to use category: :deprecated?

Yes, you're right. I forgot that category: :deprecated was not supported in 2.7.

shugo avatar Jan 11 '23 02:01 shugo