chr15m / chr15m/PodSixNet

bytes in dict don't works correctly

Open
#34 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
176
Forks
34
PR merge metrics
No merged PRs in 30d

Description

I am running rencode.py and I am getting those outputs in shell:

>>> d = {b"a":1}
>>> loads(dumps(d))
{'a': 1}
>>> loads(dumps(d)) == d
False

Same for when bytes are value of dictionary too. I am using python3.8.0

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with rencode.py and reproduce the reported Python 3.8 round trip using a dictionary with bytes keys and values. Trace how dumps and loads handle dictionary entries; done means bytes survive serialization and deserialization so the round-tripped dictionary compares equal to the original.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
networking
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.