Bug#1036060: unblock: libfinance-quote-perl/1.54-3

gregor herrmann gregoa at debian.org
Sun May 14 19:26:28 BST 2023


Package: release.debian.org
Severity: normal
User: release.debian.org at packages.debian.org
Usertags: unblock
X-Debbugs-Cc: libfinance-quote-perl at packages.debian.org
Control: affects -1 + src:libfinance-quote-perl

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

I've uploaded libfinance-quote-perl/1.54-3 to unstable, targetting
bookworm.

In comparison to -2, the upload contains 4 patches from upstream Git
commits/PRs. While this sounds a bit scary at this stage of the
freeze, all changes are minimal and fix issues.

I'm attaching a full debdiff but in practice the code changes are as
follows (the rest is documentation, patch metadata, a skipped online
test, …):

1) debian/patches/GH263_URL_MorningstarJP.patch: 1 URL changed:

- --- a/lib/Finance/Quote/MorningstarJP.pm
+++ b/lib/Finance/Quote/MorningstarJP.pm
@@ -32,7 +32,7 @@
 
 # NAV information (basis price)
 $MORNINGSTAR_JP_URL =
- -  ('https://www.morningstar.co.jp/FundData/DownloadStdYmd.do?fnc=');
+  ('https://www.wealthadvisor.co.jp/FundData/DownloadStdYmd.do?fnc=');
 
 sub methods { return ( morningstarjp => \&morningstarjp ); }
 sub labels  { return ( morningstarjp => [qw/symbol date nav/] ); }


2) debian/patches/GH262_Regex_FTfunds.patch: 1 regexp changed:

- --- a/lib/Finance/Quote/FTfunds.pm
+++ b/lib/Finance/Quote/FTfunds.pm
@@ -182,7 +182,7 @@
 		my $currency;
 		my $price;
 		if ($webdoc->content =~
- -		m[<span class="mod-ui-data-list__label">Price [(]([A-Z]{3})[)]</span><span class="mod-ui-data-list__value">([\.\,0-9]*)</span>]  )
+		m[<span class="mod-ui-data-list__label"[^>]*>Price [(]([A-Z]{3})[)]</span><span class="mod-ui-data-list__value">([\.\,0-9]*)</span>]  )
         {
 			$currency = $1;
 			$price    = $2;


3) debian/patches/GH267_TRV_AlphaVantage.patch: 1 entry added to a
   hash table:

- --- a/lib/Finance/Quote/AlphaVantage.pm
+++ b/lib/Finance/Quote/AlphaVantage.pm
@@ -58,6 +58,7 @@
     '.SA'  => "BRL",    # Brazil		Sao Paolo
     '.BR'  => "EUR",    # Belgium		Brussels
     '.TO'  => "CAD",    # Canada		Toronto
+    '.TRV' => "CAD",    # Canada        Toronto Venture
     '.V'   => "CAD",    # 		Toronto Venture
     '.TRT' => "CAD",    # Canada        Toronto
     '.SN'  => "CLP",    # Chile		Santiago


4) debian/patches/GH268_URL_YahooJSON.patch: 1 URL changed:

- --- a/lib/Finance/Quote/YahooJSON.pm
+++ b/lib/Finance/Quote/YahooJSON.pm
@@ -35,7 +35,7 @@
 
 our $VERSION = '1.54'; # VERSION
 
