Skip to content

Commit 48aa02a

Browse files
authored
Merge branch 'main' into pickleable-exceptions
2 parents 345b5c6 + e34803f commit 48aa02a

12 files changed

+908
-841
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 0 additions & 62 deletions
This file was deleted.

.github/workflows/codesee-arch-diagram.yml

Lines changed: 0 additions & 20 deletions
This file was deleted.

.github/workflows/python.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@ jobs:
1919
- macos-latest
2020
- ubuntu-latest
2121
- windows-latest
22-
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
22+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
2323

2424
steps:
25-
- uses: actions/checkout@v4.1.0
25+
- uses: actions/checkout@v4.2.2
2626
- name: Install poetry
2727
run: pipx install poetry
2828
- name: Set up Python ${{ matrix.python-version }}
29-
uses: actions/setup-python@v4
29+
uses: actions/setup-python@v5
3030
with:
3131
python-version: ${{ matrix.python-version }}
3232
cache: 'poetry'

.github/workflows/stale-issues.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
issues: write
1111
pull-requests: write
1212
steps:
13-
- uses: actions/stale@v8
13+
- uses: actions/stale@v9
1414
with:
1515
days-before-issue-stale: 90
1616
days-before-issue-close: 30

.pre-commit-config.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,34 +2,34 @@
22
# See https://pre-commit.com/hooks.html for more hooks
33
repos:
44
- repo: https://github.com/pre-commit/pre-commit-hooks
5-
rev: v4.4.0
5+
rev: v5.0.0
66
hooks:
77
- id: check-yaml
88
- id: check-added-large-files
99
- repo: https://github.com/editorconfig-checker/editorconfig-checker.python
10-
rev: '2.7.2'
10+
rev: '3.2.0'
1111
hooks:
1212
- id: editorconfig-checker
1313
alias: ec
1414
- repo: https://github.com/pycqa/flake8
15-
rev: '6.1.0'
15+
rev: '7.1.1'
1616
hooks:
1717
- id: flake8
1818
- repo: https://github.com/pycqa/isort
19-
rev: 5.12.0
19+
rev: 6.0.0
2020
hooks:
2121
- id: isort
2222
name: isort (python)
2323
- repo: https://github.com/psf/black
24-
rev: 23.9.1
24+
rev: 25.1.0
2525
hooks:
2626
- id: black
2727
- repo: https://github.com/asottile/pyupgrade
28-
rev: v3.13.0
28+
rev: v3.19.1
2929
hooks:
3030
- id: pyupgrade
3131
args: [--py37-plus]
3232
- repo: https://github.com/jendrikseipp/vulture
33-
rev: 'v2.9.1'
33+
rev: 'v2.14'
3434
hooks:
3535
- id: vulture

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,22 @@ This document records all notable changes to
44
[pytest-socket](https://pypi.python.org/pypi/pytest-socket). This
55
project attempts to adhere to [Semantic Versioning](http://semver.org/).
66

7+
## [0.7.0][] (2024-01-28)
8+
9+
Enhancements:
10+
11+
- Force enable socket CLI flag #186
12+
- Use `getaddrinfo()` instead of `gethostbyname()` #209
13+
- Allow both Hosts via IP and Name #275
14+
15+
Changes:
16+
17+
- **Removed support for Python 3.7 and older.**
18+
- Dependency updates
19+
- Development updates
20+
- Testing updates
21+
- Emit license and readme for source distribution #233
22+
723
## [0.6.0][] (2023-02-03)
824

925
Enhancements:
@@ -131,3 +147,4 @@ Maintenance release.
131147
[0.5.0]: https://github.com/miketheman/pytest-socket/compare/0.4.1...0.5.0
132148
[0.5.1]: https://github.com/miketheman/pytest-socket/compare/0.5.0...0.5.1
133149
[0.6.0]: https://github.com/miketheman/pytest-socket/compare/0.5.1...0.6.0
150+
[0.7.0]: https://github.com/miketheman/pytest-socket/compare/0.6.0...0.7.0

README.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@ tests to ensure network calls are prevented.
1919

2020
## Requirements
2121

22-
- [Pytest](https://github.com/pytest-dev/pytest) 3.6.3 or greater
22+
- [Pytest](https://github.com/pytest-dev/pytest) 7.0 or greater
2323

2424
## Installation
2525

2626
You can install `pytest-socket` via [pip](https://pypi.python.org/pypi/pip/)
2727
from [PyPI](https://pypi.python.org/pypi):
2828

2929
```console
30-
$ pip install pytest-socket
30+
pip install pytest-socket
3131
```
3232

3333
or add to your `pyproject.toml` for [poetry](https://python-poetry.org/):
@@ -43,21 +43,21 @@ Run `pytest --disable-socket`, tests should fail on any access to `socket` or
4343
libraries using socket with a `SocketBlockedError`.
4444

4545
To add this flag as the default behavior, add this section to your
46-
[`pytest.ini`](https://docs.pytest.org/en/6.2.x/customize.html#pytest-ini):
46+
[`pytest.ini`](https://docs.pytest.org/en/stable/reference/customize.html#pytest-ini):
4747

4848
```ini
4949
[pytest]
5050
addopts = --disable-socket
5151
```
5252

53-
or add this to your [`setup.cfg`](https://docs.pytest.org/en/6.2.x/customize.html#setup-cfg):
53+
or add this to your [`setup.cfg`](https://docs.pytest.org/en/stable/reference/customize.html#setup-cfg):
5454

5555
```ini
5656
[tool:pytest]
5757
addopts = --disable-socket
5858
```
5959

60-
or update your [`conftest.py`](https://docs.pytest.org/en/6.2.x/writing_plugins.html#conftest-py-plugins) to include:
60+
or update your [`conftest.py`](https://docs.pytest.org/en/stable/how-to/writing_plugins.html#conftest-py-local-per-directory-plugins) to include:
6161

6262
```python
6363
from pytest_socket import disable_socket
@@ -104,7 +104,6 @@ or for whole test run
104104
addopts = --allow-hosts=127.0.0.1,127.0.1.1
105105
```
106106

107-
108107
### Frequently Asked Questions
109108

110109
Q: Why is network access disabled in some of my tests but not others?
@@ -150,3 +149,6 @@ This plugin came about due to the efforts by
150149
[\@hangtwenty](https://github.com/hangtwenty) solving a [StackOverflow
151150
question](https://stackoverflow.com/a/30064664), then converted into a
152151
pytest plugin by [\@miketheman](https://github.com/miketheman).
152+
153+
## Star History
154+
[![Star History Chart](https://api.star-history.com/svg?repos=miketheman/pytest-socket)](https://star-history.com/#miketheman/pytest-socket&Date)

0 commit comments

Comments
 (0)