Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package rubygem-pg for openSUSE:Factory 
checked in at 2022-04-30 22:52:40
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-pg (Old)
 and      /work/SRC/openSUSE:Factory/.rubygem-pg.new.1538 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "rubygem-pg"

Sat Apr 30 22:52:40 2022 rev:41 rq:974065 version:1.3.5

Changes:
--------
--- /work/SRC/openSUSE:Factory/rubygem-pg/rubygem-pg.changes    2022-03-13 
20:25:50.539702998 +0100
+++ /work/SRC/openSUSE:Factory/.rubygem-pg.new.1538/rubygem-pg.changes  
2022-04-30 22:52:53.272252667 +0200
@@ -1,0 +2,26 @@
+Thu Apr 28 05:41:21 UTC 2022 - Stephan Kulow <[email protected]>
+
+updated to version 1.3.5
+ see installed History.rdoc
+
+  == v1.3.5 [2022-03-31] Lars Kanis <[email protected]>
+  
+  Bugfixes:
+  
+  - Handle PGRES_COMMAND_OK in pgresult_stream_any. #447
+    Fixes usage when trying to stream the result of a procedure call that 
returns no results.
+  
+  Enhancements:
+  
+  - Rename BasicTypeRegistry#define_default_types to #register_default_types 
to use a more consistent terminology.
+    Keeping define_default_types for compatibility.
+  - BasicTypeRegistry: return self instead of objects by accident.
+    This allows call chaining.
+  - Add some April fun. #449
+  
+  Documentation:
+  - Refine documentation of conn.socket_io and conn.connect_poll
+  
+  
+
+-------------------------------------------------------------------

Old:
----
  pg-1.3.4.gem

New:
----
  pg-1.3.5.gem

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ rubygem-pg.spec ++++++
--- /var/tmp/diff_new_pack.hwXbit/_old  2022-04-30 22:52:53.796253376 +0200
+++ /var/tmp/diff_new_pack.hwXbit/_new  2022-04-30 22:52:53.800253381 +0200
@@ -24,7 +24,7 @@
 #
 
 Name:           rubygem-pg
-Version:        1.3.4
+Version:        1.3.5
 Release:        0
 %define mod_name pg
 %define mod_full_name %{mod_name}-%{version}
@@ -33,7 +33,7 @@
 BuildRequires:  postgresql-devel
 # /MANUAL
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
-BuildRequires:  %{rubydevel >= 2.2}
+BuildRequires:  %{rubydevel >= 2.5}
 BuildRequires:  %{rubygem gem2rpm}
 BuildRequires:  %{rubygem rdoc > 3.10}
 BuildRequires:  ruby-macros >= 5
@@ -46,27 +46,10 @@
 Group:          Development/Languages/Ruby
 
 %description
