Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove py2 #248

Merged
merged 8 commits into from
Jan 22, 2024
Merged

Remove py2 #248

merged 8 commits into from
Jan 22, 2024

Conversation

jamielennox
Copy link
Owner

Finally get rid of python2. Take the opportunity to do some cleanup on old compatibility things that are no longer necessary.

The type bytes is available on all supported Pythons. On Python 2.7, it
is an alias for str, same as six.binary_type.

Likewise, io.BytesIO is available on all supported Pythons. It is always
a stream implementation using an in-memory bytes buffer.

Byte literals and Unicode literals are available on all supported
Pythons.

Makes the code more forward compatible with Python 3.
@jamielennox jamielennox force-pushed the remove-py2 branch 2 times, most recently from 83e1d30 to 76c2570 Compare January 21, 2024 15:42
@jamielennox
Copy link
Owner Author

cc @a-detiste @jdufresne

Github has dropped support for python2. Remove it from the unittesting
and tox configuration.
Farewell, it's been a good run. Realistically this should have been
removed years ago, but it's causing pain now.

Remove six which handles the majority of the compatibility.
We shouldn't need this any more as we can rely on python3
This minimum version is somewhat arbitrary, however inline with the
python3 changes there's no reason to keep compatibility with these old
versions.

I'm not sure why, but 2.20 has some issues with old python versions.
This seems like a decent minimum.
This was a really old hack around forks in urllib3 in early versions of
requests 2. With newer requests we don't need this any more.
Bundle all the python2 changes into a single release note.
Seems like something is wrong with python 3.12 and older versions of
urllib.
@jamielennox jamielennox merged commit b3f7080 into master Jan 22, 2024
15 checks passed
@jamielennox jamielennox deleted the remove-py2 branch January 22, 2024 15:20
renovate bot added a commit to allenporter/pyrainbird that referenced this pull request Mar 28, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [requests-mock](https://requests-mock.readthedocs.io/)
([source](https://togithub.com/jamielennox/requests-mock)) | `==1.11.0`
-> `==1.12.0` |
[![age](https://developer.mend.io/api/mc/badges/age/pypi/requests-mock/1.12.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/pypi/requests-mock/1.12.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/pypi/requests-mock/1.11.0/1.12.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/pypi/requests-mock/1.11.0/1.12.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>jamielennox/requests-mock (requests-mock)</summary>

###
[`v1.12.0`](https://togithub.com/jamielennox/requests-mock/releases/tag/1.12.0)

[Compare
Source](https://togithub.com/jamielennox/requests-mock/compare/1.11.0...1.12.0)

#### What's Changed

- Update copyright year by
[@&#8203;KrishanBhasin](https://togithub.com/KrishanBhasin) in
[jamielennox/requests-mock#239
- Remove py2 by [@&#8203;jamielennox](https://togithub.com/jamielennox)
in
[jamielennox/requests-mock#248
- Allow `raw` parameter to accept callable like body elements by
[@&#8203;jamielennox](https://togithub.com/jamielennox) in
[jamielennox/requests-mock#249
- Improve type definition of `Mocker.__call__` by
[@&#8203;Viicos](https://togithub.com/Viicos) in
[jamielennox/requests-mock#244
- Drop PBR Support by
[@&#8203;jamielennox](https://togithub.com/jamielennox) in
[jamielennox/requests-mock#250
- fix(mocker.pyi): fix Mocker class type hints by
[@&#8203;pavellos21](https://togithub.com/pavellos21) in
[jamielennox/requests-mock#251
- Remove unused `six` dependency by
[@&#8203;Viicos](https://togithub.com/Viicos) in
[jamielennox/requests-mock#252

#### New Contributors

- [@&#8203;KrishanBhasin](https://togithub.com/KrishanBhasin) made their
first contribution in
[jamielennox/requests-mock#239
- [@&#8203;Viicos](https://togithub.com/Viicos) made their first
contribution in
[jamielennox/requests-mock#244
- [@&#8203;pavellos21](https://togithub.com/pavellos21) made their first
contribution in
[jamielennox/requests-mock#251

**Full Changelog**:
jamielennox/requests-mock@1.11.0...1.12.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/allenporter/pyrainbird).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yNjkuMiIsInVwZGF0ZWRJblZlciI6IjM3LjI2OS4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants