Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Feb 20 23:44
    gaborbernat closed #1646
  • Feb 20 23:44
    gaborbernat commented #1646
  • Feb 20 23:11
    Brettfodor opened #1646
  • Feb 20 22:47
    cjolowicz commented #1643
  • Feb 20 21:13
    gaborbernat commented #1643
  • Feb 20 21:04
    cjolowicz commented #1643
  • Feb 20 21:02
    cjolowicz commented #1643
  • Feb 20 21:01
    gaborbernat commented #1643
  • Feb 20 20:46
    cjolowicz commented #1643
  • Feb 20 20:18
    gaborbernat commented #1643
  • Feb 20 20:12
    cjolowicz commented #1643
  • Feb 20 18:29
    gaborbernat synchronize #1641
  • Feb 20 18:20
    gaborbernat commented #1555
  • Feb 20 16:31
    matthew-brett commented #1555
  • Feb 20 16:27
    nsoranzo commented #1555
  • Feb 20 16:22
    gaborbernat commented #1555
  • Feb 20 16:03
    nsoranzo commented #1555
  • Feb 20 14:52
    gaborbernat commented #1555
  • Feb 20 14:28
    matthew-brett commented #1555
  • Feb 20 14:21
    gaborbernat commented #1555
Bernát Gábor
@gaborbernat
sorry?
Sorin Sbarnea
@ssbarnea
no complaint to you... the s/-/_/g work made me see double...
Bernát Gábor
@gaborbernat
Not sure can have a look tomorrow, but I'm off today now
Sorin Sbarnea
@ssbarnea
morning!
i have no idea what is confusing the py27_lower to fail and is weird because it does reproduce on CI, always on the same env. I suspect there is somewhere in the pipeline definition a condition that confuses it.
and it happens only on MacOS one. locally works as expected (tested on two machines)
Bernát Gábor
@gaborbernat
feels like we pick up the macos python which breaks the world
Bernát Gábor
@gaborbernat
@ssbarnea so seems there was a typo in the azure template tox-dev/azure-pipelines-template@32bed78 (p27 instead of py27) meaning no python was provisioned for py27 runs... but as the image still contains python2.7 on them we discovered the host ones so did not raise error; on macos this one is non functional per pypa/virtualenv#1561
Sorin Sbarnea
@ssbarnea
o/
what should we now do about the constraints? apparently only the zipapp tests start to fail when I add them.
Bernát Gábor
@gaborbernat
I think it's because we should not use constraints during zipapp build; only for provisioing the test env
Sorin Sbarnea
@ssbarnea
o/
is that true that newer virtualenv uses venv when available?
Bernát Gábor
@gaborbernat
no, and yes
Sorin Sbarnea
@ssbarnea
the schrodinger conditional?
Bernát Gábor
@gaborbernat
it always builds venv style envs on python 3 :-) so feels to use venv always; it defaults to built-in logic to do so, if it can do it, however if not fallbacks to venv
to invoking venv
Sorin Sbarnea
@ssbarnea
so it will use venv as fallback
Bernát Gábor
@gaborbernat
e.g. in case of MS store Python we by default use venv, as we detect that due to how they package the application we cannot use our builtin method for now
not really as fallback, but as default fallback is a good way of putting it
Sorin Sbarnea
@ssbarnea
lucky me, MS* is the only platform I do not care about.
it doesn't have to be MS, any platform that does packaging that does not satisfy our invariants to use the builtin will use venv method
Sorin Sbarnea
@ssbarnea
a couple of weeks ago I raised https://review.opendev.org/#/c/707078/3/roles/bindep/tasks/install.yaml as an attempt to avoid virtualenv on python3 due to recent issues and I want to understand it the change still makes sense or not really.
Bernát Gábor
@gaborbernat
e.g. if the host python is not copy/symlink-able
should no longer be worthwhile in most cases
e.g. in this one :-)
Sorin Sbarnea
@ssbarnea
the packaging guidelines do ecourage use of venv instead of virtualenv, but I am not sure which approach is better for those that have code that needs to run with py27.
Bernát Gábor
@gaborbernat
venv and virtualenv 20 will create identical envs :-) with differing activation scripts and default bootstrap packages (virtualenv env will have the newer better, venv will have with whatever it shipped
those guidelines were written pre rewrite :-) in a time where virtualenv was planned for deprecation due to lack of maintainers
Sorin Sbarnea
@ssbarnea
i know they are very old, this is why i am asking here.
Bernát Gábor
@gaborbernat
I believe one should use virtualenv whenever possible; but if you don't know how to install it, don't have network access to install it, or you don't care about getting newer pip, better activation script, faster execution then using venv is also fine
Sorin Sbarnea
@ssbarnea
still, i need to do something to avoid letting ansible module do the creation of virtualenv, because that module is not really so reliable.
probably i would use venv on a project that does not need py27, which counts as "very few" for me.
due to the interpreter name change with py3 calling virtualenv become a real challenge. on some distros there is a "virtualenv-3" cli, but not on all.
if user insalled it using --user, you do not even have it in PATH.
a full range of posibilities.... to fail.
Bernát Gábor
@gaborbernat
choose your best poison, each to their own
Sorin Sbarnea
@ssbarnea
probably I will avoid calling CLI and attempt to call it as module, preferring python3 when found.
sumitsaluja
@sumitsaluja
Hi I am trying to building virtualenv20.0.4 from source code I am getting some errors:
no modules found 'appdirs filelock importlib_metadata'
I installed these modules then I am getting error AttributeError: module 'virtualenv' has no attribute 'version'
Bernát Gábor
@gaborbernat
@sumitsaluja how you try to build it?
you should be building with something that's PEP-517518 compatible
sumitsaluja
@sumitsaluja
@gaborbernat , basically I am creating rpm, We created rpm prior to v20, everything was fine but now when I tried to make rpm for v20 I am getting error.
Bernát Gábor
@gaborbernat
how you're creating the rpm?
note now we have a few dependencies

and we need a proper build environment that satisfies our build dependencies, see https://github.com/pypa/virtualenv/blob/master/pyproject.toml#L3-L5

alternatively, you might want to package the zipapp; though this might need python -m virtualenv will not work, and you will need to generate an executable for virtualenv
https://virtualenv.pypa.io/en/latest/installation.html#via-zipapp

sumitsaluja
@sumitsaluja
@gaborbernat I am doing simple process, just downloaded tar.gz file, untar it and then run python setup.py and it give that error.
bit if I do pip install virtualenv*.tar.gz then it worked