-
Notifications
You must be signed in to change notification settings - Fork 141
Add Python 3.8 #771
Comments
I just created List of Python Kata to Update to Python 3 after running a script to enable Python 3 if it's compatible. I've also appended a list of kata that has 3.4, but not 3.6. I'll remove 3.4 after those are updated. I think some are considered incompatible because it timeouts (#757) which I still don't know the cause. I might experiment with using other images instead of the official one and compare. |
Is it possible to replace all |
Yeah, it should possible to replace all, validate against tests, then store the updated code. But I'll need to write some code to wrap this logic. For now, I'll update the list and separate the kata with |
@kazk All the 3.4.3 kata are updated. Can it be removed now? |
@Steffan153 Awesome. I'll remove it soon. |
@Steffan153 I found some more kata having only 2.7 and 3.4. See the wiki. Some of them are timing out because of #757 which still persists with Python 3.8 :( |
Okay, those are done now. |
Yes, thanks everyone for helping. I finished the remaining ones on the wiki and updated the page. Last night, I ran a script to update the default language version of the kata (this script runs any kata with outdated version set to the default and updates the default to the newest valid one), hoping to have all set to I'm debating if I should just update the language versions even it timeouts so I can get rid of 2.7 and 3.4 on Codewars. I briefly experimented with Have anyone tried using |
I think we can ignore the issue with Docker affecting the runtime and migrate to Python 3.8 as soon as the remaining katas are updated.
I haven't used
(Not sure what's the point of the question, considering the whole |
I just wanted to confirm what the article said (https://github.com/codewars/codewars-runner-cli/issues/757#issuecomment-602983343) was true about |
@kazk I can clean up those katas under an hour or two, but currently I'm blocked by these katas because they can't be edited (I already cleaned up those that I can). Is it possible to not wait for a week before they're open for editing? (For the record, the cause of these katas are #757 for 20% of them, and raulbc777 having very crappy reference solutions for the other 80%, which neither is too hard to fix.) |
@Voileexperiments Thanks. It's currently not possible, but I'll add a way to temporarily allow certain users to fix things without waiting. I should be able to deploy that tonight or tomorrow. |
Since there's no issue about PHP 7.4, is it possible to run a script to add |
@Steffan153 I can do that once all of them are PHP 7.4 compatible. Adding |
@FArekkusu @Voileexperiments @Steffan153 I just gave you guys temporary privilege to fix kata without waiting. You should be able to edit the kata you haven't contributed before. Please let me know if you still can't edit and don't abuse the power. Also, this is experimental and I may revoke it anytime. |
@kazk All Python katas are updated 😉 |
I see that Voile also finished the Nim kata. |
@kazk C, Coq, and Julia old versions can be removed now. There's 2 C++ kata left, which should probably be retired, see the wiki: https://github.com/Codewars/codewars.com/wiki/List-of-Cpp-Kata-to-Update-to-Cpp17 |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Note: updating python to 3.8 will make almost every code golf kata a f... lot easier. => either we'll need to rewrite them all, changing the char constraint, or we'll need to rewrite them all ( x) ) to ensure only 3.6 is used (if it stays available after adding 3.8) EDIT: this problem will appear again in the future, I guess... So I'm wondering: would it be possible to have several versions of python, some allowed only in previoulsy created katas and those not having access to newer versions published afterward? That would surely be the best way to get rid of the constant update/rewrite of ultra specific stuff like the "one line task" katas. |
Except everything will have to be rewritten when Python 3.6 will be deprecated as well. You can't support a language version forever only to avoid adjusting some katas' requirements. |
yeah, sure. Just saying that it's normal to have to rewrite some things, but for this kind of katas, the constraints are extremely higly related to the actual language version. So... |
That's been already possible. Just make language version a requirement. import sys
# Only allow Python < 3.8
assert sys.version_info < (3, 8) |
But if the plan is to delete the old versions, then that won't work - the kata would have to be deleted. |
Yeah, we can retire the language from the kata when it's no longer relevant. If it's the only language, then we can retire the kata as well. I need to make retiring a language possible. If I remember correctly, deleting a language will delete the solutions list too. |
So you mean by retiring that the solutions for that lang will still be available, but just not completeable? |
Yeah, but feel free to let me know if you have other ideas. I'm open to suggestions except for keeping the old language versions forever. |
Deployed. Python 3.8 have some changes.
from preloaded import something # If preloaded exists
import codewars_test as test
from solution import add
@test.describe("example")
def test_group():
@test.it("test case")
def test_add():
test.assert_equals(add(1, 1), 2) I'm planning to run a script to update compatible kata automatically sometime soon and will create a list of incompatible kata like usual. |
@kazk where's the solution located now? Doing |
@FArekkusu As far as I know, it's |
To quote kazk from another thread:
|
Sorry, I forgot to mention that, updated. There's 32 kata using |
what do you mean? I don't see any problem on my side :o |
@FArekkusu Sure.
(also with the preloaded) |
I'm assuming you guys figured out, but let me know if there's anything that's still unclear.
Nothing changed for the older language versions. The older versions have been doing similar hack/magic and will continue to. I won't introduce breaking changes to existing language versions unless the language itself is in beta. From Python 3.8, you can import explicitly to disable those magic. I don't like the runner doing anything special (adding code you didn't write, concatenating, etc), so I will slowly deprecate them as we add new language versions. |
Is it possible to perform an automatic update of all katas and replace |
I'm planning to add a way to make small changes to tests safely. Basically just modify, run tests, then revert if anything unexpected happens. I'm currently little busy, so I can't give any timelines yet. For Python, it should be safe if we used full function names ( |
I've skimmed through the list of deprecated features in Python 3.7 and 3.8, and I didn't notice any changes that would break Python 3-compatible katas. On another note, I think Python 3.4.3 could be removed as well considering it lacks features added with the newer language versions, and everything that works in version 3.4.3 already works in 3.6.0.
👍 reaction might help.
The text was updated successfully, but these errors were encountered: