Re: [Cython] [cython-users] Cython 0.23.4 released
On 10 October 2015 at 15:46, Stefan Behnel wrote: > Hi everyone, > > here is a minor bug-fix release for the 0.23 release series that repairs > some problems and regressions. > > https://pypi.python.org/pypi/Cython/0.23.4 > > Complete changelog follows below. > > > You can get the signed release from here: > > http://cython.org/ > > http://cython.org/release/Cython-0.23.4.tar.gz > > http://cython.org/release/Cython-0.23.4.zip > > > SHA1 sums: > fc574c5050cd5a8e34435432e2a4a693353ed807 Cython-0.23.4.tar.gz > ad477040a22190b5506a3d8ddde646b7586d5703 Cython-0.23.4.zip > Stefan, should we upload wheels to PyPI? It is a bit of manual work, as we would need to download artifacts for every build here: https://ci.appveyor.com/project/cython/cython/build/0.23.x-31 then use twine to do the uploads. I do not have the PyPI password to do all by myself. -- Lisandro Dalcin Research Scientist Computer, Electrical and Mathematical Sciences & Engineering (CEMSE) Numerical Porous Media Center (NumPor) King Abdullah University of Science and Technology (KAUST) http://numpor.kaust.edu.sa/ 4700 King Abdullah University of Science and Technology al-Khawarizmi Bldg (Bldg 1), Office # 4332 Thuwal 23955-6900, Kingdom of Saudi Arabia http://www.kaust.edu.sa Office Phone: +966 12 808-0459 ___ cython-devel mailing list cython-devel@python.org https://mail.python.org/mailman/listinfo/cython-devel
Re: [Cython] [cython-users] Cython 0.23.4 released
Lisandro Dalcin schrieb am 11.10.2015 um 10:30: > On 10 October 2015 at 15:46, Stefan Behnel wrote: >> here is a minor bug-fix release for the 0.23 release series that repairs >> some problems and regressions. >> >> https://pypi.python.org/pypi/Cython/0.23.4 > > Stefan, should we upload wheels to PyPI? It is a bit of manual work, > as we would need to download artifacts for every build here: > https://ci.appveyor.com/project/cython/cython/build/0.23.x-31 then use > twine to do the uploads. I do not have the PyPI password to do all by > myself. One of the reasons I released 0.23.4 now (apart from the bug fixes) was to get clean branch builds from which I could upload the wheels. You're almost a day late. :) BTW: $ vanity -q cython Cython has been downloaded 4007918 times! Stefan ___ cython-devel mailing list cython-devel@python.org https://mail.python.org/mailman/listinfo/cython-devel
Re: [Cython] git master fails to compile scipy
thanks, another file fails too: https://github.com/scipy/scipy/blob/master/scipy/sparse/csgraph/_shortest_path.pyx Error compiling Cython file: ... for k from csr_indptr[j] <= k < csr_indptr[j + 1]: w12 = csr_weights[k] ind_k = csr_indices[k] d2 = dist_matrix[i, ind_k] if d1 + w12 < d2: dist_matrix[i, ind_k] = d2 = d1 + w12 ^ scipy/sparse/csgraph/_shortest_path.pyx:798:56: Compiler crash in AnalyseExpressionsTransform ModuleNode.body = StatListNode(_shortest_path.pyx:12:0) StatListNode.stats[17] = StatListNode(_shortest_path.pyx:770:5) StatListNode.stats[0] = CFuncDefNode(_shortest_path.pyx:770:5, args = [...]/6, modifiers = [...]/0, visibility = u'private') File 'Nodes.py', line 430, in analyse_expressions: StatListNode(_shortest_path.pyx:777:4, is_terminator = True) File 'Nodes.py', line 6370, in analyse_expressions: ForFromStatNode(_shortest_path.pyx:786:4, relation1 = u'<=', relation2 = u'<') File 'Nodes.py', line 430, in analyse_expressions: StatListNode(_shortest_path.pyx:787:8) File 'Nodes.py', line 6370, in analyse_expressions: ForFromStatNode(_shortest_path.pyx:790:8, relation1 = u'<=', relation2 = u'<') File 'Nodes.py', line 430, in analyse_expressions: StatListNode(_shortest_path.pyx:791:12) File 'Nodes.py', line 6370, in analyse_expressions: ForFromStatNode(_shortest_path.pyx:791:12, relation1 = u'<=', relation2 = u'<') File 'Nodes.py', line 430, in analyse_expressions: StatListNode(_shortest_path.pyx:792:16) File 'Nodes.py', line 6370, in analyse_expressions: ForFromStatNode(_shortest_path.pyx:793:16, relation1 = u'<=', relation2 = u'<') File 'Nodes.py', line 430, in analyse_expressions: StatListNode(_shortest_path.pyx:794:20) File 'Nodes.py', line 5853, in analyse_expressions: IfStatNode(_shortest_path.pyx:797:20) File 'Nodes.py', line 5899, in analyse_expressions: IfClauseNode(_shortest_path.pyx:797:23) File 'Nodes.py', line 430, in analyse_expressions: StatListNode(_shortest_path.pyx:798:24) File 'Nodes.py', line 4787, in analyse_expressions: CascadedAssignmentNode(_shortest_path.pyx:798:56, assignment_overloads = [...]/0) File 'Nodes.py', line 5157, in analyse_types: CascadedAssignmentNode(_shortest_path.pyx:798:56, assignment_overloads = [...]/0) Compiler crash traceback from this point on: File "/tmp/local/lib/python2.7/site-packages/Cython-0.24.0a0-py2.7-linux-x86_64.egg/Cython/Compiler/Nodes.py", line 5157, in analyse_types overloaded = lhs.type.is_cpp_class and env.lookup_operator('=', [lhs, self.rhs]) AttributeError: 'NoneType' object has no attribute 'is_cpp_class' On 11.10.2015 07:30, Robert Bradshaw wrote: > Thanks for the report. This should be fixed with > https://github.com/cython/cython/commit/eef2bc650945d69158e888653a2f8bd6bbad3db3 > > On Sat, Oct 10, 2015 at 2:11 PM, Julian Taylor via cython-devel > wrote: >> hi, >> since ab78f93b3ffa88183a0d2aae6b692e394c51f860 scipy does not build anymore: >> the failing file is: >> https://github.com/scipy/scipy/blob/master/scipy/sparse/csgraph/_reordering.pyx >> ___ cython-devel mailing list cython-devel@python.org https://mail.python.org/mailman/listinfo/cython-devel
[Cython] can we deprecate for-from loops?
Hi! The syntax construct "for i from 0 <= i < 10" has been silently outdated for years. Can we start issuing a warning that normal range() loops are preferred? While I don't see it going to go away any time soon, I'd like to make users aware that it's an unnecessary syntax wart that's best avoided and that should really not be used in new code. Stefan ___ cython-devel mailing list cython-devel@python.org https://mail.python.org/mailman/listinfo/cython-devel
Re: [Cython] git master fails to compile scipy
Julian Taylor via cython-devel schrieb am 11.10.2015 um 12:38: > another file fails too: > https://github.com/scipy/scipy/blob/master/scipy/sparse/csgraph/_shortest_path.pyx > > Error compiling Cython file: > > ... > for k from csr_indptr[j] <= k < csr_indptr[j + 1]: > w12 = csr_weights[k] > ind_k = csr_indices[k] > d2 = dist_matrix[i, ind_k] > if d1 + w12 < d2: > dist_matrix[i, ind_k] = d2 = d1 + w12 >^ > > > scipy/sparse/csgraph/_shortest_path.pyx:798:56: Compiler crash in > AnalyseExpressionsTransform > > ModuleNode.body = StatListNode(_shortest_path.pyx:12:0) > StatListNode.stats[17] = StatListNode(_shortest_path.pyx:770:5) > StatListNode.stats[0] = CFuncDefNode(_shortest_path.pyx:770:5, > args = [...]/6, > modifiers = [...]/0, > visibility = u'private') > File 'Nodes.py', line 430, in analyse_expressions: > StatListNode(_shortest_path.pyx:777:4, > is_terminator = True) > File 'Nodes.py', line 6370, in analyse_expressions: > ForFromStatNode(_shortest_path.pyx:786:4, > relation1 = u'<=', > relation2 = u'<') > File 'Nodes.py', line 430, in analyse_expressions: > StatListNode(_shortest_path.pyx:787:8) > File 'Nodes.py', line 6370, in analyse_expressions: > ForFromStatNode(_shortest_path.pyx:790:8, > relation1 = u'<=', > relation2 = u'<') > File 'Nodes.py', line 430, in analyse_expressions: > StatListNode(_shortest_path.pyx:791:12) > File 'Nodes.py', line 6370, in analyse_expressions: > ForFromStatNode(_shortest_path.pyx:791:12, > relation1 = u'<=', > relation2 = u'<') > File 'Nodes.py', line 430, in analyse_expressions: > StatListNode(_shortest_path.pyx:792:16) > File 'Nodes.py', line 6370, in analyse_expressions: > ForFromStatNode(_shortest_path.pyx:793:16, > relation1 = u'<=', > relation2 = u'<') > File 'Nodes.py', line 430, in analyse_expressions: > StatListNode(_shortest_path.pyx:794:20) > File 'Nodes.py', line 5853, in analyse_expressions: > IfStatNode(_shortest_path.pyx:797:20) > File 'Nodes.py', line 5899, in analyse_expressions: > IfClauseNode(_shortest_path.pyx:797:23) > File 'Nodes.py', line 430, in analyse_expressions: > StatListNode(_shortest_path.pyx:798:24) > File 'Nodes.py', line 4787, in analyse_expressions: > CascadedAssignmentNode(_shortest_path.pyx:798:56, > assignment_overloads = [...]/0) > File 'Nodes.py', line 5157, in analyse_types: > CascadedAssignmentNode(_shortest_path.pyx:798:56, > assignment_overloads = [...]/0) > > Compiler crash traceback from this point on: > File > "/tmp/local/lib/python2.7/site-packages/Cython-0.24.0a0-py2.7-linux-x86_64.egg/Cython/Compiler/Nodes.py", > line 5157, in analyse_types > overloaded = lhs.type.is_cpp_class and env.lookup_operator('=', > [lhs, self.rhs]) > AttributeError: 'NoneType' object has no attribute 'is_cpp_class' Thanks, here's a fix: https://github.com/cython/cython/commit/ec1c92ee169e014cc12e5f3ef99d5ec0150d3228 There was a major refactoring in the latest master that cleaned up all the convoluted indexing and buffer/memoryview access code that piled up over the years. I'm not too surprised that I missed a few places and broke some code along the way. Thanks for testing. Stefan ___ cython-devel mailing list cython-devel@python.org https://mail.python.org/mailman/listinfo/cython-devel
Re: [Cython] can we deprecate for-from loops?
On 2015-10-11 16:30, Stefan Behnel wrote: Hi! The syntax construct "for i from 0 <= i < 10" has been silently outdated for years. Can we start issuing a warning that normal range() loops are preferred? Is there anything wrong with the for ... from ... syntax? In more complicated situations I find for i from a <= i < b by s more readable than the equivalent for i in range() statement. I know it's not a strong argument, it's just something to keep in mind. ___ cython-devel mailing list cython-devel@python.org https://mail.python.org/mailman/listinfo/cython-devel
Re: [Cython] can we deprecate for-from loops?
On Sun, Oct 11, 2015 at 1:01 PM, Jeroen Demeyer wrote: > On 2015-10-11 16:30, Stefan Behnel wrote: >> >> Hi! >> >> The syntax construct "for i from 0 <= i < 10" has been silently outdated >> for years. Can we start issuing a warning that normal range() loops are >> preferred? > > > Is there anything wrong with the for ... from ... syntax? In more > complicated situations I find > > for i from a <= i < b by s > > more readable than the equivalent for i in range() statement. > > I know it's not a strong argument, it's just something to keep in mind. A weak argument for removing the " for i from a <= i < b by s" syntax: - it makes it more difficult for somebody who only knows Python to read Cython code (adding one new idea that is not necessary). - it doesn't look Pythonic (purely subjective) -- William > > > ___ > cython-devel mailing list > cython-devel@python.org > https://mail.python.org/mailman/listinfo/cython-devel -- William (http://wstein.org) ___ cython-devel mailing list cython-devel@python.org https://mail.python.org/mailman/listinfo/cython-devel
Re: [Cython] can we deprecate for-from loops?
Stefan Behnel wrote: Hi! The syntax construct "for i from 0 <= i < 10" has been silently outdated for years. Can we start issuing a warning that normal range() loops are preferred? I'd be in favour of replacing it with just 'for 0 <= i < 10', but -1 on removing it altogether. I introduced it in Pyrex for a reason -- to clearly express iterations over ranges of integers with arbitrary combinations of open/closed endpoints, for use in conjunction with C code. I believe that reason is still valid. -- Greg ___ cython-devel mailing list cython-devel@python.org https://mail.python.org/mailman/listinfo/cython-devel
Re: [Cython] can we deprecate for-from loops?
Greg Ewing wrote: > Stefan Behnel wrote: > > Hi! > > > > The syntax construct "for i from 0 <= i < 10" has been silently outdated > > for years. Can we start issuing a warning that normal range() loops are > > preferred? > > I'd be in favour of replacing it with just 'for 0 <= i < 10', > but -1 on removing it altogether. > > I introduced it in Pyrex for a reason -- to clearly express > iterations over ranges of integers with arbitrary combinations > of open/closed endpoints, for use in conjunction with C code. > I believe that reason is still valid. > > -- > Greg IMHO, either it should be un-deprecated in the documentation[1], or the compiler should start issuing warnings and eventually errors. You can't have it both ways. Either it's deprecated or it isn't. [1]: http://docs.cython.org/src/reference/language_basics.html#for-loops -- Kevin ___ cython-devel mailing list cython-devel@python.org https://mail.python.org/mailman/listinfo/cython-devel