Skip to content

Commit ca994ab

Browse files
Merge pull request #571 from DanielGoldfarb/master
Fix a few deprecation warnings
2 parents 120ded9 + 162fa89 commit ca994ab

File tree

5 files changed

+13
-6
lines changed

5 files changed

+13
-6
lines changed

src/mplfinance/_kwarg_help.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ def kwarg_help( func_name=None, kwarg_names=None, sort=False ):
139139
dfd.columns = df.columns
140140
dfd.index = pd.Index(['---'])
141141

142-
df = dfd.append(df)
142+
df = pd.concat([dfd,df])
143143

144144
formatters = { 'Kwarg' : make_left_formatter( klen ),
145145
'Default' : make_left_formatter( dlen ),

src/mplfinance/_styles.py

+8-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,14 @@ def _apply_mpfstyle(style):
2020

2121
plt.style.use('default')
2222

23-
if style['base_mpl_style'] is not None:
23+
if style['base_mpl_style'] == 'seaborn-darkgrid':
24+
# deal with deprecation of old seaborn-darkgrid:
25+
try:
26+
plt.style.use('seaborn-v0_8-darkgrid')
27+
style['base_mpl_style'] = 'seaborn-v0_8-darkgrid'
28+
except:
29+
plt.style.use(style['base_mpl_style'])
30+
elif style['base_mpl_style'] is not None:
2431
plt.style.use(style['base_mpl_style'])
2532

2633
if style['rc'] is not None:

src/mplfinance/_utils.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -936,7 +936,7 @@ def _construct_renko_collections(dates, highs, lows, volumes, config_renko_param
936936

937937

938938
def _construct_pointnfig_collections(dates, highs, lows, volumes, config_pointnfig_params, closes, marketcolors=None):
939-
"""Represent the price change with Xs and Os
939+
r"""Represent the price change with Xs and Os
940940
941941
NOTE: this code assumes if any value open, low, high, close is
942942
missing they all are missing

src/mplfinance/_version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version_info = (0, 12, 9, 'beta', 5)
1+
version_info = (0, 12, 9, 'beta', 6)
22

33
_specifier_ = {'alpha': 'a','beta': 'b','candidate': 'rc','final': ''}
44

tests/test_addplot.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def percentB_aboveone(percentB,price):
7070
import numpy as np
7171
signal = []
7272
previous = 2
73-
for date,value in percentB.iteritems():
73+
for date,value in percentB.items():
7474
if value > 1 and previous <= 1:
7575
signal.append(price[date]*1.01)
7676
else:
@@ -82,7 +82,7 @@ def percentB_belowzero(percentB,price):
8282
import numpy as np
8383
signal = []
8484
previous = -1.0
85-
for date,value in percentB.iteritems():
85+
for date,value in percentB.items():
8686
if value < 0 and previous >= 0:
8787
signal.append(price[date]*0.99)
8888
else:

0 commit comments

Comments
 (0)