Bug 236938 - Python3 for lighttpd
Summary: Python3 for lighttpd
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Other
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-02-20 03:28 PST by Pascal Abresch
Modified: 2022-02-28 09:38 PST (History)
6 users (show)

See Also:


Attachments
Patch (2.37 KB, patch)
2022-02-20 03:30 PST, Pascal Abresch
no flags Details | Formatted Diff | Diff
Patch (2.63 KB, patch)
2022-02-26 12:01 PST, Pascal Abresch
no flags Details | Formatted Diff | Diff
Patch (4.80 KB, patch)
2022-02-26 13:54 PST, Pascal Abresch
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pascal Abresch 2022-02-20 03:28:35 PST
Python3 support should be enabled for lighttpd, the Haiku port currently uses lighttpd to run the tests.
Comment 1 Pascal Abresch 2022-02-20 03:30:40 PST
Created attachment 452689 [details]
Patch
Comment 2 Jonathan Bedard 2022-02-20 22:27:14 PST
Comment on attachment 452689 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=452689&action=review

> Tools/Scripts/webkitpy/layout_tests/servers/http_server.py:114
> +                 '               ".php"  => "%s"\n'

Worth noting that we won’t be adding PHP tests, and all existing tests have been replaced with Python. You should be able to remove PHP entirely, should you desire.
Comment 3 Pascal Abresch 2022-02-21 20:34:01 PST
Good day,
I don't mind much either way, I can submit a patch that replaces php instead.
Comment 4 Adrien Destugues 2022-02-22 00:07:59 PST
Yes, replacing php seems better and makes it clearer that it is not needed anymore.
Comment 5 Pascal Abresch 2022-02-26 12:01:20 PST
Created attachment 453304 [details]
Patch
Comment 6 Darin Adler 2022-02-26 13:34:04 PST
Comment on attachment 453304 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=453304&action=review

> Tools/Scripts/webkitpy/layout_tests/servers/http_server.py:-115
> -                 '               ".php"  => "%s" )\n\n') %
> -                                     self._port_obj._path_to_lighttpd_php())

Change log doesn’t mention why we’re removing ".php". Maybe a good idea, but why? Also, why not remove the _path_to_lighttpd_php function too?

> Tools/Scripts/webkitpy/layout_tests/servers/lighttpd.conf:41
> -static-file.exclude-extensions = ( ".php", ".pl", ".cgi" )
> +static-file.exclude-extensions = ( ".py", ".pl", ".cgi" )

Same question: What’s the rationale for removing ".php"? Also, not great to leave the mention of it in the comment on the line above.
Comment 7 Darin Adler 2022-02-26 13:34:50 PST
Comment on attachment 453304 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=453304&action=review

>> Tools/Scripts/webkitpy/layout_tests/servers/http_server.py:-115
>> -                                     self._port_obj._path_to_lighttpd_php())
> 
> Change log doesn’t mention why we’re removing ".php". Maybe a good idea, but why? Also, why not remove the _path_to_lighttpd_php function too?

I see Jonathan Bedard advising you to remove php, so all you need to do is to mention this in the change log. And I do think we should remove the _path_to_lighttpd_php function and any other php-only code.
Comment 8 Pascal Abresch 2022-02-26 13:54:42 PST
Created attachment 453308 [details]
Patch
Comment 9 Pascal Abresch 2022-02-26 13:56:12 PST
I've updated the patch, it should be clearer now.
Comment 10 Darin Adler 2022-02-26 13:59:28 PST
Comment on attachment 453308 [details]
Patch

r=me, but as usual, best to wait for EWS results before we set commit-queue+
Comment 11 Pascal Abresch 2022-02-26 14:03:06 PST
I don't think any port but haiku uses lighttpd for tests currently, so it may be broken even if EWS passes. I don't currently have a reference to test against for this. (The haiku port already patches this file differently so not a straightforward replacement to test with)
Comment 12 Darin Adler 2022-02-26 14:06:04 PST
OK, we’ll just use EWS to verify that this change, which should not affect the ports in EWS, does not affect them.
Comment 13 Radar WebKit Bug Importer 2022-02-27 03:29:16 PST
<rdar://problem/89525957>
Comment 14 Pascal Abresch 2022-02-28 07:37:32 PST
EWS passed, it should be ready to commit now.
Comment 15 Jonathan Bedard 2022-02-28 09:05:35 PST
(In reply to Pascal Abresch from comment #14)
> EWS passed, it should be ready to commit now.

Ok! Sending through commit-queue now.
Comment 16 EWS 2022-02-28 09:38:30 PST
Committed r290599 (247875@main): <https://commits.webkit.org/247875@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 453308 [details].