---
title: "EVE Online 启动向 Python 3 的迁移：240 万行代码的挑战"
source: "Simon Willison 博客（Atom）"
source_tier: "t2"
url: "https://simonwillison.net/2026/Aug/25/eve-online-move-to-python-3/"
permalink: "https://feed.astralor.com/items/itm_7b67d437667cb63c81a0052b"
published: "2026-08-25T22:59:30.000Z"
score: 71
channel: "tech"
tags: ["Carbon Engine","CCP Games","EVE Frontier","Futurize","Python 3","Stackless Python"]
---

# EVE Online 启动向 Python 3 的迁移：240 万行代码的挑战

## AI 点评

> 这条新闻对 Python 技术圈来说是个大事件：一个运行了二十年的 Stackless Python 2.7 服务终于要动大手术了。虽然公告没给时间表，但 EVE Frontier 已经走通了替换 Stackless 的路，等于提前踩点。对还在用 Python 2 的团队来说，这是一份难得的实战地图。

## 速览

EVE Online 宣布启动向 Python 3 的升级，这是其自 2010 年升级至 Stackless Python 2.7 后的又一次重要版本迁移。团队将使用 futurize 脚本处理约 240 万行代码，并人工审查约 2 万个 Python 2 与 3 行为差异点，例如整数除法语义变化。由于 EVE Online 仍依赖 Stackless Python，公告未提及具体替代方案，但此前他们在 EVE Frontier 中已用开放源码的 carbonengine/scheduler 取代 Stackless，这或许为本次迁移提供了技术路径。

## 关键点

- EVE Online 将用 futurize 脚本处理 240 万行代码，再人工审查约 2 万个兼容性差异点。
- 上次重大升级是在 2010 年升级到 Stackless Python 2.7，距今已 16 年。
- 公告未说明如何替代 Stackless Python，但 EVE Frontier 已使用开源 scheduler 库实现了替代。
- 迁移难点包括 Python 2/3 行为差异，如 `/` 运算在 Python 2 返回整数、Python 3 返回浮点数。

## 全文

EVE Online: The Move to Python 3 Begins! EVE Online has been one of the most interesting case studies in Python at scale for over twenty years now. They've been running on Stackless Python since their launch in 2003, and their last major upgrade was 16 years ago, to Stackless Python 2.7 in 2010. Their upgrade to Python 3 will start using the futurize script against 2.4 million lines of code, followed by careful manual review of the ~20,000 places where Python 2 and 3 behavior differ - for example 1 / 2 is 0 in Python 2 but is 0.5 in Python 3. There's nothing in this announcement about how they plan to replace Stackless, but at their conference last year they presented Scheduling in Carbon: Leaving Stackless Python Behind describing how they replaced Stackless in the Carbon engine for their more recent game EVE Frontier, using their (now open source) carbonengine/scheduler library. Via Lobster.rs Tags: eve-online, migrations, python, python3, stackless

---

引用前请核对原文;本文由星际流动整理:https://feed.astralor.com/items/itm_7b67d437667cb63c81a0052b
