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

Bytes constructor test change compatible with PR #2380 #2390

Merged

Conversation

rwgk
Copy link
Collaborator

@rwgk rwgk commented Aug 13, 2020

Hi Yannick, note the 3 commits: 1. rollback, 2. cherry-pick, 3. tests based on the cherry-pick.
I think this is best pulled with "Rebase and merge".

Ralf W. Grosse-Kunstleve added 3 commits August 12, 2020 17:01
…s one file).

The two other files changed with PR pybind#2340 are not affected by this partial rollback.

This partial rollback enables cherry-picking a commit from PR pybind#2380.
Preparation for changing `pybind11::str` to only hold `PyUnicodeObject` (NOT also `bytes`).

Currently test_constructors passes with Python 2 only because `pybind11::str` can also hold a Python 2 `PyStringObject` (or the equivalent `PyBytesObject` in Python 3). Changing the test to exercise conversions for `PyUnicodeObject` makes it consistent between Python 2 and 3, and removes this small obstacle to the planned `pybind11::str` change.

Tests for `bytes` conversions will be added separately.
@YannickJadoul YannickJadoul merged commit 3c0f566 into pybind:str-bytes-cleanup Aug 13, 2020
rwgk pushed a commit that referenced this pull request Aug 14, 2020
* Rolling back PR #2340 change to tests/test_pytypes.py (only this one file).

The two other files changed with PR #2340 are not affected by this partial rollback.

This partial rollback enables cherry-picking a commit from PR #2380.

* test_constructors() fix for Python 2.

Preparation for changing `pybind11::str` to only hold `PyUnicodeObject` (NOT also `bytes`).

Currently test_constructors passes with Python 2 only because `pybind11::str` can also hold a Python 2 `PyStringObject` (or the equivalent `PyBytesObject` in Python 3). Changing the test to exercise conversions for `PyUnicodeObject` makes it consistent between Python 2 and 3, and removes this small obstacle to the planned `pybind11::str` change.

Tests for `bytes` conversions will be added separately.

* Adding test_constructors test for bytes, on top of cherry-picked commit from PR #2380.
@rwgk rwgk deleted the bytes_constructor_test_change branch August 14, 2020 22:02
rwgk pushed a commit that referenced this pull request Aug 14, 2020
* Rolling back PR #2340 change to tests/test_pytypes.py (only this one file).

The two other files changed with PR #2340 are not affected by this partial rollback.

This partial rollback enables cherry-picking a commit from PR #2380.

* test_constructors() fix for Python 2.

Preparation for changing `pybind11::str` to only hold `PyUnicodeObject` (NOT also `bytes`).

Currently test_constructors passes with Python 2 only because `pybind11::str` can also hold a Python 2 `PyStringObject` (or the equivalent `PyBytesObject` in Python 3). Changing the test to exercise conversions for `PyUnicodeObject` makes it consistent between Python 2 and 3, and removes this small obstacle to the planned `pybind11::str` change.

Tests for `bytes` conversions will be added separately.

* Adding test_constructors test for bytes, on top of cherry-picked commit from PR #2380.
rwgk pushed a commit that referenced this pull request Aug 16, 2020
* Rolling back PR #2340 change to tests/test_pytypes.py (only this one file).

The two other files changed with PR #2340 are not affected by this partial rollback.

This partial rollback enables cherry-picking a commit from PR #2380.

* test_constructors() fix for Python 2.

Preparation for changing `pybind11::str` to only hold `PyUnicodeObject` (NOT also `bytes`).

Currently test_constructors passes with Python 2 only because `pybind11::str` can also hold a Python 2 `PyStringObject` (or the equivalent `PyBytesObject` in Python 3). Changing the test to exercise conversions for `PyUnicodeObject` makes it consistent between Python 2 and 3, and removes this small obstacle to the planned `pybind11::str` change.

Tests for `bytes` conversions will be added separately.

* Adding test_constructors test for bytes, on top of cherry-picked commit from PR #2380.
YannickJadoul pushed a commit to YannickJadoul/pybind11 that referenced this pull request Aug 16, 2020
…2390)

* Rolling back PR pybind#2340 change to tests/test_pytypes.py (only this one file).

The two other files changed with PR pybind#2340 are not affected by this partial rollback.

This partial rollback enables cherry-picking a commit from PR pybind#2380.

* test_constructors() fix for Python 2.

Preparation for changing `pybind11::str` to only hold `PyUnicodeObject` (NOT also `bytes`).

Currently test_constructors passes with Python 2 only because `pybind11::str` can also hold a Python 2 `PyStringObject` (or the equivalent `PyBytesObject` in Python 3). Changing the test to exercise conversions for `PyUnicodeObject` makes it consistent between Python 2 and 3, and removes this small obstacle to the planned `pybind11::str` change.

Tests for `bytes` conversions will be added separately.

* Adding test_constructors test for bytes, on top of cherry-picked commit from PR pybind#2380.
rwgk pushed a commit that referenced this pull request Aug 17, 2020
* Rolling back PR #2340 change to tests/test_pytypes.py (only this one file).

The two other files changed with PR #2340 are not affected by this partial rollback.

This partial rollback enables cherry-picking a commit from PR #2380.

* test_constructors() fix for Python 2.

Preparation for changing `pybind11::str` to only hold `PyUnicodeObject` (NOT also `bytes`).

Currently test_constructors passes with Python 2 only because `pybind11::str` can also hold a Python 2 `PyStringObject` (or the equivalent `PyBytesObject` in Python 3). Changing the test to exercise conversions for `PyUnicodeObject` makes it consistent between Python 2 and 3, and removes this small obstacle to the planned `pybind11::str` change.

Tests for `bytes` conversions will be added separately.

* Adding test_constructors test for bytes, on top of cherry-picked commit from PR #2380.
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.

2 participants