Giter Site home page Giter Site logo

Comments (7)

jayvdb avatar jayvdb commented on July 19, 2024 1

'isprintable' is the hard one ... it will require a backport of py3 unicode to py2. There are a few of them - I used one in about 2015, but I suspect they may not be maintained very well as the usefulness and usage reduced.

from charset_normalizer.

jayvdb avatar jayvdb commented on July 19, 2024

Also seen on https://travis-ci.org/Ousret/charset_normalizer/jobs/577468690

There is a drop-in statistics backport which can be required only on py2. https://pypi.org/project/statistics

After that, the next py2 problem is ImportError: cannot import name lru_cache , which also has a backport, but it is in a different namespace so needs a try block https://pypi.org/project/backports.functools_lru_cache/

from charset_normalizer.

jayvdb avatar jayvdb commented on July 19, 2024

And then

AttributeError: 'str' object has no attribute 'isprintable'

and

File "../charset_normalizer/normalizer.py", line 239, in from_bytes
    str(sequences, encoding=p)
TypeError: str() takes at most 1 argument (2 given)

And test_should_be_accented failing for some reason.

from charset_normalizer.

jayvdb avatar jayvdb commented on July 19, 2024

https://pypi.org/project/unicodedata2/ is the one I was thinking about ; not sure it has isprintable . maybe need future for that?

from charset_normalizer.

Ousret avatar Ousret commented on July 19, 2024

Hi,

I've tried the same and stopped at isprintable method support.
I'm looking/considering bulding my own isprintable method and add it to unicode helper class.

from charset_normalizer.

jayvdb avatar jayvdb commented on July 19, 2024

https://github.com/PythonCharmers/python-future/blob/b7fd8a50117a1eb9126ca8840e2b4c4a5c5f70bf/src/future/types/newstr.py#L414 raise NotImplementedError('fixme') :/

PythonCharmers/python-future#494

from charset_normalizer.

Ousret avatar Ousret commented on July 19, 2024

See #5

from charset_normalizer.

Related Issues (20)

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.