libsass-python icon indicating copy to clipboard operation
libsass-python copied to clipboard

Suggested api changes

Open asottile opened this issue 10 years ago • 3 comments

I think it would simplify the code to expose the following instead of compile:

def compile_string(s, **kwargs):
    # ...

# and

def compile_file(filename, **kwargs):
    # ...

and drop compile_directory (libsass has hard deprecated it)

asottile avatar Feb 05 '15 17:02 asottile

Seems better, we can change it in 0.8.0 release.

dahlia avatar Mar 06 '15 02:03 dahlia

Libsass never implemented compile_directory and traces in the API will probably be removed completely. There are some internal refactorings pending which will remove this from the internal C++ API too. Was there anything related to this exposed on the C level? I was under the impression we could safely remove it from libsass.

mgreter avatar Dec 15 '15 20:12 mgreter

@mgreter it used to be exposed in the old api, which I removed dependence on here: https://github.com/dahlia/libsass-python/commit/202d65768921379d519c4b133a10040a8dea837f#diff-454523db191eb8e24222f01b7d4e7c1dL144

To keep our api compatibility, we have an implementation in pure python: https://github.com/dahlia/libsass-python/blob/599f47019da132008fecb168d272fd814ac85821/sass.py#L198

asottile avatar Dec 15 '15 21:12 asottile