samuelcolvin / rtoml

A fast TOML library for python implemented in rust.
https://pypi.org/project/rtoml/
MIT License
323 stars 28 forks source link

rtoml Python 3.12 linux-64 conda-forge distribution is broken. #77

Closed mtessmer closed 5 months ago

mtessmer commented 6 months ago

Currently the conda-forge Python 3.12 Linux-64 distribution is broken. The package installs but none of the package functions work, e.g. running the example code:

import rtoml

tomlstr = """\
title = "TOML Example"

[owner]
dob = 1979-05-27T07:32:00-08:00
name = "Tom Preston-Werner"

[database]
connection_max = 5000
enabled = true
server = "192.168.1.1"
ports = [8001, 8001, 8002]
"""

rtoml.load(tomlstr)

throws an error:

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
Cell In[4], line 1
----> 1 rtoml.load(tomlstr)

AttributeError: module 'rtoml' has no attribute 'load'

inspecting the imported module shows that none of the load/dump functions are available:

In [6]: dir(rtoml)
Out[6]:
['__doc__',
 '__file__',
 '__loader__',
 '__name__',
 '__package__',
 '__path__',
 '__spec__']

The dir output should look like this:

In [1]: import rtoml

In [2]: dir(rtoml)
Out[2]:
['Any',
 'Dict',
 'Path',
 'TextIO',
 'TextIOBase',
 'TomlParsingError',
 'TomlSerializationError',
 'Union',
 'VERSION',
 '__all__',
 '__builtins__',
 '__cached__',
 '__doc__',
 '__file__',
 '__loader__',
 '__name__',
 '__package__',
 '__path__',
 '__spec__',
 '__version__',
 '_rtoml',
 'dump',
 'dumps',
 'load',
 'loads']

Between this issue and #74 users and dependent packages are very limited on Python 3.12

samuelcolvin commented 5 months ago

fixed I think by conda-forge/rtoml-feedstock#4