prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  ImportError using yf.Ticker
  Hello.  Hope everyone is doing well.  Getting an error after upgraded yfinance today (11/28/23) with the following code ```%pip install yfinance --upgrade --no-cache-dir --pre```.  
  
  I am using python version 3.10 and yfinance version 02.32
  
  Error I am getting is as follows:
  
  ImportError: cannot import name 'DO_NOT_CACHE' from 'requests_cache' (C:\Users\17147\anaconda3\envs\ib230729\Lib\site-packages\requests_cache\__init__.py)
  
  
  Simple code that reproduces the problem:
  session = requests_cache.CachedSession('yfinance.cache')
  session.headers['User-agent'] = 'my-program/1.0'
  msft = yf.Ticker('msft', session=session)
  msft.actions
  
  
  Traceback below:
  ---------------------------------------------------------------------------
  ImportError                               Traceback (most recent call last)
  Cell In[2], line 3
        1 session = requests_cache.CachedSession('yfinance.cache')
        2 session.headers['User-agent'] = 'my-program/1.0'
  ----> 3 msft = yf.Ticker('msft', session=session)
  
  File ~\anaconda3\envs\ib230729\Lib\site-packages\yfinance\ticker.py:34, in Ticker.__init__(self, ticker, session)
       33 def __init__(self, ticker, session=None):
  ---> 34     super(Ticker, self).__init__(ticker, session=session)
       35     self._expirations = {}
       36     self._underlying  = {}
  
  File ~\anaconda3\envs\ib230729\Lib\site-packages\yfinance\base.py:71, in TickerBase.__init__(self, ticker, session)
       68 if utils.is_isin(self.ticker):
       69     self.ticker = utils.get_ticker_by_isin(self.ticker, None, session)
  ---> 71 self._data: YfData = YfData(session=session)
       73 self._analysis = Analysis(self._data, ticker)
       74 self._holders = Holders(self._data, ticker)
  
  File ~\anaconda3\envs\ib230729\Lib\site-packages\yfinance\data.py:47, in SingletonMeta.__call__(cls, *args, **kwargs)
       45 with cls._lock:
       46     if cls not in cls._instances:
  ---> 47         instance = super().__call__(*args, **kwargs)
       48         cls._instances[cls] = instance
       49     else:
  
  File ~\anaconda3\envs\ib230729\Lib\site-packages\yfinance\data.py:75, in YfData.__init__(self, session)
       70 else:
       71     # Is caching. This is annoying. 
       72     # Can't simply use a non-caching session to fetch cookie & crumb, 
       73     # because then the caching-session won't have cookie.
       74     self._session_is_caching = True
  ---> 75     from requests_cache import DO_NOT_CACHE
       76     self._expire_after = DO_NOT_CACHE
       77 self._crumb = None
  
  ImportError: cannot import name 'DO_NOT_CACHE' from 'requests_cache' (C:\Users\17147\anaconda3\envs\ib230729\Lib\site-packages\requests_cache\__init__.py)
  
  
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `setup.py`
  Content:
  ```
  1 #!/usr/bin/env python
  2 # -*- coding: UTF-8 -*-
  3 #
  4 # yfinance - market data downloader
  5 # https://github.com/ranaroussi/yfinance
  6 
  7 """yfinance - market data downloader"""
  8 
  9 from setuptools import setup, find_packages
  10 # from codecs import open
  11 import io
  12 from os import path
  13 
  14 # --- get version ---
  15 version = "unknown"
  16 with open("yfinance/version.py") as f:
  17     line = f.read().strip()
  18     version = line.replace("version = ", "").replace('"', '')
  19 # --- /get version ---
  20 
  21 
  22 here = path.abspath(path.dirname(__file__))
  23 
  24 # Get the long description from the README file
  25 with io.open(path.join(here, 'README.md'), encoding='utf-8') as f:
  26     long_description = f.read()
  27 
  28 setup(
  29     name='yfinance',
  30     version=version,
  31     description='Download market data from Yahoo! Finance API',
  32     long_description=long_description,
  33     long_description_content_type='text/markdown',
  34     url='https://github.com/ranaroussi/yfinance',
  35     author='Ran Aroussi',
  36     author_email='ran@aroussi.com',
  37     license='Apache',
  38     classifiers=[
  39         'License :: OSI Approved :: Apache Software License',
  40         # 'Development Status :: 3 - Alpha',
  41         'Development Status :: 4 - Beta',
  42         # 'Development Status :: 5 - Production/Stable',
  43 
  44 
  45         'Operating System :: OS Independent',
  46         'Intended Audience :: Developers',
  47         'Topic :: Office/Business :: Financial',
  48         'Topic :: Office/Business :: Financial :: Investment',
  49         'Topic :: Scientific/Engineering :: Interface Engine/Protocol Translator',
  50         'Topic :: Software Development :: Libraries',
  51         'Topic :: Software Development :: Libraries :: Python Modules',
  52 
  53         'Programming Language :: Python :: 3.6',
  54         'Programming Language :: Python :: 3.7',
  55         'Programming Language :: Python :: 3.8',
  56         'Programming Language :: Python :: 3.9',
  57         'Programming Language :: Python :: 3.10',
  58     ],
  59     platforms=['any'],
  60     keywords='pandas, yahoo finance, pandas datareader',
  61     packages=find_packages(exclude=['contrib', 'docs', 'tests', 'examples']),
  62     install_requires=['pandas>=1.3.0', 'numpy>=1.16.5',
  63                       'requests>=2.31', 'multitasking>=0.0.7',
  64                       'lxml>=4.9.1', 'appdirs>=1.4.4', 'pytz>=2022.5',
  65                       'frozendict>=2.3.4', 'peewee>=3.16.2',
  66                       'beautifulsoup4>=4.11.1', 'html5lib>=1.1'],
  67     extras_require={
  68         'nospam': ['requests_cache>=1.1.1', 'requests_ratelimiter>=0.4.2'],
  69         'repair': ['scipy>=1.6.3'],
  70     },
  71     # Note: Pandas.read_html() needs html5lib & beautifulsoup4
  72     entry_points={
  73         'console_scripts': [
  74             'sample=sample:main',
  75         ],
  76     },
  77 )
  78 
  79 print("""
  80 NOTE: yfinance is not affiliated, endorsed, or vetted by Yahoo, Inc.
  81 
  82 You should refer to Yahoo!'s terms of use for details on your rights
  83 to use the actual data downloaded.""")
  84
  ```
  --- END FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
