Skip to content

Commit

Permalink
Fixed typo in docs/web3.eth.rst (ethereum#2613)
Browse files Browse the repository at this point in the history
* Fixed typo in docs/web3.eth.rst

* Add newsfragment

Co-authored-by: kclowes <[email protected]>
  • Loading branch information
2 people authored and ofek committed Aug 21, 2022
1 parent b1fe3d5 commit 440fca1
Show file tree
Hide file tree
Showing 12 changed files with 165 additions and 162 deletions.
10 changes: 5 additions & 5 deletions .bumpversion.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@ current_version = 6.0.0-beta.4
commit = True
tag = True
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(-(?P<stage>[^.]*)\.(?P<devnum>\d+))?
serialize =
serialize =
{major}.{minor}.{patch}-{stage}.{devnum}
{major}.{minor}.{patch}

[bumpversion:part:stage]
optional_value = stable
first_value = stable
values =
values =
alpha
beta
stable

[bumpversion:part:devnum]

[bumpversion:file:setup.py]
search = version='{current_version}',
replace = version='{new_version}',
[bumpversion:file:web3/__init__.py]
search = __version__ = "{current_version}"
replace = __version__ = "{new_version}"
24 changes: 12 additions & 12 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ common: &common
- checkout
- restore_cache:
keys:
- cache-{{ .Environment.CIRCLE_JOB }}-{{ checksum "setup.py" }}-{{ checksum "tox.ini" }}
- cache-{{ .Environment.CIRCLE_JOB }}-{{ checksum "pyproject.toml" }}-{{ checksum "tox.ini" }}
- run:
name: checkout ethpm-spec submodule
command: git submodule update --init --recursive
Expand All @@ -26,7 +26,7 @@ common: &common
- ./eggs
- ~/.ethash
- ~/.py-geth
key: cache-{{ .Environment.CIRCLE_JOB }}-{{ checksum "setup.py" }}-{{ checksum "tox.ini" }}
key: cache-{{ .Environment.CIRCLE_JOB }}-{{ checksum "pyproject.toml" }}-{{ checksum "tox.ini" }}
resource_class: xlarge

docs_steps: &docs_steps
Expand All @@ -35,7 +35,7 @@ docs_steps: &docs_steps
- checkout
- restore_cache:
keys:
- cache-docs-{{ .Environment.CIRCLE_JOB }}-{{ checksum "setup.py" }}-{{ checksum "tox.ini" }}
- cache-docs-{{ .Environment.CIRCLE_JOB }}-{{ checksum "pyproject.toml" }}-{{ checksum "tox.ini" }}
- run:
name: checkout ethpm-spec submodule
command: git submodule update --init --recursive
Expand All @@ -56,7 +56,7 @@ docs_steps: &docs_steps
- ./eggs
- ~/.ethash
- ~/.py-geth
key: cache-docs-{{ .Environment.CIRCLE_JOB }}-{{ checksum "setup.py" }}-{{ checksum "tox.ini" }}
key: cache-docs-{{ .Environment.CIRCLE_JOB }}-{{ checksum "pyproject.toml" }}-{{ checksum "tox.ini" }}
resource_class: xlarge

geth_steps: &geth_steps
Expand All @@ -66,7 +66,7 @@ geth_steps: &geth_steps
- checkout
- restore_cache:
keys:
- cache-{{ .Environment.CIRCLE_JOB }}-{{ checksum "setup.py" }}-{{ checksum "tox.ini" }}
- cache-{{ .Environment.CIRCLE_JOB }}-{{ checksum "pyproject.toml" }}-{{ checksum "tox.ini" }}
- run:
name: install dependencies
command: pip install --user tox
Expand Down Expand Up @@ -102,15 +102,15 @@ geth_steps: &geth_steps
- ./eggs
- ~/.ethash
- ~/.py-geth
key: cache-{{ .Environment.CIRCLE_JOB }}-{{ checksum "setup.py" }}-{{ checksum "tox.ini" }}
key: cache-{{ .Environment.CIRCLE_JOB }}-{{ checksum "pyproject.toml" }}-{{ checksum "tox.ini" }}

geth_custom_steps: &geth_custom_steps
working_directory: ~/repo
steps:
- checkout
- restore_cache:
keys:
- cache-{{ .Environment.CIRCLE_JOB }}-{{ checksum "setup.py" }}-{{ checksum "tox.ini" }}
- cache-{{ .Environment.CIRCLE_JOB }}-{{ checksum "pyproject.toml" }}-{{ checksum "tox.ini" }}
- run:
name: install dependencies
command: pip install --user tox
Expand Down Expand Up @@ -141,7 +141,7 @@ geth_custom_steps: &geth_custom_steps
- ~/.local
- ./eggs
- ~/.ethash
key: cache-{{ .Environment.CIRCLE_JOB }}-{{ checksum "setup.py" }}-{{ checksum "tox.ini" }}
key: cache-{{ .Environment.CIRCLE_JOB }}-{{ checksum "pyproject.toml" }}-{{ checksum "tox.ini" }}

ethpm_steps: &ethpm_steps
working_directory: ~/repo
Expand All @@ -150,7 +150,7 @@ ethpm_steps: &ethpm_steps
- checkout
- restore_cache:
keys:
- ethpm-cache-{{ .Environment.CIRCLE_JOB }}-{{ checksum "setup.py" }}-{{ checksum "tox.ini" }}
- ethpm-cache-{{ .Environment.CIRCLE_JOB }}-{{ checksum "pyproject.toml" }}-{{ checksum "tox.ini" }}
- run:
name: install ipfs
command:
Expand All @@ -176,7 +176,7 @@ ethpm_steps: &ethpm_steps
- .tox
- ~/.cache/pip
- ~/.local
key: ethpm-cache-{{ .Environment.CIRCLE_JOB }}-{{ checksum "setup.py" }}-{{ checksum "tox.ini" }}
key: ethpm-cache-{{ .Environment.CIRCLE_JOB }}-{{ checksum "pyproject.toml" }}-{{ checksum "tox.ini" }}

orbs:
win: circleci/[email protected]
Expand All @@ -190,7 +190,7 @@ windows_steps: &windows_steps
- checkout
- restore_cache:
keys:
- windows-cache-{{ .Environment.CIRCLE_JOB }}-{{ checksum "setup.py" }}-{{ checksum "tox.ini" }}
- windows-cache-{{ .Environment.CIRCLE_JOB }}-{{ checksum "pyproject.toml" }}-{{ checksum "tox.ini" }}
- run:
name: checkout ethpm-spec submodule
command: git submodule update --init --recursive
Expand All @@ -203,7 +203,7 @@ windows_steps: &windows_steps
- save_cache:
paths:
- .tox
key: windows-cache-{{ .Environment.CIRCLE_JOB }}-{{ checksum "setup.py" }}-{{ checksum "tox.ini" }}
key: windows-cache-{{ .Environment.CIRCLE_JOB }}-{{ checksum "pyproject.toml" }}-{{ checksum "tox.ini" }}


jobs:
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ COPY tests ./tests/
COPY ens ./ens/
COPY ethpm ./ethpm/

COPY setup.py .
COPY pyproject.toml .
COPY README.md .

RUN pip install -e .[dev]
Expand Down
11 changes: 0 additions & 11 deletions MANIFEST.in

This file was deleted.

8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ benchmark:
tox -e benchmark

build-docs:
sphinx-apidoc -o docs/ . setup.py "*conftest*" "tests" "ethpm" "web3/tools/*"
sphinx-apidoc -o docs/ . "*conftest*" "tests" "ethpm" "web3/tools/*"
$(MAKE) -C docs clean
$(MAKE) -C docs html
$(MAKE) -C docs doctest
Expand Down Expand Up @@ -72,14 +72,14 @@ release: clean
git config commit.gpgSign true
bumpversion $(bump)
git push upstream && git push upstream --tags
python setup.py sdist bdist_wheel
python -m build
twine upload dist/*
git config commit.gpgSign "$(CURRENT_SIGN_SETTING)"

dist: clean
python setup.py sdist bdist_wheel
python -m build
ls -l dist

package: clean
python setup.py sdist bdist_wheel
python -m build
python web3/scripts/release/test_package.py
8 changes: 4 additions & 4 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@

import os

DIR = os.path.dirname('__file__')
with open (os.path.join(DIR, '../setup.py'), 'r') as f:
DIR = os.path.dirname(os.path.abspath(__file__))
with open(os.path.join(DIR, '..', 'web3', '__init__.py'), 'r') as f:
for line in f:
if 'version=' in line:
setup_version = line.split('\'')[1]
if line.startswith('__version__'):
setup_version = line.strip().split(' = ')[1].strip('"')
break

# -- General configuration ------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions docs/web3.eth.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1081,7 +1081,7 @@ The following methods are available on the ``web3.eth`` namespace.
>>> myContract.functions.getVar().call()
1
# The above call equivalent to the raw call:
>>> we3.eth.call({'value': 0, 'gas': 21736, 'maxFeePerGas': 2000000000, 'maxPriorityFeePerGas': 1000000000, 'to': '0xc305c901078781C232A2a521C2aF7980f8385ee9', 'data': '0x477a5c98'})
>>> web3.eth.call({'value': 0, 'gas': 21736, 'maxFeePerGas': 2000000000, 'maxPriorityFeePerGas': 1000000000, 'to': '0xc305c901078781C232A2a521C2aF7980f8385ee9', 'data': '0x477a5c98'})
HexBytes('0x0000000000000000000000000000000000000000000000000000000000000001')
In most cases it is better to make contract function call through the :py:class:`web3.contract.Contract` interface.
Expand Down Expand Up @@ -1455,4 +1455,4 @@ Contracts
.. py:method:: Eth.set_contract_factory(contractFactoryClass)
Modify the default contract factory from ``Contract`` to ``contractFactoryClass``.
Future calls to ``Eth.contract()`` will then default to ``contractFactoryClass``.
Future calls to ``Eth.contract()`` will then default to ``contractFactoryClass``.
1 change: 1 addition & 0 deletions newsfragments/2613.doc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix typo in eth.call docs
127 changes: 127 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,130 @@
[build-system]
requires = ["hatchling>=1.8.0"]
build-backend = "hatchling.build"

[project]
name = "web3"
dynamic = ["version"]
description = "Web3.py"
readme = "README.md"
license = "MIT"
requires-python = ">=3.7.2,<3.11"
authors = [
{ name = "Piper Merriam", email = "[email protected]" },
]
keywords = [
"ethereum",
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
]
dependencies = [
"aiohttp>=3.7.4.post0,<4",
"eth-abi>=3.0.0,<4.0.0",
"eth-account>=0.6.0,<0.7.0",
"eth-hash[pycryptodome]>=0.2.0,<1.0.0",
"eth-typing>=3.0.0,<4.0.0",
"eth-utils>=2.0.0,<3.0.0",
"hexbytes>=0.1.0,<1.0.0",
"ipfshttpclient==0.8.0a2",
"jsonschema>=4.0.0,<5",
"lru-dict>=1.1.6,<2.0.0",
"protobuf>=3.10.0,<4",
"pywin32>=223;platform_system=='Windows'",
"requests>=2.16.0,<3.0.0",
# remove typing_extensions after python_requires>=3.8, see web3._utils.compat
"typing-extensions>=3.7.4.1,<5;python_version<'3.8'",
"websockets>=10.0.0,<11",
]

[project.optional-dependencies]
dev = [
"bumpversion",
"flaky>=3.7.0,<4",
"hypothesis>=3.31.2,<6",
"pytest>=6.2.5,<7",
"pytest-asyncio>=0.18.1,<0.19",
"pytest-mock>=1.10,<2",
"pytest-pythonpath>=0.3",
"pytest-watch>=4.2,<5",
"pytest-xdist>=1.29,<2",
"setuptools>=38.6.0",
"tox>=1.8.0",
"tqdm>4.32,<5",
"twine>=1.13,<2",
"pluggy==0.13.1",
"when-changed>=0.3.0,<0.4",
# pip now supports self references https://github.com/pypa/pip/issues/11296
"web3[docs,linter,tester]",
]
docs = [
"click>=5.1",
"configparser==3.5.0",
"contextlib2>=0.5.4",
"mock",
"py-geth>=3.8.0,<4",
"py-solc>=0.4.0",
"pytest>=6.2.5,<7",
"sphinx-better-theme>=0.1.4",
"sphinx>=4.2.0,<5",
"sphinx_rtd_theme>=0.1.9",
"toposort>=1.4",
"towncrier==18.5.0",
"urllib3",
"wheel",
]
linter = [
"black>=22.1.0,<23.0",
"flake8==3.8.3",
"isort>=4.2.15,<4.3.5",
"mypy==0.910",
"types-protobuf==3.19.13",
"types-requests>=2.26.1,<3",
"types-setuptools>=57.4.4,<58",
]
tester = [
"eth-tester[py-evm]==v0.6.0-beta.5",
"py-geth>=3.8.0,<4",
]

[project.entry-points.pytest11]
pytest_ethereum = "web3.tools.pytest_ethereum.plugins"

[project.urls]
Homepage = "https://github.com/ethereum/web3.py"

[tool.hatch.version]
path = "web3/__init__.py"

[tool.hatch.build.targets.sdist]
include = [
"/ens",
"/ethpm",
"/web3",
"/requirements*.txt",
]

[tool.hatch.build.targets.wheel]
include = [
"/ens",
"/ethpm",
"/web3",
]
exclude = [
"/ethpm/ethpm-spec/*",
"/ethpm/ethpm-spec/bin",
"/ethpm/ethpm-spec/docs",
"/ethpm/ethpm-spec/tests",
]

[tool.towncrier]
package="web3"
filename = "docs/releases.rst"
Expand Down
Loading

0 comments on commit 440fca1

Please sign in to comment.