aws-elastic-beanstalk-cli
aws-elastic-beanstalk-cli copied to clipboard
Warnings on CLI with Python 3.8.1
Description
When invoking the eb
CLI for the first time after download (I installed using brew
), a slew of Python warnings are printed to the console. However, after the first use these warnings do not show up again. Not a big problem, but just wanted to make this known.
Steps to reproduce
Invoke the eb
CLI for the first time after installation: eb --version
Observed result
eb --version
/usr/local/Cellar/aws-elasticbeanstalk/3.17.0/libexec/lib/python3.8/site-packages/jmespath/visitor.py:32: SyntaxWarning: "is" with a literal. Did you mean "=="?
if x is 0 or x is 1:
/usr/local/Cellar/aws-elasticbeanstalk/3.17.0/libexec/lib/python3.8/site-packages/jmespath/visitor.py:32: SyntaxWarning: "is" with a literal. Did you mean "=="?
if x is 0 or x is 1:
/usr/local/Cellar/aws-elasticbeanstalk/3.17.0/libexec/lib/python3.8/site-packages/jmespath/visitor.py:34: SyntaxWarning: "is" with a literal. Did you mean "=="?
elif y is 0 or y is 1:
/usr/local/Cellar/aws-elasticbeanstalk/3.17.0/libexec/lib/python3.8/site-packages/jmespath/visitor.py:34: SyntaxWarning: "is" with a literal. Did you mean "=="?
elif y is 0 or y is 1:
/usr/local/Cellar/aws-elasticbeanstalk/3.17.0/libexec/lib/python3.8/site-packages/jmespath/visitor.py:260: SyntaxWarning: "is" with a literal. Did you mean "=="?
if original_result is 0:
/usr/local/Cellar/aws-elasticbeanstalk/3.17.0/libexec/lib/python3.8/site-packages/ebcli/display/screen.py:442: SyntaxWarning: assertion is always true, perhaps remove parentheses?
assert(
/usr/local/Cellar/aws-elasticbeanstalk/3.17.0/libexec/lib/python3.8/site-packages/semantic_version/base.py:92: SyntaxWarning: "is" with a literal. Did you mean "=="?
if self.prerelease and self.minor is 0 and self.patch is 0:
/usr/local/Cellar/aws-elasticbeanstalk/3.17.0/libexec/lib/python3.8/site-packages/semantic_version/base.py:92: SyntaxWarning: "is" with a literal. Did you mean "=="?
if self.prerelease and self.minor is 0 and self.patch is 0:
/usr/local/Cellar/aws-elasticbeanstalk/3.17.0/libexec/lib/python3.8/site-packages/semantic_version/base.py:98: SyntaxWarning: "is" with a literal. Did you mean "=="?
if self.prerelease and self.patch is 0:
/usr/local/Cellar/aws-elasticbeanstalk/3.17.0/libexec/lib/python3.8/site-packages/ebcli/controllers/create.py:201: SyntaxWarning: "is" with a literal. Did you mean "=="?
if instance_types is "":
EB CLI 3.17.0 (Python 3.8.1)
Expected result
EB CLI 3.17.0 (Python 3.8.1)
Additional environment details (Ex: Windows, Mac, Amazon Linux etc)
- OS: MacOS Mojave (Version 10.14.6)
- Homebrew: 2.2.4
eb --version --debug
2020-02-01 19:53:35,999 (DEBUG) cement.core.foundation : laying cement for the 'eb' application
2020-02-01 19:53:35,999 (DEBUG) cement.core.hook : defining hook 'pre_setup'
2020-02-01 19:53:35,999 (DEBUG) cement.core.hook : defining hook 'post_setup'
2020-02-01 19:53:35,999 (DEBUG) cement.core.hook : defining hook 'pre_run'
2020-02-01 19:53:35,999 (DEBUG) cement.core.hook : defining hook 'post_run'
2020-02-01 19:53:35,999 (DEBUG) cement.core.hook : defining hook 'pre_argument_parsing'
2020-02-01 19:53:36,000 (DEBUG) cement.core.hook : defining hook 'post_argument_parsing'
2020-02-01 19:53:36,000 (DEBUG) cement.core.hook : defining hook 'pre_close'
2020-02-01 19:53:36,000 (DEBUG) cement.core.hook : defining hook 'post_close'
2020-02-01 19:53:36,000 (DEBUG) cement.core.hook : defining hook 'signal'
2020-02-01 19:53:36,000 (DEBUG) cement.core.hook : defining hook 'pre_render'
2020-02-01 19:53:36,000 (DEBUG) cement.core.hook : defining hook 'post_render'
2020-02-01 19:53:36,000 (DEBUG) cement.core.hook : registering hook 'add_handler_override_options' from cement.core.foundation into hooks['post_setup']
2020-02-01 19:53:36,000 (DEBUG) cement.core.hook : registering hook 'handler_override' from cement.core.foundation into hooks['post_argument_parsing']
2020-02-01 19:53:36,000 (DEBUG) cement.core.handler : defining handler type 'extension' (IExtension)
2020-02-01 19:53:36,000 (DEBUG) cement.core.handler : defining handler type 'log' (ILog)
2020-02-01 19:53:36,000 (DEBUG) cement.core.handler : defining handler type 'config' (IConfig)
2020-02-01 19:53:36,001 (DEBUG) cement.core.handler : defining handler type 'mail' (IMail)
2020-02-01 19:53:36,001 (DEBUG) cement.core.handler : defining handler type 'plugin' (IPlugin)
2020-02-01 19:53:36,001 (DEBUG) cement.core.handler : defining handler type 'output' (IOutput)
2020-02-01 19:53:36,001 (DEBUG) cement.core.handler : defining handler type 'argument' (IArgument)
2020-02-01 19:53:36,001 (DEBUG) cement.core.handler : defining handler type 'controller' (IController)
2020-02-01 19:53:36,001 (DEBUG) cement.core.handler : defining handler type 'cache' (ICache)
2020-02-01 19:53:36,001 (DEBUG) cement.core.handler : registering handler '<class 'cement.core.extension.CementExtensionHandler'>' into handlers['extension']['cement']
2020-02-01 19:53:36,019 (DEBUG) cement.ext.ext_plugin : plugin config dir /etc/eb/plugins.d does not exist.
2020-02-01 19:53:36,019 (DEBUG) cement.ext.ext_plugin : plugin config dir /Users/yanniskatsaros/.eb/plugins.d does not exist.
2020-02-01 19:53:36,025 (DEBUG) ebcli.core.hooks : -- EBCLI Version: 3.17.0
2020-02-01 19:53:36,025 (DEBUG) ebcli.core.hooks : -- Python Version: 3.8.1 (default, Dec 27 2019, 18:05:45)
[Clang 11.0.0 (clang-1100.0.33.16)]
2020-02-01 19:53:36,025 (DEBUG) ebcli.core.fileoperations : beanstalk directory not found in /Users/yanniskatsaros -Going up a level
2020-02-01 19:53:36,025 (DEBUG) ebcli.core.fileoperations : beanstalk directory not found in /Users -Going up a level
2020-02-01 19:53:36,026 (DEBUG) ebcli.core.fileoperations : beanstalk directory not found in / -Going up a level
2020-02-01 19:53:36,026 (DEBUG) ebcli.core.fileoperations : Still at the same directory /
2020-02-01 19:53:36,026 (DEBUG) ebcli.core.fileoperations : beanstalk directory not found in /Users/yanniskatsaros -Going up a level
2020-02-01 19:53:36,026 (DEBUG) ebcli.core.fileoperations : beanstalk directory not found in /Users -Going up a level
2020-02-01 19:53:36,026 (DEBUG) ebcli.core.fileoperations : beanstalk directory not found in / -Going up a level
2020-02-01 19:53:36,026 (DEBUG) ebcli.core.fileoperations : Still at the same directory /
2020-02-01 19:53:36,027 (DEBUG) ebcli.core.fileoperations : beanstalk directory not found in /Users/yanniskatsaros -Going up a level
2020-02-01 19:53:36,027 (DEBUG) ebcli.core.fileoperations : beanstalk directory not found in /Users -Going up a level
2020-02-01 19:53:36,027 (DEBUG) ebcli.core.fileoperations : beanstalk directory not found in / -Going up a level
2020-02-01 19:53:36,027 (DEBUG) ebcli.core.fileoperations : Still at the same directory /
2020-02-01 19:53:36,027 (DEBUG) ebcli.core.fileoperations : beanstalk directory not found in /Users/yanniskatsaros -Going up a level
2020-02-01 19:53:36,027 (DEBUG) ebcli.core.fileoperations : beanstalk directory not found in /Users -Going up a level
2020-02-01 19:53:36,028 (DEBUG) ebcli.core.fileoperations : beanstalk directory not found in / -Going up a level
2020-02-01 19:53:36,028 (DEBUG) ebcli.core.fileoperations : Still at the same directory /
2020-02-01 19:53:36,028 (DEBUG) ebcli.core.fileoperations : beanstalk directory not found in /Users/yanniskatsaros -Going up a level
2020-02-01 19:53:36,028 (DEBUG) ebcli.core.fileoperations : beanstalk directory not found in /Users -Going up a level
2020-02-01 19:53:36,028 (DEBUG) ebcli.core.fileoperations : beanstalk directory not found in / -Going up a level
2020-02-01 19:53:36,028 (DEBUG) ebcli.core.fileoperations : Still at the same directory /
EB CLI 3.17.0 (Python 3.8.1)
Hi @yanniskatsaros, good callout. We will investigate these errors and post any updates in this ticket.
Thanks for reporting
Same here. Mac OS X 10.15.4
> python --version
Python 2.7.16
> eb --version
EB CLI 3.17.1 (Python 3.8.2)
Same issue here and same versions of python/ebcli
Thanks for adding your own experiences to this issue. This issue is currently lower priority than some other bug fixes that are in the works, but we are continuing to track it and do plan on working on a fix in the future.
One thing to note about this issue is that some of the syntax warnings that occur are originating from dependencies of the EBCLI, meaning they will need to be resolved in those dependencies before we can incorporate the fixes into the EBCLI.
Experiencing the same issues here.
I'm also getting these.
I am also and still getting it. so annoying.
but I was able to fix with:
pip uninstall jmespath && pip3 install jmespath
I am also and still getting it. so annoying. but I was able to fix with:
pip uninstall jmespath && pip3 install jmespath
Thanks that fixed for me!
same above, pip3 install jmespath
fixed for me
I get similar warnings on macOS 12.5
$ eb --version
/opt/homebrew/Cellar/aws-elasticbeanstalk/3.20.3_1/libexec/lib/python3.10/site-packages/ebcli/display/screen.py:442: SyntaxWarning: assertion is always true, perhaps remove parentheses?
assert(
/opt/homebrew/Cellar/aws-elasticbeanstalk/3.20.3_1/libexec/lib/python3.10/site-packages/ebcli/controllers/create.py:221: SyntaxWarning: "is" with a literal. Did you mean "=="?
if instance_types is "":
EB CLI 3.20.3 (Python 3.10.)
I am working around this by setting PYTHONWARNINGS="ignore"
in the environment e.g.
$ PYTHONWARNINGS="ignore" eb --version
EB CLI 3.20.3 (Python 3.10.)
# set it for your shell lifetime. put this in shell rc file to make it permanent
export PYTHONWARNINGS="ignore"
$ eb --version EB CLI 3.20.7 (Python 3.11.4 (main, Jun 6 2023, 22:16:46) [GCC 11.3.0])
Unable to see warnings anymore , is anyone still facing the issue ?
Please reopen if you are still facing the issue .
Just installed through brew on mac osx and had this issue @NihalM99
[ billy@mac : dev ] eb --version
/opt/homebrew/Cellar/aws-elasticbeanstalk/3.20.9/libexec/lib/python3.11/site-packages/ebcli/display/screen.py:442: SyntaxWarning: assertion is always true, perhaps remove parentheses?
assert(
/opt/homebrew/Cellar/aws-elasticbeanstalk/3.20.9/libexec/lib/python3.11/site-packages/ebcli/controllers/create.py:221: SyntaxWarning: "is" with a literal. Did you mean "=="?
if instance_types is "":
EB CLI 3.20.9 (Python 3.11.5 (main, Aug 24 2023, 15:09:45) [Clang 14.0.3 (clang-1403.0.22.14.1)])
Weirdly the CLI is using python 3.11.5, but I have a later one installed:
[ billy@mac : dev ] python --version
Python 3.9.6
still the same after brew install aws-elasticbeanstalk
got
eb init
/opt/homebrew/Cellar/aws-elasticbeanstalk/3.20.9/libexec/lib/python3.11/site-packages/ebcli/display/screen.py:442: SyntaxWarning: assertion is always true, perhaps remove parentheses?
assert(
/opt/homebrew/Cellar/aws-elasticbeanstalk/3.20.9/libexec/lib/python3.11/site-packages/ebcli/controllers/create.py:221: SyntaxWarning: "is" with a literal. Did you mean "=="?
on
MacBook Air
M2, 2022
Chip Apple M2
Memory 8 GB
Serial number P95Q47H3DX
macOS Ventura 13.4.1 (c)