From 5cabacf8663da8c69412f008e2eeae9cc0288326 Mon Sep 17 00:00:00 2001 From: Itamar Turner-Trauring Date: Thu, 21 Sep 2023 12:56:00 -0400 Subject: [PATCH 1/9] New Rust release --- rust-toolchain.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust-toolchain.toml b/rust-toolchain.toml index c319e66..f0f6043 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,3 +1,3 @@ [toolchain] -channel = "1.72" +channel = "1.72.1" components = ["rustfmt", "clippy"] \ No newline at end of file From 3fbaa93d052346e04c92898ec3a5f0a5f2b31cea Mon Sep 17 00:00:00 2001 From: Itamar Turner-Trauring Date: Thu, 21 Sep 2023 13:08:36 -0400 Subject: [PATCH 2/9] Example database --- .../examples/103600e47f6e6c10/7ef3a58363360a70 | Bin 0 -> 13 bytes .../examples/2c39b0652528389a/20a2763cdf3874b1 | Bin 0 -> 7 bytes .../examples/3bb842c8650c896a/b7cf276e1892438c | Bin 0 -> 7 bytes .../examples/531cc7355cff42c2/9a3c1667a531b1ac | Bin 0 -> 6 bytes .../examples/55c0f1b47133aa5d/20a2763cdf3874b1 | Bin 0 -> 7 bytes .../examples/55c0f1b47133aa5d/576822a319690cfa | Bin 0 -> 15 bytes .../examples/6007eaac0644fd1b/7ef3a58363360a70 | Bin 0 -> 13 bytes .../examples/8198d84e326634dc/576822a319690cfa | Bin 0 -> 15 bytes .../examples/8b486cb1c1c9d7c3/03dbd1ea1be639b7 | Bin 0 -> 23 bytes .../examples/8b486cb1c1c9d7c3/1fd86b90f6bbea95 | Bin 0 -> 62 bytes .../examples/8b486cb1c1c9d7c3/257652cbe85ac09a | Bin 0 -> 81 bytes .../examples/8b486cb1c1c9d7c3/27b9d366cd0f55da | Bin 0 -> 20 bytes .../examples/8b486cb1c1c9d7c3/2c81b700510fb88e | Bin 0 -> 47 bytes .../examples/8b486cb1c1c9d7c3/3e88606e87e29819 | Bin 0 -> 71 bytes .../examples/8b486cb1c1c9d7c3/42cc1e1b7ee552b3 | Bin 0 -> 15 bytes .../examples/8b486cb1c1c9d7c3/4dbdf3ffa933d826 | Bin 0 -> 20 bytes .../examples/8b486cb1c1c9d7c3/5ffd6c3d14f086fd | Bin 0 -> 15 bytes .../examples/8b486cb1c1c9d7c3/706826b5897c8f21 | Bin 0 -> 143 bytes .../examples/8b486cb1c1c9d7c3/804d8ecdedfea816 | Bin 0 -> 76 bytes .../examples/8b486cb1c1c9d7c3/93f9de22a832f630 | Bin 0 -> 34 bytes .../examples/8b486cb1c1c9d7c3/9af922df7ed31887 | Bin 0 -> 537 bytes .../examples/8b486cb1c1c9d7c3/a72db87782dbdd7c | Bin 0 -> 52 bytes .../examples/8b486cb1c1c9d7c3/aa9286fee73e0130 | Bin 0 -> 29 bytes .../examples/8b486cb1c1c9d7c3/b105d4471d0d7757 | Bin 0 -> 24 bytes .../examples/8b486cb1c1c9d7c3/c8e87fefbd74d073 | Bin 0 -> 41 bytes .../examples/8b486cb1c1c9d7c3/e154e84c6030c3e3 | Bin 0 -> 57 bytes .../examples/8b486cb1c1c9d7c3/f3250b332e873f95 | Bin 0 -> 629 bytes .../examples/8b486cb1c1c9d7c3/fa791b5038e8176b | Bin 0 -> 20 bytes .../examples/8b486cb1c1c9d7c3/fc8970907eab2821 | Bin 0 -> 20 bytes .../examples/926adf2f773b1de7/9a3c1667a531b1ac | Bin 0 -> 6 bytes .../examples/a9e8fc16f19e74e6/7ef3a58363360a70 | Bin 0 -> 13 bytes .../examples/aa9db1092bd86c43/b7cf276e1892438c | Bin 0 -> 7 bytes .../examples/bfe2da22a2bb6466/3d12246dfa6c2702 | Bin 0 -> 11 bytes .../examples/bfe2da22a2bb6466/bb557a3de7bf606a | Bin 0 -> 49 bytes .../examples/bfe2da22a2bb6466/cd6bd1dcfebeffe9 | Bin 0 -> 3 bytes .../examples/c0f5d5372d68b6e6/9a3c1667a531b1ac | Bin 0 -> 6 bytes .../examples/c1d126aa4d876ecb/20a2763cdf3874b1 | Bin 0 -> 7 bytes .../examples/c653ccb42395525a/cd6bd1dcfebeffe9 | Bin 0 -> 3 bytes .hypothesis/unicode_data/13.0.0/charmap.json.gz | Bin 0 -> 20988 bytes 39 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 .hypothesis/examples/103600e47f6e6c10/7ef3a58363360a70 create mode 100644 .hypothesis/examples/2c39b0652528389a/20a2763cdf3874b1 create mode 100644 .hypothesis/examples/3bb842c8650c896a/b7cf276e1892438c create mode 100644 .hypothesis/examples/531cc7355cff42c2/9a3c1667a531b1ac create mode 100644 .hypothesis/examples/55c0f1b47133aa5d/20a2763cdf3874b1 create mode 100644 .hypothesis/examples/55c0f1b47133aa5d/576822a319690cfa create mode 100644 .hypothesis/examples/6007eaac0644fd1b/7ef3a58363360a70 create mode 100644 .hypothesis/examples/8198d84e326634dc/576822a319690cfa create mode 100644 .hypothesis/examples/8b486cb1c1c9d7c3/03dbd1ea1be639b7 create mode 100644 .hypothesis/examples/8b486cb1c1c9d7c3/1fd86b90f6bbea95 create mode 100644 .hypothesis/examples/8b486cb1c1c9d7c3/257652cbe85ac09a create mode 100644 .hypothesis/examples/8b486cb1c1c9d7c3/27b9d366cd0f55da create mode 100644 .hypothesis/examples/8b486cb1c1c9d7c3/2c81b700510fb88e create mode 100644 .hypothesis/examples/8b486cb1c1c9d7c3/3e88606e87e29819 create mode 100644 .hypothesis/examples/8b486cb1c1c9d7c3/42cc1e1b7ee552b3 create mode 100644 .hypothesis/examples/8b486cb1c1c9d7c3/4dbdf3ffa933d826 create mode 100644 .hypothesis/examples/8b486cb1c1c9d7c3/5ffd6c3d14f086fd create mode 100644 .hypothesis/examples/8b486cb1c1c9d7c3/706826b5897c8f21 create mode 100644 .hypothesis/examples/8b486cb1c1c9d7c3/804d8ecdedfea816 create mode 100644 .hypothesis/examples/8b486cb1c1c9d7c3/93f9de22a832f630 create mode 100644 .hypothesis/examples/8b486cb1c1c9d7c3/9af922df7ed31887 create mode 100644 .hypothesis/examples/8b486cb1c1c9d7c3/a72db87782dbdd7c create mode 100644 .hypothesis/examples/8b486cb1c1c9d7c3/aa9286fee73e0130 create mode 100644 .hypothesis/examples/8b486cb1c1c9d7c3/b105d4471d0d7757 create mode 100644 .hypothesis/examples/8b486cb1c1c9d7c3/c8e87fefbd74d073 create mode 100644 .hypothesis/examples/8b486cb1c1c9d7c3/e154e84c6030c3e3 create mode 100644 .hypothesis/examples/8b486cb1c1c9d7c3/f3250b332e873f95 create mode 100644 .hypothesis/examples/8b486cb1c1c9d7c3/fa791b5038e8176b create mode 100644 .hypothesis/examples/8b486cb1c1c9d7c3/fc8970907eab2821 create mode 100644 .hypothesis/examples/926adf2f773b1de7/9a3c1667a531b1ac create mode 100644 .hypothesis/examples/a9e8fc16f19e74e6/7ef3a58363360a70 create mode 100644 .hypothesis/examples/aa9db1092bd86c43/b7cf276e1892438c create mode 100644 .hypothesis/examples/bfe2da22a2bb6466/3d12246dfa6c2702 create mode 100644 .hypothesis/examples/bfe2da22a2bb6466/bb557a3de7bf606a create mode 100644 .hypothesis/examples/bfe2da22a2bb6466/cd6bd1dcfebeffe9 create mode 100644 .hypothesis/examples/c0f5d5372d68b6e6/9a3c1667a531b1ac create mode 100644 .hypothesis/examples/c1d126aa4d876ecb/20a2763cdf3874b1 create mode 100644 .hypothesis/examples/c653ccb42395525a/cd6bd1dcfebeffe9 create mode 100644 .hypothesis/unicode_data/13.0.0/charmap.json.gz diff --git a/.hypothesis/examples/103600e47f6e6c10/7ef3a58363360a70 b/.hypothesis/examples/103600e47f6e6c10/7ef3a58363360a70 new file mode 100644 index 0000000000000000000000000000000000000000..8f61ee3534f4acd5394ec0e413803c84563fe02e GIT binary patch literal 13 PcmZQzWMp7~AO;2i05Jds literal 0 HcmV?d00001 diff --git a/.hypothesis/examples/2c39b0652528389a/20a2763cdf3874b1 b/.hypothesis/examples/2c39b0652528389a/20a2763cdf3874b1 new file mode 100644 index 0000000000000000000000000000000000000000..e4dbaadadbb6fcc0c94761a371be9b6d3792e078 GIT binary patch literal 7 McmZQzWMlvW000sI0{{R3 literal 0 HcmV?d00001 diff --git a/.hypothesis/examples/3bb842c8650c896a/b7cf276e1892438c b/.hypothesis/examples/3bb842c8650c896a/b7cf276e1892438c new file mode 100644 index 0000000000000000000000000000000000000000..114ed4e94b4a736feae9d9824176b22201b6921e GIT binary patch literal 7 McmZQzU}OLS000aC0ssI2 literal 0 HcmV?d00001 diff --git a/.hypothesis/examples/531cc7355cff42c2/9a3c1667a531b1ac b/.hypothesis/examples/531cc7355cff42c2/9a3c1667a531b1ac new file mode 100644 index 0000000000000000000000000000000000000000..654be01f20f58665f879dcb4aac4d0d2a0f77f02 GIT binary patch literal 6 LcmZQzWB>vH01E&D literal 0 HcmV?d00001 diff --git a/.hypothesis/examples/55c0f1b47133aa5d/20a2763cdf3874b1 b/.hypothesis/examples/55c0f1b47133aa5d/20a2763cdf3874b1 new file mode 100644 index 0000000000000000000000000000000000000000..e4dbaadadbb6fcc0c94761a371be9b6d3792e078 GIT binary patch literal 7 McmZQzWMlvW000sI0{{R3 literal 0 HcmV?d00001 diff --git a/.hypothesis/examples/55c0f1b47133aa5d/576822a319690cfa b/.hypothesis/examples/55c0f1b47133aa5d/576822a319690cfa new file mode 100644 index 0000000000000000000000000000000000000000..c78cf54ddeb0c6e392da0c0a77275d8d624a694e GIT binary patch literal 15 RcmZQzWMp7q01+UX0RR9%00sa6 literal 0 HcmV?d00001 diff --git a/.hypothesis/examples/6007eaac0644fd1b/7ef3a58363360a70 b/.hypothesis/examples/6007eaac0644fd1b/7ef3a58363360a70 new file mode 100644 index 0000000000000000000000000000000000000000..8f61ee3534f4acd5394ec0e413803c84563fe02e GIT binary patch literal 13 PcmZQzWMp7~AO;2i05Jds literal 0 HcmV?d00001 diff --git a/.hypothesis/examples/8198d84e326634dc/576822a319690cfa b/.hypothesis/examples/8198d84e326634dc/576822a319690cfa new file mode 100644 index 0000000000000000000000000000000000000000..c78cf54ddeb0c6e392da0c0a77275d8d624a694e GIT binary patch literal 15 RcmZQzWMp7q01+UX0RR9%00sa6 literal 0 HcmV?d00001 diff --git a/.hypothesis/examples/8b486cb1c1c9d7c3/03dbd1ea1be639b7 b/.hypothesis/examples/8b486cb1c1c9d7c3/03dbd1ea1be639b7 new file mode 100644 index 0000000000000000000000000000000000000000..759447a623eabb92c09b2461fb9735fbb7590c3d GIT binary patch literal 23 ZcmZQ#WMtUF$dJtdq&>g{Bf~ic1^^rJ0*C+r literal 0 HcmV?d00001 diff --git a/.hypothesis/examples/8b486cb1c1c9d7c3/1fd86b90f6bbea95 b/.hypothesis/examples/8b486cb1c1c9d7c3/1fd86b90f6bbea95 new file mode 100644 index 0000000000000000000000000000000000000000..44f9e187dd4387ca8053fcfeeef085656694787b GIT binary patch literal 62 zcmZQ#WMtUF$dJtdq&+}HB_o43BSSnRBgdP0j0|=_QAUPyj0}8?3_BPZ_AoL$04ci9 L$jHLL&cFZw2#W~S literal 0 HcmV?d00001 diff --git a/.hypothesis/examples/8b486cb1c1c9d7c3/257652cbe85ac09a b/.hypothesis/examples/8b486cb1c1c9d7c3/257652cbe85ac09a new file mode 100644 index 0000000000000000000000000000000000000000..730e7026132c33726fc945e0f76439b0b27092a2 GIT binary patch literal 81 zcmZQ#WMtUF$dJtdq&+}HB_o43BSSnRBgdP0j0|=_QAUPyj0}8?3_BPZ_AoL$04ci9 a$jCBxA0s2{4>Lvvb}$kG3O(&-U;qH>g$(-u literal 0 HcmV?d00001 diff --git a/.hypothesis/examples/8b486cb1c1c9d7c3/27b9d366cd0f55da b/.hypothesis/examples/8b486cb1c1c9d7c3/27b9d366cd0f55da new file mode 100644 index 0000000000000000000000000000000000000000..bec2f3c0ca261842b9c124f00953f60581dca583 GIT binary patch literal 20 WcmZQ#WMtUF03Lv<26hGp0CGSJY5)KL literal 0 HcmV?d00001 diff --git a/.hypothesis/examples/8b486cb1c1c9d7c3/42cc1e1b7ee552b3 b/.hypothesis/examples/8b486cb1c1c9d7c3/42cc1e1b7ee552b3 new file mode 100644 index 0000000000000000000000000000000000000000..34c65dd083d4bd5d4d03117f6e51705ebcf905fe GIT binary patch literal 15 TcmZQ#WMp7q01=D~=NK3O0>}W? literal 0 HcmV?d00001 diff --git a/.hypothesis/examples/8b486cb1c1c9d7c3/4dbdf3ffa933d826 b/.hypothesis/examples/8b486cb1c1c9d7c3/4dbdf3ffa933d826 new file mode 100644 index 0000000000000000000000000000000000000000..a72b0382241708882a88da2fbb063ab2ec0e72a6 GIT binary patch literal 20 WcmZQ#WMuGQ01=D~=Roup1_l5SwE`Rf literal 0 HcmV?d00001 diff --git a/.hypothesis/examples/8b486cb1c1c9d7c3/5ffd6c3d14f086fd b/.hypothesis/examples/8b486cb1c1c9d7c3/5ffd6c3d14f086fd new file mode 100644 index 0000000000000000000000000000000000000000..5b3b73736800ab9d7f7c542010e1ac52eb2c7d46 GIT binary patch literal 15 RcmZQ#WMp7q01+UX0RRAA00;m8 literal 0 HcmV?d00001 diff --git a/.hypothesis/examples/8b486cb1c1c9d7c3/706826b5897c8f21 b/.hypothesis/examples/8b486cb1c1c9d7c3/706826b5897c8f21 new file mode 100644 index 0000000000000000000000000000000000000000..8bb93345d70921a580f28af96fd741095e7e31f2 GIT binary patch literal 143 zcmZQ#WMtUF!pOvs&A`ma$jsou&cwh5VpKA+F?h28iFj5gg3Faf!HfcOCeDgSddZbeOE*<37P<7bLz(vCQ2E fG+0WSll6xg8_)uFkm2k=ECjTeLvvc19rYDLVrL0IvfKSpWb4 literal 0 HcmV?d00001 diff --git a/.hypothesis/examples/8b486cb1c1c9d7c3/93f9de22a832f630 b/.hypothesis/examples/8b486cb1c1c9d7c3/93f9de22a832f630 new file mode 100644 index 0000000000000000000000000000000000000000..5a63ed276869214ac319806beaae1d152d403c21 GIT binary patch literal 34 kcmZQ#WMtUF$dJtdq&+}HB_o43BSSnJkjuz$j)9#406mKXy8r+H literal 0 HcmV?d00001 diff --git a/.hypothesis/examples/8b486cb1c1c9d7c3/9af922df7ed31887 b/.hypothesis/examples/8b486cb1c1c9d7c3/9af922df7ed31887 new file mode 100644 index 0000000000000000000000000000000000000000..3c3019c50269572b362f55984f6119f5dd8fd2b1 GIT binary patch literal 537 zcmW+z!7Hax6g}s?@4ZKTKZOiGO0k~Un8jqUKv_%{GgcynnkY*tD`}d|G)7I$f|S2t zR(4nr8mZr6hWbg06l-N+hGv{=@!jsb_ndRjy&p(SGsCf0c$GXO&K(^}USTj0J4vM< zo+)EP?P)&Rsnp{lFra8*9vMX)atbwMDBsfKwI^1Bh@pM9tnyQR#a_%qjV4c9+b>MkIbmm3JLk(^hCMy{+83x6vLgGT1!7$^BU` z&i^2tU9InMsgb89_*DwS0%z#e8S1w`VE>mqvud1>o-}4`=@PVq*vnRA^}BWECz2TV z>PZ{_td4HexhBTU&P&0+>-&@Gu_jEdBm!E<{H{YMz_QNe(MT3Q7V-wU517mpx-zla pv~I*3Mx?gjg9S3f^BFQ`A+D0K3cW$ht!+`o&e4bMrQy3 literal 0 HcmV?d00001 diff --git a/.hypothesis/examples/8b486cb1c1c9d7c3/a72db87782dbdd7c b/.hypothesis/examples/8b486cb1c1c9d7c3/a72db87782dbdd7c new file mode 100644 index 0000000000000000000000000000000000000000..6f5f7c2b844b5032d52a9385f4de2fee72afe4c9 GIT binary patch literal 52 zcmZQ#WMtUF$dJtdq&+}HB_o43BSSnRBgdP0j0|=_QAUPyj0}8?3_BP>^6U%@0INm@ AQvd(} literal 0 HcmV?d00001 diff --git a/.hypothesis/examples/8b486cb1c1c9d7c3/aa9286fee73e0130 b/.hypothesis/examples/8b486cb1c1c9d7c3/aa9286fee73e0130 new file mode 100644 index 0000000000000000000000000000000000000000..e82480a8a1df6422c2b6ab12eacdbf1e939453a3 GIT binary patch literal 29 fcmZQ#WMtUF$dJtdq&+}HB|96C#mI1uft>*WEBXT# literal 0 HcmV?d00001 diff --git a/.hypothesis/examples/8b486cb1c1c9d7c3/b105d4471d0d7757 b/.hypothesis/examples/8b486cb1c1c9d7c3/b105d4471d0d7757 new file mode 100644 index 0000000000000000000000000000000000000000..9b5d5d743fb7bed3652064dba7fe4e8e21a01cc2 GIT binary patch literal 24 acmZQ#WMtUF$dJtdq&>g{Bf~icb_M_*hXRiP literal 0 HcmV?d00001 diff --git a/.hypothesis/examples/8b486cb1c1c9d7c3/c8e87fefbd74d073 b/.hypothesis/examples/8b486cb1c1c9d7c3/c8e87fefbd74d073 new file mode 100644 index 0000000000000000000000000000000000000000..02831a9683081eb2ad191e2feb5700af8542ed10 GIT binary patch literal 41 rcmZQ#WMtUF$dJtdq&+}HB_o43BSSnRBgdP0j0|=_QAUPy4D1X5XJ`e8 literal 0 HcmV?d00001 diff --git a/.hypothesis/examples/8b486cb1c1c9d7c3/e154e84c6030c3e3 b/.hypothesis/examples/8b486cb1c1c9d7c3/e154e84c6030c3e3 new file mode 100644 index 0000000000000000000000000000000000000000..45a7155fa0b6ed17351f142d5e277e7e09fc79cc GIT binary patch literal 57 zcmZQ#WMtUF$dJtdq&+}HB_o43BSSnRBgdP0j0|=_QAUPyj0}8?3_BPZ_AoL$04ZW; GU;qHw)(7wa literal 0 HcmV?d00001 diff --git a/.hypothesis/examples/8b486cb1c1c9d7c3/f3250b332e873f95 b/.hypothesis/examples/8b486cb1c1c9d7c3/f3250b332e873f95 new file mode 100644 index 0000000000000000000000000000000000000000..0b849730300aa184181d1733b9a022d9a7b2e9a2 GIT binary patch literal 629 zcmX9+O-Phc6g~I-_A?{n%$JZ(wMc{r!3jh`5gJ=WF07;?fDBZ;73RwX1MMD8L8K|NO&@ABTg=bd}*c~3;d%uYza4%dnihpr$o zNOEv9bAQ1zx$FexAO_bRPu~O;mNBn~VFX@B)(X}W0U+A7Z@)l_6QIoW};cU95pz|>_p9c7%u zJ4v3FPmKS}4!lXqmGs|RhJ{Y9H6@rM~RA=mUF zo^Vq`nY1yqd{DeYH*Mt;RBKh^pke4$&wD-bSCzL#ad;VoBNOY6qkQo;ZL literal 0 HcmV?d00001 diff --git a/.hypothesis/examples/8b486cb1c1c9d7c3/fa791b5038e8176b b/.hypothesis/examples/8b486cb1c1c9d7c3/fa791b5038e8176b new file mode 100644 index 0000000000000000000000000000000000000000..bb094d9175dc616f1cb3a327c980d0eab39c5457 GIT binary patch literal 20 WcmZQ#WMp7q01=D~=Roup1_l5L9RZ90 literal 0 HcmV?d00001 diff --git a/.hypothesis/examples/8b486cb1c1c9d7c3/fc8970907eab2821 b/.hypothesis/examples/8b486cb1c1c9d7c3/fc8970907eab2821 new file mode 100644 index 0000000000000000000000000000000000000000..6daf709f64a0d7f3d4641b4b01454e4e57bb7e6c GIT binary patch literal 20 XcmZQ#WMuGQ01{h3ga;$TIR*v*5avH01E&D literal 0 HcmV?d00001 diff --git a/.hypothesis/examples/a9e8fc16f19e74e6/7ef3a58363360a70 b/.hypothesis/examples/a9e8fc16f19e74e6/7ef3a58363360a70 new file mode 100644 index 0000000000000000000000000000000000000000..8f61ee3534f4acd5394ec0e413803c84563fe02e GIT binary patch literal 13 PcmZQzWMp7~AO;2i05Jds literal 0 HcmV?d00001 diff --git a/.hypothesis/examples/aa9db1092bd86c43/b7cf276e1892438c b/.hypothesis/examples/aa9db1092bd86c43/b7cf276e1892438c new file mode 100644 index 0000000000000000000000000000000000000000..114ed4e94b4a736feae9d9824176b22201b6921e GIT binary patch literal 7 McmZQzU}OLS000aC0ssI2 literal 0 HcmV?d00001 diff --git a/.hypothesis/examples/bfe2da22a2bb6466/3d12246dfa6c2702 b/.hypothesis/examples/bfe2da22a2bb6466/3d12246dfa6c2702 new file mode 100644 index 0000000000000000000000000000000000000000..d4ba96b5f13ff373f502b6405fbee2efaddc2cd9 GIT binary patch literal 11 ScmZQzV`T7WU}j`6WdHyI_5hFo literal 0 HcmV?d00001 diff --git a/.hypothesis/examples/bfe2da22a2bb6466/bb557a3de7bf606a b/.hypothesis/examples/bfe2da22a2bb6466/bb557a3de7bf606a new file mode 100644 index 0000000000000000000000000000000000000000..f642da082b70feea63ab2b30a780b81b76026144 GIT binary patch literal 49 zcmZQzW@KXsW@BVwIK#ro#PF64NX%hkWM^UISvH01E&D literal 0 HcmV?d00001 diff --git a/.hypothesis/examples/c1d126aa4d876ecb/20a2763cdf3874b1 b/.hypothesis/examples/c1d126aa4d876ecb/20a2763cdf3874b1 new file mode 100644 index 0000000000000000000000000000000000000000..e4dbaadadbb6fcc0c94761a371be9b6d3792e078 GIT binary patch literal 7 McmZQzWMlvW000sI0{{R3 literal 0 HcmV?d00001 diff --git a/.hypothesis/examples/c653ccb42395525a/cd6bd1dcfebeffe9 b/.hypothesis/examples/c653ccb42395525a/cd6bd1dcfebeffe9 new file mode 100644 index 0000000000000000000000000000000000000000..4227ca4e8736af63036e7457e2db376ddf7e5795 GIT binary patch literal 3 KcmZQzU;qFB0{{U4 literal 0 HcmV?d00001 diff --git a/.hypothesis/unicode_data/13.0.0/charmap.json.gz b/.hypothesis/unicode_data/13.0.0/charmap.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..59be8a4c73777fe902c2239abd118e0a30dc21e1 GIT binary patch literal 20988 zcmbUIWmFwa`0feg?ht~zOK^Ah;O_1Of;++8-8Sy-?iL8{x^Z{c&G4M_f8RN4&6ip8 z>UlAjqRO0+&RD$^#4u`bvgNb8?+=IYRl%gcRw5a=Zl@FAq$AR~9JDXUC9uRMG#KVCn^30Q^6)3_orsp0W&M9!ooy zz1|Ns?Q?`a%8Lv?ADNyzhT8xmedxC5yk@u0&6YCWqLJ!Cy}HsbDK4#)4@6I6YpG4^ zeKfzF>>?n1_Ail@07Zos?KsSiT;A5J$Bm4ofK zMxP7SJny|ne9hC-qrO<~LC$f0{(8EyotK9z$rhbLHjQ^<5tTiQRy1pY)q)iE(!9U#6GMA+UCnLp#;;3Ux@mo(Uy_iQae*z zNN#%0H7wh7Wf12QljB{?q?q)(7os+~q?YVqi)i6{vtAu`kyMu(9QW}O9eb(;AvIHZ zZ@1lj6uo^Yhb^tecJ&eXPiB&0y(n$v;P)t97+G#Q%dc#v${34d*z9tQ_r|Kpxu)`F z@gjgXjOP*b6LH;Um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^vX zpXeSQzbWVFj@1*S0{utAt`l&>+WPbV@#hH24nyJoNS8J0910FmU8)or;%-Z15G?PW iN@_}wj-?E)L}~BrHV9OurlVZupZ*_{ycpT-;{X77_r;z7 literal 0 HcmV?d00001 From a8fefc7cfa862fb23bef51960b3ddab118132c69 Mon Sep 17 00:00:00 2001 From: Itamar Turner-Trauring Date: Thu, 21 Sep 2023 13:40:28 -0400 Subject: [PATCH 3/9] A prototype handling of empty strings. --- src/lib.rs | 13 ++++++++++--- tests/test_ac.py | 30 ++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 3 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 69b271b..2480ecd 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -42,14 +42,19 @@ impl PyAhoCorasick { overlapping: bool, ) -> PyResult> { let ac_impl = &self.ac_impl; + // Empty patterns are basically garbage, and can break unicode codepoint + // boundary assumptions, so we filter them out. py.allow_threads(|| { if overlapping { ac_impl .try_find_overlapping_iter(haystack) .map_err(match_error_to_pyerror) - .map(|it| it.collect()) + .map(|it| it.filter(|m| m.start() != m.end()).collect()) } else { - Ok(ac_impl.find_iter(haystack).collect()) + Ok(ac_impl + .find_iter(haystack) + .filter(|m| m.start() != m.end()) + .collect()) } }) } @@ -245,7 +250,9 @@ impl PyAhoCorasick { } else { PyList::new( py, - matches.map(|m| PyUnicode::new(py, &haystack[m.start()..m.end()])), + matches.map(|m| { + PyUnicode::new(py, &haystack[m.start()..m.end()]) + }), ) }; Ok(result.into()) diff --git a/tests/test_ac.py b/tests/test_ac.py index 0c67b49..f4c878e 100644 --- a/tests/test_ac.py +++ b/tests/test_ac.py @@ -155,6 +155,36 @@ def test_unicode_extensive( assert ac.find_matches_as_strings(haystack) == [pattern] +@given(st.text(), st.text(), st.sampled_from([True, False, None])) +def test_unicode_totally_random( + pattern: str, haystack: str, store_patterns: Optional[bool] +) -> None: + """ + Catch more edge cases of patterns and haystacks. + """ + if store_patterns is None: + ac = AhoCorasick([pattern]) + else: + ac = AhoCorasick([pattern], store_patterns=store_patterns) + + index_matches = ac.find_matches_as_indexes(haystack) + string_matches = ac.find_matches_as_strings(haystack) + + if not pattern: + assert index_matches == [] + assert string_matches == [] + return + + expected_index = haystack.find(pattern) + if expected_index == -1: + assert index_matches == [] + assert string_matches == [] + else: + assert index_matches[0][1] == expected_index + assert [haystack[s:e] for (_, s, e) in index_matches] == [pattern] + assert string_matches == [pattern] + + def test_matchkind() -> None: """ Different matchkinds give different results. From ea4747b88cac05bf7ddf2a35414777b10c2aca01 Mon Sep 17 00:00:00 2001 From: Itamar Turner-Trauring Date: Thu, 21 Sep 2023 13:58:50 -0400 Subject: [PATCH 4/9] A better way of handling empty patterns: disallow them. --- src/lib.rs | 22 ++++++++++++---------- tests/test_ac.py | 19 +++++++++++++------ 2 files changed, 25 insertions(+), 16 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 2480ecd..5733d3b 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -42,19 +42,14 @@ impl PyAhoCorasick { overlapping: bool, ) -> PyResult> { let ac_impl = &self.ac_impl; - // Empty patterns are basically garbage, and can break unicode codepoint - // boundary assumptions, so we filter them out. py.allow_threads(|| { if overlapping { ac_impl .try_find_overlapping_iter(haystack) .map_err(match_error_to_pyerror) - .map(|it| it.filter(|m| m.start() != m.end()).collect()) + .map(|it| it.collect()) } else { - Ok(ac_impl - .find_iter(haystack) - .filter(|m| m.start() != m.end()) - .collect()) + Ok(ac_impl.find_iter(haystack).collect()) } }) } @@ -141,6 +136,15 @@ impl PyAhoCorasick { .map_while(|i_result| { i_result .and_then(|i| i.downcast::().map_err(PyErr::from)) + .and_then(|s| { + if s.len().expect("Failed to get length of string?!") != 0 { + Ok(s) + } else { + Err(PyValueError::new_err( + "You passed in an empty string as a pattern", + )) + } + }) .map_or_else( |e| { if let Ok(mut guard) = patterns_error.lock() { @@ -250,9 +254,7 @@ impl PyAhoCorasick { } else { PyList::new( py, - matches.map(|m| { - PyUnicode::new(py, &haystack[m.start()..m.end()]) - }), + matches.map(|m| PyUnicode::new(py, &haystack[m.start()..m.end()])), ) }; Ok(result.into()) diff --git a/tests/test_ac.py b/tests/test_ac.py index f4c878e..6891ede 100644 --- a/tests/test_ac.py +++ b/tests/test_ac.py @@ -155,7 +155,19 @@ def test_unicode_extensive( assert ac.find_matches_as_strings(haystack) == [pattern] -@given(st.text(), st.text(), st.sampled_from([True, False, None])) +@pytest.mark.parametrize("bad_patterns", [[""], ["", "xx"], ["xx", ""]]) +@pytest.mark.parametrize("store_patterns", [True, False]) +def test_empty_patterns_are_not_legal(bad_patterns, store_patterns): + """ + Passing in an empty pattern suggests a bug in user code, and the outputs + are bad when you do have that, so raise an error. + """ + with pytest.raises(ValueError) as e: + AhoCorasick(bad_patterns, store_patterns=store_patterns) + assert "You passed in an empty string as a pattern" in str(e.value) + + +@given(st.text(min_size=1), st.text(), st.sampled_from([True, False, None])) def test_unicode_totally_random( pattern: str, haystack: str, store_patterns: Optional[bool] ) -> None: @@ -170,11 +182,6 @@ def test_unicode_totally_random( index_matches = ac.find_matches_as_indexes(haystack) string_matches = ac.find_matches_as_strings(haystack) - if not pattern: - assert index_matches == [] - assert string_matches == [] - return - expected_index = haystack.find(pattern) if expected_index == -1: assert index_matches == [] From 60673405946d1f28647967ce219c64c157790d8f Mon Sep 17 00:00:00 2001 From: Itamar Turner-Trauring Date: Thu, 21 Sep 2023 14:01:36 -0400 Subject: [PATCH 5/9] New version, changelog entry, and update aho-corasick crate. --- CHANGELOG.md | 8 +++++++- Cargo.lock | 10 +++++----- Cargo.toml | 2 +- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2c94556..a5fd32c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,14 @@ # Changelog +## 0.19.0 + +* If an empty string is passed in as a pattern, `AhoCorasick()` will now raise a `ValueError`. + Previously using empty patterns could result in garbage results or exceptions when matching. +* Upgraded to `aho-corasick` v1.1.1. + ## 0.18.0 -* Upgrade to `aho-corasick` v1.1.0, which can run faster on ARM machines like newer Macs. +* Upgraded to `aho-corasick` v1.1.0, which can run faster on ARM machines like newer Macs. ## 0.17.0 diff --git a/Cargo.lock b/Cargo.lock index 699169f..da85bda 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,16 +4,16 @@ version = 3 [[package]] name = "aho-corasick" -version = "1.1.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f2135563fb5c609d2b2b87c1e8ce7bc41b0b45430fa9661f457981503dd5bf0" +checksum = "ea5d730647d4fadd988536d06fecce94b7b4f2a7efdae548f1cf4b63205518ab" dependencies = [ "memchr", ] [[package]] name = "ahocorasick_rs" -version = "0.18.0" +version = "0.19.0" dependencies = [ "aho-corasick", "itertools", @@ -214,9 +214,9 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "smallvec" -version = "1.11.0" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62bb4feee49fdd9f707ef802e22365a35de4b7b299de4763d44bfea899442ff9" +checksum = "942b4a808e05215192e39f4ab80813e599068285906cc91aa64f923db842bd5a" [[package]] name = "syn" diff --git a/Cargo.toml b/Cargo.toml index 7a4ab49..b59cca2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ahocorasick_rs" -version = "0.18.0" +version = "0.19.0" edition = "2021" authors = ["G-Research ", "Itamar Turner-Trauring "] description = "Search a string for multiple substrings at once" From b890b2631ea9ac6766ef6dedc47756ac90e56c57 Mon Sep 17 00:00:00 2001 From: Itamar Turner-Trauring Date: Thu, 21 Sep 2023 14:07:45 -0400 Subject: [PATCH 6/9] Document the new restriction. --- src/lib.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 5733d3b..88b8bb1 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -14,7 +14,9 @@ use pyo3::{ /// /// Takes three arguments: /// -/// * ``patterns``: A list of strings, the patterns to match against. +/// * ``patterns``: A list of strings, the patterns to match against. Empty +/// patterns are not supported and will result in a ``ValueError`` exception +/// being raised. /// * ``matchkind``: Defaults to ``"MATCHKING_STANDARD"``. /// * ``store_patterns``: If ``True``, keep a reference to the patterns, which /// will speed up ``find_matches_as_strings()`` but will use more memory. If From cca8f8eb635e8fb08a7aade4d116ddebb2fdf77f Mon Sep 17 00:00:00 2001 From: Itamar Turner-Trauring Date: Thu, 21 Sep 2023 14:11:38 -0400 Subject: [PATCH 7/9] More examples, more correct test. --- .../examples/0a3a13c375cbef58/5d0ee50bbc9e81ca | Bin 0 -> 13 bytes .../examples/1d47f825b95ef0c4/106f0f267bad0256 | Bin 0 -> 18 bytes .../examples/1d525299ac17004b/2f5427605d3e198d | Bin 0 -> 9 bytes .../examples/1d525299ac17004b/9a3c1667a531b1ac | Bin 0 -> 6 bytes .../examples/1d525299ac17004b/cd6bd1dcfebeffe9 | Bin 0 -> 3 bytes .../examples/2813a5e94c6b3fc8/35ad336a2a6fdfd2 | Bin 0 -> 13 bytes .../examples/30c35e01a9722884/cd6bd1dcfebeffe9 | Bin 0 -> 3 bytes .../examples/474f3ad49262d3ec/2f5427605d3e198d | Bin 0 -> 9 bytes .../examples/4b6d35316b9dfb2c/3192aedc13e9fb94 | Bin 0 -> 6 bytes .../examples/4b6d35316b9dfb2c/69dca6a561a1acfd | Bin 0 -> 9 bytes .../examples/4b6d35316b9dfb2c/85c0272697d6fd5e | Bin 0 -> 11 bytes .../examples/4b6d35316b9dfb2c/b1d05b1a4f5d57d8 | Bin 0 -> 53 bytes .../examples/4b6d35316b9dfb2c/cd6bd1dcfebeffe9 | Bin 0 -> 3 bytes .../examples/4e607744a84e246b/2f5427605d3e198d | Bin 0 -> 9 bytes .../examples/532a94be90c9efd0/b8231a7f06bee7f9 | Bin 0 -> 13 bytes .../examples/532a94be90c9efd0/de2f4e902ceb702d | Bin 0 -> 17 bytes .../examples/532a94be90c9efd0/ffd3c03363776c1f | Bin 0 -> 13 bytes .../examples/5841fbe83c75a177/085f80daee6d089f | Bin 0 -> 9 bytes .../examples/5841fbe83c75a177/96784e8d40b82570 | Bin 0 -> 9 bytes .../examples/5841fbe83c75a177/975b2cb9b044b541 | Bin 0 -> 11 bytes .../examples/610f0d49a7f18187/015ec5d979c41511 | Bin 0 -> 17 bytes .../examples/610f0d49a7f18187/085f80daee6d089f | Bin 0 -> 9 bytes .../examples/610f0d49a7f18187/93fd353b208e5ead | Bin 0 -> 9 bytes .../examples/65c7e04feb03f2b7/9a3c1667a531b1ac | Bin 0 -> 6 bytes .../examples/65c7e04feb03f2b7/cd6bd1dcfebeffe9 | Bin 0 -> 3 bytes .../examples/8c20b63c7c3ee2a0/2f5427605d3e198d | Bin 0 -> 9 bytes .../examples/8c20b63c7c3ee2a0/9a3c1667a531b1ac | Bin 0 -> 6 bytes .../examples/8c20b63c7c3ee2a0/cd6bd1dcfebeffe9 | Bin 0 -> 3 bytes .../examples/95fbd6c8090ecb40/cd6bd1dcfebeffe9 | Bin 0 -> 3 bytes .../examples/95fbd6c8090ecb40/dc11c3cd8814f97f | Bin 0 -> 24 bytes .../examples/988fff622301a798/86b12aeace201491 | Bin 0 -> 7 bytes .../examples/b37a28bfb88d7d9a/0d491ebeb6bcc34b | Bin 0 -> 18 bytes .../examples/b37a28bfb88d7d9a/7abd2938b62a02d9 | Bin 0 -> 6 bytes .../examples/ce5beca553078037/7abd2938b62a02d9 | Bin 0 -> 6 bytes .../examples/d467e571ca193666/9c37882aff0161aa | Bin 0 -> 17 bytes .../examples/d467e571ca193666/cd6bd1dcfebeffe9 | Bin 0 -> 3 bytes .../examples/ea046fba42e7e6df/5d0ee50bbc9e81ca | Bin 0 -> 13 bytes .../examples/ea046fba42e7e6df/9a3c1667a531b1ac | Bin 0 -> 6 bytes .../examples/ea046fba42e7e6df/cd6bd1dcfebeffe9 | Bin 0 -> 3 bytes .../examples/f110168263c9473c/0d491ebeb6bcc34b | Bin 0 -> 18 bytes .../unicode_data/13.0.0/codec-utf-8.json.gz | Bin 0 -> 60 bytes tests/test_ac.py | 4 ++-- 42 files changed, 2 insertions(+), 2 deletions(-) create mode 100644 .hypothesis/examples/0a3a13c375cbef58/5d0ee50bbc9e81ca create mode 100644 .hypothesis/examples/1d47f825b95ef0c4/106f0f267bad0256 create mode 100644 .hypothesis/examples/1d525299ac17004b/2f5427605d3e198d create mode 100644 .hypothesis/examples/1d525299ac17004b/9a3c1667a531b1ac create mode 100644 .hypothesis/examples/1d525299ac17004b/cd6bd1dcfebeffe9 create mode 100644 .hypothesis/examples/2813a5e94c6b3fc8/35ad336a2a6fdfd2 create mode 100644 .hypothesis/examples/30c35e01a9722884/cd6bd1dcfebeffe9 create mode 100644 .hypothesis/examples/474f3ad49262d3ec/2f5427605d3e198d create mode 100644 .hypothesis/examples/4b6d35316b9dfb2c/3192aedc13e9fb94 create mode 100644 .hypothesis/examples/4b6d35316b9dfb2c/69dca6a561a1acfd create mode 100644 .hypothesis/examples/4b6d35316b9dfb2c/85c0272697d6fd5e create mode 100644 .hypothesis/examples/4b6d35316b9dfb2c/b1d05b1a4f5d57d8 create mode 100644 .hypothesis/examples/4b6d35316b9dfb2c/cd6bd1dcfebeffe9 create mode 100644 .hypothesis/examples/4e607744a84e246b/2f5427605d3e198d create mode 100644 .hypothesis/examples/532a94be90c9efd0/b8231a7f06bee7f9 create mode 100644 .hypothesis/examples/532a94be90c9efd0/de2f4e902ceb702d create mode 100644 .hypothesis/examples/532a94be90c9efd0/ffd3c03363776c1f create mode 100644 .hypothesis/examples/5841fbe83c75a177/085f80daee6d089f create mode 100644 .hypothesis/examples/5841fbe83c75a177/96784e8d40b82570 create mode 100644 .hypothesis/examples/5841fbe83c75a177/975b2cb9b044b541 create mode 100644 .hypothesis/examples/610f0d49a7f18187/015ec5d979c41511 create mode 100644 .hypothesis/examples/610f0d49a7f18187/085f80daee6d089f create mode 100644 .hypothesis/examples/610f0d49a7f18187/93fd353b208e5ead create mode 100644 .hypothesis/examples/65c7e04feb03f2b7/9a3c1667a531b1ac create mode 100644 .hypothesis/examples/65c7e04feb03f2b7/cd6bd1dcfebeffe9 create mode 100644 .hypothesis/examples/8c20b63c7c3ee2a0/2f5427605d3e198d create mode 100644 .hypothesis/examples/8c20b63c7c3ee2a0/9a3c1667a531b1ac create mode 100644 .hypothesis/examples/8c20b63c7c3ee2a0/cd6bd1dcfebeffe9 create mode 100644 .hypothesis/examples/95fbd6c8090ecb40/cd6bd1dcfebeffe9 create mode 100644 .hypothesis/examples/95fbd6c8090ecb40/dc11c3cd8814f97f create mode 100644 .hypothesis/examples/988fff622301a798/86b12aeace201491 create mode 100644 .hypothesis/examples/b37a28bfb88d7d9a/0d491ebeb6bcc34b create mode 100644 .hypothesis/examples/b37a28bfb88d7d9a/7abd2938b62a02d9 create mode 100644 .hypothesis/examples/ce5beca553078037/7abd2938b62a02d9 create mode 100644 .hypothesis/examples/d467e571ca193666/9c37882aff0161aa create mode 100644 .hypothesis/examples/d467e571ca193666/cd6bd1dcfebeffe9 create mode 100644 .hypothesis/examples/ea046fba42e7e6df/5d0ee50bbc9e81ca create mode 100644 .hypothesis/examples/ea046fba42e7e6df/9a3c1667a531b1ac create mode 100644 .hypothesis/examples/ea046fba42e7e6df/cd6bd1dcfebeffe9 create mode 100644 .hypothesis/examples/f110168263c9473c/0d491ebeb6bcc34b create mode 100644 .hypothesis/unicode_data/13.0.0/codec-utf-8.json.gz diff --git a/.hypothesis/examples/0a3a13c375cbef58/5d0ee50bbc9e81ca b/.hypothesis/examples/0a3a13c375cbef58/5d0ee50bbc9e81ca new file mode 100644 index 0000000000000000000000000000000000000000..5c5cc7cb500a4469c20ac69e6c08e4d89881bf32 GIT binary patch literal 13 PcmZQ%WB>w2Fv$P_05bpu literal 0 HcmV?d00001 diff --git a/.hypothesis/examples/1d47f825b95ef0c4/106f0f267bad0256 b/.hypothesis/examples/1d47f825b95ef0c4/106f0f267bad0256 new file mode 100644 index 0000000000000000000000000000000000000000..ecdc08992ec875ec1f7b24be47fbede652e43f4d GIT binary patch literal 18 TcmZQ%WawpJU<8q1f`I`555)nl literal 0 HcmV?d00001 diff --git a/.hypothesis/examples/1d525299ac17004b/2f5427605d3e198d b/.hypothesis/examples/1d525299ac17004b/2f5427605d3e198d new file mode 100644 index 0000000000000000000000000000000000000000..31dfa6c685d49b29497122fca5bbe371cba81f73 GIT binary patch literal 9 OcmZQ%U|?VbVg>*J7XSkQ literal 0 HcmV?d00001 diff --git a/.hypothesis/examples/1d525299ac17004b/9a3c1667a531b1ac b/.hypothesis/examples/1d525299ac17004b/9a3c1667a531b1ac new file mode 100644 index 0000000000000000000000000000000000000000..654be01f20f58665f879dcb4aac4d0d2a0f77f02 GIT binary patch literal 6 LcmZQzWB>vH01E&D literal 0 HcmV?d00001 diff --git a/.hypothesis/examples/1d525299ac17004b/cd6bd1dcfebeffe9 b/.hypothesis/examples/1d525299ac17004b/cd6bd1dcfebeffe9 new file mode 100644 index 0000000000000000000000000000000000000000..4227ca4e8736af63036e7457e2db376ddf7e5795 GIT binary patch literal 3 KcmZQzU;qFB0{{U4 literal 0 HcmV?d00001 diff --git a/.hypothesis/examples/2813a5e94c6b3fc8/35ad336a2a6fdfd2 b/.hypothesis/examples/2813a5e94c6b3fc8/35ad336a2a6fdfd2 new file mode 100644 index 0000000000000000000000000000000000000000..7923a2fc843147009918b97964353a5d203c843a GIT binary patch literal 13 PcmZQ%WMF_G1_lNI05t#w literal 0 HcmV?d00001 diff --git a/.hypothesis/examples/30c35e01a9722884/cd6bd1dcfebeffe9 b/.hypothesis/examples/30c35e01a9722884/cd6bd1dcfebeffe9 new file mode 100644 index 0000000000000000000000000000000000000000..4227ca4e8736af63036e7457e2db376ddf7e5795 GIT binary patch literal 3 KcmZQzU;qFB0{{U4 literal 0 HcmV?d00001 diff --git a/.hypothesis/examples/474f3ad49262d3ec/2f5427605d3e198d b/.hypothesis/examples/474f3ad49262d3ec/2f5427605d3e198d new file mode 100644 index 0000000000000000000000000000000000000000..31dfa6c685d49b29497122fca5bbe371cba81f73 GIT binary patch literal 9 OcmZQ%U|?VbVg>*J7XSkQ literal 0 HcmV?d00001 diff --git a/.hypothesis/examples/4b6d35316b9dfb2c/3192aedc13e9fb94 b/.hypothesis/examples/4b6d35316b9dfb2c/3192aedc13e9fb94 new file mode 100644 index 0000000000000000000000000000000000000000..eb4fd096de4dc9a75abf2cd77e97d15d2d6e63b0 GIT binary patch literal 6 NcmZQzWUymk0002R06+i$ literal 0 HcmV?d00001 diff --git a/.hypothesis/examples/4b6d35316b9dfb2c/69dca6a561a1acfd b/.hypothesis/examples/4b6d35316b9dfb2c/69dca6a561a1acfd new file mode 100644 index 0000000000000000000000000000000000000000..3bedc8ea3daafd707f08ac13b574751104d87df5 GIT binary patch literal 9 QcmZQzW@KV`&d$I900ZR!^#A|> literal 0 HcmV?d00001 diff --git a/.hypothesis/examples/4b6d35316b9dfb2c/85c0272697d6fd5e b/.hypothesis/examples/4b6d35316b9dfb2c/85c0272697d6fd5e new file mode 100644 index 0000000000000000000000000000000000000000..f8480761c563ac785766c527f375a21aa2340eac GIT binary patch literal 11 ScmZQ(WbkBUVK~pgzyJUR*#RN| literal 0 HcmV?d00001 diff --git a/.hypothesis/examples/4b6d35316b9dfb2c/b1d05b1a4f5d57d8 b/.hypothesis/examples/4b6d35316b9dfb2c/b1d05b1a4f5d57d8 new file mode 100644 index 0000000000000000000000000000000000000000..4988797ca9e84b545296c8d679041418a6c2e724 GIT binary patch literal 53 zcmZQ!WN2Y!WMqF`&c?{j#wgq;!lAI1jge7A{S24-BxXi7hEL3l%nZ70K%x@FGGt(2 F007^H2UY+8 literal 0 HcmV?d00001 diff --git a/.hypothesis/examples/4b6d35316b9dfb2c/cd6bd1dcfebeffe9 b/.hypothesis/examples/4b6d35316b9dfb2c/cd6bd1dcfebeffe9 new file mode 100644 index 0000000000000000000000000000000000000000..4227ca4e8736af63036e7457e2db376ddf7e5795 GIT binary patch literal 3 KcmZQzU;qFB0{{U4 literal 0 HcmV?d00001 diff --git a/.hypothesis/examples/4e607744a84e246b/2f5427605d3e198d b/.hypothesis/examples/4e607744a84e246b/2f5427605d3e198d new file mode 100644 index 0000000000000000000000000000000000000000..31dfa6c685d49b29497122fca5bbe371cba81f73 GIT binary patch literal 9 OcmZQ%U|?VbVg>*J7XSkQ literal 0 HcmV?d00001 diff --git a/.hypothesis/examples/532a94be90c9efd0/b8231a7f06bee7f9 b/.hypothesis/examples/532a94be90c9efd0/b8231a7f06bee7f9 new file mode 100644 index 0000000000000000000000000000000000000000..df77930e8787a260ad9876e3121dab5ba3465c79 GIT binary patch literal 13 PcmZQ%WB>w2Fv$b}05t#y literal 0 HcmV?d00001 diff --git a/.hypothesis/examples/532a94be90c9efd0/de2f4e902ceb702d b/.hypothesis/examples/532a94be90c9efd0/de2f4e902ceb702d new file mode 100644 index 0000000000000000000000000000000000000000..ea0939726b2a08ed2fb65391f2485fed9a12c13a GIT binary patch literal 17 TcmZQ%WIy$bor!@FN;3ffBF6)- literal 0 HcmV?d00001 diff --git a/.hypothesis/examples/532a94be90c9efd0/ffd3c03363776c1f b/.hypothesis/examples/532a94be90c9efd0/ffd3c03363776c1f new file mode 100644 index 0000000000000000000000000000000000000000..566fcd5d8ed4b2bf33868cffacd0e542f568547f GIT binary patch literal 13 RcmZQ%WIy$bfe}nH0RR_i1DyZ> literal 0 HcmV?d00001 diff --git a/.hypothesis/examples/5841fbe83c75a177/085f80daee6d089f b/.hypothesis/examples/5841fbe83c75a177/085f80daee6d089f new file mode 100644 index 0000000000000000000000000000000000000000..01670af15d8692de721c16886037717a70bb8573 GIT binary patch literal 9 OcmZQ%U|?VbVkQ6p82|+U literal 0 HcmV?d00001 diff --git a/.hypothesis/examples/5841fbe83c75a177/96784e8d40b82570 b/.hypothesis/examples/5841fbe83c75a177/96784e8d40b82570 new file mode 100644 index 0000000000000000000000000000000000000000..0bc649f3746d01719818e031b71d8bdd8bcd6b45 GIT binary patch literal 9 OcmZQ%P+(vLVkQ6qSpY=< literal 0 HcmV?d00001 diff --git a/.hypothesis/examples/5841fbe83c75a177/975b2cb9b044b541 b/.hypothesis/examples/5841fbe83c75a177/975b2cb9b044b541 new file mode 100644 index 0000000000000000000000000000000000000000..7ebee0c07f2319ee4b198d6318df7df1be41f394 GIT binary patch literal 11 PcmZQ%Wl&&X1QARC0m%SQ literal 0 HcmV?d00001 diff --git a/.hypothesis/examples/610f0d49a7f18187/015ec5d979c41511 b/.hypothesis/examples/610f0d49a7f18187/015ec5d979c41511 new file mode 100644 index 0000000000000000000000000000000000000000..044eb507dcd22ea5a3fef99b4e3b2ff37fb2b377 GIT binary patch literal 17 XcmZQ%sAFJdWMi1l%E-vH01E&D literal 0 HcmV?d00001 diff --git a/.hypothesis/examples/65c7e04feb03f2b7/cd6bd1dcfebeffe9 b/.hypothesis/examples/65c7e04feb03f2b7/cd6bd1dcfebeffe9 new file mode 100644 index 0000000000000000000000000000000000000000..4227ca4e8736af63036e7457e2db376ddf7e5795 GIT binary patch literal 3 KcmZQzU;qFB0{{U4 literal 0 HcmV?d00001 diff --git a/.hypothesis/examples/8c20b63c7c3ee2a0/2f5427605d3e198d b/.hypothesis/examples/8c20b63c7c3ee2a0/2f5427605d3e198d new file mode 100644 index 0000000000000000000000000000000000000000..31dfa6c685d49b29497122fca5bbe371cba81f73 GIT binary patch literal 9 OcmZQ%U|?VbVg>*J7XSkQ literal 0 HcmV?d00001 diff --git a/.hypothesis/examples/8c20b63c7c3ee2a0/9a3c1667a531b1ac b/.hypothesis/examples/8c20b63c7c3ee2a0/9a3c1667a531b1ac new file mode 100644 index 0000000000000000000000000000000000000000..654be01f20f58665f879dcb4aac4d0d2a0f77f02 GIT binary patch literal 6 LcmZQzWB>vH01E&D literal 0 HcmV?d00001 diff --git a/.hypothesis/examples/8c20b63c7c3ee2a0/cd6bd1dcfebeffe9 b/.hypothesis/examples/8c20b63c7c3ee2a0/cd6bd1dcfebeffe9 new file mode 100644 index 0000000000000000000000000000000000000000..4227ca4e8736af63036e7457e2db376ddf7e5795 GIT binary patch literal 3 KcmZQzU;qFB0{{U4 literal 0 HcmV?d00001 diff --git a/.hypothesis/examples/95fbd6c8090ecb40/cd6bd1dcfebeffe9 b/.hypothesis/examples/95fbd6c8090ecb40/cd6bd1dcfebeffe9 new file mode 100644 index 0000000000000000000000000000000000000000..4227ca4e8736af63036e7457e2db376ddf7e5795 GIT binary patch literal 3 KcmZQzU;qFB0{{U4 literal 0 HcmV?d00001 diff --git a/.hypothesis/examples/95fbd6c8090ecb40/dc11c3cd8814f97f b/.hypothesis/examples/95fbd6c8090ecb40/dc11c3cd8814f97f new file mode 100644 index 0000000000000000000000000000000000000000..a2f040118160cc9fbbee1873bb8a9a230c8ad73a GIT binary patch literal 24 ecmZQzV`ODuWoKk&XlG?)XRv1jvJNvaGXek)&H=#y literal 0 HcmV?d00001 diff --git a/.hypothesis/examples/988fff622301a798/86b12aeace201491 b/.hypothesis/examples/988fff622301a798/86b12aeace201491 new file mode 100644 index 0000000000000000000000000000000000000000..8fd73713936b233be2a4e404d16df21477ebea72 GIT binary patch literal 7 LcmZQzWB>sG01W^F literal 0 HcmV?d00001 diff --git a/.hypothesis/examples/b37a28bfb88d7d9a/0d491ebeb6bcc34b b/.hypothesis/examples/b37a28bfb88d7d9a/0d491ebeb6bcc34b new file mode 100644 index 0000000000000000000000000000000000000000..3390dddf2fddf05f98329b34aa9b3ff1afe5e018 GIT binary patch literal 18 RcmZQ%WB>w25D6w27ytlS00#g7 literal 0 HcmV?d00001 diff --git a/.hypothesis/examples/b37a28bfb88d7d9a/7abd2938b62a02d9 b/.hypothesis/examples/b37a28bfb88d7d9a/7abd2938b62a02d9 new file mode 100644 index 0000000000000000000000000000000000000000..606a865ef29880cfff0771f3dc5ffa70b386e88e GIT binary patch literal 6 KcmZQ%009613;+TE literal 0 HcmV?d00001 diff --git a/.hypothesis/examples/ce5beca553078037/7abd2938b62a02d9 b/.hypothesis/examples/ce5beca553078037/7abd2938b62a02d9 new file mode 100644 index 0000000000000000000000000000000000000000..606a865ef29880cfff0771f3dc5ffa70b386e88e GIT binary patch literal 6 KcmZQ%009613;+TE literal 0 HcmV?d00001 diff --git a/.hypothesis/examples/d467e571ca193666/9c37882aff0161aa b/.hypothesis/examples/d467e571ca193666/9c37882aff0161aa new file mode 100644 index 0000000000000000000000000000000000000000..eb078fa01cb9b9f9a3ef6323362d92a664a7fe76 GIT binary patch literal 17 YcmZQ#VPs+`WMpQLU|?coV<=_-00-g$6951J literal 0 HcmV?d00001 diff --git a/.hypothesis/examples/d467e571ca193666/cd6bd1dcfebeffe9 b/.hypothesis/examples/d467e571ca193666/cd6bd1dcfebeffe9 new file mode 100644 index 0000000000000000000000000000000000000000..4227ca4e8736af63036e7457e2db376ddf7e5795 GIT binary patch literal 3 KcmZQzU;qFB0{{U4 literal 0 HcmV?d00001 diff --git a/.hypothesis/examples/ea046fba42e7e6df/5d0ee50bbc9e81ca b/.hypothesis/examples/ea046fba42e7e6df/5d0ee50bbc9e81ca new file mode 100644 index 0000000000000000000000000000000000000000..5c5cc7cb500a4469c20ac69e6c08e4d89881bf32 GIT binary patch literal 13 PcmZQ%WB>w2Fv$P_05bpu literal 0 HcmV?d00001 diff --git a/.hypothesis/examples/ea046fba42e7e6df/9a3c1667a531b1ac b/.hypothesis/examples/ea046fba42e7e6df/9a3c1667a531b1ac new file mode 100644 index 0000000000000000000000000000000000000000..654be01f20f58665f879dcb4aac4d0d2a0f77f02 GIT binary patch literal 6 LcmZQzWB>vH01E&D literal 0 HcmV?d00001 diff --git a/.hypothesis/examples/ea046fba42e7e6df/cd6bd1dcfebeffe9 b/.hypothesis/examples/ea046fba42e7e6df/cd6bd1dcfebeffe9 new file mode 100644 index 0000000000000000000000000000000000000000..4227ca4e8736af63036e7457e2db376ddf7e5795 GIT binary patch literal 3 KcmZQzU;qFB0{{U4 literal 0 HcmV?d00001 diff --git a/.hypothesis/examples/f110168263c9473c/0d491ebeb6bcc34b b/.hypothesis/examples/f110168263c9473c/0d491ebeb6bcc34b new file mode 100644 index 0000000000000000000000000000000000000000..3390dddf2fddf05f98329b34aa9b3ff1afe5e018 GIT binary patch literal 18 RcmZQ%WB>w25D6w27ytlS00#g7 literal 0 HcmV?d00001 diff --git a/.hypothesis/unicode_data/13.0.0/codec-utf-8.json.gz b/.hypothesis/unicode_data/13.0.0/codec-utf-8.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..08b3b36629781ef6613f1161c59f492142b9c522 GIT binary patch literal 60 zcmb2|=HOstU|?YSUy@r;5pSHCZfY3M(A{TtA<)3obdyQ%)xZujQ*$%Ji-86vCMJxJ PZbUHDMd`1Q1L^?)E=3Zr literal 0 HcmV?d00001 diff --git a/tests/test_ac.py b/tests/test_ac.py index 6891ede..328967b 100644 --- a/tests/test_ac.py +++ b/tests/test_ac.py @@ -188,8 +188,8 @@ def test_unicode_totally_random( assert string_matches == [] else: assert index_matches[0][1] == expected_index - assert [haystack[s:e] for (_, s, e) in index_matches] == [pattern] - assert string_matches == [pattern] + assert [haystack[s:e] for (_, s, e) in index_matches][0] == pattern + assert string_matches[0] == pattern def test_matchkind() -> None: From 9c79176cea9471ad9bf01a219bf227d8a2c7aff4 Mon Sep 17 00:00:00 2001 From: Itamar Turner-Trauring Date: Thu, 21 Sep 2023 14:18:24 -0400 Subject: [PATCH 8/9] Fix mypy complaint. --- .../unicode_data/13.0.0/codec-utf-8.json.gz | Bin 60 -> 60 bytes justfile | 5 ++++- tests/test_ac.py | 4 +++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.hypothesis/unicode_data/13.0.0/codec-utf-8.json.gz b/.hypothesis/unicode_data/13.0.0/codec-utf-8.json.gz index 08b3b36629781ef6613f1161c59f492142b9c522..35fdea6f4f3cd7884dcf6285647670934159b0f3 100644 GIT binary patch delta 27 icmcDq5tZ-e;9z86U|{-Rl3S3QmsS;D6mLFJR2=|W_y>vr delta 27 icmcDq5tZ-e;9z86U|{-Rl3P#_Z=9KKY8XFJR2=|T3 None: """ Passing in an empty pattern suggests a bug in user code, and the outputs are bad when you do have that, so raise an error. From f86ec64ebed723c0cf983bb8eb9262ba3ba0cf66 Mon Sep 17 00:00:00 2001 From: Itamar Turner-Trauring Date: Thu, 21 Sep 2023 14:37:28 -0400 Subject: [PATCH 9/9] A more efficient way to check for empty patterns. --- src/lib.rs | 67 +++++++++++++++++++++++++++++------------------------- 1 file changed, 36 insertions(+), 31 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 88b8bb1..a2a32f7 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,4 +1,6 @@ -use std::sync::{Arc, Mutex}; +use std::{sync::{ + Arc, Mutex, +}, cell::Cell}; use aho_corasick::{ AhoCorasick, AhoCorasickBuilder, AhoCorasickKind, Match, MatchError, MatchKind, @@ -138,15 +140,6 @@ impl PyAhoCorasick { .map_while(|i_result| { i_result .and_then(|i| i.downcast::().map_err(PyErr::from)) - .and_then(|s| { - if s.len().expect("Failed to get length of string?!") != 0 { - Ok(s) - } else { - Err(PyValueError::new_err( - "You passed in an empty string as a pattern", - )) - } - }) .map_or_else( |e| { if let Ok(mut guard) = patterns_error.lock() { @@ -188,27 +181,39 @@ impl PyAhoCorasick { None }; - let result = Ok(Self { - ac_impl: AhoCorasickBuilder::new() - .kind(implementation.map(|i| i.into())) - .match_kind(matchkind.into()) - .build( - first_few_patterns - .into_iter() - .chain(patterns_iter) - .chunks(10 * 1024) - .into_iter() - .flat_map(|chunk| { - let result = chunk.filter_map(|s| s.extract::().ok()); - // Release the GIL in case some other thread wants to do work: - py.allow_threads(|| ()); - result - }), - ) - // TODO make sure this error is menaingful to Python users - .map_err(|e| PyValueError::new_err(e.to_string()))?, - patterns, - }); + let has_empty_patterns = Cell::new(false); + let ac_impl = AhoCorasickBuilder::new() + .kind(implementation.map(|i| i.into())) + .match_kind(matchkind.into()) + .build( + first_few_patterns + .into_iter() + .chain(patterns_iter) + .chunks(10 * 1024) + .into_iter() + .flat_map(|chunk| { + let result = + chunk + .filter_map(|s| s.extract::().ok()) + .inspect(|s| { + if s.is_empty() { + has_empty_patterns.set(true); + } + }); + // Release the GIL in case some other thread wants to do work: + py.allow_threads(|| ()); + result + }), + ) // TODO make sure this error is menaingful to Python users + .map_err(|e| PyValueError::new_err(e.to_string()))?; + + if has_empty_patterns.get() { + return Err(PyValueError::new_err( + "You passed in an empty string as a pattern", + )); + } + + let result = Ok(Self { ac_impl, patterns }); if let Ok(mut guard) = patterns_error.lock() { if let Some(err) = guard.take() { return Err(err);