-Pg is the Ruby interface to the {PostgreSQL
-RDBMS}[http://www.postgresql.org/].
-It works with {PostgreSQL 9.2 and
-later}[http://www.postgresql.org/support/versioning/].
-A small example usage:
-#!/usr/bin/env ruby
-require 'pg'
-# Output a table of current connections to the DB
-conn = PG.connect( dbname: 'sales' )
-conn.exec( "SELECT * FROM pg_stat_activity" ) do |result|
-puts "     PID | User             | Query"
-result.each do |row|
-puts " %7d | %-16s | %s " %
-row.values_at('procpid', 'usename', 'current_query')
-end
-end.
+Pg is the Ruby interface to the PostgreSQL RDBMS. It works with PostgreSQL 9.3
+and later.
 
 %prep
-%gem_unpack
-find -type f -print0 | xargs -0 touch -r %{S:0}
-%gem_build
 
 %build
 

++++++ pg-1.3.4.gem -> pg-1.3.5.gem ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/History.rdoc new/History.rdoc
--- old/History.rdoc    2022-03-10 14:56:37.000000000 +0100
+++ new/History.rdoc    2022-03-31 14:39:47.000000000 +0200
@@ -1,3 +1,22 @@
+== v1.3.5 [2022-03-31] Lars Kanis <[email protected]>
+
+Bugfixes:
+
+- Handle PGRES_COMMAND_OK in pgresult_stream_any. #447
+  Fixes usage when trying to stream the result of a procedure call that 
returns no results.
+
+Enhancements:
+
+- Rename BasicTypeRegistry#define_default_types to #register_default_types to 
use a more consistent terminology.
+  Keeping define_default_types for compatibility.
+- BasicTypeRegistry: return self instead of objects by accident.
+  This allows call chaining.
+- Add some April fun. #449
+
+Documentation:
+- Refine documentation of conn.socket_io and conn.connect_poll
+
+
 == v1.3.4 [2022-03-10] Lars Kanis <[email protected]>
 
 Bugfixes:
Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ
Binary files old/checksums.yaml.gz.sig and new/checksums.yaml.gz.sig differ
Binary files old/data.tar.gz.sig and new/data.tar.gz.sig differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ext/extconf.rb new/ext/extconf.rb
--- old/ext/extconf.rb  2022-03-10 14:56:37.000000000 +0100
+++ new/ext/extconf.rb  2022-03-31 14:39:47.000000000 +0200
@@ -1,3 +1,5 @@
+# -*- encoding: utf-8 -*-
+
 require 'pp'
 require 'mkmf'
 
@@ -167,3 +169,32 @@
 create_header()
 create_makefile( "pg_ext" )
 
+
+def message!(important_message)
+       message important_message
+       if !$stdout.tty? && File.chardev?('/dev/tty')
+               File.open('/dev/tty', 'w') do |tty|
+                       tty.print important_message
+               end
+       end
+rescue
+end
+
+if "2022-04-01" == Time.now.strftime("%Y-%m-%d")
+       message! <<-EOM
+===================================================================
+HEADS UP! Prepare for pg-1.4.2022 ! ????????????
+
+Now that psycopg3 has most of the features of ruby-pg, we plan to
+switch to using it as our foundation for the next pg release.
+It will run through pycall and requires a working python setup.
+This will minimize our development and maintenance efforts, since
+it allows us to use one and the same code base for both programming
+languages - ruby and python. ????????
+
+And we follow the recent merge of the Django and Rails teams! ??????
+
+Stay up-to-date at https://github.com/ged/ruby-pg/issues/449
+===================================================================
+EOM
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ext/pg_connection.c new/ext/pg_connection.c
--- old/ext/pg_connection.c     2022-03-10 14:56:37.000000000 +0100
+++ new/ext/pg_connection.c     2022-03-31 14:39:47.000000000 +0200
@@ -450,17 +450,18 @@
  *   the asynchronous connection is ready
  *
  * Example:
- *   conn = PG::Connection.connect_start("dbname=mydatabase")
- *   socket = conn.socket_io
+ *   require "io/wait"
+ *
+ *   conn = PG::Connection.connect_start(dbname: 'mydatabase')
  *   status = conn.connect_poll
  *   while(status != PG::PGRES_POLLING_OK) do
  *     # do some work while waiting for the connection to complete
  *     if(status == PG::PGRES_POLLING_READING)
- *       if(not select([socket], [], [], 10.0))
+ *       unless conn.socket_io.wait_readable(10.0)
  *         raise "Asynchronous connection timed out!"
  *       end
  *     elsif(status == PG::PGRES_POLLING_WRITING)
- *       if(not select([], [socket], [], 10.0))
+ *       unless conn.socket_io.wait_writable(10.0)
  *         raise "Asynchronous connection timed out!"
  *       end
  *     end
@@ -818,13 +819,15 @@
  * call-seq:
  *    conn.socket_io() -> IO
  *
- * Fetch a memorized IO object created from the Connection's underlying socket.
- * This object can be used for IO.select to wait for events while running
- * asynchronous API calls.
- *
- * Using this instead of #socket avoids the problem of the underlying 
connection
- * being closed by Ruby when an IO created using 
<tt>IO.for_fd(conn.socket)</tt>
- * goes out of scope. In contrast to #socket, it also works on Windows.
+ * Fetch an IO object created from the Connection's underlying socket.
+ * This object can be used per <tt>socket_io.wait_readable</tt>, 
<tt>socket_io.wait_writable</tt> or for <tt>IO.select</tt> to wait for events 
while running asynchronous API calls.
+ * <tt>IO#wait_*able</tt> is is <tt>Fiber.scheduler</tt> compatible in 
contrast to <tt>IO.select</tt>.
+ *
+ * The IO object can change while the connection is established, but is 
memorized afterwards.
+ * So be sure not to cache the IO object, but repeat calling 
<tt>conn.socket_io</tt> instead.
+ *
+ * Using this method also works on Windows in contrast to using #socket .
+ * It also avoids the problem of the underlying connection being closed by 
Ruby when an IO created using <tt>IO.for_fd(conn.socket)</tt> goes out of scope.
  */
 static VALUE
 pgconn_socket_io(VALUE self)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ext/pg_record_coder.c new/ext/pg_record_coder.c
--- old/ext/pg_record_coder.c   2022-03-10 14:56:37.000000000 +0100
+++ new/ext/pg_record_coder.c   2022-03-31 14:39:47.000000000 +0200
@@ -344,10 +344,12 @@
  *   oids = conn.exec( "SELECT (NULL::complex).*" )
  *   # Build a type map (PG::TypeMapByColumn) for decoding the "complex" type
  *   dtm = PG::BasicTypeMapForResults.new(conn).build_column_map( oids )
- *   # Register a record decoder for decoding our type "complex"
- *   
PG::BasicTypeRegistry.register_coder(PG::TextDecoder::Record.new(type_map: dtm, 
name: "complex"))
- *   # Apply the basic type registry to all results retrieved from the server
- *   conn.type_map_for_results = PG::BasicTypeMapForResults.new(conn)
+ *   # Build a type map and populate with basic types
+ *   btr = PG::BasicTypeRegistry.new.register_default_types
+ *   # Register a new record decoder for decoding our type "complex"
+ *   btr.register_coder(PG::TextDecoder::Record.new(type_map: dtm, name: 
"complex"))
+ *   # Apply our basic type registry to all results retrieved from the server
+ *   conn.type_map_for_results = PG::BasicTypeMapForResults.new(conn, 
registry: btr)
  *   # Now queries decode the "complex" type (and many basic types) 
automatically
  *   conn.exec("SELECT * FROM my_table").to_a
  *   # => [{"v1"=>[2.0, 3.0], "v2"=>[4.0, 5.0]}, {"v1"=>[6.0, 7.0], 
"v2"=>[8.0, 9.0]}]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ext/pg_result.c new/ext/pg_result.c
--- old/ext/pg_result.c 2022-03-10 14:56:37.000000000 +0100
+++ new/ext/pg_result.c 2022-03-31 14:39:47.000000000 +0200
@@ -1457,6 +1457,7 @@
 
                switch( PQresultStatus(pgresult) ){
                        case PGRES_TUPLES_OK:
+                       case PGRES_COMMAND_OK:
                                if( ntuples == 0 )
                                        return self;
                                rb_raise( rb_eInvalidResultStatus, "PG::Result 
is not in single row mode");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/pg/basic_type_registry.rb 
new/lib/pg/basic_type_registry.rb
--- old/lib/pg/basic_type_registry.rb   2022-03-10 14:56:37.000000000 +0100
+++ new/lib/pg/basic_type_registry.rb   2022-03-31 14:39:47.000000000 +0200
@@ -22,7 +22,7 @@
 #   end
 #
 #   conn = PG.connect
-#   regi = PG::BasicTypeRegistry.new.define_default_types
+#   regi = PG::BasicTypeRegistry.new.register_default_types
 #   regi.register_type(0, 'inet', InetEncoder, InetDecoder)
 #   conn.type_map_for_results = PG::BasicTypeMapForResults.new(conn, registry: 
regi)
 class PG::BasicTypeRegistry
@@ -184,6 +184,7 @@
                name = coder.name || raise(ArgumentError, "name of 
#{coder.inspect} must be defined")
                h[:encoder][name] = coder if coder.respond_to?(:encode)
                h[:decoder][name] = coder if coder.respond_to?(:decode)
+               self
        end
 
        # Register the given +encoder_class+ and/or +decoder_class+ for casting 
a PostgreSQL type.
@@ -193,6 +194,7 @@
        def register_type(format, name, encoder_class, decoder_class)
                register_coder(encoder_class.new(name: name, format: format)) 
if encoder_class
                register_coder(decoder_class.new(name: name, format: format)) 
if decoder_class
+               self
        end
 
        # Alias the +old+ type to the +new+ type.
@@ -205,10 +207,11 @@
                                @coders_by_name[format][ende].delete(new)
                        end
                end
+               self
        end
 
        # Populate the registry with all builtin types of ruby-pg
-       def define_default_types
+       def register_default_types
                register_type 0, 'int2', PG::TextEncoder::Integer, 
PG::TextDecoder::Integer
                alias_type    0, 'int4', 'int2'
                alias_type    0, 'int8', 'int2'
@@ -281,8 +284,10 @@
                self
        end
 
+       alias define_default_types register_default_types
+
        # @private
-       DEFAULT_TYPE_REGISTRY = PG::BasicTypeRegistry.new.define_default_types
+       DEFAULT_TYPE_REGISTRY = PG::BasicTypeRegistry.new.register_default_types
 
        # Delegate class method calls to DEFAULT_TYPE_REGISTRY
        class << self
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/pg/version.rb new/lib/pg/version.rb
--- old/lib/pg/version.rb       2022-03-10 14:56:37.000000000 +0100
+++ new/lib/pg/version.rb       2022-03-31 14:39:47.000000000 +0200
@@ -1,4 +1,4 @@
 module PG
        # Library version
-       VERSION = '1.3.4'
+       VERSION = '1.3.5'
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata        2022-03-10 14:56:37.000000000 +0100
+++ new/metadata        2022-03-31 14:39:47.000000000 +0200
@@ -1,7 +1,7 @@
 --- !ruby/object:Gem::Specification
 name: pg
 version: !ruby/object:Gem::Version
-  version: 1.3.4
+  version: 1.3.5
 platform: ruby
 authors:
 - Michael Granger
@@ -36,7 +36,7 @@
   oL1mUdzB8KrZL4/WbG5YNX6UTtJbIOu9qEFbBAy4/jtIkJX+dlNoFwd4GXQW1YNO
   nA==
   -----END CERTIFICATE-----
-date: 2022-03-10 00:00:00.000000000 Z
+date: 2022-03-31 00:00:00.000000000 Z
 dependencies: []
 description: Pg is the Ruby interface to the PostgreSQL RDBMS. It works with 
PostgreSQL
   9.3 and later.
Binary files old/metadata.gz.sig and new/metadata.gz.sig differ

Reply via email to