|
21 | 21 | from . import version
|
22 | 22 | from . import endpoints
|
23 | 23 |
|
24 |
| -# Trying to support Python 2.7: |
25 |
| -if sys.version_info.major < 3: |
26 |
| - reload(sys) |
27 |
| - sys.setdefaultencoding("utf8") |
28 |
| - |
29 | 24 | __version__ = version.VERSION
|
30 | 25 | """Installed version of MLB-StatsAPI"""
|
31 | 26 |
|
|
39 | 34 | # Python 2 Support Warning
|
40 | 35 | if sys.version_info.major < 3:
|
41 | 36 | logger.warning(
|
42 |
| - "WARNING: Support for Python 2 will be discontinued on or after " |
43 |
| - "January 1, 2021. The MLB-StatsAPI module may continue to function, but " |
| 37 | + "WARNING: Support for Python 2 has been discontinued. " |
| 38 | + "The MLB-StatsAPI module may continue to function, but " |
44 | 39 | "issues not impacting Python 3 will be closed and support will not be provided."
|
45 | 40 | )
|
46 | 41 |
|
@@ -1375,7 +1370,7 @@ def standings_data(
|
1375 | 1370 | params.update(
|
1376 | 1371 | {
|
1377 | 1372 | "hydrate": "team(division)",
|
1378 |
| - "fields": "records,standingsType,teamRecords,team,name,division,id,nameShort,abbreviation,divisionRank,gamesBack,wildCardRank,wildCardGamesBack,wildCardEliminationNumber,divisionGamesBack,clinched,eliminationNumber,winningPercentage,type,wins,losses", |
| 1373 | + "fields": "records,standingsType,teamRecords,team,name,division,id,nameShort,abbreviation,divisionRank,gamesBack,wildCardRank,wildCardGamesBack,wildCardEliminationNumber,divisionGamesBack,clinched,eliminationNumber,winningPercentage,type,wins,losses,leagueRank,sportRank", |
1379 | 1374 | }
|
1380 | 1375 | )
|
1381 | 1376 |
|
@@ -1411,6 +1406,8 @@ def standings_data(
|
1411 | 1406 | "wc_elim_num": x.get("wildCardEliminationNumber", "-"),
|
1412 | 1407 | "elim_num": x["eliminationNumber"],
|
1413 | 1408 | "team_id": x["team"]["id"],
|
| 1409 | + "league_rank": x["leagueRank"], |
| 1410 | + "sport_rank": x["sportRank"], |
1414 | 1411 | }
|
1415 | 1412 | divisions[x["team"]["division"]["id"]]["teams"].append(team)
|
1416 | 1413 |
|
|
0 commit comments