Git Product home page Git Product logo

see's People

Contributors

andreif avatar hugovk avatar jdunck avatar ljcooke avatar rodfersou avatar sevas avatar sjl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

see's Issues

Error in JupyterLite

Description

An error occurs in using see in JupyterLite

Steps to reproduce

  1. Prepare JupyterLite with see included in requirements.txt
  2. from see import see
  3. see(<an object>) generates an error

Expected behaviour: [...]

No error

Actual behaviour: [...]

The following error message is displayed

Version info

  • See: 1.4.1
  • Python: 3.10
  • OS: Mac
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
File /lib/python3.10/site-packages/IPython/core/formatters.py:707, in PlainTextFormatter.__call__(self, obj)
    700 stream = StringIO()
    701 printer = pretty.RepresentationPrinter(stream, self.verbose,
    702     self.max_width, self.newline,
    703     max_seq_length=self.max_seq_length,
    704     singleton_pprinters=self.singleton_printers,
    705     type_pprinters=self.type_printers,
    706     deferred_pprinters=self.deferred_printers)
--> 707 printer.pretty(obj)
    708 printer.flush()
    709 return stream.getvalue()

File /lib/python3.10/site-packages/IPython/lib/pretty.py:410, in RepresentationPrinter.pretty(self, obj)
    407                         return meth(obj, self, cycle)
    408                 if cls is not object \
    409                         and callable(cls.__dict__.get('__repr__')):
--> 410                     return _repr_pprint(obj, self, cycle)
    412     return _default_pprint(obj, self, cycle)
    413 finally:

File /lib/python3.10/site-packages/IPython/lib/pretty.py:778, in _repr_pprint(obj, p, cycle)
    776 """A pprint that just redirects to the normal repr function."""
    777 # Find newlines and replace them with p.break_()
--> 778 output = repr(obj)
    779 lines = output.splitlines()
    780 with p.group():

File /lib/python3.10/site-packages/see/output.py:46, in SeeResult.__repr__(self)
     43 else:
     44     indent = ' ' * MAX_INDENT
---> 46 return textwrap.fill(''.join(padded), term.line_width(),
     47                      initial_indent=indent,
     48                      subsequent_indent=indent)

File /lib/python3.10/site-packages/see/term.py:57, in line_width(default_width, max_width)
     52 def line_width(default_width=DEFAULT_LINE_WIDTH, max_width=MAX_LINE_WIDTH):
     53     """
     54     Return the ideal column width for the output from :func:`see.see`, taking
     55     the terminal width into account to avoid wrapping.
     56     """
---> 57     width = term_width()
     58     if width:  # pragma: no cover (no terminal info in Travis CI)
     59         return min(width, max_width)

File /lib/python3.10/site-packages/see/term.py:34, in term_width()
     32 if fcntl and termios:
     33     try:
---> 34         winsize = fcntl.ioctl(0, termios.TIOCGWINSZ, '    ')
     35         _, width = struct.unpack('hh', winsize)
     36         return width

AttributeError: module 'fcntl' has no attribute 'ioctl'

Deprecation Warning

Description

The following deprecation warning messages are shown after using see().

/Users/tetsu/opt/anaconda3/envs/tflow/lib/python3.10/site-packages/see/inspector.py:117: FutureWarning: Index.is_all_dates is deprecated, will be removed in a future version. check index.inferred_type instead.
  prop = getattr(obj, attr)
/Users/tetsu/opt/anaconda3/envs/tflow/lib/python3.10/site-packages/see/inspector.py:117: FutureWarning: is_monotonic is deprecated and will be removed in a future version. Use is_monotonic_increasing instead.
  prop = getattr(obj, attr)
/Users/tetsu/opt/anaconda3/envs/tflow/lib/python3.10/site-packages/see/inspector.py:117: FutureWarning: weekofyear and week have been deprecated, please use DatetimeIndex.isocalendar().week instead, which returns a Series. To exactly reproduce the behavior of week and weekofyear and return an Index, you may call pd.Int64Index(idx.isocalendar().week)
  prop = getattr(obj, attr)
/Users/tetsu/opt/anaconda3/envs/tflow/lib/python3.10/site-packages/see/inspector.py:117: FutureWarning: weekofyear and week have been deprecated, please use DatetimeIndex.isocalendar().week instead, which returns a Series. To exactly reproduce the behavior of week and weekofyear and return an Index, you may call pd.Int64Index(idx.isocalendar().week)
  prop = getattr(obj, attr)

Steps to reproduce

  1. run from see import see
  2. run see()

Version info

  • See: 1.4.1
  • Python: 3.10.9
  • OS: macOS 13.2

OS X: TypeError: 'module' object is not callable

Following the readme:

$ pip install --upgrade see
Collecting see
Installing collected packages: see
Successfully installed see-1.2.0

$ python
Python 2.7.10 (default, Sep 23 2015, 04:34:21) 
[GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.0.72)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from see import see
>>> foo = 'bar'
>>> see()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: 'module' object is not callable

License change

Consider putting see under Python's license, or something equally liberal like Apache or BSD. If see is used in any Python program it currently requires the entire program to become GPL. That's obviously not acceptable for most software, including software that is open source under a more liberal license.

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.