golden_diff: diff --git a/setup.py b/setup.py
  --- a/setup.py
  +++ b/setup.py
  @@ -65,7 +65,7 @@
                         'frozendict>=2.3.4', 'peewee>=3.16.2',
                         'beautifulsoup4>=4.11.1', 'html5lib>=1.1'],
       extras_require={
  -        'nospam': ['requests_cache>=1.1.1', 'requests_ratelimiter>=0.4.2'],
  +        'nospam': ['requests_cache>=1.0', 'requests_ratelimiter>=0.3.1'],
           'repair': ['scipy>=1.6.3'],
       },
       # Note: Pandas.read_html() needs html5lib & beautifulsoup4
  
verification_info: {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -65,7 +65,7 @@\n                       'frozendict>=2.3.4', 'peewee>=3.16.2',\n                       'beautifulsoup4>=4.11.1', 'html5lib>=1.1'],\n     extras_require={\n-        'nospam': ['requests_cache>=1.1.1', 'requests_ratelimiter>=0.4.2'],\n+        'nospam': ['requests_cache>=1.0', 'requests_ratelimiter>=0.3.1'],\n         'repair': ['scipy>=1.6.3'],\n     },\n     # Note: Pandas.read_html() needs html5lib & beautifulsoup4\n", "issue": "ImportError using yf.Ticker\nHello.  Hope everyone is doing well.  Getting an error after upgraded yfinance today (11/28/23) with the following code ```%pip install yfinance --upgrade --no-cache-dir --pre```.  \r\n\r\nI am using python version 3.10 and yfinance version 02.32\r\n\r\nError I am getting is as follows:\r\n\r\nImportError: cannot import name 'DO_NOT_CACHE' from 'requests_cache' (C:\\Users\\17147\\anaconda3\\envs\\ib230729\\Lib\\site-packages\\requests_cache\\__init__.py)\r\n\r\n\r\nSimple code that reproduces the problem:\r\nsession = requests_cache.CachedSession('yfinance.cache')\r\nsession.headers['User-agent'] = 'my-program/1.0'\r\nmsft = yf.Ticker('msft', session=session)\r\nmsft.actions\r\n\r\n\r\nTraceback below:\r\n---------------------------------------------------------------------------\r\nImportError                               Traceback (most recent call last)\r\nCell In[2], line 3\r\n      1 session = requests_cache.CachedSession('yfinance.cache')\r\n      2 session.headers['User-agent'] = 'my-program/1.0'\r\n----> 3 msft = yf.Ticker('msft', session=session)\r\n\r\nFile ~\\anaconda3\\envs\\ib230729\\Lib\\site-packages\\yfinance\\ticker.py:34, in Ticker.__init__(self, ticker, session)\r\n     33 def __init__(self, ticker, session=None):\r\n---> 34     super(Ticker, self).__init__(ticker, session=session)\r\n     35     self._expirations = {}\r\n     36     self._underlying  = {}\r\n\r\nFile ~\\anaconda3\\envs\\ib230729\\Lib\\site-packages\\yfinance\\base.py:71, in TickerBase.__init__(self, ticker, session)\r\n     68 if utils.is_isin(self.ticker):\r\n     69     self.ticker = utils.get_ticker_by_isin(self.ticker, None, session)\r\n---> 71 self._data: YfData = YfData(session=session)\r\n     73 self._analysis = Analysis(self._data, ticker)\r\n     74 self._holders = Holders(self._data, ticker)\r\n\r\nFile ~\\anaconda3\\envs\\ib230729\\Lib\\site-packages\\yfinance\\data.py:47, in SingletonMeta.__call__(cls, *args, **kwargs)\r\n     45 with cls._lock:\r\n     46     if cls not in cls._instances:\r\n---> 47         instance = super().__call__(*args, **kwargs)\r\n     48         cls._instances[cls] = instance\r\n     49     else:\r\n\r\nFile ~\\anaconda3\\envs\\ib230729\\Lib\\site-packages\\yfinance\\data.py:75, in YfData.__init__(self, session)\r\n     70 else:\r\n     71     # Is caching. This is annoying. \r\n     72     # Can't simply use a non-caching session to fetch cookie & crumb, \r\n     73     # because then the caching-session won't have cookie.\r\n     74     self._session_is_caching = True\r\n---> 75     from requests_cache import DO_NOT_CACHE\r\n     76     self._expire_after = DO_NOT_CACHE\r\n     77 self._crumb = None\r\n\r\nImportError: cannot import name 'DO_NOT_CACHE' from 'requests_cache' (C:\\Users\\17147\\anaconda3\\envs\\ib230729\\Lib\\site-packages\\requests_cache\\__init__.py)\r\n\r\n\n", "before_files": [{"content": "#!/usr/bin/env python\n# -*- coding: UTF-8 -*-\n#\n# yfinance - market data downloader\n# https://github.com/ranaroussi/yfinance\n\n\"\"\"yfinance - market data downloader\"\"\"\n\nfrom setuptools import setup, find_packages\n# from codecs import open\nimport io\nfrom os import path\n\n# --- get version ---\nversion = \"unknown\"\nwith open(\"yfinance/version.py\") as f:\n    line = f.read().strip()\n    version = line.replace(\"version = \", \"\").replace('\"', '')\n# --- /get version ---\n\n\nhere = path.abspath(path.dirname(__file__))\n\n# Get the long description from the README file\nwith io.open(path.join(here, 'README.md'), encoding='utf-8') as f:\n    long_description = f.read()\n\nsetup(\n    name='yfinance',\n    version=version,\n    description='Download market data from Yahoo! Finance API',\n    long_description=long_description,\n    long_description_content_type='text/markdown',\n    url='https://github.com/ranaroussi/yfinance',\n    author='Ran Aroussi',\n    author_email='ran@aroussi.com',\n    license='Apache',\n    classifiers=[\n        'License :: OSI Approved :: Apache Software License',\n        # 'Development Status :: 3 - Alpha',\n        'Development Status :: 4 - Beta',\n        # 'Development Status :: 5 - Production/Stable',\n\n\n        'Operating System :: OS Independent',\n        'Intended Audience :: Developers',\n        'Topic :: Office/Business :: Financial',\n        'Topic :: Office/Business :: Financial :: Investment',\n        'Topic :: Scientific/Engineering :: Interface Engine/Protocol Translator',\n        'Topic :: Software Development :: Libraries',\n        'Topic :: Software Development :: Libraries :: Python Modules',\n\n        'Programming Language :: Python :: 3.6',\n        'Programming Language :: Python :: 3.7',\n        'Programming Language :: Python :: 3.8',\n        'Programming Language :: Python :: 3.9',\n        'Programming Language :: Python :: 3.10',\n    ],\n    platforms=['any'],\n    keywords='pandas, yahoo finance, pandas datareader',\n    packages=find_packages(exclude=['contrib', 'docs', 'tests', 'examples']),\n    install_requires=['pandas>=1.3.0', 'numpy>=1.16.5',\n                      'requests>=2.31', 'multitasking>=0.0.7',\n                      'lxml>=4.9.1', 'appdirs>=1.4.4', 'pytz>=2022.5',\n                      'frozendict>=2.3.4', 'peewee>=3.16.2',\n                      'beautifulsoup4>=4.11.1', 'html5lib>=1.1'],\n    extras_require={\n        'nospam': ['requests_cache>=1.1.1', 'requests_ratelimiter>=0.4.2'],\n        'repair': ['scipy>=1.6.3'],\n    },\n    # Note: Pandas.read_html() needs html5lib & beautifulsoup4\n    entry_points={\n        'console_scripts': [\n            'sample=sample:main',\n        ],\n    },\n)\n\nprint(\"\"\"\nNOTE: yfinance is not affiliated, endorsed, or vetted by Yahoo, Inc.\n\nYou should refer to Yahoo!'s terms of use for details on your rights\nto use the actual data downloaded.\"\"\")\n", "path": "setup.py"}], "after_files": [{"content": "#!/usr/bin/env python\n# -*- coding: UTF-8 -*-\n#\n# yfinance - market data downloader\n# https://github.com/ranaroussi/yfinance\n\n\"\"\"yfinance - market data downloader\"\"\"\n\nfrom setuptools import setup, find_packages\n# from codecs import open\nimport io\nfrom os import path\n\n# --- get version ---\nversion = \"unknown\"\nwith open(\"yfinance/version.py\") as f:\n    line = f.read().strip()\n    version = line.replace(\"version = \", \"\").replace('\"', '')\n# --- /get version ---\n\n\nhere = path.abspath(path.dirname(__file__))\n\n# Get the long description from the README file\nwith io.open(path.join(here, 'README.md'), encoding='utf-8') as f:\n    long_description = f.read()\n\nsetup(\n    name='yfinance',\n    version=version,\n    description='Download market data from Yahoo! Finance API',\n    long_description=long_description,\n    long_description_content_type='text/markdown',\n    url='https://github.com/ranaroussi/yfinance',\n    author='Ran Aroussi',\n    author_email='ran@aroussi.com',\n    license='Apache',\n    classifiers=[\n        'License :: OSI Approved :: Apache Software License',\n        # 'Development Status :: 3 - Alpha',\n        'Development Status :: 4 - Beta',\n        # 'Development Status :: 5 - Production/Stable',\n\n\n        'Operating System :: OS Independent',\n        'Intended Audience :: Developers',\n        'Topic :: Office/Business :: Financial',\n        'Topic :: Office/Business :: Financial :: Investment',\n        'Topic :: Scientific/Engineering :: Interface Engine/Protocol Translator',\n        'Topic :: Software Development :: Libraries',\n        'Topic :: Software Development :: Libraries :: Python Modules',\n\n        'Programming Language :: Python :: 3.6',\n        'Programming Language :: Python :: 3.7',\n        'Programming Language :: Python :: 3.8',\n        'Programming Language :: Python :: 3.9',\n        'Programming Language :: Python :: 3.10',\n    ],\n    platforms=['any'],\n    keywords='pandas, yahoo finance, pandas datareader',\n    packages=find_packages(exclude=['contrib', 'docs', 'tests', 'examples']),\n    install_requires=['pandas>=1.3.0', 'numpy>=1.16.5',\n                      'requests>=2.31', 'multitasking>=0.0.7',\n                      'lxml>=4.9.1', 'appdirs>=1.4.4', 'pytz>=2022.5',\n                      'frozendict>=2.3.4', 'peewee>=3.16.2',\n                      'beautifulsoup4>=4.11.1', 'html5lib>=1.1'],\n    extras_require={\n        'nospam': ['requests_cache>=1.0', 'requests_ratelimiter>=0.3.1'],\n        'repair': ['scipy>=1.6.3'],\n    },\n    # Note: Pandas.read_html() needs html5lib & beautifulsoup4\n    entry_points={\n        'console_scripts': [\n            'sample=sample:main',\n        ],\n    },\n)\n\nprint(\"\"\"\nNOTE: yfinance is not affiliated, endorsed, or vetted by Yahoo, Inc.\n\nYou should refer to Yahoo!'s terms of use for details on your rights\nto use the actual data downloaded.\"\"\")\n", "path": "setup.py"}]}