- -my $YIND_URL_HEAD = 'https://query1.finance.yahoo.com/v7/finance/quote?symbols=';
+my $YIND_URL_HEAD = 'https://query1.finance.yahoo.com/v6/finance/quote?symbols=';
 my $YIND_URL_TAIL = '';
 
 sub methods {

(This is Debian bug #1035690)


All these changes are also in the new 1.55 upstream release which
I've chosen not to take as it also contains other/more code changes.

Having these changes in bookworm would help users to have working
stock quote modules, and as the changes are minimal there should be
no risk for regressions.


unblock libfinance-quote-perl/1.54-3
age-days 5 libfinance-quote-perl/1.54-3



Thanks in advance,
gregor

-----BEGIN PGP SIGNATURE-----

iQKTBAEBCgB9FiEE0eExbpOnYKgQTYX6uzpoAYZJqgYFAmRhJ9RfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEQx
RTEzMTZFOTNBNzYwQTgxMDREODVGQUJCM0E2ODAxODY0OUFBMDYACgkQuzpoAYZJ
qgauYg/+IpHCLWKfRn18h5jiQruWhQkosM3n8cPaXVqiCbm2V1o/I4DC5Rx6xK4W
uZ/255jydt1DI771a4p2zlgl/svKIXCBCqsk9c3aUzpCrkeAVghOW6OGqD9X2P+Q
o8W1ADpEbG/gI6kGHn7Yj5x428L6PtG/t0rUTEKnEEUznPnLFufszFkr1/aifwbr
bbX1sjSxcdNQjtaiMVRusK7CD8sfqgRaDSZJC7iN9NjIbMnYEo/3UYiSDpBnXC6/
QP/VZrAdrbfsmWCahJtcZ/ZlvpKN1rmQI6fnaTIFFGewQmyj2uMAnVa1bLSm2lI0
6yo5oc33TDfxCR0nnJOr4jE3ruB1sYenIoUilNxLtglCRCJZhoZCQP6IPq2wCTe3
U18L4dH0lAppXGx7MHq2bnEXTV5JB6pcz0EBDe66iupmotQrgOwoNRVOt8A6GMah
2+MCWGSTub2Z0RAFQWv/HTdSZWhsjq+TgMNoxOcxGjXBUdgBAl+JkrfxeZ3e2RLd
oY42kFhTIimDKnyHOe9CdA2Zp/PvISnHdafiMoeHBrnZfMmvG3dttqcxDxn9GPAL
wievCeyj27th12taQN5/Rg5qPU07cr3yiFE9v8ccSsKPcQzmT27nx+qFEYALcYxn
fXlgcIMsRuWaIfc1okSgus7Q8QhxAQk3Ep2vZrPQ5cuoOC91so4=
=apkh
-----END PGP SIGNATURE-----
-------------- next part --------------
diff -Nru libfinance-quote-perl-1.54/debian/changelog libfinance-quote-perl-1.54/debian/changelog
--- libfinance-quote-perl-1.54/debian/changelog	2023-02-05 14:24:34.000000000 +0100
+++ libfinance-quote-perl-1.54/debian/changelog	2023-05-14 20:04:45.000000000 +0200
@@ -1,3 +1,17 @@
+libfinance-quote-perl (1.54-3) unstable; urgency=medium
+
+  * Add patch GH263_URL_MorningstarJP.patch from upstream Git repo.
+    URL change in MorningstarJP.pm. (GH#263)
+  * Add patch GH262_Regex_FTfunds.patch from upstream Git repo.
+    Tweak regex to fix FTfunds.pm. (GH#262)
+  * Add patch GH267_TRV_AlphaVantage.patch from upstream Git repo.
+    Added currency map .TRV => CAD. (GH#267)
+  * Add patch GH268_URL_YahooJSON.patch from upstream Git repo.
+    Quick fix to YahooJSON.pm. (GH#268)
+    Thanks to David Engel for the bug report. (Closes: #1035690)
+
+ -- gregor herrmann <gregoa at debian.org>  Sun, 14 May 2023 20:04:45 +0200
+
 libfinance-quote-perl (1.54-2) unstable; urgency=medium
 
   * Drop text-trim.patch, libstring-util-perl is packaged now.
diff -Nru libfinance-quote-perl-1.54/debian/patches/GH262_Regex_FTfunds.patch libfinance-quote-perl-1.54/debian/patches/GH262_Regex_FTfunds.patch
--- libfinance-quote-perl-1.54/debian/patches/GH262_Regex_FTfunds.patch	1970-01-01 01:00:00.000000000 +0100
+++ libfinance-quote-perl-1.54/debian/patches/GH262_Regex_FTfunds.patch	2023-05-14 20:04:45.000000000 +0200
@@ -0,0 +1,46 @@
+From 504fcc1ae35fd9c1e59949281e2939bda6a971a5 Mon Sep 17 00:00:00 2001
+From: Paul Howarth <paul at city-fan.org>
+Date: Sat, 8 Apr 2023 11:48:20 +0100
+Subject: [PATCH 1/3] Tweak regex to fix FTfunds.pm
+Origin: https://github.com/finance-quote/finance-quote/pull/262
+
+--- a/lib/Finance/Quote/FTfunds.pm
++++ b/lib/Finance/Quote/FTfunds.pm
+@@ -182,7 +182,7 @@
+ 		my $currency;
+ 		my $price;
+ 		if ($webdoc->content =~
+-		m[<span class="mod-ui-data-list__label">Price [(]([A-Z]{3})[)]</span><span class="mod-ui-data-list__value">([\.\,0-9]*)</span>]  )
++		m[<span class="mod-ui-data-list__label"[^>]*>Price [(]([A-Z]{3})[)]</span><span class="mod-ui-data-list__value">([\.\,0-9]*)</span>]  )
+         {
+ 			$currency = $1;
+ 			$price    = $2;
+--- a/t/ftfunds.t
++++ b/t/ftfunds.t
+@@ -13,21 +13,21 @@
+ my $year   = (localtime())[5] + 1900;
+ my $lastyear = $year - 1;
+ 
+-my %quotes = $q->ftfunds("GB0031835118","GB0030880255","GB0003865176","GB00B7W6PR65","BOGUS");
++my %quotes = $q->ftfunds("GB0031834814","GB0030881337","GB0003865176","GB00B7W6PR65","BOGUS");
+ ok(%quotes);
+ 
+ # Check the last values are defined.  These are the most
+ #  used and most reliable indicators of success.
+-ok($quotes{"GB0031835118","last"} > 0);
+-ok($quotes{"GB0031835118","success"});
++ok($quotes{"GB0031834814","last"} > 0);
++ok($quotes{"GB0031834814","success"});
+ 
+ ok($quotes{"GB00B7W6PR65","last"} > 0);
+ ok($quotes{"GB00B7W6PR65","success"});
+ ok($quotes{"GB00B7W6PR65","currency"} eq "GBP", "Currency (GBP) for GB00B7W6PR65 is ".$quotes{"GB00B7W6PR65","currency"});
+ ok($quotes{"GB00B7W6PR65","price"}<100,"Price for GB00B7W6PR65 < 100 : ".$quotes{"GB00B7W6PR65","price"});
+ 
+-ok($quotes{"GB0030880255","last"} > 0);
+-ok($quotes{"GB0030880255","success"});
++ok($quotes{"GB0030881337","last"} > 0);
++ok($quotes{"GB0030881337","success"});
+ 
+ ok($quotes{"GB0003865176","last"} > 0);
+ ok($quotes{"GB0003865176","success"});
diff -Nru libfinance-quote-perl-1.54/debian/patches/GH263_URL_MorningstarJP.patch libfinance-quote-perl-1.54/debian/patches/GH263_URL_MorningstarJP.patch
--- libfinance-quote-perl-1.54/debian/patches/GH263_URL_MorningstarJP.patch	1970-01-01 01:00:00.000000000 +0100
+++ libfinance-quote-perl-1.54/debian/patches/GH263_URL_MorningstarJP.patch	2023-05-14 20:04:45.000000000 +0200
@@ -0,0 +1,43 @@
+From 991669cf10a30cf3358580dd0f38a8fc175b8e51 Mon Sep 17 00:00:00 2001
+From: Bruce Schuck <bschuck at asgard-systems.com>
+Date: Sat, 8 Apr 2023 13:35:08 -0700
+Subject: [PATCH] URL change in MorningstarJP.pm
+Origin: https://github.com/finance-quote/finance-quote/pull/263
+
+--- a/lib/Finance/Quote/MorningstarJP.pm
++++ b/lib/Finance/Quote/MorningstarJP.pm
+@@ -32,7 +32,7 @@
+ 
+ # NAV information (basis price)
+ $MORNINGSTAR_JP_URL =
+-  ('https://www.morningstar.co.jp/FundData/DownloadStdYmd.do?fnc=');
++  ('https://www.wealthadvisor.co.jp/FundData/DownloadStdYmd.do?fnc=');
+ 
+ sub methods { return ( morningstarjp => \&morningstarjp ); }
+ sub labels  { return ( morningstarjp => [qw/symbol date nav/] ); }
+@@ -147,7 +147,7 @@
+ =head1 DESCRIPTION
+ 
+ This module obtains information from Morningstar (Japan),
+-L<http://www.morningstar.co.jp/>.
++L<http://www.wealthadvisor.co.jp/>.
+ 
+ Information returned by this module is governed by Morningstar
+ (Japan)'s terms and conditions.
+@@ -157,7 +157,7 @@
+ Use the numeric symbol shown in the URL on the "SnapShot" page
+ of the security of interest.
+ 
+-e.g. For L<http://www.morningstar.co.jp/FundData/SnapShot.do?fnc=2009100101>,
++e.g. For L<http://www.wealthadvisor.co.jp/FundData/SnapShot.do?fnc=2009100101>,
+ one would supply 2009100101 as the symbol argument on the fetch API call.
+ 
+ =head1 LABELS RETURNED
+@@ -197,6 +197,6 @@
+ 
+ =head1 SEE ALSO
+ 
+-Morningstar (Japan), L<http://www.morningstar.co.jp/>
++Morningstar (Japan), L<http://www.wealthadvisor.co.jp/>
+ 
+ =cut
diff -Nru libfinance-quote-perl-1.54/debian/patches/GH267_TRV_AlphaVantage.patch libfinance-quote-perl-1.54/debian/patches/GH267_TRV_AlphaVantage.patch
--- libfinance-quote-perl-1.54/debian/patches/GH267_TRV_AlphaVantage.patch	1970-01-01 01:00:00.000000000 +0100
+++ libfinance-quote-perl-1.54/debian/patches/GH267_TRV_AlphaVantage.patch	2023-05-14 20:04:45.000000000 +0200
@@ -0,0 +1,16 @@
+From 7b74452e119f4df5ad9cd56f55efe681c1a31798 Mon Sep 17 00:00:00 2001
+From: Bruce Schuck <bschuck at asgard-systems.com>
+Date: Tue, 2 May 2023 11:00:34 -0700
+Subject: [PATCH] Added currency map .TRV => CAD
+Origin: https://github.com/finance-quote/finance-quote/pull/267
+
+--- a/lib/Finance/Quote/AlphaVantage.pm
++++ b/lib/Finance/Quote/AlphaVantage.pm
+@@ -58,6 +58,7 @@
+     '.SA'  => "BRL",    # Brazil		Sao Paolo
+     '.BR'  => "EUR",    # Belgium		Brussels
+     '.TO'  => "CAD",    # Canada		Toronto
++    '.TRV' => "CAD",    # Canada        Toronto Venture
+     '.V'   => "CAD",    # 		Toronto Venture
+     '.TRT' => "CAD",    # Canada        Toronto
+     '.SN'  => "CLP",    # Chile		Santiago
diff -Nru libfinance-quote-perl-1.54/debian/patches/GH268_URL_YahooJSON.patch libfinance-quote-perl-1.54/debian/patches/GH268_URL_YahooJSON.patch
--- libfinance-quote-perl-1.54/debian/patches/GH268_URL_YahooJSON.patch	1970-01-01 01:00:00.000000000 +0100
+++ libfinance-quote-perl-1.54/debian/patches/GH268_URL_YahooJSON.patch	2023-05-14 20:04:45.000000000 +0200
@@ -0,0 +1,18 @@
+From e41f55191b07879442cf83f3d70d9e00080e54eb Mon Sep 17 00:00:00 2001
+From: Bruce Schuck <bschuck at asgard-systems.com>
+Date: Sat, 6 May 2023 14:37:10 -0700
+Subject: [PATCH 1/2] Quick fix to YahooJSON.pm
+Origin: https://github.com/finance-quote/finance-quote/pull/268
+Bug-Debian: https://bugs.debian.org/1035690
+
+--- a/lib/Finance/Quote/YahooJSON.pm
++++ b/lib/Finance/Quote/YahooJSON.pm
+@@ -35,7 +35,7 @@
+ 
+ our $VERSION = '1.54'; # VERSION
+ 
+-my $YIND_URL_HEAD = 'https://query1.finance.yahoo.com/v7/finance/quote?symbols=';
++my $YIND_URL_HEAD = 'https://query1.finance.yahoo.com/v6/finance/quote?symbols=';
+ my $YIND_URL_TAIL = '';
+ 
+ sub methods {
diff -Nru libfinance-quote-perl-1.54/debian/patches/series libfinance-quote-perl-1.54/debian/patches/series
--- libfinance-quote-perl-1.54/debian/patches/series	1970-01-01 01:00:00.000000000 +0100
+++ libfinance-quote-perl-1.54/debian/patches/series	2023-05-14 20:04:45.000000000 +0200
@@ -0,0 +1,4 @@
+GH263_URL_MorningstarJP.patch
+GH262_Regex_FTfunds.patch
+GH267_TRV_AlphaVantage.patch
+GH268_URL_YahooJSON.patch


More information about the pkg-perl-maintainers mailing list