Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

beancount: 2.3.1 -> 2.3.2 #99947

Merged
merged 1 commit into from Oct 9, 2020
Merged

beancount: 2.3.1 -> 2.3.2 #99947

merged 1 commit into from Oct 9, 2020

Conversation

omasanori
Copy link
Contributor

Motivation for this change

This change updates the beancount package to the latest release.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

Signed-off-by: Masanori Ogino <167209+omasanori@users.noreply.github.com>
Copy link
Contributor

@danieldk danieldk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After building with nix-review:

$ bean-doctor
Traceback (most recent call last):
  File "/nix/store/9ggb9is831h79xn1dh7zjkp31i7as8ic-python3.8-beancount-2.3.2/bin/.bean-doctor-wrapped", line 6, in <module>
    from beancount.scripts.doctor import main
  File "/nix/store/ysjc3hyc27jwhhqdkbrlflzfri194vss-python3.7-beancount-2.3.2/lib/python3.7/site-packages/beancount/scripts/doctor.py", line 21, in <module>
    from beancount.parser import version
  File "/nix/store/ysjc3hyc27jwhhqdkbrlflzfri194vss-python3.7-beancount-2.3.2/lib/python3.7/site-packages/beancount/parser/version.py", line 11, in <module>
    from beancount.parser import _parser
ImportError: cannot import name '_parser' from 'beancount.parser' (/nix/store/ysjc3hyc27jwhhqdkbrlflzfri194vss-python3.7-beancount-2.3.2/lib/python3.7/site-packages/beancount/parser/__init__.py)

I get the same error for other commands.

@omasanori
Copy link
Contributor Author

@danieldk Thank you for reviewing. I confirmed the error you mentioned by executing nix-shell -p nixpkgs-review --run "nixpkgs-review pr 99947" and then bean-example in the shell.

The problem is, as shown in the traceback, while beancount itself uses Python 3.8, it tries to load libraries built for Python 3.7. The _parser extension module for Python 3.8 is _parser.cpython-38-x86_64-linux-gnu.so whereas one for 3.7 is _parser.cpython-37m-x86_64-linux-gnu.so. Thus, the interpreter fails to find the extension module correctly.

One can check sys.path at the time using the interpreter launched by PYTHONINSPECT=1 bean-example (or any other command). In my environment, it was:

