Skip to content

Conversation

@bernhardkaindl
Copy link

No description provided.

@bernhardkaindl bernhardkaindl force-pushed the TDD-Py3-Merge branch 6 times, most recently from c94805c to 5b3e731 Compare April 26, 2023 05:49
@codecov
Copy link

codecov bot commented Apr 26, 2023

Codecov Report

❗ No coverage uploaded for pull request base (master@efa489e). Click here to learn what that means.
The diff coverage is n/a.

@@            Coverage Diff            @@
##             master       #5   +/-   ##
=========================================
  Coverage          ?   67.40%           
=========================================
  Files             ?       20           
  Lines             ?     3454           
  Branches          ?        0           
=========================================
  Hits              ?     2328           
  Misses            ?     1126           
  Partials          ?        0           

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

ydirson and others added 6 commits April 26, 2023 08:05
With python3, pylint complains about `else: raise()` constructs.
This rework avoids them and reduces cyclomatic complexity by using
the error-out-first idiom.

Signed-off-by: Yann Dirson <yann.dirson@vates.fr>
This is supposed to be just a module renaming to conform to PEP8, see
https://docs.python.org/3/whatsnew/3.0.html#library-changes

The SafeConfigParser class has been renamed to ConfigParser in Python
3.2, and backported as addon package.  The `readfp` method now
triggers a deprecation warning to replace it with `read_file`.

Originally authored by Yann Dirson.

Co-authored-by: Yann Dirson <yann.dirson@vates.fr>
Signed-off-by: Bernhard Kaindl <bernhard.kaindl@cloud.com>
xcp.xmlunwrap extracts XML Elements from XML, and for Python2,
the unwrapped unicode is encoded into Py2:str(bytes).

Python3 unwraps XML Text elements as the Py3:str type which is
likewise Unicode, but since Py3:str is the native type, we don't
want to encode the Py3:str to Py3:bytes as that would break the
API for use on Python3.

BEcause binary data is not legal XML content and XML Text elements
are defined to be encoded text, UTF-8 is the standard encoding,
which Python converts to.

It this fine to only encode() to Py2:str(=bytes) on Python2 as
a legacy operation which can be removed once we drop Python2.

Signed-off-by: Bernhard Kaindl <bernhard.kaindl@cloud.com>
Fix issue #19 based on the description and progress from PR xenserver#24.
Allows for opening text and binary files in text and binary modes.

Mode, encoding and error handling can be set by passing the parameters
"encoding" and "errors" using the kwargs parameters from openAddress()
and writeFile() to open(mode, **kwargs) and ftp.makefile(mode, **kwargs).

Signed-off-by: Bernhard Kaindl <bernhard.kaindl@cloud.com>
Add and enable a parameterized test to read binary data
from a file- and an HTTP based accessor.

Originally authored by Yann Dirson. Extracted, refactored
and squashed for a single considated and concise commit by me.

Co-authored-by: Yann Dirson <yann.dirson@vates.fr>
Signed-off-by: Bernhard Kaindl <bernhard.kaindl@cloud.com>
Comment from Yann:
diff-cover defaults to origin/main in new version, it seems.

Originally by Yann Dirson, Updates by me:

- Fix the GitHub action deprecation warning caused by the use of
  old action repo version which use the deprecated node.js 12
- Rename the variable "pyversion" to the upstream "python-version"
- Remove the installation of pyliblzma which is not used.
- Add branding.py to fix GitHub CI with Python3

Co-authored-by: Yann Dirson <yann.dirson@vates.fr>
Signed-off-by: Bernhard Kaindl <bernhard.kaindl@cloud.com>
…3.12)

Because future.standard_library also has not type markers,
replacing future with six.moves (which is also much shorter)
also makes fixing mypy easier.

Signed-off-by: Bernhard Kaindl <bernhard.kaindl@cloud.com>
Without these generated API descriptions, we'd have to disable all
checks which use these APIs because we'd have to typing info for them.

Signed-off-by: Bernhard Kaindl <bernhard.kaindl@cloud.com>
@bernhardkaindl bernhardkaindl force-pushed the TDD-Py3-Merge branch 8 times, most recently from 10014b5 to 74c2003 Compare April 26, 2023 08:10
@github-actions
Copy link

github-actions bot commented Apr 26, 2023

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
3454 2328 67% 40% 🟢

New Files

File Coverage Status
tests/init.py 100% 🟢
TOTAL 100% 🟢

Modified Files

No covered modified files...

updated for commit: eb92036 by action🐍

@bernhardkaindl bernhardkaindl force-pushed the TDD-Py3-Merge branch 4 times, most recently from 8364261 to b90a671 Compare April 27, 2023 02:44
@bernhardkaindl bernhardkaindl force-pushed the TDD-Py3-Merge branch 7 times, most recently from c0d24b4 to de11320 Compare April 27, 2023 04:02
Signed-off-by: Bernhard Kaindl <bernhard.kaindl@cloud.com>
@bernhardkaindl bernhardkaindl reopened this Jun 8, 2023
@bernhardkaindl bernhardkaindl deleted the TDD-Py3-Merge branch June 8, 2023 15:16
@bernhardkaindl bernhardkaindl restored the TDD-Py3-Merge branch June 8, 2023 17:50
@bernhardkaindl bernhardkaindl deleted the TDD-Py3-Merge branch June 8, 2023 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants