D2282: util: extract all date-related utils in utils/dateutil module

durin42 (Augie Fackler) phabricator at mercurial-scm.org
Fri Feb 16 14:12:39 EST 2018


durin42 added a comment.


  In https://phab.mercurial-scm.org/D2282#37774, @martinvonz wrote:
  
  > In https://phab.mercurial-scm.org/D2282#37758, @lothiraldan wrote:
  >
  > > In https://phab.mercurial-scm.org/D2282#37757, @dlax wrote:
  > >
  > > > lothiraldan (Boris Feld) wrote:
  > > >
  > > > > I have but I'm always very cautious when creating a new package with the
  > > > >  name of an old module. .pyc/.pycache files may still be there both for
  > > > >  Mercurial developers and for Mercurial users using their deb/rpm package.
  > > > > 
  > > > > I may be wrong, but if we could avoid weird bugs, I would prefer put in
  > > > >  the utils package.
  > > >
  > > > Well, this is Python... Most people are aware of this kind of issues, I
  > > >  think. So the argument sounds a bit like FUD :)
  > > >
  > > > On the other hand, if we keep going that route, we'll have to live with
  > > >  util/utils "forever" just to have avoided this hypothetical
  > > >  inconvenience, is this more acceptable?
  > >
  > >
  > > I would love to be wrong on this, just remember that Mercurial users are not necessarily Python developers.
  > >
  > > @martinvonz @durin42 what d you think about copying `util.py` as `util/__init__.py`?
  >
  >
  > I don't know much about Python. Is it defined whether util.pyc or util/__init__.py will take precedence, and, if so, which is it?
  
  
  I asked Alex Gaynor about this and it's not an immediate answer ("You get a basket of trouble. What python version?")
  
  Could we make the package version be utils (note trailing ess) and migrate things to the package as we have time, making util be the legacy forwarding name and nothing more?

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D2282

To: lothiraldan, #hg-reviewers
Cc: durin42, dlax, martinvonz, mercurial-devel


More information about the Mercurial-devel mailing list