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

PG adapter deprecation in recent release #48046

Closed
morgoth opened this issue Apr 24, 2023 · 4 comments · Fixed by #48048
Closed

PG adapter deprecation in recent release #48046

morgoth opened this issue Apr 24, 2023 · 4 comments · Fixed by #48048

Comments

@morgoth
Copy link
Member

morgoth commented Apr 24, 2023

With the recent release of pg gem (1.5.0) https://github.com/ged/ruby-pg/blob/master/History.md#v150-2023-04-24-lars-kanis-larsgreiz-reinsdorfde
the warning is logged:

PG::Coder.new(hash) is deprecated. Please use keyword arguments instead! Called from ../ruby/3.2.2/lib/ruby/gems/3.2.0/gems/activerecord-7.0.4.3/lib/active_record/connection_adapters/postgresql_adapter.rb:980:in `new'
ruby -v
ruby 3.2.2 (2023-03-30 revision e51014f9c0) [x86_64-linux]
rails -v
Rails 7.0.4.3
@yahonda
Copy link
Member

yahonda commented Apr 24, 2023

Please feel free to open a pull request. it looks like the main branch will get the same warning.

@timestamp_decoder = decoder_class.new(@timestamp_decoder.to_h)

@timestamp_decoder = decoder_class.new(@timestamp_decoder.to_h)

@nPaul
Copy link

nPaul commented Apr 26, 2023

i have same problem

@janosrusiczki
Copy link

@nPaul It will be fixed in the next Rails patch release. Make sure you update.

@larskanis
Copy link
Contributor

pg-1.5.3 marks the warnings as deprecation, so that they are suppressed at an ordinary rails run and shouldn't bother any longer.

danielvdao pushed a commit to danielvdao/rails that referenced this issue May 1, 2023
danielvdao pushed a commit to danielvdao/rails that referenced this issue May 1, 2023
danielvdao pushed a commit to danielvdao/rails that referenced this issue May 1, 2023
simonbaird added a commit to simonbaird/tiddlyhost that referenced this issue May 4, 2023
Commit created with `make deps-update`

Note: I manually rolled back the pg gem like this:
-    pg (1.5.0)
+    pg (1.4.6)

Due to these:
rails/rails#48049
rails/rails#48046
gschlager added a commit to discourse/discourse that referenced this issue Oct 13, 2023
We stopped upgrading due to deprecation notices in Rails. See #21271 (comment)
But pg 1.5.3 and Rails 7.0.5 should have fixed the issue. See rails/rails#48046 (comment) and rails/rails#48048 (comment)
gschlager added a commit to discourse/discourse that referenced this issue Oct 23, 2023
We stopped upgrading due to deprecation notices in Rails. See #21271 (comment)

pg 1.5.3 and Rails 7.0.5 should have fixed the issue. See rails/rails#48046 (comment) and rails/rails#48048 (comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants