correct way to specify windows python 3 only environment
Hi!
I have had successful CI builds with windows in the past on my project, but now I added "encoding='utf8'" and the build process breaks with "TypeError: 'encoding' is an invalid keyword argument for this function", because apparently python 2 is still imported (as mentioned here https://stackoverflow.com/a/12541521/5238559), and also visible from the warning "DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please..." in my project.
Now, I was under the impression that I specified that I only want python 3 to be loaded to the environment. Can someone tell me what's wrong with my appveyor.yml and my tox.ini:
appveyor.yml
```
branches:
only:
- master
environment:
matrix:
- TOXENV: py37
PYTHON: "C:\\Python37-x64"
init:
- "ECHO %TOXENV%"
build:
off
install:
- "SET PATH=%PYTHON%; %PYTHON%\\Scripts; %PATH%"
- python -m pip install -U pip
- pip install tox
test_script:
- tox
```
ox.ini
```
[tox]
envlist = py37
[testenv]
passenv = APPVEYOR APPVEYOR_*
deps = .[test]
commands =
pytest -s --cov=phenopype --cov-report=html
- coveralls
```
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Feodor Fitsner on 21 Oct, 2020 05:01 AM
Try this:
2 Posted by moritz.luerig on 21 Oct, 2020 07:50 AM
That fixed it – many thanks!