Giter Club home page Giter Club logo

pyhunspell's People

Watchers

 avatar

pyhunspell's Issues

Problems when hunspell cannot open dictionary

What steps will reproduce the problem?
1. Trying to do "Basic spell checking" from tutorial with wrong path
2. doing .spell(word)

What is the expected output? What do you see instead?
expected: True or False
happening: segmentation fault

What version of the product are you using? On what operating system?
0.1 on ubuntu natty

Please provide any additional information below.
There is no code to check if hunspell oppened the dictionaries correctly. 
Attached is a patch (-p1) that does it.

Original issue reported on code.google.com by [email protected] on 3 Mar 2011 at 5:58

Attachments:

Please support Python 3

Please support Python 3. A patch that allows building a Python 3 module is 
attached.

Original issue reported on code.google.com by benjamin.drung on 29 Jun 2013 at 6:46

Attachments:

licensing improvements

I prepared a package for Fedora and in the review some possible
improvements were noticed:

1) Please include the license text in tarball. According to the gpl howto,
you should include both the lgpl and the gpl license text in the tarball:
http://www.gnu.org/licenses/gpl-howto.html

They can be downloaded here:
http://www.gnu.org/licenses/lgpl-3.0.txt
http://www.gnu.org/licenses/gpl-3.0.txt

2) The header in hunspell.c says:
| GNU Library General Public License 
the license was renamed to "GNU Lesser General Public License" a while ago

3) The setup.py also supports a license keyword. Btw. you mixed tabstops
and spaces in the setup.py.

4) Not regarding the license:
Is it ok to rename the tarball to pyhunspell to make it obvious, that it is
not the official hunspell tarball?

I will attach a patch that takes care of all this.

Original issue reported on code.google.com by [email protected] on 2 Aug 2009 at 8:32

Attachments:

Fork

I created a fork, currently just to fix #6 issue.

Fork URL:

  https://bitbucket.org/sirex/pyhunspell

Original issue reported on code.google.com by [email protected] on 11 Jul 2013 at 2:41

Request for enhancement: int add_dic(const char *dpath);

Please add a binding to add_dic function in order to be able to add a full 
specialized dict at once, instead of adding word by word.


What version of the product are you using? On what operating system?

0.1

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 7 Feb 2011 at 4:14

alternative implementation

This code segfaulted for me, when I tried it with python-2.7.3

I did a quick and dirty rewrite as a pure python module.
This is being maintained as part of pdfcompare at 
https://github.com/jnweiger/pdfcompare

Please find a copy of version 0.2 attached.

Original issue reported on code.google.com by [email protected] on 2 Feb 2013 at 2:33

Attachments:

Bugs found in pyhunspell-0.1-6.fc17 using gcc-with-cpychecker static analyzer

I originally filed this downstream in Fedora's bug tracker as 
https://bugzilla.redhat.com/show_bug.cgi?id=800116 ; filing here so that 
upstream developers can see it.

Description of problem:
I've been writing an experimental static analysis tool to detect bugs commonly
occurring within C Python extension modules:
  https://fedorahosted.org/gcc-python-plugin/
  http://gcc-python-plugin.readthedocs.org/en/latest/cpychecker.html
  http://fedoraproject.org/wiki/Features/StaticAnalysisOfPythonRefcounts

I ran the latest version of the tool (in git master; post 0.9) on
pyhunspell-0.1-6.fc17.src.rpm, and it reports various errors.

You can see a list of errors here, triaged into categories (from most
significant to least significant):
http://fedorapeople.org/~dmalcolm/gcc-python-plugin/2012-03-05/pyhunspell-0.1-6.
fc17/

I've manually reviewed the issues reported by the tool.

Within the category "Reference leaks" the 4 issues reported appear to be
genuine  memory leaks, each of the form:
   PyList_Append(list, Py_BuildValue())
When Py_BuildValue() succeeds it returns a new reference, but PyList_Append
doesn't steal that reference, it adds a new reference.  Hence this leaks a
reference to the built value, and it becomes "immortal" for the rest of the
lifetime of the process.

Within the category "Segfaults within error-handling paths" the 4 issues
reported are for the same code as the above, considering the case where the
PyList_New() call fails (e.g. due to out of memory), it will return NULL, and
then the PyList_Append(NULL, item) call will segfault.  Note that the
Py_BuildValue() and PyList_Append calls could also fail.

Suggested fix is to add an intermediate value, changing the calls to:

    slist_list = PyList_New(0);
    if (!slist_list) {
        return NULL;
    }

within the loop:
    PyObject *item; 
    item = Py_BuildValue(etc);
    if (!item) {
        Py_DECREF(slist_list);
        return NULL;
    }
    if (-1 == PyList_Append(slist_list, item)) {
        Py_DECREF(slist_list);
        Py_DECREF(item);
        return NULL;
    }
    Py_DECREF(item);

or similar.

There may of course be other bugs in my checker tool.

Hope this is helpful; let me know if you need help reading the logs that the
tool generates - I know that it could use some improvement.

Version-Release number of selected component (if applicable):
pyhunspell-0.1-6.fc17
gcc-python-plugin post-0.9 git 11462291a66c8db693c8884cb84b795bb5988ffb running
the checker in an *f16* chroot



Original issue reported on code.google.com by [email protected] on 21 Mar 2012 at 6:53

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.