Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

bump AS deprecation_horizon to 4.1

  • Loading branch information...
commit 824733612eaa408f699c5c78018d72f49c34a061 1 parent 8690d5a
@frodsan frodsan authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 activesupport/lib/active_support/deprecation.rb
View
4 activesupport/lib/active_support/deprecation.rb
@@ -10,10 +10,10 @@ class << self
# The version the deprecated behavior will be removed, by default.
attr_accessor :deprecation_horizon
end
- self.deprecation_horizon = '3.2'
+ self.deprecation_horizon = '4.1'
@spastorino Owner

Shouldn't this be also changed in 3-2-stable, from 3.2 to 4.0?

@frodsan
frodsan added a note

I have the feeling that this is not being used. I will research.

@frodsan
frodsan added a note

So far, i just have seen that people use ActiveSupport::Deprecation.warn method to raise deprecation warnings.

The only place where i found Module#deprecate method is in activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:

def clear_stale_cached_connections! # :nodoc:
  reap
end
deprecate :clear_stale_cached_connections! => "Please use #reap instead"

Probably, we can use ActiveSupport::Deprecation.warn instead and remove
some AS::Deprecation unused methods?

@rafaelfranca Owner

Yes, nobody is using the deprecate method, so the deprecation_horizon doesn't make difference. I think we should start to use deprecate where we can.

@frodsan
frodsan added a note

Can we reach an agreement about how to deprecate things? If everyone is using #warn, maybe we can remove the #deprecate method and stop maintaining code that is not being used. Thoughts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
# By default, warnings are not silenced and debugging is off.
self.silenced = false
self.debug = false
end
-end
+end
@spastorino

Shouldn't this be also changed in 3-2-stable, from 3.2 to 4.0?

@frodsan

I have the feeling that this is not being used. I will research.

@frodsan

So far, i just have seen that people use ActiveSupport::Deprecation.warn method to raise deprecation warnings.

The only place where i found Module#deprecate method is in activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:

def clear_stale_cached_connections! # :nodoc:
  reap
end
deprecate :clear_stale_cached_connections! => "Please use #reap instead"

Probably, we can use ActiveSupport::Deprecation.warn instead and remove
some AS::Deprecation unused methods?

@rafaelfranca

Yes, nobody is using the deprecate method, so the deprecation_horizon doesn't make difference. I think we should start to use deprecate where we can.

@frodsan

Can we reach an agreement about how to deprecate things? If everyone is using #warn, maybe we can remove the #deprecate method and stop maintaining code that is not being used. Thoughts?

Please sign in to comment.
Something went wrong with that request. Please try again.