From 9f9f2d8fd428fb72eda4801d6108f7f53fb0b214 Mon Sep 17 00:00:00 2001 From: kclowes Date: Wed, 22 Mar 2023 12:24:48 -0600 Subject: [PATCH] Update docs with the details of multiple HTTPProviders --- docs/providers.rst | 7 ++++--- newsfragments/2889.doc.rst | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) create mode 100644 newsfragments/2889.doc.rst diff --git a/docs/providers.rst b/docs/providers.rst index e5ec5e0c03..cfabe3447b 100644 --- a/docs/providers.rst +++ b/docs/providers.rst @@ -124,9 +124,10 @@ HTTPProvider >>> from web3 import Web3 >>> w3 = Web3(Web3.HTTPProvider("http://127.0.0.1:8545")) - Note that you should create only one HTTPProvider per python - process, as the HTTPProvider recycles underlying TCP/IP network connections, - for better performance. + Note that you should create only one HTTPProvider with the same provider URL + per python process, as the HTTPProvider recycles underlying TCP/IP + network connections, for better performance. Multiple HTTPProviders with different + URLs will work as expected. Under the hood, the ``HTTPProvider`` uses the python requests library for making requests. If you would like to modify how requests are made, you can diff --git a/newsfragments/2889.doc.rst b/newsfragments/2889.doc.rst new file mode 100644 index 0000000000..eb564fd2bd --- /dev/null +++ b/newsfragments/2889.doc.rst @@ -0,0 +1 @@ +Add doc blurb about multiple HTTPProviders with the same URL