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

Backport bug fixes for a 4.2.1 release #2827

Merged
merged 7 commits into from Jan 20, 2023
Merged

Backport bug fixes for a 4.2.1 release #2827

merged 7 commits into from Jan 20, 2023

Conversation

jtilly
Copy link
Contributor

@jtilly jtilly commented Jan 12, 2023

Hi everyone,

I'm a big fan of altair! Thanks for all your work on this.

I've read #2588, #2768 and related issues and I was wondering if you'd be willing to make a 4.2.1 (or 4.3.0) release with bug fixes as long as I do all the work on it? (Or almost all of the work, because based on #2793, one of you would still need to make the actual PyPI release).

In this PR, I'm backporting

and I bumped the version number and added a changlog entry.

I'm happy to backport more PRs that are fixing critical issues (if desired).

The PR is using v4.2.X as base branch.

Test suite is ✅ (after installing altair_saver and 'vega-lite-cli<5' so that no tests are skipped).

pytest --pyargs --doctest-modules altair -x                                                           
============================================================================== test session starts ==============================================================================
platform darwin -- Python 3.11.0, pytest-7.2.0, pluggy-1.0.0
rootdir: /Users/jtilly/altair
plugins: xdist-3.1.0, cov-4.0.0
collected 605 items                                                                                                                                                             

altair/examples/tests/test_examples.py .................................................................................................................................. [ 21%]
......................................................................................................................................................................... [ 49%]
.............                                                                                                                                                             [ 51%]
altair/expr/tests/test_expr.py ..........                                                                                                                                 [ 53%]
altair/tests/test_magics.py .......                                                                                                                                       [ 54%]
altair/utils/core.py ..                                                                                                                                                   [ 54%]
altair/utils/deprecation.py .                                                                                                                                             [ 54%]
altair/utils/tests/test_core.py ..............                                                                                                                            [ 57%]
altair/utils/tests/test_data.py ........                                                                                                                                  [ 58%]
altair/utils/tests/test_deprecation.py ..                                                                                                                                 [ 58%]
altair/utils/tests/test_execeval.py ..                                                                                                                                    [ 59%]
altair/utils/tests/test_html.py ....                                                                                                                                      [ 59%]
altair/utils/tests/test_mimebundle.py ....                                                                                                                                [ 60%]
altair/utils/tests/test_plugin_registry.py ....                                                                                                                           [ 61%]
altair/utils/tests/test_schemapi.py ...................                                                                                                                   [ 64%]
altair/utils/tests/test_server.py .                                                                                                                                       [ 64%]
altair/utils/tests/test_utils.py ........                                                                                                                                 [ 65%]
altair/vega/tests/test_import.py .                                                                                                                                        [ 65%]
altair/vegalite/tests/test_common.py ........                                                                                                                             [ 67%]
altair/vegalite/v3/api.py ......                                                                                                                                          [ 68%]
altair/vegalite/v3/tests/test_api.py ................................................................................                                                     [ 81%]
altair/vegalite/v3/tests/test_data.py .                                                                                                                                   [ 81%]
altair/vegalite/v3/tests/test_display.py ..                                                                                                                               [ 81%]
altair/vegalite/v3/tests/test_geo_interface.py ........                                                                                                                   [ 83%]
altair/vegalite/v3/tests/test_renderers.py ...                                                                                                                            [ 83%]
altair/vegalite/v3/tests/test_theme.py .                                                                                                                                  [ 83%]
altair/vegalite/v4/api.py ......                                                                                                                                          [ 84%]
altair/vegalite/v4/tests/test_api.py ............................................................................                                                         [ 97%]
altair/vegalite/v4/tests/test_data.py .                                                                                                                                   [ 97%]
altair/vegalite/v4/tests/test_display.py ..                                                                                                                               [ 98%]
altair/vegalite/v4/tests/test_geo_interface.py ........                                                                                                                   [ 99%]
altair/vegalite/v4/tests/test_renderers.py ...                                                                                                                            [ 99%]
altair/vegalite/v4/tests/test_theme.py .                                                                                                                                  [100%]

======================================================================== 605 passed in 193.91s (0:03:13) ========================================================================

In #2588 (reply in thread), @joelostblom writes that

but it would require some reordering of the commits on the main branch

I'm not exactly sure what you mean by that and I would hope that it's fine to not have these bug fix commits in the correct order in the main branch.

If you're saying this is not worth the effort, feel free to close the PR.

jakevdp and others added 6 commits December 29, 2021 05:22
* Disable uri-reference format check. Consistently use same validator across codebase

* Remove validation in SchemaInfo as not used anywhere and it referenced the wrong jsonschema draft

* Add compatibility for older jsonschema versions

* Improve comments

* Simplify validate_jsonschema
@jtilly jtilly marked this pull request as draft January 12, 2023 15:05
@joelostblom
Copy link
Contributor

Thanks for working on this @jtilly ! Regarding my previous comment, I think I made a more accurate one here #2817 (comment):

Regarding a 4.3 version, I think there are some nice things with this, but it would involve a lot of rearranging or cherrypicking of commits to create the 4.3 release. I would rather spend that time on working toward a 5.0 release, and recommend people to update.

I guess between the two approaches it would make more sense to cherrypick the relevant commits into a separate branch (as you have here) and do a 4.3 release from that rather than trying to get the main branch in the right order.

As I mentioned in that comment, I do see advantage with a 4.3 release, but I don't have the bandwidth to put into work or review on that myself and would rather focus my efforts towards 5.0. Having that said, if someone else is willing to review, I definitely don't have anything against there being a 4.3/4.2.1 release with the most important bugfixes.

I would also like to draw your attention to #2599 (reply in thread), which mentions not all of the maintainers have the required permissions to make a PyPI release, so if you are hoping to make a quick 4.3 release while waiting for 5.0, I am not sure if that will happen and it might be more likely that they both come out at a similar time (but that's a bit of speculation from my side, just wanted you to be aware of these caveats).

@jtilly jtilly marked this pull request as ready for review January 12, 2023 19:15
@jtilly
Copy link
Contributor Author

jtilly commented Jan 13, 2023

so if you are hoping to make a quick 4.3 release while waiting for 5.0, I am not sure if that will happen and it might be more likely that they both come out at a similar time

That was my hope indeed 😁

In any case, I wanted to give it a try -- please let me know if there are any other bug fixes that should be backported.

@th0ger
Copy link

th0ger commented Jan 15, 2023

Would love a patch for #2771 soon, to avoid forcing jsonschema<=4.16.0.

@mattijn
Copy link
Contributor

mattijn commented Jan 16, 2023

Not a patch, but as was found here: #2794, to avoid pinning jsonschema

One workaround is to uninstall rfc3986-validator right after installing the package that pulled it (e.g. jupyter):

pip uninstall rfc3986-validator

@mattijn
Copy link
Contributor

mattijn commented Jan 20, 2023

I think it is a good idea to prepare for a hotfixed version of altair 4.2. I also would like to include some warnings of features that will be removed in altair 5.
Let me merge this PR first, as it looks solid to me.

@mattijn mattijn merged commit 6d214f9 into vega:v4.2.X Jan 20, 2023
mattijn pushed a commit to mattijn/altair that referenced this pull request Jan 21, 2023
* DOC: remove unused section

* Disable uri-reference format check in jsonsschema (vega#2771)

* Disable uri-reference format check. Consistently use same validator across codebase

* Remove validation in SchemaInfo as not used anywhere and it referenced the wrong jsonschema draft

* Add compatibility for older jsonschema versions

* Improve comments

* Simplify validate_jsonschema

* Replace `iteritems` with `items` due to pandas deprecation (vega#2683)

* Add changelog entry.

* Bump version.

* Run black and flake8.

* Pin selenium in CI.

Co-authored-by: Jake VanderPlas <jakevdp@google.com>
Co-authored-by: Stefan Binder <binder_stefan@outlook.com>
Co-authored-by: Joel Ostblom <joelostblom@users.noreply.github.com>
mattijn added a commit that referenced this pull request Jan 21, 2023
* include an altairfuturewarning

* deprecate vega 5 wrappers and render function

* deprecate vegalite 3 wrappers and render function

* use AltairDeprecationWarning

* fix typo in v5 warning

* remove mentioning alternative for vega wrappers

* Backport bug fixes for a 4.2.1 release (#2827)

* DOC: remove unused section

* Disable uri-reference format check in jsonsschema (#2771)

* Disable uri-reference format check. Consistently use same validator across codebase

* Remove validation in SchemaInfo as not used anywhere and it referenced the wrong jsonschema draft

* Add compatibility for older jsonschema versions

* Improve comments

* Simplify validate_jsonschema

* Replace `iteritems` with `items` due to pandas deprecation (#2683)

* Add changelog entry.

* Bump version.

* Run black and flake8.

* Pin selenium in CI.

Co-authored-by: Jake VanderPlas <jakevdp@google.com>
Co-authored-by: Stefan Binder <binder_stefan@outlook.com>
Co-authored-by: Joel Ostblom <joelostblom@users.noreply.github.com>

* include note in releases change log

Co-authored-by: Jan Tilly <jan.tilly@quantco.com>
Co-authored-by: Jake VanderPlas <jakevdp@google.com>
Co-authored-by: Stefan Binder <binder_stefan@outlook.com>
Co-authored-by: Joel Ostblom <joelostblom@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

6 participants