-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Config #2216
base: dev
Are you sure you want to change the base?
Config #2216
Conversation
@ValueRaider what do you think? Happy to move |
@ValueRaider What do you think? |
I haven't had time to try and review yet. |
Remove stuff to simplify
User should not be informed on internal deprecations that aren't their fault. Best solution probably is: if
Set What happens if user changes session with Reduce |
Unless it is near the next release cycle, it is normally pretty obvious, plus it can always be changed - like I'm going to have to do now. I think this should stay as (1) more information never hurt - even if just for devs and (2) it lets the user know when it was deprecated, so if they really wanted to or needed to could revert back to that until they change it. However i will remove it if needed.
I think this should probably stay as it tells them exactly when to change by.
I don't believe it is however think it should stay for future use.
Yes, I agree. I marked the "getters" with deprecate as they weren't the common "private attributes"
That shouldn't raise a
Not possible for
In my initial testing of it, it seemed to work. However it doesn't seem to set it if its called after. Will have to fix. Any ideas how to? I will change the default of timeout |
OK keep
Without a current use case it isn't immediately obvious what it does. I figured it out and saw a bug, it's broken. Also the variable name could be more specific.
You need to inform users of the replacement in that deprecation message. That's my point. Move Run the unit tests to check for bugs. You might need to rebase to latest |
@ValueRaider I have made changes to the branch having already rebased and it now wont let me push due to:
But there isn't any upstream changes etc. Any ideas? |
Immediately after the rebase (done on your local system), do a force push to your fork #1084 |
@ValueRaider How is this? |
How are you testing this? |
@ValueRaider sorry for the late reply. I updated the tests and have been running them |
Do you use this branch as your daily driver? Bug:
Then with
|
No
Fixed
They were debug prints I forgot to remove. Removed now. |
Would highly suggest you to use and test your own branch. Bug:import yfinance as yf
yf.Ticker("AAPL").history() C:\Users\dhruv\yfinance\yfinance\base.py:86: DeprecationWarning: `proxy` is deprecated. Please set it using `yf.set_config`
Deprecated since version 0.2.53
`timeout` is deprecated. Please set it using `yf.set_config`
Deprecated since version 0.2.53
self._price_history = PriceHistory(self._data, self.ticker, self._get_ticker_tz(self.proxy, timeout=10))
$AAPL: possibly delisted; no price data found (period=1mo)
Empty DataFrame
Columns: [Open, High, Low, Close, Adj Close, Volume]
Index: [] |
I do test them, just not thoroughly enough obviously
Weird, it seems like |
I think you need to search the whole codebase and remove every occurrence of passing proxy, session, etc. down to |
I did initially, but @ValueRaider told me to deprecate them instead. |
Would removing the deprecated wrapper from
My philosophy is similar to Pandas - warn users of breaking changes early, gives them time to adjust their codes. No one wants their algo-trading to suddenly break. |
Yes, I after you mentioned it, I agree with this. You should not just remove anything
Problem is, functions like |
This was just me being lazy back when I moved the fetch logic into |
I thought I had mentioned this before and you said no. Anyway added now. Also I fixed the bug Any ideas on how to implement the custom url? Will probably just have it as a class attribute to |
Supersedes #2209 with better implementation.
Changes:
proxy
,session
andtimeout
in functionsyf.set_config
proxy
session
timout
url
language
region
yf.set_config