Skip to content

Conversation

@Uncl3D3n
Copy link

In python3.13 datetime... can't be dumped to json in output_writer.write_metadata in line 182 (json.dump(metadata, f, indent=2))

If we had object like this:

 [{
   "prefix": "74.119.64.0/21",
  "entries": [("apnic", "MO", datetime.date(2009, 10, 28)), ("arin", "US", datetime.date(2009, 10, 28))],
  "chosen": ("arin", "US", datetime.date(2009, 10, 28))}]

datetime object causes unexpected behavior when converting with json.dump.

Need to be converted to str object.

In python3.13 datetime... can't be dumped to json in output_writer.write_metadata in line 182 (json.dump(metadata, f, indent=2))

If we had object like this:
```python
 [{
   "prefix": "74.119.64.0/21",
  "entries": [("apnic", "MO", datetime.date(2009, 10, 28)), ("arin", "US", datetime.date(2009, 10, 28))],
  "chosen": ("arin", "US", datetime.date(2009, 10, 28))}]
```

datetime object causes unexpected behavior when converting with `json.dump`.

Need to be converted to `str` object.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant