cvat icon indicating copy to clipboard operation
cvat copied to clipboard

cvat-sdk: remove broken and unused body-to-params conversion

Open SpecLad opened this issue 3 years ago • 4 comments

It's broken, because it generates a multipart/form-data body that Django REST Framework cannot parse. DRF doesn't examine the individual Content-Type headers of parts, so it interprets the JSON-encoded values as str()-encoded values, which corrupts them.

Since this logic is also currently unused (and it's unclear whether it will ever be used again), remove it.

Motivation and context

This is a follow-up to #5058.

How has this been tested?

Relying on CI for this.

Checklist

  • [x] I submit my changes into the develop branch
  • ~~[ ] I have added a description of my changes into CHANGELOG file~~
  • ~~[ ] I have updated the documentation accordingly~~
  • ~~[ ] I have added tests to cover my changes~~
  • [x] I have linked related issues (read github docs)
  • ~~[ ] I have increased versions of npm packages if it is necessary (cvat-canvas, cvat-core, cvat-data and cvat-ui)~~

License

  • [x] I submit my code changes under the same MIT License that covers the project. Feel free to contact the maintainers if that's a concern.

SpecLad avatar Nov 04 '22 14:11 SpecLad

/check

nmanovic avatar Nov 07 '22 04:11 nmanovic

:x: Some checks failed :page_facing_up: See logs here

github-actions[bot] avatar Nov 07 '22 04:11 github-actions[bot]

@SpecLad , what is the next step with the PR?

nmanovic avatar Nov 21 '22 17:11 nmanovic

@SpecLad , what is the next step with the PR?

It's on the backburner for now, because some tests don't pass and I can't fix them easily. It's not blocking anything, so I'll come bsck to it if this issue becomes relevant again (or if I have a spare minute).

SpecLad avatar Nov 21 '22 17:11 SpecLad

I decided to fix this in a different way. I'll open a new PR, since it won't have much in common with this.

SpecLad avatar Dec 16 '22 11:12 SpecLad