Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Exporting wrong version to requirements.txt #4797

Closed
3 tasks done
redeemefy opened this issue Nov 18, 2021 · 7 comments
Closed
3 tasks done

Exporting wrong version to requirements.txt #4797

redeemefy opened this issue Nov 18, 2021 · 7 comments
Labels
kind/bug Something isn't working as expected

Comments

@redeemefy
Copy link

  • 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).
  • OS version and name: BigSur 11.6
  • Poetry version: 1.1.8
  • Link of a Gist with the contents of your pyproject.toml file:
    NOTE
    I'm trying to update poetry and is not working.
    Screen Shot 2021-11-18 at 10 08 07 AM
[tool.poetry]
name = "databricks-rest-interface"
version = "0.1.0"
description = ""
authors = ["Compony Name"]

[tool.poetry.dependencies]
python = "^3.9"
azure-functions = "^1.8.0"
azure-identity = "^1.7.1"
azure-keyvault-secrets = "^4.3.0"
xmltodict = "^0.12.0"
aiohttp = "^3.8.1"

[tool.poetry.dev-dependencies]

[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"

Issue

Azure functions doesn't have support for poetry.lock file. When you run func azure functionapp publish databricks-rest-interface for deploying your code, requirements.txt is needed. I decided to poetry export -f requirements.txt -o requirements.txt and do the deployment that way. When I run func azure functionapp publish databricks-rest-interface again I get an error:

ERROR: Could not find a version that satisfies the requirement pywin32==302 (from -r requirements.txt (line 23)) (from versions: none)
ERROR: No matching distribution found for pywin32==302 (from -r requirements.txt (line 23))

When I go to the pywin32 repo the release version is not 302 but rather b302?
Screen Shot 2021-11-18 at 10 02 28 AM

@redeemefy redeemefy added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Nov 18, 2021
@redeemefy
Copy link
Author

I decided to modify the file manually and still get the same error

ERROR: Could not find a version that satisfies the requirement pywin32==b302 (from -r requirements.txt (line 295)) (from versions: none)
ERROR: No matching distribution found for pywin32==b302 (from -r requirements.txt (line 295))
WARNING: You are using pip version 20.2.3; however, version 21.3.1 is available.
You should consider upgrading via the '/tmp/oryx/platforms/python/3.9.7/bin/python3.9 -m pip install --upgrade pip' command.
Done in 4 sec(s).
ERROR: Could not find a version that satisfies the requirement pywin32==b302 (from -r requirements.txt (line 295)) (from versions: none)\nERROR: No matching distribution found for pywin32==b302 (from -r requirements.txt (line 295))

I'm not sure now if this ash to do with poetry or not? 🤔

@redeemefy
Copy link
Author

Doing further investigation I ran the command poetry show --tree

aiohttp 3.8.1 Async http client/server framework (asyncio)
├── aiosignal >=1.1.2
│   └── frozenlist >=1.1.0
├── async-timeout >=4.0.0a3,<5.0
│   └── typing-extensions >=3.6.5
├── attrs >=17.3.0
├── charset-normalizer >=2.0,<3.0
├── frozenlist >=1.1.1
├── multidict >=4.5,<7.0
└── yarl >=1.0,<2.0
    ├── idna >=2.0
    └── multidict >=4.0
azure-functions 1.8.0 Azure Functions for Python
azure-identity 1.7.1 Microsoft Azure Identity Library for Python
├── azure-core >=1.11.0,<2.0.0
│   ├── requests >=2.18.4
│   │   ├── certifi >=2017.4.17
│   │   ├── charset-normalizer >=2.0.0,<2.1.0
│   │   ├── idna >=2.5,<4
│   │   └── urllib3 >=1.21.1,<1.27
│   └── six >=1.11.0
├── cryptography >=2.5
├── msal >=1.12.0,<2.0.0
│   ├── cryptography >=0.6,<38
│   ├── pyjwt >=1.0.0,<3
│   │   └── cryptography >=3.3.1 (circular dependency aborted here)
│   └── requests >=2.0.0,<3
│       ├── certifi >=2017.4.17
│       ├── charset-normalizer >=2.0.0,<2.1.0
│       ├── idna >=2.5,<4
│       └── urllib3 >=1.21.1,<1.27
├── msal-extensions >=0.3.0,<0.4.0
│   ├── msal >=0.4.1,<2.0.0
│   │   ├── cryptography >=0.6,<38
│   │   ├── pyjwt >=1.0.0,<3
│   │   │   └── cryptography >=3.3.1 (circular dependency aborted here)
│   │   └── requests >=2.0.0,<3
│   │       ├── certifi >=2017.4.17
│   │       ├── charset-normalizer >=2.0.0,<2.1.0
│   │       ├── idna >=2.5,<4
│   │       └── urllib3 >=1.21.1,<1.27
│   ├── portalocker >=1.0,<2.0
│   │   └── pywin32 !=226
│   └── portalocker >=1.6,<2.0 (circular dependency aborted here)
└── six >=1.12.0
azure-keyvault-secrets 4.3.0 Microsoft Azure Key Vault Secrets Client Library for Python
├── azure-common >=1.1,<2.0
├── azure-core >=1.7.0,<2.0.0
│   ├── requests >=2.18.4
│   │   ├── certifi >=2017.4.17
│   │   ├── charset-normalizer >=2.0.0,<2.1.0
│   │   ├── idna >=2.5,<4
│   │   └── urllib3 >=1.21.1,<1.27
│   └── six >=1.11.0
└── msrest >=0.6.21
    ├── certifi >=2017.4.17
    ├── isodate >=0.6.0
    │   └── six *
    ├── requests >=2.16,<3.0
    │   ├── certifi >=2017.4.17 (circular dependency aborted here)
    │   ├── charset-normalizer >=2.0.0,<2.1.0
    │   ├── idna >=2.5,<4
    │   └── urllib3 >=1.21.1,<1.27
    └── requests-oauthlib >=0.5.0
        ├── oauthlib >=3.0.0
        └── requests >=2.0.0 (circular dependency aborted here)
xmltodict 0.12.0 Makes working with XML feel like you are working with JSON
azure-identity
|
`-- msal-extensions
    |
    `-- msal
        |
        `--portalocker
           |
           `--pywin32

I went to the code for portalocker and looks like they are requiring pywin32 when the OS is Windows?
https://github.com/WoLpH/portalocker/blob/3025e66895ce819d806ac7201041af9d0b4f67bb/setup.py#L142

I'm not sure how poetry could be even smarter and know not to include this dependency since I'm developing in MacBook.

@dimbleby
Copy link
Contributor

duplicate #3511, fixed at #4686

@redeemefy
Copy link
Author

I just figured that I'm not in the latest Poetry version. I'm trying to upgrade Poetry and it doesn't upgrade.
Screen Shot 2021-11-20 at 12 29 02 PM

@dimbleby
Copy link
Contributor

the fix is not in any released version, so even if you get your upgrade working it won't help.

@dimbleby
Copy link
Contributor

dimbleby commented Apr 3, 2022

#4686 did make it into a 1.1 release, please close

@mkniewallner mkniewallner removed the status/triage This issue needs to be triaged label Jun 11, 2022
Copy link

github-actions bot commented Mar 1, 2024

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 1, 2024
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
kind/bug Something isn't working as expected
Projects
None yet
Development

No branches or pull requests

4 participants