Skip to content

Commit

Permalink
Merge 8fc01d9 into 26da898
Browse files Browse the repository at this point in the history
  • Loading branch information
liampauling committed Aug 6, 2018
2 parents 26da898 + 8fc01d9 commit 0d93e56
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 24 deletions.
2 changes: 0 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ python:
- "3.6"

install:
- if [[ $TRAVIS_PYTHON_VERSION == '2.7' ]]; then travis_retry pip install enum34 mock; fi
- pip install -r requirements.txt
- travis_retry python setup.py install
- pip install coveralls

Expand Down
14 changes: 14 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,20 @@
Release History
---------------

1.7.1 (2018-08-06)
+++++++++++++++++++

**Improvements**

- Now working on py3.7!
- setup.py updated to use requirements only.
- py3.7 added to appveyor but pending travis to get their act together.
- Travis and appveyor yml cleanup.

**Bug Fixes**

- async renamed to _async in betting endpoint for py3.7

1.7.0 (2018-07-23)
+++++++++++++++++++

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Lightweight, super fast (uses c libraries) pythonic wrapper for [Betfair API-NG]

[Join slack group](https://betfairlightweight.herokuapp.com)

Currently tested on Python 2.7, 3.4, 3.5 and 3.6.
Currently tested on Python 2.7, 3.4, 3.5, 3.6 and 3.7.

# installation

Expand Down
6 changes: 3 additions & 3 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@ environment:
- PYTHON: "C:\\Python36"
PYTHON_VERSION: "3.6.x"

- PYTHON: "C:\\Python37"
PYTHON_VERSION: "3.7.x"

init:
- "ECHO %PYTHON% %PYTHON_VERSION% %PYTHON_ARCH%"

install:
- "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"
- cmd: if %PYTHON_VERSION% == 2.7.x pip install enum34
- "pip install setuptools==39.2.0"
- "pip install -r requirements.txt"
- "python setup.py install"

test_script:
- "pip install mock"
- "python setup.py test"
2 changes: 1 addition & 1 deletion betfairlightweight/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from . import filters

__title__ = 'betfairlightweight'
__version__ = '1.7.0'
__version__ = '1.7.1'
__author__ = 'Liam Pauling'

# Set default logging handler to avoid "No handler found" warnings.
Expand Down
8 changes: 4 additions & 4 deletions betfairlightweight/endpoints/betting.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ def list_market_profit_and_loss(self, market_ids, include_settled_bets=None, inc
return self.process_response(response, resources.MarketProfitLoss, elapsed_time, lightweight)

def place_orders(self, market_id, instructions, customer_ref=None, market_version=None,
customer_strategy_ref=None, async=None, session=None, lightweight=None):
customer_strategy_ref=None, _async=None, session=None, lightweight=None):
"""
Place new orders into market.
Expand All @@ -286,7 +286,7 @@ def place_orders(self, market_id, instructions, customer_ref=None, market_versio
version of the market the orders should be placed on, e.g. "{'version': 123456}"
:param str customer_strategy_ref: An optional reference customers can use to specify
which strategy has sent the order
:param bool async: An optional flag (not setting equates to false) which specifies if
:param bool _async: An optional flag (not setting equates to false) which specifies if
the orders should be placed asynchronously
:param requests.session session: Requests session object
:param bool lightweight: If True will return dict not a resource
Expand Down Expand Up @@ -336,7 +336,7 @@ def update_orders(self, market_id, instructions, customer_ref=None, session=None
return self.process_response(response, resources.UpdateOrders, elapsed_time, lightweight)

def replace_orders(self, market_id, instructions, customer_ref=None, market_version=None,
async=None, session=None, lightweight=None):
_async=None, session=None, lightweight=None):
"""
This operation is logically a bulk cancel followed by a bulk place.
The cancel is completed first then the new orders are placed.
Expand All @@ -348,7 +348,7 @@ def replace_orders(self, market_id, instructions, customer_ref=None, market_vers
string (up to 32 chars) that is used to de-dupe mistaken re-submissions
:param dict market_version: Optional parameter allowing the client to specify
which version of the market the orders should be placed on, e.g. "{'version': 123456}"
:param str async: An optional flag (not setting equates to false) which specifies
:param bool _async: An optional flag (not setting equates to false) which specifies
if the orders should be replaced asynchronously
:param requests.session session: Requests session object
:param bool lightweight: If True will return dict not a resource
Expand Down
20 changes: 7 additions & 13 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,24 +1,16 @@
import sys
import re
import os

from setuptools import setup


INSTALL_REQUIRES = [
'setuptools==39.2.0',
'requests==2.19.1',
'ciso8601==2.0.1',
'ujson==1.35',
]
TEST_REQUIRES = [
with open(os.path.join(os.path.dirname(__file__), 'requirements.txt')) as f:
INSTALL_REQUIRES = f.read().splitlines()

TESTS_REQUIRE = [
'mock==2.0.0'
]

if sys.version_info < (3, 4):
INSTALL_REQUIRES.extend([
'enum34',
])

with open('betfairlightweight/__init__.py', 'r') as f:
version = re.search(
r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]',
Expand All @@ -39,6 +31,7 @@
'betfairlightweight': 'betfairlightweight'
},
install_requires=INSTALL_REQUIRES,
tests_require=TESTS_REQUIRE,
url='https://github.com/liampauling/betfair',
license='MIT',
author='liampauling',
Expand All @@ -51,6 +44,7 @@
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
],
test_suite='tests'
)

0 comments on commit 0d93e56

Please sign in to comment.