Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Freeze version of marshmallow to 2.20.5 #3380

Closed
dv01d opened this issue Feb 13, 2020 · 4 comments
Closed

Freeze version of marshmallow to 2.20.5 #3380

dv01d opened this issue Feb 13, 2020 · 4 comments
Assignees
Labels
Milestone

Comments

@dv01d
Copy link

dv01d commented Feb 13, 2020

What kind of issue is this?

  • [X ] PlatformIO Core.
    If you’ve found a bug, please provide an information below.

You can erase any parts of this template not applicable to your Issue.


Configuration

Operating system: Customer

PlatformIO Version (platformio --version): 4.2.0

Description of problem

Updating or installing platformio results in an incompatible version of marshmallow to be installed.

Traceback (most recent call last):
File "/usr/bin/platformio", line 9, in
load_entry_point('platformio==4.2.0', 'console_scripts', 'platformio')()
File "/usr/lib/python2.7/site-packages/setuptools-22.0.5-py2.7.egg/pkg_resources/init.py", line 542, in load_entry_point
File "/usr/lib/python2.7/site-packages/setuptools-22.0.5-py2.7.egg/pkg_resources/init.py", line 2569, in load_entry_point
File "/usr/lib/python2.7/site-packages/setuptools-22.0.5-py2.7.egg/pkg_resources/init.py", line 2229, in load
File "/usr/lib/python2.7/site-packages/setuptools-22.0.5-py2.7.egg/pkg_resources/init.py", line 2235, in resolve
File "/usr/lib/python2.7/site-packages/platformio/main.py", line 21, in
from platformio import version, exception, maintenance, util
File "/usr/lib/python2.7/site-packages/platformio/maintenance.py", line 24, in
from platformio.commands.lib import CTX_META_STORAGE_DIRS_KEY
File "/usr/lib/python2.7/site-packages/platformio/commands/lib.py", line 29, in
from platformio.package.manifest.schema import ManifestSchema
File "/usr/lib/python2.7/site-packages/platformio/package/manifest/schema.py", line 17, in
import marshmallow
File "/usr/lib/python2.7/site-packages/marshmallow/init.py", line 1, in
from marshmallow.schema import Schema, SchemaOpts
File "/usr/lib/python2.7/site-packages/marshmallow/schema.py", line 131
klass: type,
^
SyntaxError: invalid syntax

Steps to Reproduce

  1. Install or update platformio
  2. run platformio
  3. fail

Additional info

Just need to explicitly define version 2.20.5 for it to continue to work.

@ivankravets
Copy link
Member

What is your OS? Could you provide me an output of pip --version?

@ivankravets ivankravets added this to the 4.2.1 milestone Feb 14, 2020
@ivankravets ivankravets self-assigned this Feb 14, 2020
@ivankravets
Copy link
Member

  1. This issue is caused by your outdated PIP version which does not handle Python compatibility when looking for a package
  2. I did also a fix on our side. So, it should work with old PIP client too.

chenrui333 pushed a commit to Homebrew/homebrew-core that referenced this issue Feb 18, 2020
- [x] Have you followed the [guidelines for contributing](https://github.com/Homebrew/homebrew-core/blob/master/CONTRIBUTING.md)?
- [x] Have you checked that there aren't other open [pull requests](https://github.com/Homebrew/homebrew-core/pulls) for the same formula update/change?
- [x] Have you built your formula locally with `brew install --build-from-source <formula>`, where `<formula>` is the name of the formula you're submitting?
- [x] Is your test running fine `brew test <formula>`, where `<formula>` is the name of the formula you're submitting?
- [x] Does your build pass `brew audit --strict <formula>` (after doing `brew install <formula>`)?

-----

* Improved VSCode template with special ``forceInclude`` field for direct includes via ``-include`` flag ([issue #3379](platformio/platformio-core#3379))
* Improved support of PIO Home on card-sized PC (Raspberry Pi, etc.) ([issue #3313](platformio/platformio-core#3313))
* Froze "marshmallow" dependency to 2.X for Python 2 ([issue #3380](platformio/platformio-core#3380))
* Fixed "TypeError: unsupported operand type(s)" when system environment variable is used by project configuration parser ([issue #3377](platformio/platformio-core#3377))
* Fixed an issue when Library Dependency Finder (LDF) ignores custom "libLDFMode" and "libCompatMode" options in [library.json](http://docs.platformio.org/page/librarymanager/config.html)
* Fixed an issue when generating of compilation database "compile_commands.json" does not work with Python 2.7 ([issue #3378](platformio/platformio-core#3378))

Closes #50367.

Signed-off-by: Rui Chen <chenrui333@gmail.com>
@jamesmyatt
Copy link

jamesmyatt commented Feb 18, 2020

Might be better to implement this using built-in functionality in setuptools rather than doing it dynamically.

https://setuptools.readthedocs.io/en/latest/setuptools.html#declaring-platform-specific-dependencies

@ivankravets
Copy link
Member

Do you have a problem with the latest PIO Core 4.2.1? Indeed, pip handles package compatibility with a Python version. The problem is linked with outdated pip and setuptools packages that do not understand new syntax. This is why a hard declaration should work for old and new packages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants