[issue31361] Update feedparser.py to prevent theano compiling fail in python3
New submission from Wei-Shun Lo: To get theano compiled successfully -- messages: 301440 nosy: Wei-Shun Lo priority: normal pull_requests: 3390 severity: normal status: open title: Update feedparser.py to prevent theano compiling fail in python3 type: enhancement versions: Python 3.6 ___ Python tracker <http://bugs.python.org/issue31361> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue31361] Update feedparser.py to prevent theano compiling fail in python3
Wei-Shun Lo added the comment: Issue resolved in pull request : https://github.com/python/cpython/pull/3336 -- ___ Python tracker <http://bugs.python.org/issue31361> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue31361] Update feedparser.py to prevent theano compiling fail in python3
Changes by Wei-Shun Lo : -- resolution: -> fixed ___ Python tracker <http://bugs.python.org/issue31361> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue31361] Update feedparser.py to prevent theano compiling fail in python3
Wei-Shun Lo added the comment: Hi David, A led, I may try to reproduce this error, but it may take a while. Thanks On Wed, Sep 6, 2017 at 11:31 AM R. David Murray wrote: > > R. David Murray added the comment: > > You did not follow the request I made on the PR to explain in this issue > you opened what is failing and why. Unless you convince us that this is > actually a bug in python, we will close the issue and PR. > > -- > > ___ > Python tracker > <http://bugs.python.org/issue31361> > ___ > -- ************************ ************ * Contact Info* *US Mobile: 1-408-609-7628 * Em ail: rali...@gmail.com Skype : ralic_lo ************************ ************ -- ___ Python tracker <http://bugs.python.org/issue31361> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue31361] Update feedparser.py to prevent theano compiling fail in python3
Wei-Shun Lo added the comment: Bug encountered while installing multiple packages : 1. keras 2. theano Error Information : ~/work/bottles @ dojos-MacBook-Pro (dojo) |=> pip3 install keras Requirement already satisfied: keras in /usr/local/lib/python3.6/site-packages Requirement already satisfied: scipy>=0.14 in /usr/local/lib/python3.6/site-packages (from keras) Exception: Traceback (most recent call last): File "/usr/local/lib/python3.6/site-packages/pip/basecommand.py", line 215, in main status = self.run(options, args) File "/usr/local/lib/python3.6/site-packages/pip/commands/install.py", line 335, in run wb.build(autobuilding=True) File "/usr/local/lib/python3.6/site-packages/pip/wheel.py", line 749, in build self.requirement_set.prepare_files(self.finder) File "/usr/local/lib/python3.6/site-packages/pip/req/req_set.py", line 380, in prepare_files ignore_dependencies=self.ignore_dependencies)) File "/usr/local/lib/python3.6/site-packages/pip/req/req_set.py", line 666, in _prepare_file check_dist_requires_python(dist) File "/usr/local/lib/python3.6/site-packages/pip/utils/packaging.py", line 48, in check_dist_requires_python feed_parser.feed(metadata) File "/usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/email/feedparser.py", line 175, in feed self._input.push(data) File "/usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/email/feedparser.py", line 103, in push self._partial.write(data) TypeError: string argument expected, got 'NoneType' ~/work/bottles @ dojos-MacBook-Pro (dojo) |=> pip3 install theano Collecting theano Downloading Theano-0.9.0.tar.gz (3.1MB) 100% || 3.1MB 353kB/s Requirement already satisfied: numpy>=1.9.1 in /usr/local/lib/python3.6/site-packages (from theano) Requirement already satisfied: scipy>=0.14 in /usr/local/lib/python3.6/site-packages (from theano) Exception: Traceback (most recent call last): File "/usr/local/lib/python3.6/site-packages/pip/basecommand.py", line 215, in main status = self.run(options, args) File "/usr/local/lib/python3.6/site-packages/pip/commands/install.py", line 335, in run wb.build(autobuilding=True) File "/usr/local/lib/python3.6/site-packages/pip/wheel.py", line 749, in build self.requirement_set.prepare_files(self.finder) File "/usr/local/lib/python3.6/site-packages/pip/req/req_set.py", line 380, in prepare_files ignore_dependencies=self.ignore_dependencies)) File "/usr/local/lib/python3.6/site-packages/pip/req/req_set.py", line 666, in _prepare_file check_dist_requires_python(dist) File "/usr/local/lib/python3.6/site-packages/pip/utils/packaging.py", line 48, in check_dist_requires_python feed_parser.feed(metadata) File "/usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/email/feedparser.py", line 175, in feed self._input.push(data) File "/usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/email/feedparser.py", line 103, in push self._partial.write(data) TypeError: string argument expected, got 'NoneType' -- ___ Python tracker <https://bugs.python.org/issue31361> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue31361] Update feedparser.py to prevent theano compiling fail in python3
Wei-Shun Lo added the comment: After patching, I've tested installed packages listed in the pip3.update. The default c compiler used is clang. Few of them are failed, listed as following, after change the c compiler to be gcc-7. (Twisted av cymem cytoolz dulwich gnureadline pycrypto pydsm pycurl regex reportlab setproctitle). PyAudio and mercurial needs additional support to get them installed. I hope this demonstrate the reliance of this change. Running setup.py install for PyAudio ... error Running setup.py install for Twisted ... error Running setup.py install for av ... error Running setup.py install for cymem ... error Running setup.py install for cytoolz ... error Running setup.py install for dulwich ... error Running setup.py install for gnureadline ... error Running setup.py install for mercurial ... error Running setup.py install for pycrypto ... error Running setup.py install for pycurl ... error Running setup.py install for pydsm ... error Running setup.py install for regex ... error Running setup.py install for reportlab ... error Running setup.py install for setproctitle ... error -- Added file: https://bugs.python.org/file47128/pip3.update ___ Python tracker <https://bugs.python.org/issue31361> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue31361] Update feedparser.py to prevent theano compiling fail in python3
Wei-Shun Lo added the comment: Correct some type : Few of them are failed, listed as following, after change the c compiler to be gcc-7, they can be fixed. (Twisted av cymem cytoolz dulwich gnureadline pycrypto pydsm pycurl regex reportlab setproctitle). ************************ ************ * Contact Info* *US Mobile: 1-408-609-7628 * Em ail: rali...@gmail.com Skype : ralic_lo ************************ ************ On Fri, Sep 8, 2017 at 2:42 PM, Wei-Shun Lo wrote: > > Wei-Shun Lo added the comment: > > After patching, I've tested installed packages listed in the pip3.update. > The default c compiler used is clang. Few of them are failed, listed as > following, after change the c compiler to be gcc-7. (Twisted av cymem > cytoolz dulwich gnureadline pycrypto pydsm pycurl regex reportlab > setproctitle). PyAudio and mercurial needs additional support to get them > installed. > I hope this demonstrate the reliance of this change. > > Running setup.py install for PyAudio ... error > Running setup.py install for Twisted ... error > Running setup.py install for av ... error > Running setup.py install for cymem ... error > Running setup.py install for cytoolz ... error > Running setup.py install for dulwich ... error > Running setup.py install for gnureadline ... error > Running setup.py install for mercurial ... error > Running setup.py install for pycrypto ... error > Running setup.py install for pycurl ... error > Running setup.py install for pydsm ... error > Running setup.py install for regex ... error > Running setup.py install for reportlab ... error > Running setup.py install for setproctitle ... error > > -- > Added file: https://bugs.python.org/file47128/pip3.update > > ___ > Python tracker > <https://bugs.python.org/issue31361> > ___ > -- ___ Python tracker <https://bugs.python.org/issue31361> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue31361] Update feedparser.py to prevent theano compiling fail in python3
Wei-Shun Lo added the comment: Hi David, >From the error message, the source of the None object was from pip, and it is grabbing data from the metadata of the package. File "/usr/local/lib/python3.6/site-packages/pip/utils/packaging.py", line 48, in check_dist_requires_python -- By adding 'print(metadata)' on line 46, I have the metadata of theano as attached. So another fix maybe adding str() in the packaging.py in pip, I tested it too and worked fine. It appears to me as of now, getting pip to send the metadata in string seems to be better. As for the NoneType object error, somehow it no longer pops up, it might be related to the original metadata, which may have not define 'METADATA' and 'PKG-INFO'. You may close this pull request and issue, I believe that's not necessary for now. Thanks ! [image: Inline image 2] *Theano's metatdata* Metadata-Version: 1.1 Name: Theano Version: 0.9.0 Summary: Optimizing compiler for evaluating mathematical expressions on CPUs and GPUs. Home-page: http://deeplearning.net/software/theano/ Author: LISA laboratory, University of Montreal Author-email: theano-...@googlegroups.com License: BSD Description-Content-Type: UNKNOWN Description: Theano is a Python library that allows you to define, optimize, and efficiently evaluate mathematical expressions involving multi-dimensional arrays. It is built on top of NumPy_. Theano features: * **tight integration with NumPy:** a similar interface to NumPy's. numpy.ndarrays are also used internally in Theano-compiled functions. * **transparent use of a GPU:** perform data-intensive computations up to 140x faster than on a CPU (support for float32 only). * **efficient symbolic differentiation:** Theano can compute derivatives for functions of one or many inputs. * **speed and stability optimizations:** avoid nasty bugs when computing expressions such as log(1 + exp(x)) for large values of x. * **dynamic C code generation:** evaluate expressions faster. * **extensive unit-testing and self-verification:** includes tools for detecting and diagnosing bugs and/or potential problems. Theano has been powering large-scale computationally intensive scientific research since 2007, but it is also approachable enough to be used in the classroom (IFT6266 at the University of Montreal). .. _NumPy: http://numpy.scipy.org/ = Release Notes = Theano 0.9.0 (20th of March, 2017) == This is a final release of Theano, version ``0.9.0``, with a lot of new features, interface changes, improvements and bug fixes. We recommend that everybody update to this version. Highlights (since 0.8.0): - Better Python 3.5 support - Better numpy 1.12 support - Conda packages for Mac, Linux and Windows - Support newer Mac and Windows versions - More Windows integration: - Theano scripts (``theano-cache`` and ``theano-nose``) now works on Windows - Better support for Windows end-lines into C codes - Support for space in paths on Windows - Scan improvements: - More scan optimizations, with faster compilation and gradient computation - Support for checkpoint in scan (trade off between speed and memory usage, useful for long sequences) - Fixed broadcast checking in scan - Graphs improvements: - More numerical stability by default for some graphs - Better handling of corner cases for theano functions and graph optimizations - More graph optimizations with faster compilation and execution - smaller and more readable graph - New GPU back-end: - Removed warp-synchronous programming to get good results with newer CUDA drivers - More pooling support on GPU when cuDNN isn't available - Full support of ignore_border option for pooling - Inplace storage for shared variables - float16 storage - Using PCI bus ID of graphic cards for a better mapping between theano device number and nvidia-smi number - Fixed offset error in ``GpuIncSubtensor`` - Less C code compilation - Added support for bool dtype - Updated and more complete documentation - Bug fixes related to merge optimizer and shape inference - Lot of other bug fixes, crashes fixes and warning improvements A total of 123 people contributed to this release since 0.8.0, see list below. Interface changes: - Merged ``CumsumOp/CumprodOp`` into ``CumOp`` - In MRG module: - Replaced method ``multinomial_wo_replacement()`` with new method ``c