Skip to content

Fixed versions - #56

Closed
ArturDevico wants to merge 2 commits into
mchardysam:masterfrom
Emurgo:master
Closed

Fixed versions#56
ArturDevico wants to merge 2 commits into
mchardysam:masterfrom
Emurgo:master

Conversation

@ArturDevico

Copy link
Copy Markdown

Updated versions to fix poetry issue

  SolverProblemError

  Because no versions of two1 match >3.10.8,<3.10.9 || >3.10.9
   and two1 (3.10.8) depends on requests (<=2.11.1), two1 (>=3.10.8,<3.10.9 || >3.10.9) requires requests (<=2.11.1).
  And because two1 (3.10.9) depends on requests (<=2.11.1), two1 (>=3.10.8) requires requests (<=2.11.1).
  Because no versions of pywallet match >0.1.0
   and pywallet (0.1.0) depends on two1 (>=3.10.8), pywallet (>=0.1.0) requires two1 (>=3.10.8).
  Thus, pywallet (>=0.1.0) requires requests (<=2.11.1).
  And because python-binance-chain (0.1.20) depends on both pywallet (>=0.1.0) and requests (>=2.21.0), python-binance-chain is forbidden.
  So, because no versions of python-binance-chain match >0.1.20,<0.2.0
   and test depends on python-binance-chain (^0.1.20), version solving failed.

  at ~/.poetry/lib/poetry/puzzle/solver.py:241 in _solve
      237│             packages = result.packages
      238│         except OverrideNeeded as e:
      239│             return self.solve_in_compatibility_mode(e.overrides, use_latest=use_latest)
      240│         except SolveFailure as e:
    → 241│             raise SolverProblemError(e)
      242│ 
      243│         results = dict(
      244│             depth_first_search(
      245│                 PackageNode(self._package, packages), aggregate_package_nodes

mchardysam pushed a commit that referenced this pull request Jul 31, 2026
The old stub was generated with protoc < 3.19 and built its descriptors
via _descriptor.FieldDescriptor(). protobuf 4 and up rejects that, so
importing binance_chain.messages or binance_chain.http died with
"TypeError: Descriptors cannot be created directly". requirements.txt
asked for protobuf>=3.6.1, so a fresh install pulled protobuf 7 and the
package was unusable on install.

Only the generated file was ever committed, no .proto source, so I
recovered the schema from the descriptor embedded in the old stub and
checked it in as dex.proto. The regenerated stub serialises to a
byte-identical FileDescriptorProto, so the wire format and signing are
unchanged. test_messages.py asserts exact signed transaction hex and
still passes.

Generated with protoc 4.25 on purpose. protoc 7 output adds a runtime
version gate that would force everyone onto protobuf 7, while the 4.25
builder output works on 4.x through 7.x.

Also adds ujson to requirements.txt. It was already in setup.py
install_requires but missing here, so installing from requirements.txt
alone gave "No module named 'ujson'". Thanks @ArturDevico for flagging
that in #56.
@mchardysam

Copy link
Copy Markdown
Owner

@ArturDevico thanks for this, the ujson line is on master now in 39e22f5. It was in setup.py install_requires but missing from requirements.txt, so installing from requirements alone gave you a ModuleNotFoundError on import.

I didn't take the requests downgrade though. The reason poetry was dragging in two1 and pinning requests<=2.11.1 is pywallet, and that came out of the dependencies back in #30, so master doesn't have that conflict any more. It's still in the published 0.1.20 on PyPI which is why you hit it, so the real fix there is a release from me rather than loosening the pin. Tracking that in #60.

Closing this one, thanks again.

@mchardysam mchardysam closed this Jul 31, 2026
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.

2 participants