Custom Query (121 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (10 - 12 of 121)

1 2 3 4 5 6 7 8 9 10 11 12 13 14
Ticket Resolution Summary Owner Reporter
#13 fixed Windows install broken xi anonymous

Reported by anonymous, 8 years ago.

Description

None of the source files install except the EGG-INFO directory.

C:\>easy_install -Z PyYAML
Searching for PyYAML
Reading http://www.python.org/pypi/PyYAML/
Reading http://pyyaml.org/wiki/PyYAML
Best match: PyYAML 3.01
Downloading http://pyyaml.org/download/pyyaml/PyYAML-3.01.win32.exe
Processing PyYAML-3.01.win32.exe
WARNING: can't process home/xi/lib/python2.4/site-packages/yaml/resolver.py
WARNING: can't process home/xi/lib/python2.4/site-packages/yaml/parser.py
WARNING: can't process home/xi/lib/python2.4/site-packages/yaml/scanner.py
WARNING: can't process home/xi/lib/python2.4/site-packages/yaml/error.py
WARNING: can't process home/xi/lib/python2.4/site-packages/yaml/composer.py
WARNING: can't process home/xi/lib/python2.4/site-packages/yaml/loader.py
WARNING: can't process home/xi/lib/python2.4/site-packages/yaml/events.py
WARNING: can't process home/xi/lib/python2.4/site-packages/yaml/dumper.py
WARNING: can't process home/xi/lib/python2.4/site-packages/yaml/tokens.py
WARNING: can't process home/xi/lib/python2.4/site-packages/yaml/serializer.py
WARNING: can't process home/xi/lib/python2.4/site-packages/yaml/constructor.py
WARNING: can't process home/xi/lib/python2.4/site-packages/yaml/representer.py
WARNING: can't process home/xi/lib/python2.4/site-packages/yaml/__init__.py
WARNING: can't process home/xi/lib/python2.4/site-packages/yaml/nodes.py
WARNING: can't process home/xi/lib/python2.4/site-packages/yaml/reader.py
WARNING: can't process home/xi/lib/python2.4/site-packages/yaml/emitter.py
creating 'c:\docume~1\user\locals~1\temp\easy_install-wfs0iv\PyYAML-3.01-py2.4-w
in32.egg' and adding 'c:\docume~1\user\locals~1\temp\easy_install-wfs0iv\PyYAML-
3.01-py2.4-win32.egg.tmp' to it
creating c:\python24\lib\site-packages\PyYAML-3.01-py2.4-win32.egg
Extracting PyYAML-3.01-py2.4-win32.egg to c:\python24\lib\site-packages
Adding PyYAML 3.01 to easy-install.pth file

Installed c:\python24\lib\site-packages\pyyaml-3.01-py2.4-win32.egg
Processing dependencies for PyYAML

C:\>
#14 fixed Inf and NaN handling needs re-vamp xi Scott David Daniels <Scott.Daniels@…>

Reported by Scott David Daniels <Scott.Daniels@…>, 8 years ago.

Description

Trying to import YAML fails in Python 2.5. Even simple patches fail, because the root cause is that NaNs and INFs cannot be marshalled/unmarshalled. Marshalling is used to save and restore compiled python modules, so a tested module can work initially, but later fail to load (when not from source).

When handling INFs and NaNs, you need to be careful. 1e300000 is not a safe way to represent infinity, and fails to pickle/unpickle safely from manifest constants. Different C runtimes represent the text for INFs and NaNs differently. Since Python 2.5 folds constants, a simple expression won't solve the problem.

The following changes should allow yaml to work on python 2.5a2 on Win2000 (and I think for 64-bit machines as well):

=============== constructor.py: ===============

*** 231,239 ****
          else:
              return sign*int(value)

-     inf_value = 1e300000
-     nan_value = inf_value/inf_value
-
      def construct_yaml_float(self, node):
          value = str(self.construct_scalar(node))
          value = value.replace('_', '')
--- 231,236 ----
***************
***************
*** 242,251 ****
              sign = -1
          if value[0] in '+-':
              value = value[1:]
!         if value.lower() == '.inf':
!             return sign*self.inf_value
!         elif value.lower() == '.nan':
!             return self.nan_value
          elif ':' in value:
              digits = [float(part) for part in value.split(':')]
              digits.reverse()
--- 239,253 ----
              sign = -1
          if value[0] in '+-':
              value = value[1:]
!         if value.lower() in ('.inf', '.nan'):
!             big = 1e300
!             bigger = big * big
!             while bigger > big and bigger == bigger:
!                 big = bigger
!                 bigger = big * big
!             if value.lower() == '.nan':
!                 return bigger / bigger
!             return sign * bigger
          elif ':' in value:
              digits = [float(part) for part in value.split(':')]
              digits.reverse()

=============== representer.py: ===============

*** 192,200 ****
      def represent_long(self, data):
          return self.represent_scalar(u'tag:yaml.org,2002:int', unicode(data))

!     repr_pos_inf = repr(1e300000)
!     repr_neg_inf = repr(-1e300000)
!     repr_nan = repr(1e300000/1e300000)

      def represent_float(self, data):
          repr_data = repr(data)
--- 192,206 ----
      def represent_long(self, data):
          return self.represent_scalar(u'tag:yaml.org,2002:int', unicode(data))

!     big = 1e300
!     bigger = big * big
!     while bigger > big and bigger == bigger:
!         big = bigger
!         bigger = big * big
!     repr_pos_inf = repr(bigger)
!     repr_neg_inf = repr(-bigger)
!     repr_nan = repr(bigger / bigger)
!     del big, bigger

      def represent_float(self, data):
          repr_data = repr(data)
#15 fixed pyyaml discards '-' sign on negative floats xi alex_(a)_alexmole_(o)_co_(o)_uk

Reported by alex_(a)_alexmole_(o)_co_(o)_uk, 8 years ago.

Description

yaml.load( 'foo: -3.1' ) returns {'foo': 3.10000}

The same technique preserves the sign of integers though, so I presume it must be a bug rather than a yaml feature.

1 2 3 4 5 6 7 8 9 10 11 12 13 14
Note: See TracQuery for help on using queries.