Skip to content

[1.1.0a3] Does not export env markers #2662

Closed

Description

@s0undt3ch
  • I am on the latest Poetry version.
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option).

Issue

Poetry 1.1.0a3 does not "export" environment markers either by using platform or markers in the dependency definition

Activity

  1. myoung34 commented on Aug 11, 2020

    @myoung34

    I can confirm this behavior.

    for now I'm having to work around it with

    poetry export --without-hashes --dev -f requirements.txt | sed 's/\(pybluez==.*\)/\1; platform_system == "Linux"/g' >requirements-dev.txt
    

    which feels really dirty

  2. added
    kind/featureFeature requests/implementations
    and removed
    kind/bugSomething isn't working as expected
    on Sep 23, 2020
  3. bneijt commented on Sep 30, 2020

    @bneijt

    This is a regression from 1.0.10. We get python markers but not platform markers:

    FROM python:3.8-slim
    
    WORKDIR /project
    
    RUN pip install poetry==1.0.10 \
        && poetry new 1010 \
        && cd 1010 \
        && poetry add loguru \
        && poetry export --without-hashes -f requirements.txt |sort > reqs.txt \
        && pip uninstall -y poetry
    
    RUN pip install poetry==1.1.0rc1 \
        && poetry new 110rc1 \
        && cd 110rc1 \
        && poetry add loguru \
        && poetry export --without-hashes -f requirements.txt |sort > reqs.txt \
        && pip uninstall -y poetry
    
    RUN grep marker */poetry.lock
    
    RUN cat 1010/reqs.txt
    
    RUN cat 110rc1/reqs.txt
    
    ENTRYPOINT "/bin/bash"
    

    will result in:

    Step 6/8 : RUN cat 1010/reqs.txt
     ---> Running in e6cc151075fa
    colorama==0.4.3; sys_platform == "win32"
    loguru==0.5.3
    win32-setctime==1.0.2; sys_platform == "win32"
    Removing intermediate container e6cc151075fa
     ---> 7568f92263c2
    Step 7/8 : RUN cat 110rc1/reqs.txt
     ---> Running in 201adead5df8
    colorama==0.4.3; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.5.0"
    loguru==0.5.3; python_version >= "3.5"
    win32-setctime==1.0.2; python_version >= "3.5"
    Removing intermediate container 201adead5df8
    

    showing that RC1 does not add the sys_platform markers that 1.0.10 did add.

  4. bneijt commented on Sep 30, 2020

    @bneijt

    After reviewing the above docker build, it's clear that the sys platform marker is missing in the lock file, so the exporter is probably doing the right thing and this is just the lock mechanism not picking up on the platform marker anymore:

    root@055eb589ab63:/project# grep -A20 -B2 'name = "win32-setctime' */poetry.lock
    1010/poetry.lock-description = "A small Python utility to set file creation time on Windows"
    1010/poetry.lock-marker = "sys_platform == \"win32\""
    1010/poetry.lock:name = "win32-setctime"
    1010/poetry.lock-optional = false
    1010/poetry.lock-python-versions = ">=3.5"
    1010/poetry.lock-version = "1.0.2"
    1010/poetry.lock-
    --
    110rc1/poetry.lock-
    110rc1/poetry.lock-[[package]]
    110rc1/poetry.lock:name = "win32-setctime"
    110rc1/poetry.lock-version = "1.0.2"
    110rc1/poetry.lock-description = "A small Python utility to set file creation time on Windows"
    110rc1/poetry.lock-category = "main"
    110rc1/poetry.lock-optional = false
    110rc1/poetry.lock-python-versions = ">=3.5"
    110rc1/poetry.lock-
    
  5. added 3 commits that reference this issue on Sep 30, 2020
    c8f1e8b
    eb5493b
    f07a831
  6. added this to the 1.1 milestone on Sep 30, 2020
  7. added a commit that references this issue on Sep 30, 2020
    b2b8b7d
  8. added a commit that references this issue on Sep 30, 2020
    1159148
  9. github-actions commented on Mar 2, 2024

    @github-actions

    This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

  10. locked as resolved and limited conversation to collaborators on Mar 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/featureFeature requests/implementations

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions