cocotb-bus icon indicating copy to clipboard operation
cocotb-bus copied to clipboard

Switch from fork to start_soon

Open toddstrader opened this issue 1 year ago • 9 comments

Re: #61 I've s/fork/start_soon which resolves my particular problem, but I have no idea if this is generically correct. Also, I don't know how far back start_soon goes in cocotb, so clearly this would break some people until they also update cocotb.

toddstrader avatar Oct 18 '23 20:10 toddstrader

CI is mad because it's trying to use Python 3.6. I could update: https://github.com/cocotb/cocotb-bus/blob/3c9345292930f3f4dddeb9892837f96d48510b6a/.github/workflows/tests.yml#L30 but I'm going to take a beat to see if I'm pulling on a thread that requires more thought than I'm putting into it.

Also, I'm guessing this should be updated to whatever the correct supported versions of cocotb would be: https://github.com/cocotb/cocotb-bus/blob/2c846dca8d3293b7676c70dd51dbc9c7f51029f0/setup.py#L33 But I'm also not sure what to put there.

toddstrader avatar Oct 18 '23 20:10 toddstrader

But I'm also not sure what to put there.

cocotb is now 2.0.0.dev0, so: cocotb>=2.0.0.dev

marlonjames avatar Oct 19 '23 01:10 marlonjames

For the attrs deprecation warnings on 3.6, we use this in the main cocotb repo:

https://github.com/cocotb/cocotb/blob/20266934f8fc3a15ea9b459981e3534704c28b0e/tests/Makefile#L28-L31

marlonjames avatar Oct 19 '23 01:10 marlonjames

But I'm also not sure what to put there.

cocotb is now 2.0.0.dev0, so: cocotb>=2.0.0.dev

Yeah, I was more uncertain about the starting point. Looks like start_soon() was added here:

commit ac465b968a241136dbd0cdc4509331ef49a61ea1
Author: Marlon James <[email protected]>
Date:   Sun Aug 15 13:54:57 2021 -0700

    Add start and start_soon scheduling functions (#2660)

So we can probably start at 1.6.0: https://github.com/cocotb/cocotb/releases/tag/v1.6.0

toddstrader avatar Oct 19 '23 12:10 toddstrader

For the attrs deprecation warnings on 3.6, we use this in the main cocotb repo:

https://github.com/cocotb/cocotb/blob/20266934f8fc3a15ea9b459981e3534704c28b0e/tests/Makefile#L28-L31

Thanks, I can try this. But should these tests just run on a newer version of Python instead? Maybe I'll try that first.

toddstrader avatar Oct 19 '23 12:10 toddstrader

@toddstrader , Can you also add fix for https://github.com/cocotb/cocotb-bus/blob/2c846dca8d3293b7676c70dd51dbc9c7f51029f0/src/cocotb_bus/drivers/init.py#L92 in this PR.

jahagirdar avatar Nov 12 '23 20:11 jahagirdar

Additional patches scheduler.txt

jahagirdar avatar Nov 13 '23 06:11 jahagirdar

#75 (once merged) makes CI work again, but it doesn't pass because of the issues fixed by this PR.

@toddstrader Would you mind updating this PR (resolve conflicts and add the changes that @jahagirdar mentioned), or are you okay with me doing it?

cmarqu avatar Mar 01 '24 20:03 cmarqu

#75 (once merged) makes CI work again, but it doesn't pass because of the issues fixed by this PR.

@toddstrader Would you mind updating this PR (resolve conflicts and add the changes that @jahagirdar mentioned), or are you okay with me doing it?

@cmarqu if you're willing please do. We abandoned ship on cocotb-bus since trying to keep cocotb and cocotb-bus coherent in this interstitial period between v1 and v2 is quite painful.

toddstrader avatar Mar 01 '24 21:03 toddstrader

Hi @cmarqu

What's the state of this PR?

Botnic avatar Jul 17 '24 15:07 Botnic

What's the state of this PR?

Nothing new. I'll try to take a look at it soon.

cmarqu avatar Jul 17 '24 16:07 cmarqu

Replaced by #78

cmarqu avatar Jul 17 '24 17:07 cmarqu