Repository: ethereum/web3.py

Issue:
DeprecationWarning
* Version: 5.0.0b2
* Python: 3.6
* OS: linux
* `pip freeze` output:
```
alabaster==0.7.12
apipkg==1.5
appdirs==1.4.3
argh==0.26.2
asn1crypto==0.24.0
atomicwrites==1.3.0
attrdict==2.0.1
attrs==19.1.0
Babel==2.6.0
backcall==0.1.0
base58==1.0.3
black==18.9b0
bleach==3.1.0
bumpversion==0.5.3
certifi==2019.3.9
cffi==1.12.3
chardet==3.0.4
Click==7.0
colorama==0.4.1
cryptography==2.6.1
cytoolz==0.9.0.1
decorator==4.4.0
docopt==0.6.2
docutils==0.14
eth-abi==2.0.0b9
eth-account==0.4.0
eth-bloom==1.0.3
eth-hash==0.2.0
eth-keyfile==0.5.1
eth-keys==0.2.2
eth-rlp==0.1.2
eth-tester==0.1.0b39
eth-typing==2.1.0
eth-utils==1.6.0
ethpm==0.1.4a16
execnet==1.6.0
flake8==3.4.1
hexbytes==0.1.0
hypothesis==4.23.6
# Editable Git install with no remote (hypothesis-ethereum==0.0.1a3)
# (This is what I'm testing!)
-e /home/bryant/Dropbox/work/Ethereum/hypothesis-ethereum
idna==2.8
imagesize==1.1.0
ipfshttpclient==0.4.12
ipython==7.5.0
ipython-genutils==0.2.0
isort==4.3.20
jedi==0.13.3
Jinja2==2.10.1
jsonschema==2.6.0
lru-dict==1.1.6
MarkupSafe==1.1.1
mccabe==0.6.1
more-itertools==7.0.0
multiaddr==0.0.7
mypy==0.590
mypy-extensions==0.4.1
netaddr==0.7.19
packaging==19.0
parsimonious==0.8.1
parso==0.4.0
pathtools==0.1.2
pexpect==4.7.0
pickleshare==0.7.5
pkginfo==1.5.0.1
pluggy==0.11.0
prompt-toolkit==2.0.9
protobuf==3.7.1
ptyprocess==0.6.0
py==1.8.0
py-ecc==1.6.0
py-evm==0.2.0a42
py-geth==2.1.0
pycodestyle==2.3.1
pycparser==2.19
pycryptodome==3.8.1
pyethash==0.1.27
pyflakes==1.5.0
Pygments==2.4.0
pyparsing==2.4.0
pytest==4.5.0
pytest-ethereum==0.1.3a6
pytest-forked==1.0.2
pytest-watch==4.2.0
pytest-xdist==1.28.0
pytz==2019.1
PyYAML==5.1
readme-renderer==24.0
requests==2.22.0
requests-toolbelt==0.9.1
rlp==1.1.0
semantic-version==2.6.0
six==1.12.0
snowballstemmer==1.2.1
Sphinx==1.8.5
sphinx-rtd-theme==0.4.3
sphinxcontrib-websupport==1.1.2
toml==0.10.0
toolz==0.9.0
tox==2.9.1
tqdm==4.32.1
traitlets==4.3.2
trie==1.4.0
twine==1.13.0
typed-ast==1.1.2
urllib3==1.25.2
varint==1.0.2
virtualenv==16.6.0
vyper==0.1.0b9
watchdog==0.9.0
wcwidth==0.1.7
web3==5.0.0b2
webencodings==0.5.1
websockets==7.0
```


### What was wrong?

Please include any of the following that are applicable:

* The code which produced the error:
I'm testing my library https://github.com/fubuloubu/hypothesis-ethereum
* The full output of the error:
I get the following in my warnings when running pytest
```
/home/bryant/.pyenv/versions/3.6.7/envs/hypothesis-ethereum/lib/python3.6/site-packages/eth_utils/applicators.py:32
/home/bryant/.pyenv/versions/3.6.7/envs/hypothesis-ethereum/lib/python3.6/site-packages/eth_utils/applicators.py:32
  /home/bryant/.pyenv/versions/3.6.7/envs/hypothesis-ethereum/lib/python3.6/site-packages/eth_utils/applicators.py:32: DeprecationWarning: combine_argument_formatters(formatter1, formatter2)([item1, item2])has been deprecated and will be removed in a subsequent major version release of the eth-utils library. Update your calls to use apply_formatters_to_sequence([formatter1, formatter2], [item1, item2]) instead.
    "combine_argument_formatters(formatter1, formatter2)([item1, item2])"
```


### How can it be fixed?
I'm _pretty_ sure the issue is here:
https://github.com/ethereum/web3.py/blob/master/web3/middleware/pythonic.py

This needs to be updated to use the newer function



Discussion:

Resolving patch:
diff --git a/web3/middleware/pythonic.py b/web3/middleware/pythonic.py
--- a/web3/middleware/pythonic.py
+++ b/web3/middleware/pythonic.py
@@ -2,7 +2,7 @@
 import operator
 
 from eth_utils.curried import (
-    combine_argument_formatters,
+    apply_formatters_to_sequence,
     is_address,
     is_bytes,
     is_integer,
@@ -273,10 +273,10 @@ def to_hexbytes(num_bytes, val, variable_length=False):
 )
 
 estimate_gas_without_block_id = apply_formatter_at_index(transaction_param_formatter, 0)
-estimate_gas_with_block_id = combine_argument_formatters(
+estimate_gas_with_block_id = apply_formatters_to_sequence([
     transaction_param_formatter,
     block_number_formatter,
-)
+])
 
 
 pythonic_middleware = construct_formatting_middleware(
@@ -304,10 +304,10 @@ def to_hexbytes(num_bytes, val, variable_length=False):
         'eth_getUncleByBlockHashAndIndex': apply_formatter_at_index(integer_to_hex, 1),
         'eth_newFilter': apply_formatter_at_index(filter_params_formatter, 0),
         'eth_getLogs': apply_formatter_at_index(filter_params_formatter, 0),
-        'eth_call': combine_argument_formatters(
+        'eth_call': apply_formatters_to_sequence([
             transaction_param_formatter,
             block_number_formatter,
-        ),
+        ]),
         'eth_estimateGas': apply_one_of_formatters((
             (estimate_gas_without_block_id, is_length(1)),
             (estimate_gas_with_block_id, is_length(2)),


Test patch: