mbox

[bug#44077,0/2] gnu: poetry: Update to 1.1.3.

Message ID 20201019132649.13548-1-tanguy@bioneland.org
Headers show

Message

Tanguy LE CARROUR Oct. 19, 2020, 1:26 p.m. UTC
Tanguy Le Carrour (2):
  gnu: Add python-poetry-core.
  gnu: poetry: Update to 1.1.3.

 gnu/packages/python-xyz.scm | 45 +++++++++++++++++++++++++------------
 1 file changed, 31 insertions(+), 14 deletions(-)

Comments

Tanguy LE CARROUR Oct. 23, 2020, 6:54 a.m. UTC | #1
Hi Nicolas,

I've just figured out that the updated version of Poetry crashes in some cases!

Actually, there are 2 ways of using Poetry :
1- you manage your own virtual env (I do it with `direnv`) ;
2- you let Poetry manage it.

Obviously, the one I use works, but the second one doesn't! I guess it
requires a newer version of `python-virtualenv`. So I guess this bug
should be marked as work in progress.

I'll let you know once I've solved the problem!

Best regards
Tanguy LE CARROUR Oct. 30, 2020, 6:17 p.m. UTC | #2
Hi Nicolas,

I'm submitting an updated patch set.

Poetry seems to work in a `guix environement --pure --ad-hoc poetry`
environment, but… I cannot install it into my profile because a lot of
packages get rebuilt and, unfortunatly, some of them are failing! For
instance `python-jedi` tests fail because my computer is too slow! :-(

Again, thanks for your time!
Tanguy LE CARROUR Nov. 26, 2020, 1:36 p.m. UTC | #3
Hi Nicolas,

Sorry to ask you this, but not knowing exactly how the code review works,
I just wanted to know if my patch hadn't fallen into oblivion.

If you don't have more time to spend on reviewing v2 — which I could understand! —,
should I make a goodwill call on guix-devel?

Best regards,
Nicolas Goaziou Nov. 27, 2020, 8:14 p.m. UTC | #4
Hello,

Tanguy Le Carrour <tanguy@bioneland.org> writes:

> Sorry to ask you this, but not knowing exactly how the code review works,
> I just wanted to know if my patch hadn't fallen into oblivion.

Well, it had, indeed… =/

I looked at it again, and it LGTM. However python-distlib has a lot of
dependents, so it needs to be applied on core-updates branch.

If there is no objection, I'll do that soon.

Regards,
Tanguy LE CARROUR Nov. 28, 2020, 2:11 p.m. UTC | #5
Hi Nicolas,


Excerpts from Nicolas Goaziou's message of November 27, 2020 9:14 pm:
> Tanguy Le Carrour <tanguy@bioneland.org> writes:
> 
>> Sorry to ask you this, but not knowing exactly how the code review works,
>> I just wanted to know if my patch hadn't fallen into oblivion.
> 
> Well, it had, indeed… =/

No problem! ;-)
I should consider myself lucky to have someone reviewing my patch on his
spare time! … all the more so I might be the only person using Poetry!  ^_^'


> I looked at it again, and it LGTM. However python-distlib has a lot of
> dependents, so it needs to be applied on core-updates branch.

Would have it been better for me to submit separate patches, as they are
not really specific to Poetry, and wait for them to be merged before
submitting a patch set with only `poetry-core` and `poetry`?


> If there is no objection, I'll do that soon.

The process is not yet clear to me. Out of sheer curiosity… can someone object
to a merge in master? Who would that be?

Thanks again for your help and your time!
Tanguy LE CARROUR Nov. 29, 2020, 7:34 p.m. UTC | #6
Hi,


Excerpts from Tanguy LE CARROUR's message of November 29, 2020 6:56 pm:
> Excerpts from Nicolas Goaziou's message of November 28, 2020 4:41 pm:
>> Tanguy LE CARROUR <tanguy@bioneland.org> writes:
>> 
>>> Would have it been better for me to submit separate patches, as they are
>>> not really specific to Poetry, and wait for them to be merged before
>>> submitting a patch set with only `poetry-core` and `poetry`?
>> 
>> The sole "problematic" patch is the one updating python-distlib, in the
>> sense that it cannot be applied in the same branch as the others (unless
>> everything goes into core-updates, of course).
>> 
>> If you can split the set into independent parts, i.e., if you don't
>> really need to update python-distlib prior to updating Poetry, we can
>> process it differently.
> 
> I'm working on it! But it's apparently rebuilding the World, which is really
> slow on my computer at home! :-(

I've tried to modify `python-virtualenv` to make it use our current
version of `python-distlib`. Poetry builds, but it does not work
properly!

```
$ poetry install
Creating virtualenv test-4avGy1Vc-py3.8 in /home/tanguy/.cache/pypoetry/virtualenvs

  ImportError

  cannot import name 'enquote_executable' from 'distlib.scripts'
  (/gnu/store/2j3qn0ksry1qarwih9knh1ngr6zm2rci-python-distlib-0.3.0/lib/python3.8/site-packages/distlib/scripts.py)
```

So I guess the version of distlib does matter and we cannot do without.


Regards
Marius Bakke Nov. 29, 2020, 8:06 p.m. UTC | #7
Tanguy LE CARROUR <tanguy@bioneland.org> skriver:

> I've tried to modify `python-virtualenv` to make it use our current
> version of `python-distlib`. Poetry builds, but it does not work
> properly!
>
> ```
> $ poetry install
> Creating virtualenv test-4avGy1Vc-py3.8 in /home/tanguy/.cache/pypoetry/virtualenvs
>
>   ImportError
>
>   cannot import name 'enquote_executable' from 'distlib.scripts'
>   (/gnu/store/2j3qn0ksry1qarwih9knh1ngr6zm2rci-python-distlib-0.3.0/lib/python3.8/site-packages/distlib/scripts.py)
> ```
>
> So I guess the version of distlib does matter and we cannot do without.

To get these patches on 'master' without rebuilding the world, you can
create a new 'python-distlib' like so:

  ;; TODO: Merge with 'python-distlib' on the next rebuild cycle.
  (define-public python-distlib/next
    (package
      (inherit python-distlib)
      (version "1.2.3")
      (source (origin ...))))

...and in the packages that require the new version, refer to
'python-distlib/next' instead of 'python-distlib'.

Does that make sense?
Tanguy LE CARROUR Nov. 30, 2020, 8:27 a.m. UTC | #8
Hi Marius!


Excerpts from Marius Bakke's message of November 29, 2020 9:06 pm:
> Tanguy LE CARROUR <tanguy@bioneland.org> skriver:
> 
>> I've tried to modify `python-virtualenv` to make it use our current
>> version of `python-distlib`. Poetry builds, but it does not work
>> properly!
>>
>> ```
>> $ poetry install
>> Creating virtualenv test-4avGy1Vc-py3.8 in /home/tanguy/.cache/pypoetry/virtualenvs
>>
>>   ImportError
>>
>>   cannot import name 'enquote_executable' from 'distlib.scripts'
>>   (/gnu/store/2j3qn0ksry1qarwih9knh1ngr6zm2rci-python-distlib-0.3.0/lib/python3.8/site-packages/distlib/scripts.py)
>> ```
>>
>> So I guess the version of distlib does matter and we cannot do without.
> 
> To get these patches on 'master' without rebuilding the world, you can
> create a new 'python-distlib' like so:
> 
>   ;; TODO: Merge with 'python-distlib' on the next rebuild cycle.
>   (define-public python-distlib/next
>     (package
>       (inherit python-distlib)
>       (version "1.2.3")
>       (source (origin ...))))
> 
> ...and in the packages that require the new version, refer to
> 'python-distlib/next' instead of 'python-distlib'.
> 
> Does that make sense?

Yes, thanks, that's a great solution, indeed!

I'm only concerned about the poor soul who has to remember to get rid of
the `python-distlib/next` and update `python-virtualenv` package
definition. I guess none of this is auto-magic, right?!

Regards
Marius Bakke Dec. 3, 2020, 9:39 p.m. UTC | #9
Tanguy LE CARROUR <tanguy@bioneland.org> skriver:

> Hi Marius!
>
>
> Excerpts from Marius Bakke's message of November 29, 2020 9:06 pm:
>> Tanguy LE CARROUR <tanguy@bioneland.org> skriver:
>> 
>>> I've tried to modify `python-virtualenv` to make it use our current
>>> version of `python-distlib`. Poetry builds, but it does not work
>>> properly!
>>>
>>> ```
>>> $ poetry install
>>> Creating virtualenv test-4avGy1Vc-py3.8 in /home/tanguy/.cache/pypoetry/virtualenvs
>>>
>>>   ImportError
>>>
>>>   cannot import name 'enquote_executable' from 'distlib.scripts'
>>>   (/gnu/store/2j3qn0ksry1qarwih9knh1ngr6zm2rci-python-distlib-0.3.0/lib/python3.8/site-packages/distlib/scripts.py)
>>> ```
>>>
>>> So I guess the version of distlib does matter and we cannot do without.
>> 
>> To get these patches on 'master' without rebuilding the world, you can
>> create a new 'python-distlib' like so:
>> 
>>   ;; TODO: Merge with 'python-distlib' on the next rebuild cycle.
>>   (define-public python-distlib/next
>>     (package
>>       (inherit python-distlib)
>>       (version "1.2.3")
>>       (source (origin ...))))
>> 
>> ...and in the packages that require the new version, refer to
>> 'python-distlib/next' instead of 'python-distlib'.
>> 
>> Does that make sense?
>
> Yes, thanks, that's a great solution, indeed!
>
> I'm only concerned about the poor soul who has to remember to get rid of
> the `python-distlib/next` and update `python-virtualenv` package
> definition. I guess none of this is auto-magic, right?!

It's not automatic indeed.  But as long as there is a source code
comment mentioning 'core-updates', 'staging' or 'rebuild cycle', chances
are some poor soul will take care of it appropriately in due time.  ;-)