apispec icon indicating copy to clipboard operation
apispec copied to clipboard

Drop deprecated distutils.version.LooseVersion in favor of packaging.…

Open theonlynexus opened this issue 2 years ago • 8 comments

distutils.version.LooseVersion has been deprecated, instead use packaging.version.Version

theonlynexus avatar Apr 25 '22 01:04 theonlynexus

Thanks.

See discussion here: https://github.com/marshmallow-code/marshmallow/pull/1903 and in #739.

Since we expose OpenAPIVersion, this is a breaking change -> 6.0.

No rush since this is just a deprecation warning and it won't break until Python 12.

lafrech avatar Apr 25 '22 07:04 lafrech

Oh... I see. Sorry for the double trouble. Shall I just close the PR since you're already on the job?

theonlynexus avatar Apr 25 '22 08:04 theonlynexus

No pb. You may leave the PR open, even fix it. Just don't expect it to be merged soon.

lafrech avatar Apr 25 '22 09:04 lafrech

1- sorry again for submitting a buggy PR. 2- sorry for taking such a long time to fix it... I had a BIG injection of life. 3- Everything should be OK, now. Please check it out?

theonlynexus avatar Jul 11 '22 04:07 theonlynexus

Hi.

No pb with the delay. As I said, this is no emergency.

I didn't take the time to review thoroughly but I saw a mention of backward compatibility. Since we'll be shipping this in a major update, we don't have to worry about backward compatibility.

Thanks for your work on this.

lafrech avatar Jul 13 '22 22:07 lafrech

Related to this, is there any way to hide only specific deprecation warnings in Python? I get hundreds of these in my current app tests, from apispec and other libraries, and while the warning itself can be considered unimportant at the moment, it still clutters my test reports, and I still want to see other, possibly relevant warnings, so a blanket filter on DeprecationWarning doesn't really work for me.

judgeaxl avatar Aug 15 '22 02:08 judgeaxl

[...] I get hundreds of these in my current app tests, from apispec and other libraries, and while the warning itself can be considered unimportant at the moment, it still clutters my test reports[...]

This is exactly why I made the PR.

theonlynexus avatar Aug 15 '22 03:08 theonlynexus

See comment above. Since this is technically a breaking change, this is v6.

I intend to ship v6 soon. See v6 milestone.

I just need to finish and polish (documentation, etc.) #778. The rest is more or less trivial.

Nothing blocking, just time.

Meanwhile, this is just a deprecation warning about a breakage in Python 12.

lafrech avatar Sep 22 '22 13:09 lafrech

Achieved in #801. I removed OpenAPIVersion and dropped compatibility.

lafrech avatar Oct 04 '22 13:10 lafrech

Change released in 6.0.0b1.

lafrech avatar Oct 04 '22 13:10 lafrech