>>> sys.path
['/nix/store/9ggb9is831h79xn1dh7zjkp31i7as8ic-python3.8-beancount-2.3.2/bin', '/nix/store/8ijmj6f8hiqxv1dr8f4i3ld4lnmcdwg9-nixpkgs-review-2.4.2/lib/python3.8/site-packages', '/nix/store/z65l1jqvxa58zzwwa3bvglb6asj4y8cv-python3-3.8.5/lib/python3.8/site-packages', '/nix/store/ysjc3hyc27jwhhqdkbrlflzfri194vss-python3.7-beancount-2.3.2/lib/python3.7/site-packages', '/nix/store/ain61w2s2g8viisyvnn8xylzm4bip9ih-python3.7-beautifulsoup4-4.9.1/lib/python3.7/site-packages', '/nix/store/gcx1k7m8aav64xb0xv9jgsvwd1w5kr4q-python3.7-soupsieve-2.0.1/lib/python3.7/site-packages', '/nix/store/cpzs1hpwzs23c41haa4dap0zjfx6xych-python3-3.7.9/lib/python3.7/site-packages', '/nix/store/misbsb3gd04k6n83dp1qjik3cbmgi7aw-python3.7-bottle-0.12.18/lib/python3.7/site-packages', '/nix/store/v9ch38p8kdxapbn06sfxjivqbqb61wby-python3.7-setuptools-47.3.1/lib/python3.7/site-packages', '/nix/store/waqhsvvzfkp3wk1r3mjqb0jhx81wakal-python3.7-chardet-3.0.4/lib/python3.7/site-packages', '/nix/store/x8b702hp9265n2vknk7wvgwbjmva841j-python3.7-python-dateutil-2.8.1/lib/python3.7/site-packages', '/nix/store/ym24vcjkc46i5wa5gxqxx8ahs8kv5lrg-python3.7-six-1.15.0/lib/python3.7/site-packages', '/nix/store/hhqn9a671dj5pm69rgidg43j0xfxdlfh-python3.7-setuptools_scm-4.1.2/lib/python3.7/site-packages', '/nix/store/j3md8x6kb9whg4wqh0yr3bw4w48m9pkd-python3.7-google-api-python-client-1.12.3/lib/python3.7/site-packages', '/nix/store/y6mh10xs22vqd5cqryh2z2gja9l9xnny-python3.7-google-auth-1.20.1/lib/python3.7/site-packages', '/nix/store/ss6vpv5j3dghrw4sg7v7r1yb0dpdd83s-python3.7-pyasn1-modules-0.2.8/lib/python3.7/site-packages', '/nix/store/x5yisa3nllz6r6pd8x76rs47777fpg8l-python3.7-pyasn1-0.4.8/lib/python3.7/site-packages', '/nix/store/lqz8p3rdldzxyddihyklkbwfmbckmwxk-python3.7-cachetools-4.1.1/lib/python3.7/site-packages', '/nix/store/yz89hy3cyxhl7nb4rjwms5nsvnv198f0-python3.7-rsa-4.6/lib/python3.7/site-packages', '/nix/store/ryddx4ywnzggzhnsnm2abd431jfj391f-python3.7-google-auth-httplib2-0.0.4/lib/python3.7/site-packages', '/nix/store/vbl63qd84bcaf580rskflwjcdilxb1zk-python3.7-httplib2-0.18.1/lib/python3.7/site-packages', '/nix/store/07qrpwqxj3bq7m7wi7v9z39f3rklw750-python3.7-google-api-core-1.22.1/lib/python3.7/site-packages', '/nix/store/k5042z4x5ikxnc9w6rl5pn4zcglnhc3i-python3.7-googleapis-common-protos-1.52.0/lib/python3.7/site-packages', '/nix/store/989zwsn9z9br20rxpcgvszg4zani0ikm-python3.7-protobuf-3.13.0/lib/python3.7/site-packages', '/nix/store/57hx2d70hbxghv0ncmb67v649jgqb2b1-python3.7-google-apputils-0.4.2/lib/python3.7/site-packages', '/nix/store/r1jall3n519xi1d8c8j57zsxs0phiz7s-python3.7-pytz-2020.1/lib/python3.7/site-packages', '/nix/store/3v6x1b6609q6j1k95gz5dg15kss843vw-python3.7-python-gflags-3.1.2/lib/python3.7/site-packages', '/nix/store/hm31arfn9lhhv5cp0d21i32kqaf46f9c-python3.7-mox-0.5.3/lib/python3.7/site-packages', '/nix/store/hwsxvf6nm2x8n1j8rk5j581dhinymgn9-python3.7-requests-2.24.0/lib/python3.7/site-packages', '/nix/store/vv5ai0szfg8l45m27krbzllcjzzlpk4f-python3.7-urllib3-1.25.10/lib/python3.7/site-packages', '/nix/store/sjdd2vjg2dq529cdhqbbhqqj2l57h5j4-python3.7-packaging-20.4/lib/python3.7/site-packages', '/nix/store/zdn45mjklw1zrwm4s623fkwdqx1pd5gf-python3.7-pyparsing-2.4.6/lib/python3.7/site-packages', '/nix/store/cq6a5fhnixbpmd0nk2g63492crhmi9g9-python3.7-pycparser-2.20/lib/python3.7/site-packages', '/nix/store/y2ki58psphfl1nbabrxa7wkl2i9ds4xx-python3.7-cffi-1.14.2/lib/python3.7/site-packages', '/nix/store/lh4f1qcg4866858apaz5m51gf6zwmafh-python3.7-cryptography-3.1/lib/python3.7/site-packages', '/nix/store/9lwi03micnd748kh44b6infbkz6jfbkr-python3.7-idna-2.10/lib/python3.7/site-packages', '/nix/store/x055i403vjl8jrkmfwlva4mfgg380hxk-python3.7-pyOpenSSL-19.1.0/lib/python3.7/site-packages', '/nix/store/g7q5c0ix5j7mq622j6wyild44df7pd2l-python3.7-certifi-2020.6.20/lib/python3.7/site-packages', '/nix/store/m7hhh222fr6ig7xndh6s57c04xb6q7js-python3.7-pysocks-1.7.1/lib/python3.7/site-packages', '/nix/store/rcqwb66n1cwrwxdi18hqrkpm0gbs1cjn-python3.7-grpcio-1.32.0/lib/python3.7/site-packages', '/nix/store/w6alxwhpy4n6jyap3bi0dki8kxb02m9z-python3.7-uritemplate-3.0.1/lib/python3.7/site-packages', '/nix/store/pkbqld3qg6860fryib9wv82wpa6bf9rg-python3.7-simplejson-3.17.0/lib/python3.7/site-packages', '/nix/store/4b9csps8d42s1dxqjl3z9gjs1la4krvp-python3.7-oauth2client-4.1.3/lib/python3.7/site-packages', '/nix/store/0l7l7m3j2lwh7c60zq8b5ki4j6n230ap-python3.7-lxml-4.5.2/lib/python3.7/site-packages', '/nix/store/7irp394cwccms32ijs63kd0b8xxpqscl-python3.7-ply-3.11/lib/python3.7/site-packages', '/nix/store/s3pqp0szq905ms6dz38gapay22lsq8qs-python3.7-python-magic-0.4.18/lib/python3.7/site-packages', '/nix/store/bb4q1va1wacncvh6apyw9wza81naa3jg-python3.7-pytest-5.4.3/lib/python3.7/site-packages', '/nix/store/gg3n585s57a7ckqf04c3kgdz5v9g8knw-python3.7-atomicwrites-1.4.0/lib/python3.7/site-packages', '/nix/store/h2lmvfn13qjavdc134j3lgyk3113an6b-python3.7-attrs-19.3.0/lib/python3.7/site-packages', '/nix/store/6vxsmg22hd3pn83wjisx71xqhxji4kk4-python3.7-more-itertools-8.4.0/lib/python3.7/site-packages', '/nix/store/ycfw80g2qbnf1h76hr211yxg2l7zav9k-python3.7-pluggy-0.13.1/lib/python3.7/site-packages', '/nix/store/3vkmqfwvq4xaqrpnxbc2436gnapd6m7b-python3.7-importlib-metadata-1.7.0/lib/python3.7/site-packages', '/nix/store/kpwix4y4mzrap9vwy5q706dnd2dbhdis-python3.7-zipp-3.1.0/lib/python3.7/site-packages', '/nix/store/6xic74bi23pc7qwb33s03c0xb19kxdnx-python3.7-py-1.9.0/lib/python3.7/site-packages', '/nix/store/dvb2y8adraxq6ywy1ry8g6nyyrycaxfw-python3.7-toml-0.10.1/lib/python3.7/site-packages', '/nix/store/3c705pdfjbhisaz0dfjn4j7kz1wnrbnq-python3.7-wcwidth-0.2.5/lib/python3.7/site-packages', '/nix/store/5jn8glk99jrkcq8mirc8bpd0fkj7l5x8-python3.7-beancount_docverif-1.0.0/lib/python3.7/site-packages', '/nix/store/z65l1jqvxa58zzwwa3bvglb6asj4y8cv-python3-3.8.5/lib/python38.zip', '/nix/store/z65l1jqvxa58zzwwa3bvglb6asj4y8cv-python3-3.8.5/lib/python3.8', '/nix/store/z65l1jqvxa58zzwwa3bvglb6asj4y8cv-python3-3.8.5/lib/python3.8/lib-dynload', '/nix/store/9ggb9is831h79xn1dh7zjkp31i7as8ic-python3.8-beancount-2.3.2/lib/python3.8/site-packages', '/nix/store/nnsvd8ihc1v36a8g57azwmf1p6cvj2v4-python3.8-beautifulsoup4-4.9.1/lib/python3.8/site-packages', '/nix/store/xh8czqffx4wqm4vjgiyhhisn7p9f6dgl-python3.8-soupsieve-2.0.1/lib/python3.8/site-packages', '/nix/store/3cq67y7r8n9v1nzr6jcm9gjb85gvkyjs-python3.8-bottle-0.12.18/lib/python3.8/site-packages', '/nix/store/vliz92p6b5ykk3xqyd8rr6kiv50flfnd-python3.8-setuptools-47.3.1/lib/python3.8/site-packages', '/nix/store/9wp5lrvad52cvg6ms3pmq0qki3a22gpn-python3.8-chardet-3.0.4/lib/python3.8/site-packages', '/nix/store/gyh47cd751rwj550r6rhbdl7byv47sq6-python3.8-python-dateutil-2.8.1/lib/python3.8/site-packages', '/nix/store/md9ld5w5s4dkqkm0rjbsqrlzlhyjiq4y-python3.8-six-1.15.0/lib/python3.8/site-packages', '/nix/store/xcgjqy81crrz2x6mm8gybj48qmi35b9d-python3.8-setuptools_scm-4.1.2/lib/python3.8/site-packages', '/nix/store/25yinawyw0mwi9lgflryx74l957icb79-python3.8-google-api-python-client-1.12.3/lib/python3.8/site-packages', '/nix/store/c0qiabhj4a180nslrz01pgf5zc93mik5-python3.8-google-auth-1.20.1/lib/python3.8/site-packages', '/nix/store/gialzrfirx47xsdv65710jxvravv9vxf-python3.8-pyasn1-modules-0.2.8/lib/python3.8/site-packages', '/nix/store/rr0xha1krknswdaz1a9mq94kgq0bmj2w-python3.8-pyasn1-0.4.8/lib/python3.8/site-packages', '/nix/store/wyxgxgkipmh3wyw0dfs2icw3q7rwyhmf-python3.8-cachetools-4.1.1/lib/python3.8/site-packages', '/nix/store/0q58xl2carb3gdk7ghvam0piffq4ak80-python3.8-rsa-4.6/lib/python3.8/site-packages', '/nix/store/dy9992pkycxabd4d9klxcfmbc0sy1453-python3.8-google-auth-httplib2-0.0.4/lib/python3.8/site-packages', '/nix/store/k1wkmhkmaqm2chwl0v041hsmsbj530yk-python3.8-httplib2-0.18.1/lib/python3.8/site-packages', '/nix/store/0mgrvcd8xx77rhg6ysfxkg6g4z76jhch-python3.8-google-api-core-1.22.1/lib/python3.8/site-packages', '/nix/store/sv0zy61dd1snd5qin5z6sb8pa880xinw-python3.8-googleapis-common-protos-1.52.0/lib/python3.8/site-packages', '/nix/store/praa2h6vl4c3j8ii64c72rc1697l1xq5-python3.8-protobuf-3.13.0/lib/python3.8/site-packages', '/nix/store/hbybc6k49ibxzyzivj5lm2iprid3j0cv-python3.8-google-apputils-0.4.2/lib/python3.8/site-packages', '/nix/store/cm7pj3pyav34ybqhv3hly8pnd2p48i0h-python3.8-pytz-2020.1/lib/python3.8/site-packages', '/nix/store/9xnx45f34azn16cn45gp36gwgzbv635q-python3.8-python-gflags-3.1.2/lib/python3.8/site-packages', '/nix/store/8hvdvndl5xqpraq5w25nxd1cnvh7iwj7-python3.8-mox-0.5.3/lib/python3.8/site-packages', '/nix/store/gsya2zk5is2lzx580pdg4azp1k39lkdy-python3.8-requests-2.24.0/lib/python3.8/site-packages', '/nix/store/hhmp3gflmmpsfc6jgdlm947p99nyml8s-python3.8-urllib3-1.25.10/lib/python3.8/site-packages', '/nix/store/4pm9il0pmdxa07pvh15dxvqcyld5ph36-python3.8-packaging-20.4/lib/python3.8/site-packages', '/nix/store/8gc7fykwz027sbsnfy9bkbsz5xxxxfji-python3.8-pyparsing-2.4.6/lib/python3.8/site-packages', '/nix/store/5mjjg851r9pxfaqg6xzjx3lqdlpmmidm-python3.8-pycparser-2.20/lib/python3.8/site-packages', '/nix/store/xg0jqm46cm4apms15c405yz5rn6lxdja-python3.8-cffi-1.14.2/lib/python3.8/site-packages', '/nix/store/s5cgynhqcy875m4xrslcz0q54vlvnpfs-python3.8-cryptography-3.1/lib/python3.8/site-packages', '/nix/store/jjr4xgxy62n6kai3xlchz3qdxvgqdhqc-python3.8-idna-2.10/lib/python3.8/site-packages', '/nix/store/vhyvczc7bs7l34951c24ryhxpgjbp573-python3.8-pyOpenSSL-19.1.0/lib/python3.8/site-packages', '/nix/store/kj3kakbfy6bzlg4ai5mkpnxwwgra3agv-python3.8-certifi-2020.6.20/lib/python3.8/site-packages', '/nix/store/swckldvpplyydj72gs480477svqsbpsg-python3.8-pysocks-1.7.1/lib/python3.8/site-packages', '/nix/store/7f85v28hd5bcgcj2gib8l0aymjzjs7zr-python3.8-grpcio-1.32.0/lib/python3.8/site-packages', '/nix/store/3m763rvz312s5c48b6cwawinljbagm9h-python3.8-uritemplate-3.0.1/lib/python3.8/site-packages', '/nix/store/4g9hpliwb39spqy7dc8jqwar5cxkjs6x-python3.8-simplejson-3.17.0/lib/python3.8/site-packages', '/nix/store/gdhv01li8zka9381xyal24sk5hlzdx5a-python3.8-oauth2client-4.1.3/lib/python3.8/site-packages', '/nix/store/xd5babqrg75azc589rga5gxfy52ch1vf-python3.8-lxml-4.5.2/lib/python3.8/site-packages', '/nix/store/mg2m82a7wd1mzjshg469yd4rpwciw80y-python3.8-ply-3.11/lib/python3.8/site-packages', '/nix/store/n3w5w44f0wb6l61z52xdwcznfcykzx6z-python3.8-python-magic-0.4.18/lib/python3.8/site-packages', '/nix/store/snjq2rhfv0q8d7k083mciailplv646wy-python3.8-pytest-5.4.3/lib/python3.8/site-packages', '/nix/store/8yd0h8z3x6dpq47lxj0wqm41acxyn29h-python3.8-atomicwrites-1.4.0/lib/python3.8/site-packages', '/nix/store/2yz46mk42fyj7lv7f28y9aq24n8vhqf9-python3.8-attrs-19.3.0/lib/python3.8/site-packages', '/nix/store/k0hakfhmyj6k5jm7d4b6k9j0vlfm75hy-python3.8-more-itertools-8.4.0/lib/python3.8/site-packages', '/nix/store/r0vfq7xz0v3aff3q6fwh1zqkdahfkknl-python3.8-pluggy-0.13.1/lib/python3.8/site-packages', '/nix/store/zachx9ik7jw6bwnl00mjf940s5pfz8xl-python3.8-importlib-metadata-1.7.0/lib/python3.8/site-packages', '/nix/store/fxdp5ynk0v1l0cxpss4p7ij53b9yh4c3-python3.8-zipp-3.1.0/lib/python3.8/site-packages', '/nix/store/p16lgp1c5rbsdbkzs71klglmii3m10sa-python3.8-py-1.9.0/lib/python3.8/site-packages', '/nix/store/3an149y1zwr2a2m0b2imzd097xyqh03g-python3.8-toml-0.10.1/lib/python3.8/site-packages', '/nix/store/xdsa3hfycgh9pcb7s4q18np7q13ncf0r-python3.8-wcwidth-0.2.5/lib/python3.8/site-packages']

On the other hand, when I had checked a command before sending the PR by nix-build -A beancount; ./result/bin/bean-example, it processed the sample as expected.

Is it an issue in beancount, or one in nixpkg-review?

@danieldk
Copy link
Contributor

danieldk commented Oct 9, 2020

Ah, right, I forgot that this happens in nix-review. It works when PYTHONPATH is empty.

Copy link
Contributor

@danieldk danieldk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Result of nixpkgs-review pr 99947 1

5 packages built:
  • beancount (python38Packages.beancount)
  • fava
  • python37Packages.beancount
  • python37Packages.beancount_docverif
  • python38Packages.beancount_docverif

@danieldk danieldk merged commit a110339 into NixOS:master Oct 9, 2020
@omasanori
Copy link
Contributor Author

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants