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

Release 6.0.0 to allow users to update to Python 3.12? #793

Closed
hartwork opened this issue Dec 11, 2023 · 20 comments
Closed

Release 6.0.0 to allow users to update to Python 3.12? #793

hartwork opened this issue Dec 11, 2023 · 20 comments

Comments

@hartwork
Copy link
Collaborator

hartwork commented Dec 11, 2023

Hi! 👋

(This is similar to issue #749 for the release of VCR.py 5.1.0.)

Since release 5.1.0 I believe we have merged the following pull requests to master (in order of pull request ID):

I believe it would be important to do a soon new release 6.0.0 to allow users to upgrade to Python 3.12 which VCR.py has been de-facto blocking (including one of my own projects, case hartwork/wnpp.debian.net#806).

For anyone wondering why 6.0.0 rather than 5.2.0, we agreed at #731 (comment) that merge of now-merged #731 should go along with a bump in major version.

@kevin1024 would you be up for cutting a release 6.0.0 from latest master shortly?
(Latest commit is 6a31904 as of the moment.)

Thanks and best, Sebastian

CC @jairhenrique

@jairhenrique
Copy link
Collaborator

This pr needs to be merged before this version #788

@hartwork
Copy link
Collaborator Author

@jairhenrique just to understand: "needs" as in "would be beneficial" or as in "hard blocker"? Could you elaborate?

@jairhenrique
Copy link
Collaborator

@hartwork I think it's a hard blocker because of this comment #784 (comment). More people may need to recreate the cassettes if this change doesn't go through.

@hartwork
Copy link
Collaborator Author

@jairhenrique thanks for elaborating, I understand! 👍

@parkerhancock if you could rebase your pull request #788 against latest master that would rock and greatly increase the chances of a soon release 6.0.0. Thanks in advance! 🙏

@hartwork
Copy link
Collaborator Author

@kevin1024 I believe all release blockers are resolved now.

CC @jairhenrique

@anton-daneyko-ultramarin

What is the highest Python version that you recommend to use ATM?

@hartwork
Copy link
Collaborator Author

What is the highest Python version that you recommend to use ATM?

@anton-daneyko-ultramarin probably 3.11? Could you elaborate or give more context for the question?

@anton-daneyko-ultramarin
Copy link

anton-daneyko-ultramarin commented Dec 14, 2023

@hartwork
Some context: I do not get any errors running my test suite if I use Python 3.12, however I do get some errors when I try to use PyCharm debugger with my test suite, so 3.12 is not very convenient for me for this reason (I appreciate the debugger). So I bumped it down to Python 3.11.6 and started to get some TypeError: cannot pickle 'generator' object errors. This prompted me to go to VCR.py issues page and read this thread from which I assume there are some problems with Python 3.12 (which I am not triggering with my test suite).

I am about to give 3.10 a try, but decided to ask you instead. I assumed it's something easy to answer.

@hartwork
Copy link
Collaborator Author

@anton-daneyko-ultramarin thanks for elaborating! Could you check if the pickle issue is the same as #737? If not, please create a new issue with details. Thanks in advance!

@vEpiphyte
Copy link

vEpiphyte commented Dec 15, 2023

I'm running a big regression test with the latest vcrpy development head. I'll update this comment when it is done ( likely in the morning EST ) if i run across any issues :)

Update: 👍 My big regression test did not uncover any sort of issues with the current head 713cb36d35108a21416744a393f3c947b86a0efe

@dmelo
Copy link

dmelo commented Jan 3, 2024

Any update on when we'll have the new release?

@hartwork
Copy link
Collaborator Author

@kevin1024 we need you here to move forward. Do you have a minute?

@eugene-s
Copy link

Hey guys!

Are there any plans to release that stuff soon? I need fixes for httpx.

@hartwork
Copy link
Collaborator Author

@kevin1024 we need you here to move forward. Do you have a minute?

@graingert
Copy link
Collaborator

I'd like to get #801 in before 6.0

@kevin1024
Copy link
Owner

OK! lemme cut a release.

@graingert
Copy link
Collaborator

graingert commented Jan 23, 2024

Wait I broke the tornado generator decorator in #801 fixed by #811

@kevin1024
Copy link
Owner

No worries, ping me when fixed and I'll do another release.

@anton-daneyko-ultramarin

@anton-daneyko-ultramarin thanks for elaborating! Could you check if the pickle issue is the same as #737? If not, please create a new issue with details. Thanks in advance!

I did not have the chance to look into it back then and now I am getting bitten by this error again. I get a TypeError: cannot pickle 'generator' object error when using urllib3 v2.1.0 and the error goes away with urllib3 v1.26.18. The vcrpy version is 5.1.0. The stack trace leads to before_record_request in vcr/config.py. I probably won't be able to dig into it now as well, but I thought it might be helpful to leave some breadcrumbs for a future investigation or maybe @hartwork would be able to spot something fishy immediatly:

Tail of a stack trace
/home/acme-corp/.conda/envs/apa-proxy/lib/python3.10/site-packages/requests/adapters.py:486: in send
    resp = conn.urlopen(
/home/acme-corp/.conda/envs/apa-proxy/lib/python3.10/site-packages/urllib3/connectionpool.py:790: in urlopen
    response = self._make_request(
/home/acme-corp/.conda/envs/apa-proxy/lib/python3.10/site-packages/urllib3/connectionpool.py:536: in _make_request
    response = conn.getresponse()
/home/acme-corp/.conda/envs/apa-proxy/lib/python3.10/site-packages/vcr/stubs/__init__.py:257: in getresponse
    if self.cassette.can_play_response_for(self._vcr_request):
/home/acme-corp/.conda/envs/apa-proxy/lib/python3.10/site-packages/vcr/cassette.py:263: in can_play_response_for
    request = self._before_record_request(request)
/home/acme-corp/.conda/envs/apa-proxy/lib/python3.10/site-packages/vcr/config.py:223: in before_record_request
    request = copy.deepcopy(request)
/home/acme-corp/.conda/envs/apa-proxy/lib/python3.10/copy.py:172: in deepcopy
    y = _reconstruct(x, memo, *rv)
/home/acme-corp/.conda/envs/apa-proxy/lib/python3.10/copy.py:271: in _reconstruct
    state = deepcopy(state, memo)
/home/acme-corp/.conda/envs/apa-proxy/lib/python3.10/copy.py:146: in deepcopy
    y = copier(x, memo)
/home/acme-corp/.conda/envs/apa-proxy/lib/python3.10/copy.py:231: in _deepcopy_dict
    y[deepcopy(key, memo)] = deepcopy(value, memo)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
x = <generator object Client.upload_data.<locals>.json_stream at 0x7f792ac86030>
memo = {140158380145104: <[AttributeError("'Request' object has no attribute 'method'") raised in repr()] Request object at 0...', 'uri': 'http://localhost:8080/websrv/portfolios/test_cancel_task/dates?enforce-partial-import=false'}}
_nil = []
    def deepcopy(x, memo=None, _nil=[]):
        """Deep copy operation on arbitrary Python objects.
    
        See the module's __doc__ string for more info.
        """
    
        if memo is None:
            memo = {}
    
        d = id(x)
        y = memo.get(d, _nil)
        if y is not _nil:
            return y
    
        cls = type(x)
    
        copier = _deepcopy_dispatch.get(cls)
        if copier is not None:
            y = copier(x, memo)
        else:
            if issubclass(cls, type):
                y = _deepcopy_atomic(x, memo)
            else:
                copier = getattr(x, "__deepcopy__", None)
                if copier is not None:
                    y = copier(memo)
                else:
                    reductor = dispatch_table.get(cls)
                    if reductor:
                        rv = reductor(x)
                    else:
                        reductor = getattr(x, "__reduce_ex__", None)
                        if reductor is not None:
>                           rv = reductor(4)
E                           TypeError: cannot pickle 'generator' object

@hartwork
Copy link
Collaborator Author

@anton-daneyko-ultramarin let me repeat, please create a new issue, your report is out of place here. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants