-
Notifications
You must be signed in to change notification settings - Fork 1
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
Bump pg from 1.5.6 to 1.5.7 #654
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Bumps [pg](https://github.com/ged/ruby-pg) from 1.5.6 to 1.5.7. - [Changelog](https://github.com/ged/ruby-pg/blob/master/History.md) - [Commits](ged/ruby-pg@v1.5.6...v1.5.7) --- updated-dependencies: - dependency-name: pg dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]>
gem compare pg 1.5.6 1.5.7 Compared versions: ["1.5.6", "1.5.7"]
DIFFERENT date:
1.5.6: 2024-03-01 00:00:00 UTC
1.5.7: 2024-07-28 00:00:00 UTC
DIFFERENT require_paths:
1.5.6: ["/opt/hostedtoolcache/Ruby/3.2.5/x64/lib/ruby/gems/3.2.0/extensions/x86_64-linux/3.2.0/pg-1.5.6", "lib"]
1.5.7: ["/opt/hostedtoolcache/Ruby/3.2.5/x64/lib/ruby/gems/3.2.0/extensions/x86_64-linux/3.2.0/pg-1.5.7", "lib"]
DIFFERENT version:
1.5.6: 1.5.6
1.5.7: 1.5.7
DIFFERENT files:
1.5.6->1.5.7:
* Changed:
.appveyor.yml +1/-1
.github/workflows/source-gem.yml +3/-0
Gemfile +3/-0
History.md +16/-4
Rakefile.cross +3/-3
ext/extconf.rb +3/-0
ext/pg.c +1/-1
ext/pg_connection.c +19/-12
ext/pg_copy_coder.c +6/-6
ext/pg_record_coder.c +5/-5
ext/pg_result.c +2/-2
ext/pg_text_decoder.c +1/-1
ext/pg_text_encoder.c +11/-11
lib/pg.rb +10/-0
lib/pg/basic_type_map_for_queries.rb +1/-1
lib/pg/basic_type_registry.rb +9/-2
lib/pg/connection.rb +10/-2
lib/pg/exceptions.rb +6/-0
lib/pg/version.rb +1/-1
DIFFERENT extra_rdoc_files:
1.5.6->1.5.7:
* Changed:
History.md +16/-4
ext/pg.c +1/-1
ext/pg_connection.c +19/-12
ext/pg_copy_coder.c +6/-6
ext/pg_record_coder.c +5/-5
ext/pg_result.c +2/-2
ext/pg_text_decoder.c +1/-1
ext/pg_text_encoder.c +11/-11
lib/pg.rb +10/-0
lib/pg/basic_type_map_for_queries.rb +1/-1
lib/pg/basic_type_registry.rb +9/-2
lib/pg/connection.rb +10/-2
lib/pg/exceptions.rb +6/-0
lib/pg/version.rb +1/-1
DIFFERENT Gemfile dependencies
1.5.6->1.5.7:
* Added:
ostruct ["~> 0.5"] (development) |
gem compare --diff pg 1.5.6 1.5.7 Compared versions: ["1.5.6", "1.5.7"]
DIFFERENT files:
1.5.6->1.5.7:
* Changed:
.appveyor.yml
--- /tmp/d20240729-1994-yxjbhn/pg-1.5.6/.appveyor.yml 2024-07-29 02:57:35.783991001 +0000
+++ /tmp/d20240729-1994-yxjbhn/pg-1.5.7/.appveyor.yml 2024-07-29 02:57:35.803991410 +0000
@@ -41 +41 @@
- RUBYDOWNLOAD: x86
+ RUBYDOWNLOAD: x64
.github/workflows/source-gem.yml
--- /tmp/d20240729-1994-yxjbhn/pg-1.5.6/.github/workflows/source-gem.yml 2024-07-29 02:57:35.783991001 +0000
+++ /tmp/d20240729-1994-yxjbhn/pg-1.5.7/.github/workflows/source-gem.yml 2024-07-29 02:57:35.803991410 +0000
@@ -122,0 +123 @@
+ sudo mv /Library/PostgreSQL/$PGVER/pgsql/* /Library/PostgreSQL/$PGVER/ && \
@@ -132,0 +134,2 @@
+ # Temprary fix only for Truffleruby-24.0.0:
+ TRUFFLERUBYOPT: --experimental-options --keep-handles-alive
Gemfile
--- /tmp/d20240729-1994-yxjbhn/pg-1.5.6/Gemfile 2024-07-29 02:57:35.787991083 +0000
+++ /tmp/d20240729-1994-yxjbhn/pg-1.5.7/Gemfile 2024-07-29 02:57:35.803991410 +0000
@@ -13,0 +14 @@
+ gem "ostruct", "~> 0.5" # for Rakefile.cross
@@ -15,0 +17,2 @@
+ # With bigdecimal commented out here, corresponding tests are omitted on ruby-3.4+ but are executed on ruby < 3.4.
+ # That way we can check both situations in CI.
History.md
--- /tmp/d20240729-1994-yxjbhn/pg-1.5.6/History.md 2024-07-29 02:57:35.787991083 +0000
+++ /tmp/d20240729-1994-yxjbhn/pg-1.5.7/History.md 2024-07-29 02:57:35.803991410 +0000
@@ -0,0 +1,12 @@
+## v1.5.7 [2024-07-28] Lars Kanis <[email protected]>
+
+- Remove deprecated use of fptr->fd.[#562](https://github.com/ged/ruby-pg/pull/562)
+ Direct access is disallowed since ruby-3.4.
+- Make `pgconn_connect_poll` close the socket prior to calling `PQconnectPoll`. [#564](https://github.com/ged/ruby-pg/pull/564)
+ This could result in an exception while connecting when used multi threaded.
+- Fix several typos and improve spelling in documentation and code. [#566](https://github.com/ged/ruby-pg/pull/566)
+- Add missing PG::RollbackTransaction as an option to exit conn.transaction. [#560](https://github.com/ged/ruby-pg/pull/560)
+ Usage like in rails: https://api.rubyonrails.org/classes/ActiveRecord/Rollback.html
+- Don't print a warning when bigdecimal is required on ruby-3.4+ [#574](https://github.com/ged/ruby-pg/pull/574)
+
+
@@ -95 +107 @@
- So there's no need to set the PATH manuelly any longer.
+ So there's no need to set the PATH manually any longer.
@@ -164 +176 @@
-- Re-add block-call semantics to PG::Connection.new accidently removed in pg-1.3.0. [#454](https://github.com/ged/ruby-pg/pull/454)
+- Re-add block-call semantics to PG::Connection.new accidentally removed in pg-1.3.0. [#454](https://github.com/ged/ruby-pg/pull/454)
@@ -203 +215 @@
-- Fix a performance regession in conn.get_result noticed in single row mode. [#442](https://github.com/ged/ruby-pg/pull/442)
+- Fix a performance regression in conn.get_result noticed in single row mode. [#442](https://github.com/ged/ruby-pg/pull/442)
@@ -289 +301 @@
- Now a local type registry can be instanciated and given to the type map, to avoid changing shared global states.
+ Now a local type registry can be instantiated and given to the type map, to avoid changing shared global states.
Rakefile.cross
--- /tmp/d20240729-1994-yxjbhn/pg-1.5.6/Rakefile.cross 2024-07-29 02:57:35.787991083 +0000
+++ /tmp/d20240729-1994-yxjbhn/pg-1.5.7/Rakefile.cross 2024-07-29 02:57:35.807991491 +0000
@@ -34,2 +34,2 @@
- self.openssl_version = ENV['OPENSSL_VERSION'] || '3.2.1'
- self.postgresql_version = ENV['POSTGRESQL_VERSION'] || '16.2'
+ self.openssl_version = ENV['OPENSSL_VERSION'] || '3.3.1'
+ self.postgresql_version = ENV['POSTGRESQL_VERSION'] || '16.3'
@@ -294 +294 @@
- rake native:#{platform} pkg/#{$gem_spec.full_name}-#{platform}.gem MAKE="make -j`nproc`" RUBY_CC_VERSION=3.3.0:3.2.0:3.1.0:3.0.0:2.7.0:2.6.0:2.5.0
+ rake native:#{platform} pkg/#{$gem_spec.full_name}-#{platform}.gem MAKEOPTS=-j`nproc` RUBY_CC_VERSION=3.3.0:3.2.0:3.1.0:3.0.0:2.7.0:2.6.0:2.5.0
ext/extconf.rb
--- /tmp/d20240729-1994-yxjbhn/pg-1.5.6/ext/extconf.rb 2024-07-29 02:57:35.787991083 +0000
+++ /tmp/d20240729-1994-yxjbhn/pg-1.5.7/ext/extconf.rb 2024-07-29 02:57:35.807991491 +0000
@@ -11,0 +12,2 @@
+ $LDFLAGS <<
+ ' -ggdb'
@@ -160,0 +163 @@
+have_func 'rb_io_descriptor' # since ruby-3.1
ext/pg.c
--- /tmp/d20240729-1994-yxjbhn/pg-1.5.6/ext/pg.c 2024-07-29 02:57:35.791991165 +0000
+++ /tmp/d20240729-1994-yxjbhn/pg-1.5.7/ext/pg.c 2024-07-29 02:57:35.807991491 +0000
@@ -546 +546 @@
- * The SQLSTATE code identies the type of error that has occurred; it can be used by front-end applications to perform specific operations (such as error handling) in response to a particular database error.
+ * The SQLSTATE code identifies the type of error that has occurred; it can be used by front-end applications to perform specific operations (such as error handling) in response to a particular database error.
ext/pg_connection.c
--- /tmp/d20240729-1994-yxjbhn/pg-1.5.6/ext/pg_connection.c 2024-07-29 02:57:35.791991165 +0000
+++ /tmp/d20240729-1994-yxjbhn/pg-1.5.7/ext/pg_connection.c 2024-07-29 02:57:35.811991573 +0000
@@ -36,2 +36,2 @@
-static void
-pg_raise_conn_error( VALUE klass, VALUE self, const char *format, ...)
+NORETURN( static void
+pg_raise_conn_error( VALUE klass, VALUE self, const char *format, ...))
@@ -518 +517,0 @@
- status = gvl_PQconnectPoll(pg_get_pgconn(self));
@@ -520,0 +520 @@
+ status = gvl_PQconnectPoll(pg_get_pgconn(self));
@@ -618 +617,0 @@
- status = gvl_PQresetPoll(pg_get_pgconn(self));
@@ -620,0 +620 @@
+ status = gvl_PQresetPoll(pg_get_pgconn(self));
@@ -2268,0 +2269,11 @@
+#ifndef HAVE_RB_IO_DESCRIPTOR
+static int
+rb_io_descriptor(VALUE io)
+{
+ Check_Type(io, T_FILE);
+ rb_io_t *fptr = RFILE(io)->fptr;
+ rb_io_check_closed(fptr);
+ return fptr->fd;
+}
+#endif
+
@@ -2289 +2299,0 @@
- rb_io_t *fptr;
@@ -2300 +2309,0 @@
- GetOpenFile((io), fptr);
@@ -2314 +2323 @@
- if ( WSAEventSelect(_get_osfhandle(fptr->fd), hEvent, w32_events) == SOCKET_ERROR ) {
+ if ( WSAEventSelect(_get_osfhandle(rb_io_descriptor(io)), hEvent, w32_events) == SOCKET_ERROR ) {
@@ -2357 +2366 @@
- * Fortunatelly ruby-3.1 offers a C-API for it.
+ * Fortunately ruby-3.1 offers a C-API for it.
@@ -2387 +2395,0 @@
- rb_io_t *fptr;
@@ -2391 +2398,0 @@
- GetOpenFile((io), fptr);
@@ -2396 +2403 @@
- res = rb_wait_for_single_fd(fptr->fd, NUM2UINT(events), NIL_P(timeout) ? NULL : &waittime);
+ res = rb_wait_for_single_fd(rb_io_descriptor(io), NUM2UINT(events), NIL_P(timeout) ? NULL : &waittime);
@@ -3165 +3172 @@
- * * +false+ when a failure occured and the connection was closed
+ * * +false+ when a failure occurred and the connection was closed
ext/pg_copy_coder.c
--- /tmp/d20240729-1994-yxjbhn/pg-1.5.6/ext/pg_copy_coder.c 2024-07-29 02:57:35.791991165 +0000
+++ /tmp/d20240729-1994-yxjbhn/pg-1.5.7/ext/pg_copy_coder.c 2024-07-29 02:57:35.811991573 +0000
@@ -238 +238 @@
- int backslashs;
+ int backslashes;
@@ -289 +289 @@
- for(backslashs = 0; ptr1 != ptr2; ptr1++) {
+ for(backslashes = 0; ptr1 != ptr2; ptr1++) {
@@ -292 +292 @@
- backslashs++;
+ backslashes++;
@@ -297 +297 @@
- ptr2 = current_out + strlen + backslashs;
+ ptr2 = current_out + strlen + backslashes;
@@ -301 +301 @@
- * right to left, until all backslashs are placed. */
+ * right to left, until all backslashes are placed. */
@@ -394 +394 @@
- /* 4 bytes for -1 indicationg a NULL value */
+ /* 4 bytes for -1 indicating a NULL value */
ext/pg_record_coder.c
--- /tmp/d20240729-1994-yxjbhn/pg-1.5.6/ext/pg_record_coder.c 2024-07-29 02:57:35.791991165 +0000
+++ /tmp/d20240729-1994-yxjbhn/pg-1.5.7/ext/pg_record_coder.c 2024-07-29 02:57:35.811991573 +0000
@@ -201 +201 @@
- int backslashs;
+ int backslashes;
@@ -252 +252 @@
- for(backslashs = 0; ptr1 != ptr2; ptr1++) {
+ for(backslashes = 0; ptr1 != ptr2; ptr1++) {
@@ -255 +255 @@
- backslashs++;
+ backslashes++;
@@ -260 +260 @@
- ptr2 = current_out + strlen + backslashs;
+ ptr2 = current_out + strlen + backslashes;
@@ -264 +264 @@
- * right to left, until all backslashs are placed. */
+ * right to left, until all backslashes are placed. */
ext/pg_result.c
--- /tmp/d20240729-1994-yxjbhn/pg-1.5.6/ext/pg_result.c 2024-07-29 02:57:35.791991165 +0000
+++ /tmp/d20240729-1994-yxjbhn/pg-1.5.7/ext/pg_result.c 2024-07-29 02:57:35.811991573 +0000
@@ -667 +667 @@
- * conn.exec( "SELECT * FROM nonexistant_table" )
+ * conn.exec( "SELECT * FROM nonexistent_table" )
@@ -687 +687 @@
- * ["ERROR", "42P01", "relation \"nonexistant_table\" does not exist", nil, nil,
+ * ["ERROR", "42P01", "relation \"nonexistent_table\" does not exist", nil, nil,
ext/pg_text_decoder.c
--- /tmp/d20240729-1994-yxjbhn/pg-1.5.6/ext/pg_text_decoder.c 2024-07-29 02:57:35.791991165 +0000
+++ /tmp/d20240729-1994-yxjbhn/pg-1.5.7/ext/pg_text_decoder.c 2024-07-29 02:57:35.811991573 +0000
@@ -177 +177 @@
- rb_require("bigdecimal");
+ rb_funcall(rb_mPG, rb_intern("require_bigdecimal_without_warning"), 0);
ext/pg_text_encoder.c
--- /tmp/d20240729-1994-yxjbhn/pg-1.5.6/ext/pg_text_encoder.c 2024-07-29 02:57:35.791991165 +0000
+++ /tmp/d20240729-1994-yxjbhn/pg-1.5.7/ext/pg_text_encoder.c 2024-07-29 02:57:35.811991573 +0000
@@ -380 +380 @@
- rb_require("bigdecimal");
+ rb_funcall(rb_mPG, rb_intern("require_bigdecimal_without_warning"), 0);
@@ -440 +440 @@
- int backslashs = 0;
+ int backslashes = 0;
@@ -457 +457 @@
- backslashs++;
+ backslashes++;
@@ -466 +466 @@
- ptr2 = p_out + strlen + backslashs + 2;
+ ptr2 = p_out + strlen + backslashes + 2;
@@ -471 +471 @@
- * right to left, until all backslashs are placed. */
+ * right to left, until all backslashes are placed. */
@@ -480 +480 @@
- return strlen + backslashs + 2;
+ return strlen + backslashes + 2;
@@ -695 +695 @@
- int backslashs = 0;
+ int backslashes = 0;
@@ -700 +700 @@
- backslashs++;
+ backslashes++;
@@ -705 +705 @@
- ptr2 = p_out + strlen + backslashs + 2;
+ ptr2 = p_out + strlen + backslashes + 2;
@@ -710 +710 @@
- * right to left, until all backslashs are placed. */
+ * right to left, until all backslashes are placed. */
@@ -719 +719 @@
- return strlen + backslashs + 2;
+ return strlen + backslashes + 2;
lib/pg.rb
--- /tmp/d20240729-1994-yxjbhn/pg-1.5.6/lib/pg.rb 2024-07-29 02:57:35.795991246 +0000
+++ /tmp/d20240729-1994-yxjbhn/pg-1.5.7/lib/pg.rb 2024-07-29 02:57:35.815991655 +0000
@@ -128,0 +129,10 @@
+ # Ruby-3.4+ prints a warning, if bigdecimal is required but not in the Gemfile.
+ # But it's a false positive, since we enable bigdecimal depending features only if it's available.
+ # And most people don't need these features.
+ def self.require_bigdecimal_without_warning
+ oldverb, $VERBOSE = $VERBOSE, nil
+ require "bigdecimal"
+ ensure
+ $VERBOSE = oldverb
+ end
+
lib/pg/basic_type_map_for_queries.rb
--- /tmp/d20240729-1994-yxjbhn/pg-1.5.6/lib/pg/basic_type_map_for_queries.rb 2024-07-29 02:57:35.795991246 +0000
+++ /tmp/d20240729-1994-yxjbhn/pg-1.5.7/lib/pg/basic_type_map_for_queries.rb 2024-07-29 02:57:35.815991655 +0000
@@ -170 +170 @@
- require "bigdecimal"
+ PG.require_bigdecimal_without_warning
lib/pg/basic_type_registry.rb
--- /tmp/d20240729-1994-yxjbhn/pg-1.5.6/lib/pg/basic_type_registry.rb 2024-07-29 02:57:35.795991246 +0000
+++ /tmp/d20240729-1994-yxjbhn/pg-1.5.7/lib/pg/basic_type_registry.rb 2024-07-29 02:57:35.815991655 +0000
@@ -174 +174,8 @@
- # The key of these hashs maps to the `typname` column from the table pg_type.
+ # @coders_by_name has a content of
+ # Array< Hash< Symbol: Hash< String: Coder > > >
+ #
+ # The layers are:
+ # * index of Array is 0 (text) and 1 (binary)
+ # * Symbol key in the middle Hash is :encoder and :decoder
+ # * String key in the inner Hash corresponds to the `typname` column in the table pg_type
+ # * Coder value in the inner Hash is the associated coder object
@@ -229 +236 @@
- require "bigdecimal"
+ PG.require_bigdecimal_without_warning
lib/pg/connection.rb
--- /tmp/d20240729-1994-yxjbhn/pg-1.5.6/lib/pg/connection.rb 2024-07-29 02:57:35.795991246 +0000
+++ /tmp/d20240729-1994-yxjbhn/pg-1.5.7/lib/pg/connection.rb 2024-07-29 02:57:35.815991655 +0000
@@ -169 +169,4 @@
- # Also PG::BinaryEncoder::CopyRow can be used to send data in binary format to the server.
+ # All 4 CopyRow classes can take a type map to specify how the columns are mapped to and from the database format.
+ # For details see the particular CopyRow class description.
+ #
+ # PG::BinaryEncoder::CopyRow can be used to send data in binary format to the server.
@@ -308,0 +312,5 @@
+ rescue PG::RollbackTransaction
+ rollback = true
+ cancel if transaction_status == PG::PQTRANS_ACTIVE
+ block
+ exec "ROLLBACK"
@@ -496 +504 @@
- # sync_put_copy_data does a non-blocking attept to flush data.
+ # sync_put_copy_data does a non-blocking attempt to flush data.
lib/pg/exceptions.rb
--- /tmp/d20240729-1994-yxjbhn/pg-1.5.6/lib/pg/exceptions.rb 2024-07-29 02:57:35.795991246 +0000
+++ /tmp/d20240729-1994-yxjbhn/pg-1.5.7/lib/pg/exceptions.rb 2024-07-29 02:57:35.815991655 +0000
@@ -23,0 +24,6 @@
+ # PG::Connection#transaction uses this exception to distinguish a deliberate rollback from other exceptional situations.
+ # Normally, raising an exception will cause the .transaction method to rollback the database transaction and pass on the exception.
+ # But if you raise an PG::RollbackTransaction exception, then the database transaction will be rolled back, without passing on the exception.
+ class RollbackTransaction < StandardError
+ end
+
lib/pg/version.rb
--- /tmp/d20240729-1994-yxjbhn/pg-1.5.6/lib/pg/version.rb 2024-07-29 02:57:35.799991328 +0000
+++ /tmp/d20240729-1994-yxjbhn/pg-1.5.7/lib/pg/version.rb 2024-07-29 02:57:35.819991736 +0000
@@ -3 +3 @@
- VERSION = '1.5.6'
+ VERSION = '1.5.7' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Bumps pg from 1.5.6 to 1.5.7.
Changelog
Sourced from pg's changelog.
Commits
0ac827c
Bump VERSION to 1.5.7cdb5202
Update release notes for pg-1.5.75935b15
Merge pull request #575 from larskanis/appv1e5f1630
CI: Fix appveyor build by switching to x64 platform8e62c81
Fix ruby warningd17123c
Merge pull request #574 from larskanis/bigdecia629d14
Don't print a warning when bigdecimal is required on ruby-3.4+1a94b12
Add comment to Gemfile reg. bigdecimal3719759
Add ostruct as a development gem as a preparation for ruby-3.569551bd
Add release notes for pg-1.5.7Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebase
will rebase this PR@dependabot recreate
will recreate this PR, overwriting any edits that have been made to it@dependabot merge
will merge this PR after your CI passes on it@dependabot squash and merge
will squash and merge this PR after your CI passes on it@dependabot cancel merge
will cancel a previously requested merge and block automerging@dependabot reopen
will reopen this PR if it is closed@dependabot close
will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot show <dependency name> ignore conditions
will show all of the ignore conditions of the specified dependency@dependabot ignore this major version
will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor version
will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependency
will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)