Closed LvffY closed 1 year ago
@reinout @mauritsvanrees I think this is quite urgent because I think every one using the latest version of this lib will be impacted by this error
I've taken your setup.cfg
, did a quick git init
in an empty dir, added a 0.1.dev0
version.txt
and ran fullrelease: no error. I'll have to look a bit further.
Ah, I had to add a changelog file, too. Now I'm getting the error.
This is only when you explicitly set an encoding in setup.cfg
. I don't think I have that in any of the many packages that I release. So not everybody is impacted. But should be fixed, yes.
@LvffY : found it, partially. Everything should work for you if you remove the "encoding=" line from your setup.cfg
. Without it, fullrelease runs fine.
Some left-over code from the weird magic we had to do for python2.
@mauritsvanrees : great minds think alike and comment at the same time? :-)
I wonder: is that "encoding" setting even needed anymore now that we're on python 3?
@reinout @mauritsvanrees I'll try to remove the encoding and tell you :)
May be a warning on the change log could be useful ?
Anyway, thanks for your very quick answer :)
We have this:
with open(filename, "rb", encoding=encoding) as filehandler:
data = filehandler.read()
That probably should either be this:
with open(filename, "r", encoding=encoding) as filehandler:
data = filehandler.read()
or this:
with open(filename, "rb") as filehandler:
data = filehandler.read().decode(encoding)
Or maybe try both.
It would be good to add a test, because apparently this is not caught by the current ones.
@reinout @mauritsvanrees you were right : removing the encoding property fixed my issue :)
I think that we can't still close the issue because this is just a workaround and bad properties shouldn't break the program, right ?
I wanted to try out the modifications made by #389.
Unfortuntately, I've fall into an issue that seems releated to the major version upgrade you've made.
I have a simple python (with src/tests directory layout) and trya
fullrealease --no-input
command (I've also triedfullrealease
manually and fall into the same error)To reproduce
The error