Merge pull request #2540 from ranaroussi/main

sync main -> dev
This commit is contained in:
ValueRaider
2025-06-14 14:29:13 +01:00
committed by GitHub
6 changed files with 31 additions and 14 deletions
+2 -2
View File
@@ -9,7 +9,7 @@ jobs:
ruff:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: chartboost/ruff-action@v1
- uses: actions/checkout@v4
- uses: astral-sh/ruff-action@v3
with:
args: check . --exclude yfinance/pricing_pb2.py
+16
View File
@@ -1,6 +1,22 @@
Change Log
===========
0.2.63
------
Fix download(ISIN) # 2531
0.2.62
------
Fix prices 'period=max' sometimes failing # 2509
ISIN cache #2516
Proxy:
- fix false 'proxy deprecated' messages
- fix ISIN + proxy #2514
- replace print_once with warnings #2523
Error handling:
- detect rate-limit during crumb fetch #2491
- replace requests.HTTPError with curl_cffi
0.2.61
------
Fix ALL type hints in websocket #2493
+1 -1
View File
@@ -1,5 +1,5 @@
{% set name = "yfinance" %}
{% set version = "0.2.61" %}
{% set version = "0.2.63" %}
package:
name: "{{ name|lower }}"
+7 -7
View File
@@ -94,6 +94,12 @@ def download(tickers, start=None, end=None, actions=False, threads=True,
logger = utils.get_yf_logger()
session = session or requests.Session(impersonate="chrome")
# Ensure data initialised with session.
if proxy is not _SENTINEL_:
warnings.warn("Set proxy via new config function: yf.set_config(proxy=proxy)", DeprecationWarning, stacklevel=3)
YfData(proxy=proxy)
YfData(session=session)
if auto_adjust is None:
# Warn users that default has changed to True
warnings.warn("YF.download() has changed argument auto_adjust default to True", FutureWarning, stacklevel=3)
@@ -128,7 +134,7 @@ def download(tickers, start=None, end=None, actions=False, threads=True,
for ticker in tickers:
if utils.is_isin(ticker):
isin = ticker
ticker = utils.get_ticker_by_isin(ticker, session=session)
ticker = utils.get_ticker_by_isin(ticker)
shared._ISINS[ticker] = isin
_tickers_.append(ticker)
@@ -144,12 +150,6 @@ def download(tickers, start=None, end=None, actions=False, threads=True,
shared._ERRORS = {}
shared._TRACEBACKS = {}
# Ensure data initialised with session.
if proxy is not _SENTINEL_:
warnings.warn("Set proxy via new config function: yf.set_config(proxy=proxy)", DeprecationWarning, stacklevel=3)
YfData(proxy=proxy)
YfData(session=session)
# download using threads
if threads:
if threads is True:
+4 -3
View File
@@ -134,13 +134,14 @@ class PriceHistory:
end = utils._parse_user_dt(end, tz)
if start is None:
if interval == "1m":
start = end - 604800 # 7 days
elif interval in ("5m", "15m", "30m", "90m"):
start = end - 691200 # 8 days
elif interval in ("2m", "5m", "15m", "30m", "90m"):
start = end - 5184000 # 60 days
elif interval in ("1h", '60m'):
elif interval in ("1h", "60m"):
start = end - 63072000 # 730 days
else:
start = end - 3122064000 # 99 years
start += 5 # allow for processing time
else:
start = utils._parse_user_dt(start, tz)
params = {"period1": start, "period2": end}
+1 -1
View File
@@ -1 +1 @@
version = "0.2.61"
version = "0.2.63"