Update dev dependencies using Poetry >1.20 - python-poetry

In my pyproject.toml I have some dev dependencies configured as follows:
[tool.poetry.group.dev.dependencies]
mypy = "^0.971"
A simple poetry show -l shows that I indeed have mypy installed with version 0.971. Currently, the latest version available is v0.991.
What's the correct syntax to have all my dependencies - including dev dependencies - being updated.
poetry update --with=dev is not going to update mypy to the latest version.

poetry update updates dependencies within the version range given in the pyproject.toml.
^0.971 translates to >=0.971,<0.972 (See: https://python-poetry.org/docs/dependency-specification/#caret-requirements). This is why poetry update will not update mypy to 0.991.
To get the latest version of a dependency you have to use poetry add <dep>#latest. In your case poetry add -G dev mypy#latest.
At the moment there is no Poetry command to bump all dependencies to its latest version outside of the given version ranges. But there is a feature request for it: https://github.com/python-poetry/poetry/issues/461

Related

Can't get specific version of composer package

I am trying to get latest version of calcinai/xero-php (just doing composer require as per their readme installs v ^1.7)
When I run
composer require "calcinai/xero-php":"^2.0.4"
The incorrect version of this package is downloaded (composer logs below + vendor code being installed is not what is in master repos, currently at v2.0.4).
How do I get v2.0.4/latest code that is on master (using composer)?
If you want to require a specific version, and not any other, skip the caret. Installing exactly v2.0.4 of that package works using
composer require "calcinai/xero-php":"2.0.4"

Is it possible to specify a version range when using `yarn add`?

You can do yarn add my-package to install the latest version of my-package
You can do yarn add my-package#1.2.3 to install v1.2.3
Can you specify a range, like in package.json?
Yes.
I don't know why this isn't documented explicitly, but this works:
yarn add express#^4.15.4
# wrote "express": "^4.15.4" to package.json
# actually installed v4.17.1, which is latest satisfactory version

pip install dependency installs older version of a library

My app has a requirements file that looks something like this:
somelibrary==2
otherlib==1.5
Now the problem is that otherlib contains in its setup file somelibrary as dependency and what happens is that pip first installs somelibrary in version 2 as required by my file, but later installs an older version because of otherlib which hides the version of somelibrary that my app needs and that also works for otherlib. I checked the setup.py file of otherlib and it does not specify a version for somelibrary. How can I stop pip from installing the older version on top of the newer one?

How to upgrade nativescript angular dependencies with the "tns update"?

I want to upgrade my #angular dependencies in my package.json file.
I guess the documentation
http://docs.nativescript.org/releases/upgrade-instructions show some way to do it with : tns update. I upgraded my cli to 2.4 but upgrade doesnt work!!
i called tns --help and there is no appearance of update.
How can i update/upgrade the #angular dependencies into package.json file?
The #angular dependencies will not be updated from tns update.
The update command will update only the platform related dependencies and the reason your #angular dependencies won't be updated is because there are no guarantees that your current NativeScript CLI and runtime will work as expected with the last #angular updates.
Modify Package.json to include most latest version of dependency by prefixing symbol ^ to existing version number.Then delete all npm dependency from npm modules folder .Remove and add platform using cli commands
'tns platform remove android
tns platfrom add android '
it will download new packages from npm .But its better to go with default unless cli is updataed.

Cannot update project with composer

I pushed my package medyes/ebay-api on github.
When I tried to download it on another project with composer I have an error:
Command composer:
composer require medyes/ebay-api:dev-master
The error:
[InvalidArgumentException]
Could not find package medyes/ebay-api at any version for your
minimum-stability (dev). Check the package spelling or your minimum
-stability
this is the composer.json of medyes/ebay-api package
composer.json
Avoid using branches - especially when the project you are about to include offers tagged versions.
composer require medyes/ebay-api:~0.1
This will update this package until version 1.0 comes out (which would not be installed, because that major release number change it is considered incompatible according to semantic versioning) every time a newer, installable version exists and you run composer update.

Resources