-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
For anyone who needs a Python 3-compatible FormAlchemy that actually works, read here... #71
Comments
Hi Robert,
Thanks for sharing. Are you saying that master has an unreleased version
that has the fix you need? And if so then all you need would be a new
release of FormAlchemy?
I'm not sure who's in charge of releases now, but since you felt the pain
then if someone reading this has the ability to do releases then it sounds
like it would make a positive impact to some folks out there. Anyone?
…On Tue, Nov 3, 2020, 4:09 PM Robert Rollins ***@***.***> wrote:
So if you're like me, and needed to update an ancient webapp that uses
FormAlchemy, but were frustrated by the lack of a release that fixes the
WebHelpers incompatibility which causes an error related to not being able
to use lists/tuples for options, here's how to fix that:
git clone ***@***.***:FormAlchemy/formalchemy.git
cd formalchemy
python setup.py sdist
cd dist
You're now in a folder with a file called FormAlchemy-1.6.dev0.tar.gz.
Put that file somewhere online (a S3 bucket works great), and then add that
URL to your requirements file. You *may* also need to update from
WebHelpers==1.3 to WebHelpers2==2.0, but I'm not 100% certain about that.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#71>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAB4O3LV37GXHR56XOEUSSDSOCLVNANCNFSM4TJMGY7A>
.
|
Yes, master has a number of changes that did not make it into 1.5.5, including one that makes it compatible with a change in WebHelpers from several years ago, which completely broke FormAlchemy. Also, something I forgot to mention is that line 7 of setup.py needs to be removed, because the six library is not available during the execution of setup.py while installing FormAlchemy through pip. It does an import that doesn't even get used anyway, so there's no harm in removing it. |
@coredumperror Maybe you could add a PR to make that change easier to include in the next release? @gawel @aconrad @smurfix Do you see a chance to cut a release? |
Sure, I could do that. To be honest, I expected my comment to sit here, unread, for possibly years, until someone like myself came along and tried to update an ancient codebase that used FormAlchemy. If I'd know that not one, but two people would actually come along and see it within a day, I would have made a PR. So I'll go do that. Though I believe it'll just be that one change to setup.py, as there are no other changes necessary on the master branch to make a working version. |
Thank you @coredumperror, this is much appreciated. Once it gets merged, I'll see if I have enough permissions to issue a new release. |
@coredumperror What do you think, will you need to support your app for a longer period of time? I.e., is it reasonable to keep FormAlchemy in a state that is reliably tested via CI? I did not managed to run a buildout with successful tests afterwards, so there might be some work involved beyond the usual cleanup. |
@aconrad Would you cut a release, as I do not have any PyPI rights for this package. There is a guide to create a release in the repo, although I failed with the tests. |
@sallner thanks for merging the PR. Could you do the release if I gave you the necessary PyPI permissions to publish a new FA release? |
@aconrad Yes, I would do that. |
What is your pypi username? |
it is |
@aconrad Have you tried to give me permission on PyPI? |
On 10.11.20 09:04, Steffen Allner wrote:
@aconrad <https://github.com/aconrad> Have you tried to give me
permission on PyPI?
I just added you, you should have received an invite.
…--
-- Matthias Urlichs
|
Thank you, that worked. I will prepare a release. |
Sorry for the late reply, and thanks Matthias for that.
…On Tue, Nov 10, 2020, 12:33 AM Steffen Allner ***@***.***> wrote:
Thank you, that worked. I will prepare a release.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#71 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAB4O3L3EICBIB45C6M55OLSPD3G5ANCNFSM4TJMGY7A>
.
|
Glad to hear that a working official release is coming! |
@coredumperror I made a release 1.5.6 https://pypi.org/project/FormAlchemy/1.5.6/. But I have to say, that the 1.5.5 already included the fix of the wrong Sidenote: Do you plan to use FormAlchemy for a longer time? Do we need to activate a CI? It is rather difficult to clean the repo and make tests working again. |
Yes, but it didn't include the other changes made to master since 1.5.5 was released. Those were already working in builds made manually from master. I only did the PR for this fix because it made it possible to make a new, working PyPI release that has those changes. I don't believe there's any good reason to make any further FormAlchemy releases. At least not for my sake. The only reason I came to this issue queue was because I'm working on updating an ancient app that my team hasn't got time to rewrite from scratch using modern tech. We wanted to update the app to Python 3, which meant we absolutely needed to update our version of FormAlchemy from 1.4.3. But I found that the latest version on PyPI was broken due to a later change made to one of its dependencies. Now that that's fixed, FormAlchemy should be pretty stable. |
Thanks @sallner for making the release, much appreciated! @coredumperror thanks again for your report and everyone else who chimed in. We're making people's work a little better this way. |
There's still a huge problem, as FormAlchemy 1.5.6 cannot be installed on Python 3, due to an import error in MsgFmt.py. cStringIO doesn't exist in Python 3. I'm pretty sure the issue is due to the changes in I tried editing MsgFmt.py to make it Python3 compatible, but I the more editing I did, the more it broke. I eventually gave up. I have no idea what MsgFmt.py is even doing, or why. Maybe there's a better way to do what it's doing in modern Python? It seems very antiquated, from the glimpses I took at the code while fixing the string of new exceptions that kept popping up. |
It's an ancient replacement for "msgfmt". Just call the system's msgfmt program. |
So we need tests anyhow. It is never a good idea to run without it and we should enforce it here again. |
I pushed a rudimentary "call the system's msgfmt" PR. Could be better but does the job for now. |
any updates on this? It's stating to affect us upgrading to latest version of python |
So if you're like me, and needed to update an ancient webapp that uses FormAlchemy, but were frustrated by the lack of a release that fixes the WebHelpers incompatibility which causes an error related to not being able to use lists/tuples for options, here's how to fix that:
You're now in a folder with a file called
FormAlchemy-1.6.dev0.tar.gz
. Put that file somewhere online (a S3 bucket works great), and then add that URL to your requirements file. You may also need to update fromWebHelpers==1.3
toWebHelpers2==2.0
, but I'm not 100% certain about that.The text was updated successfully, but these errors were encountered: