Repository: dr-prodigy/python-holidays

Issue:
HolidayBase::pop_named won't remove holiday by a partial name
```
  File ".../home-assistant-core/venv/lib/python3.10/site-packages/holidays/holiday_base.py", line 825, in pop_named
    holiday_names.remove(name)
ValueError: list.remove(x): x not in list
```

Discussion:
coveralls: 
[![Coverage Status](https://coveralls.io/builds/60874961/badge)](https://coveralls.io/builds/60874961)

coverage: 100.0%. remained the same when pulling **d611042998a28cfb61e3afe1fe31b00f704c5299 on arkid15r:fix-pop-named** into **2b0463684d23adacb331c03fda7b794534c16c6d on dr-prodigy:master**.


Patch:
diff --git a/CHANGES b/CHANGES
index 38bd8937..04d3b680 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,10 @@
+Version 0.27.1
+==============
+
+Released June 21, 2023
+
+- Fix HolidayBase::pop_named partial holiday names removal (#1325 by @arkid15r)
+
 Version 0.27
 ============
 
diff --git a/holidays/__init__.py b/holidays/__init__.py
index 12bda76a..02182bc9 100644
--- a/holidays/__init__.py
+++ b/holidays/__init__.py
@@ -14,7 +14,7 @@ from holidays.holiday_base import *
 from holidays.registry import EntityLoader
 from holidays.utils import *
 
-__version__ = "0.27"
+__version__ = "0.27.1"
 
 
 EntityLoader.load("countries", globals())
diff --git a/holidays/holiday_base.py b/holidays/holiday_base.py
index 5c568e22..c25cf69c 100644
--- a/holidays/holiday_base.py
+++ b/holidays/holiday_base.py
@@ -822,7 +822,13 @@ class HolidayBase(Dict[date, str]):
 
             # Keep the rest of holidays falling on the same date.
             if not use_exact_name:
-                holiday_names.remove(name)
+                name_lower = name.lower()
+                holiday_names = [
+                    holiday_name
+                    for holiday_name in holiday_names
+                    if name_lower not in holiday_name.lower()
+                ]
+
                 if len(holiday_names) > 0:
                     self[dt] = HOLIDAY_NAME_DELIMITER.join(holiday_names)
 
diff --git a/setup.cfg b/setup.cfg
index 4c1e185c..f0505dea 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -37,7 +37,7 @@ python_requires = >=3.7
 include_package_data = True
 
 [bumpversion]
-current_version = 0.27
+current_version = 0.27.1
 
 [flake8]
 extend-ignore = F821


Test patch:
diff --git a/tests/test_holiday_base.py b/tests/test_holiday_base.py
index c57af796..bfe86e01 100644
--- a/tests/test_holiday_base.py
+++ b/tests/test_holiday_base.py
@@ -156,6 +156,16 @@ class TestBasics(unittest.TestCase):
         self.holidays.pop_named(holiday_name_2)
         self.assertNotIn(dt, self.holidays)
 
+    def test_pop_named_partial(self):
+        self.assertIn(date(2014, 1, 1), self.holidays)
+        dts = self.holidays.pop_named("N")
+        for dt in dts:
+            self.assertNotIn(dt, self.holidays)
+        self.assertRaises(
+            KeyError,
+            lambda: self.holidays.pop_named("New Year"),
+        )
+
     def test_pop_named_exception(self):
         self.assertRaises(
             KeyError,