TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Python 2, Python 3, Debian and Porting

195 点作者 neokya大约 10 年前

17 条评论

ak217大约 10 年前
Shameless plug of a modern Python 2&#x2F;3 porting tool that I wrote: <a href="https:&#x2F;&#x2F;github.com&#x2F;kislyuk&#x2F;eight" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;kislyuk&#x2F;eight</a>, which builds upon the excellent work in <a href="https:&#x2F;&#x2F;pypi.python.org&#x2F;pypi&#x2F;future" rel="nofollow">https:&#x2F;&#x2F;pypi.python.org&#x2F;pypi&#x2F;future</a>.
评论 #9391357 未加载
评论 #9391052 未加载
rspeer大约 10 年前
When it comes to finding which packages need to be ported:<p>I&#x27;ve been disappointed by the &quot;Python 3 Wall of Superpowers&quot; and the fact that they&#x27;ve basically never updated their package list. (They update the Python 3 readiness, but you&#x27;d never find out if a popular package created in the last 4 years was incompatible, or if packages on the list have become unpopular.)<p>Today I found py3readiness.org, which is much more relevant and up-to-date. It has a better call to action, too.<p><a href="http:&#x2F;&#x2F;py3readiness.org&#x2F;" rel="nofollow">http:&#x2F;&#x2F;py3readiness.org&#x2F;</a>
评论 #9392540 未加载
评论 #9391323 未加载
评论 #9391197 未加载
diminoten大约 10 年前
Am I correct to assume this would be a <i>fantastic</i> place to start contributing to open source projects by helping convert these Debian tools over to Python 3?
评论 #9389327 未加载
评论 #9389585 未加载
grumbel大约 10 年前
&gt; We can all soon look forward to the day where we no longer have to play Unicode whack-a-mole<p>I don&#x27;t expect Unicode trouble to disappear with Python3, quite the opposite, it&#x27;s trivially to insert ticking Unicode time bombs into Python3 code, especially in things surrounding shell scripting. Something as trivial as this:<p><pre><code> print(os.listdir()) </code></pre> Will explode when it runs into filenames that aren&#x27;t encodable by Unicode (i.e. perfectly legal filenames in Linux). Linux allows raw binary in a lot of places (filenames, arguments, environment variables) where Python expects Unicode.
评论 #9391287 未加载
评论 #9390304 未加载
评论 #9390344 未加载
deckiedan大约 10 年前
As someone who uses a lot of Python scripting for sys-admin automation stuff, is there anyone here on HN who could ask apple to start distributing a python3 binary with the OS by default?<p>Otherwise we&#x27;re going to end up with a similar situation as BASH and other utils in a few years time, where OSX comes with Python2.7.x, and everything else in the world is Python3...<p>(Although, by 2020, apple will probably have deprecated OSX in favour of iOS, and have javascript as the only blessed scripting language...)
评论 #9391426 未加载
评论 #9390790 未加载
评论 #9390690 未加载
chimeracoder大约 10 年前
&gt; Python 2 is scheduled to be EOL&#x27;d upstream officially and for good in 2020. We&#x27;re in 2015 now (wow, that went quickly), and keeping our release cadence up (3 years a pop) puts Stretch up in 2018, and Buster in 2021.<p>Am I missing something? Did Debian decide to extend their release cycles?<p>Jessie is due to be released next week, which is 2 years since Wheezy (May 2013). In fact, the last several years have all been 2-year cycles, not 3. The only three-year cycle was Woody → Sarge (2002-2005), and AFAIK, that delay was one of the reasons that Ubuntu had room to enter the market. Since this put pressure on Debian to make their development more rapid, I&#x27;d be surprised if they decided to move in the opposite direction.
评论 #9389501 未加载
评论 #9389504 未加载
FreakyT大约 10 年前
Nice, I&#x27;m glad to see that Python 3 adoption is finally picking up steam! Python 2 is nice, but it has really started to overstay its welcome, I think.
rkuska大约 10 年前
We (Fedora) are step ahead.<p>Currently we are waiting for a last few packages to be ported (anaconda is already running on python3 and ready for Fedora 23 release). Ironically the hardest part isn&#x27;t porting (we&#x27;ve sent a huge amount of patches to upstream projects) but getting upstreams to accept the python3 as supported interpreter (&quot;what is this python3 thing?&quot; yes, this is a real quote).<p>I am happy to see a new distros joinning a party, gl!
afarrell大约 10 年前
If you want to switch back and forth between python2 and python3, one option is to install miniconda (like Anaconda, but with just the package manager) as your Python distribution and create a python2 environment (conda create --name=myproject-py2 python=2.7 &amp;&amp; source activate myproject-py2) that you can then pip install the python2-only libraries into. Then, when your libraries support Python3, create a new Python3 environment and install them into that (conda env export &gt; environment.yml &amp;&amp; conda create --name=myproject-py3 python=3.4 &amp;&amp; conda env update --name=myproject-py3 --file=environment.yml &amp;&amp; source activate myproject-py3)<p>See <a href="http:&#x2F;&#x2F;conda.io" rel="nofollow">http:&#x2F;&#x2F;conda.io</a><p>Disclosure: conda is open-source, but I work for company that sponsors most of the development.
评论 #9389845 未加载
评论 #9391033 未加载
syllogism大约 10 年前
My biggest peeve writing Python 3 is pretty trivial...<p>I cannot get used to typing print()<p>Every time I go to debug a line, I get a syntax error, and have to go back and change it. And I type a lot of debug lines!<p>I need to find a vim extension to handle this, but so far it just makes me frustrated whenever I try to type Python 3.
评论 #9392504 未加载
评论 #9393061 未加载
bayesianhorse大约 10 年前
Interesting side node: Blender (an open source graphics suite) switched to Python 3 in like 2008 (so far as I can determine).<p>The reasoning probably was &quot;Hey, the rest of the Python community would probably leave us in the dust, if we don&#x27;t...&quot;
krylon大约 10 年前
Oh man.<p>I&#x27;ve been meaning to check out Python 3 for a couple of years now, but so far I did not have a compelling reason. Maybe it&#x27;s time to start anyway.
评论 #9392201 未加载
评论 #9391228 未加载
NeoAbdn大约 10 年前
Someone asked why not swap to Elixir or Rust, but why not actually swap to the sysadmins dream of Ruby?
评论 #9395102 未加载
评论 #9393084 未加载
kristjanvalur大约 10 年前
Or just fork python 2 and keep on trucking there in happy land.
stefantalpalaru大约 10 年前
&gt; Booo, Python 2!<p>It would be better for everybody if we&#x27;d treat Python 2 and Python 3 like separate languages. Then we can reason about the sanity of spending development time to port existing and working code from one language to another.
评论 #9390640 未加载
评论 #9391861 未加载
评论 #9390362 未加载
winter_blue大约 10 年前
This seems like a good time and opportunity for Debian to try their hand at one of the recent languages that have popped up like Rust, Elixir, etc.
评论 #9390692 未加载
评论 #9391950 未加载
upofadown大约 10 年前
I am getting really tired of this &quot;if Python3 is to live then Python2 must die&quot; stuff...<p>Perhaps Debian should avoid the war entirely and switch to another scripting language.
评论 #9390548 未加载